fix(shell): attach dropped image paths eagerly#2183
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06a23d8a8d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
06a23d8 to
c5cd3e4
Compare
|
Thanks for the reviews. I pushed
Validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c5cd3e44e9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
c5cd3e4 to
a4b7ae0
Compare
|
Thanks, pushed The bare-path detector now avoids starting a relative path match from common wrapper punctuation, so inputs such as Validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a4b7ae0be1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 25c64df9f8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| raw = path_text.replace("\\ ", " ") | ||
| if raw.lower().startswith("file://"): | ||
| parsed = urlparse(raw) | ||
| raw = unquote(parsed.path) |
There was a problem hiding this comment.
Preserve UNC host when expanding file:// image paths
In _expand_image_path, file:// URIs are rebuilt from parsed.path only, so the authority component is dropped. On Windows, an input like file://server/share/screenshot.png should resolve to a UNC path (\\server\share\screenshot.png), but this code turns it into /share/screenshot.png (then usually into a cwd-relative path), which causes false "no longer accessible" errors and prevents attaching valid network-share images.
Useful? React with 👍 / 👎.
25c64df to
e9855f8
Compare
|
Rebased onto current main and resolved the import conflict with the new shell migration nudge code. Validation on the rebased branch: pytest tests/ui_and_conv/test_prompt_placeholders.py tests/ui_and_conv/test_shell_prompt_router.py tests/ui_and_conv/test_prompt_tips.py::test_prompt_once_appends_history_after_command_resolves tests/ui_and_conv/test_prompt_tips.py::test_prompt_once_skips_history_when_command_resolution_fails -q passed (36 passed); ruff check on touched shell/test files passed; py_compile on touched shell/test files passed; git diff --check upstream/main..HEAD passed. |
Related Issue
Resolve #2182
Description
Prompt submission now scans literal user text for local image paths when the selected model supports image input, reads the image immediately, and sends it as an
ImageURLPartinstead of leaving a short-lived path forReadMediaFileto chase later.This keeps URLs and simple filenames as text, supports quoted paths and
file://URLs, deduplicates repeated image paths, enforces the inline image size cap, sniffs image MIME bytes, and reports explicit missing image paths without crashing the prompt router.Added regression coverage for path attachment, capability gating, missing explicit paths, simple missing filenames, and prompt-router recovery after an image path resolution error.
Checklist
make gen-changelogto update the changelog.make gen-docsto update the user documentation.