Repository navigation
Copying / Dragging image files (MacOS Terminal + iTerm) - #2567
Conversation
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
[P1] Remove wrong image when multiple placeholders identical
[chat_composer.rs:682-704] attach_image keys attachments only by [image {w}x{h} {fmt}] (lines 229‑233). try_remove_any_placeholder_at_cursor then searches self.attached_images for the first placeholder text equal to the substring at the cursor (lines 682‑705). If two images share the same dimensions/format, deleting one placeholder removes the other entry while leaving its placeholder in the text, so later submission can send the wrong file.
Reply with @codex fix comments to fix any unresolved comments.
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, or 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 fix this CI failure" or "@codex address that feedback".
38cb333 to
edf2402
Compare
|
Summary
Review
Follow-up (outside this PR scope)
|
|
(still working on window tests) |
| let input = "file:///tmp/example.png"; | ||
| let result = normalize_pasted_path(input).expect("should parse file URL"); | ||
| assert_eq!(result, PathBuf::from("/tmp/example.png")); | ||
| } |
There was a problem hiding this comment.
@bolinfest I didn't realize that, in Rust, expect or assert would panic upon failure. So I thought it was a crash in my function, but it's just that the path test was failing on windows -- which was expected!
(Fixed now by adding a conditional for windows.)
|
@dedrisian-oai from Windows CI: |
| return url.to_file_path().ok(); | ||
| } | ||
|
|
||
| // Detect unquoted Windows paths and bypass POSIX shlex which |
There was a problem hiding this comment.
OK, let's go with this and we'll improve the implementation/unit tests over time, as appropriate!
In this PR:
Works for:
Todos: