Repository navigation
Sheets: file attachment and dictation in the copilot - #20
Merged
Merged
Conversation
Two affordances the slides kit has that this one shipped without. ATTACHMENTS reuse the mechanism the agent columns already use: the file becomes an `input_file` block on the next turn, and the gateway writes it into the working directory before the agent starts. Deliberately not a workspace PUT, which is how slides does it — that needs a session a brand-new sheet does not have yet, is refused 409 while a turn is running, and cannot carry bytes that are not text. One encoder now serves both callers (lib/attach.js); cell.js had its own copy. The staged files show as chips above the box with their size and a remove button, and the names ride on the sent message so the bubble shows what went with it. They are not replayed from history — the transcript stores the person's text, not the files — so this says "attached in this session" and does not claim anything about past turns. DICTATION is the browser's own SpeechRecognition. There is no speech service here and no reason to add one; Chrome, Edge and Safari ship exactly this feature. Where the API is absent the button is not rendered at all, rather than rendered disabled: slides has a permanently greyed mic labelled "voice input is coming soon", which is a control that does nothing while implying the product has a capability it does not have. Listening is visible because it cannot be heard — the button takes the brand colour and pulses. Also: the kit description was six lines on the Starter Kits card next to Slides' four. Three now. Verified live: attaching a CSV and asking for its contents returns them exactly, and the file is in the session workspace afterwards; the transcript shows the sentence typed, not the base64. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013DCjqvx3L4VKAPnFaPe7YJ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two affordances the slides kit has that sheets shipped without, plus a shorter kit description.
Attachments
Reuse the mechanism the agent columns already use: the file becomes an
input_fileblock on the next turn, and the gateway writes it into the working directory before the agent starts.Deliberately not a workspace
PUT, which is how slides does it — that needs a session a brand-new sheet does not have yet, is refused 409 while a turn is running, and cannot carry bytes that are not text. One encoder now serves both callers (lib/attach.js);cell.jshad its own copy.Staged files show as chips above the box with size and a remove button. The names ride on the sent message so the bubble shows what went with it — they are not replayed from history (the transcript stores the person's text, not the files), so this says "attached in this session" rather than claiming anything about past turns.
Dictation
The browser's own
SpeechRecognition. There is no speech service here and no reason to add one — Chrome, Edge and Safari ship exactly this feature.Where the API is absent the button is not rendered at all, rather than rendered disabled. Slides has a permanently greyed mic labelled "voice input is coming soon", which is a control that does nothing while implying a capability the product does not have. Listening is made visible because it cannot be heard.
Verified live
Attaching a CSV and asking for its contents returns them exactly; the file is in the session workspace afterwards; the transcript shows the sentence typed, not the base64.
🤖 Generated with Claude Code
https://claude.ai/code/session_013DCjqvx3L4VKAPnFaPe7YJ