Files, Images and Voice
Let people attach files and screenshots, speak their question, and hear the answer: with limits, previews, permissions and every failure handled on screen.
So far Mitra only reads and writes text. People do not only type: they want to show a screenshot of a broken order page, attach a receipt, say a question out loud while their hands are busy, or hear the answer read back. This phase adds those inputs and outputs to the browser side of an AI feature.
Each of them brings its own limits and its own ways to fail. A file can be too big, empty, the wrong type, or not what its name says. A photo can be twelve megabytes. A microphone can be blocked, missing, or already in use. A voice can be silent until the user taps. You will check each one before it costs money, show its state on screen, and say in plain words what went wrong.
The sandboxed preview has no camera, no microphone and no real file picker, so the examples create files in code, draw test images on a canvas, and show the blocked and unsupported paths live. The working microphone and speaker paths are shown as code and checked against MDN. The stand-in model cannot see images or hear audio: it is scripted, and each example says so.
Practise this phase
Hands-on exercises: write the code, see your page live, and press Check to have it tested automatically.