Skip to content

Conversation

@marcodenic
Copy link

@marcodenic marcodenic commented Jan 5, 2026

image

Summary

  • Designed to be combined with this PR: Add terminal position toggle and allow thinner review panel #6893
  • Add new "Agent" tab to terminal panel that displays real-time streaming 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 is sent)

Bug Fixes

  • 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

New Files

  • packages/app/src/context/agent-terminal.tsx - Context for tracking bash tool commands
  • packages/app/src/components/agent-terminal.tsx - UI component for agent terminal output with ANSI color support

Demo

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.

Copilot AI review requested due to automatic review settings January 5, 2026 17:39
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

The following comment was made by an LLM, it may be inaccurate:

Summary

No 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:

  • Agent terminal panel bash command output
  • Agent tab terminal streaming output
  • agent-terminal context component
  • bash tool commands real-time output
  • terminal panel ANSI color
  • PTY terminal auto-focus
  • ansi-to-html spinner indicator

The repository does not currently have any other open PRs addressing the same Agent terminal panel feature or related terminal enhancements.

Copy link
Contributor

Copilot AI left a 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-html library
  • 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
@marcodenic marcodenic force-pushed the feature/agent-terminal-panel branch from 044e443 to 9f3c47d Compare January 5, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant