-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Copying / Dragging image files (MacOS Terminal + iTerm) #2567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) |
codex-rs/tui/src/clipboard_paste.rs
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, let's go with this and we'll improve the implementation/unit tests over time, as appropriate!
In this PR:
Works for:
Todos: