store prompt attachments on queued prompt model, store on prompt queue, attach on submit#11901
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR moves image/file attachments from live input staging onto queued prompt rows, threads queued row ids through local/slash/skill send paths, and adds tests/specs for the new behavior. The direct local send paths generally resolve row-owned attachments before removal, and I did not find security issues in the changed code.
Concerns
- Queued shared-session viewer prompts can lose their row and attachments if the asynchronous upload path fails before emitting
SendAgentPrompt; the row is removed immediately after starting dispatch.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
2537a8a to
4b7511a
Compare
460dc2c to
9d6afd8
Compare
4b7511a to
3b91b0b
Compare
9d6afd8 to
f56e305
Compare
697087a to
f6ca26b
Compare
f56e305 to
c560930
Compare
f6ca26b to
25a4850
Compare
382f07f to
5802a52
Compare
5802a52 to
1b257a7
Compare
1b257a7 to
f69a2fd
Compare
…e, attach on submit
f69a2fd to
bf0c7a0
Compare

Description
Before this PR, if you queued a prompt with an image attached, the image would stay attached in the input and not get associated with the prompt/cleared until send time. This isn't great, and is especially untenable if we want to allow users to queue multiple prompts, each with their own attachments.
This PR fixes it so that the queued prompt singleton stores prompt attachments along with the prompt text such that, when the prompt is queued, we can clear the attachments from the input and, when the prompt is sent, we can send the attachments with the prompt.
Testing
./script/runScreenshots / Videos
https://www.loom.com/share/814a8562374a456ead64f409321f1a0b
Agent Mode