{{ message }}
feat(tui): improve drag-drop image path handling for tool access#17489
Closed
fenlyin0420 wants to merge 2 commits into
Closed
feat(tui): improve drag-drop image path handling for tool access#17489fenlyin0420 wants to merge 2 commits into
fenlyin0420 wants to merge 2 commits into
Conversation
When an image is drag-dropped or pasted as a file path into the TUI, the absolute file path is now preserved and passed through to the message system. This allows tools (like look_at from plugins) to access the file path even when the model doesn't support vision.
Contributor
This was referenced Apr 8, 2026
3 tasks
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Issue for this PR
Closes #17488
Type of change
What does this PR do?
When an image is drag-dropped into the TUI, the absolute file path was not being preserved. The source.path field was set to just the filename instead of the full path. This meant tools (like look_at from plugins) couldn't access the file, even though it existed on disk.
Changes:
prompt/index.tsx: When pasting an image file path, resolve it to an absolute path before storing insource.path
message-v2.ts: Pass the source path as the filename field so it's visible to the model when buildingmessages
transform.ts: When a model doesn't support images, show the file path in the error message so the modelcan suggest using the Read tool
How did you verify your code works?
Screenshots / recordings
No UI changes.
Checklist