Give Agents access to Terminal output#1032
Give Agents access to Terminal output#1032maskdotdev wants to merge 6 commits intopingdotgg:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
this looks amazing - definitely will try and get this merged soon. thank you! don't worry about the diff limit for this one
one nit: i think this indicator is a bit small and discrete, how would it look to keep the pill-like thing on top of the message similar to the composer input (or even inline like file taggings?)
another "feature" I originally wanted from this is the ability to tag a terminal using look at the logs in @terminal-1 and fix the build issue or whatever (autocompletes similar to the workspace entries search) and we'd transform that in the user message to include a reference to the terminal log file (in ~/.t3/userdata/logs/terminals/.log` that the agent can go look at
|
I know you mentiond to not worry about the diff size on this one, but would you prefer if I create another issue and separate PR for the |
i don't mind either. whatever is easiest! |
|
inline pills i think looks the best - will also match the existing file pills the best |
|
Style now reflects inline in a similar fashion to file mentions Created a separate issue for Will create a separate PR for that one 🫡 |
|
mind attaching a new recording of the current state? |
|
of course! here you go t3code-term-context-inline.mp4 |



sorry this is so close to the 1k limit outline in the contributing.md., some of the code here could be reused by the diff pr at #1003 (could make smaller if I remove the timeline and composer pills, but I think those provide value to the end user)
What Changed
Added terminal selection as chat context, surfaced pending terminal-context chips in the composer, and rendered sent terminal context as compact metadata in the timeline.
Why
resolves #26
UI Changes
Composer now shows selected terminal snippets as removable chips, the terminal drawer adds an “Add to chat” action for selections, and sent messages show a compact terminal-context indicator with tooltip preview.
Checklist
t3code-terminal-context-optimized.mp4
Note
Give agents access to terminal output by attaching selected text as context in chat
TerminalViewportthat appears when the user selects text; clicking it appends a<terminal_context>block to the composer draft viacomposerDraftStore.ComposerPendingTerminalContextscomponent.@terminal-1:3-7) with tooltips instead of raw block text.Macroscope summarized 1bee2ab.