|
sessions: a pasted image lands in the session directory, and the notice says where
An image pasted into the chat lived only in the transcript. The system prompt of every session names `session_files/<id>/` as the place its files live, so an agent looking for "the attached images" went there, found nothing, and spent turns on fruitless `find` calls before giving up. Now the agent's non-hidden turn writes each pasted image into that directory as `image_N.<ext>` — the extension sniffed from the bytes, the bytes stored as they arrived, so a PNG keeps its alpha channel. Numbering runs across the session, and a picture sent twice reuses the file already holding it. The paths go into the hidden context copy of the message: images past the context budget are not sent to the model at all, so the notice names them for `image_view` instead. The line is written by the agent rather than the websocket handler, which is the layer that knows the names the files actually took — including for a message queued behind a running turn. A save that fails is logged and skipped: it never costs the turn. |
|---|
|
|
| docs/api.md |
|---|
| docs/sessions.md |
|---|
| manuals/filesystem.md |
|---|
| navi/api/websocket.py |
|---|
| navi/core/agent.py |
|---|
| navi/session_files.py |
|---|
| tests/unit/api/test_session_files.py |
|---|
| tests/unit/core/test_agent.py |
|---|