Repository navigation
Large pasted text as attachment in Zookeeper - #14765
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| export const ZookeeperAttachmentPreview = ({ | ||
| file, | ||
| }: { | ||
| file: File | MlCopilotFile |
There was a problem hiding this comment.
Trying something fun here: this UI is both for a pre-upload attachment or a fetched one post-prompt or on replay.
| // Attachment names persist across turns, so each paste needs a unique name. | ||
| appendAttachments( | ||
| [ | ||
| new File([text], `pasted-text-${crypto.randomUUID()}.txt`, { |
There was a problem hiding this comment.
This here can help solve issues with duplicate image names across prompts (eg. people pasting from clipboard). We'll fix this the same way in the stacked PR.
|
Sorry doing this after the fact, but was playing with https://www.blindtextgenerator.com/lorem-ipsum And 4000 characters feels like the document is still long enough that it wouldn't feel a suprise to a user that this counted as a pasted attachment, and the lower we keep the threshold the more it saves us money, so I would be open to moving the threshold down? I got the impression you picked 10000 arbitrarily, and it's an okay default, but think we could also lower it? would have to be a follow up PR. |
Convert Zookeeper text pastes over 10,000 characters into uniquely named
.txtattachments, preserving the existing prompt and earlier attachments. Pairs with documentation #1099 to address this discussion.Next PRs in this stack will touch on image previews with unique names, as well as a new click-to-see-in-big dialog, but are far less urgent to get in.