-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Add Agent terminal panel for viewing bash command output #6970
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
base: dev
Are you sure you want to change the base?
Conversation
|
The following comment was made by an LLM, it may be inaccurate: SummaryNo duplicate PRs found. All searches consistently returned only PR #6970 (the PR itself), which is the one described in the file you provided. I searched using multiple keyword combinations including:
The repository does not currently have any other open PRs addressing the same Agent terminal panel feature or related terminal enhancements. |
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.
Pull request overview
This PR introduces a new "Agent" terminal tab that displays real-time bash command output with ANSI color support. The implementation includes smart auto-focus behavior that respects user interaction preferences and fixes duplicate terminal creation issues.
Key Changes
- Adds dedicated Agent terminal tab with streaming output display and ANSI color rendering via
ansi-to-htmllibrary - Implements user interaction tracking to prevent auto-focus from interfering with manually opened PTY terminals
- Fixes duplicate terminal creation bug using
ready()check and creation guard
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
packages/app/src/context/agent-terminal.tsx |
New context for tracking and managing bash tool commands with auto-focus logic |
packages/app/src/components/agent-terminal.tsx |
UI component rendering agent commands with ANSI color support and auto-scrolling |
packages/app/src/context/terminal.tsx |
Adds user interaction tracking and duplicate creation prevention |
packages/app/src/pages/session.tsx |
Integrates Agent tab component and adds ready() check for terminal creation |
packages/app/src/app.tsx |
Wraps Session with AgentTerminalProvider |
packages/app/package.json |
Adds ansi-to-html dependency |
bun.lock |
Lock file updates for new dependency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add new "Agent" tab to terminal panel that displays real-time output from agent bash commands - Auto-focus Agent tab when agent runs commands (unless user has interacted with PTY terminals) - Show spinner indicator on Agent tab when commands are running - Support ANSI color codes in output using ansi-to-html - Hide Agent tab in empty session state (before first message) - Fix duplicate terminal creation on session load by adding ready() check and creating guard - Track user interaction with PTY terminals to control auto-focus behavior
044e443 to
9f3c47d
Compare
Summary
ansi-to-htmlBug Fixes
ready()check andcreatingguardNew Files
packages/app/src/context/agent-terminal.tsx- Context for tracking bash tool commandspackages/app/src/components/agent-terminal.tsx- UI component for agent terminal output with ANSI color supportDemo
The Agent tab appears on the right side of the terminal panel tabs. When the agent runs bash commands, the output streams in real-time with colored output support. If the user hasn't interacted with any PTY terminal tabs, the Agent tab will auto-focus when commands start running.