Skip to content

Restyle /remote success banner as native info notification#311516

Merged
pierceboggan merged 1 commit intopierceboggan/add-remote-slash-commandfrom
eli/restyle-remote-slash-command
Apr 20, 2026
Merged

Restyle /remote success banner as native info notification#311516
pierceboggan merged 1 commit intopierceboggan/add-remote-slash-commandfrom
eli/restyle-remote-slash-command

Conversation

@eli-w-king
Copy link
Copy Markdown
Contributor

@eli-w-king eli-w-king commented Apr 20, 2026

Builds on #311393.

Restyles the /remote success message to use a native blue info notification card with a persistent Open on GitHub button.

Changes

New info chat content kind — mirrors the existing warning path end-to-end:

  • IChatInfoMessage in chatService.ts, added to model/progress unions
  • Renderer case in chatListRenderer.ts → instantiates ChatErrorContentPart with ChatErrorLevel.Info (blue .chat-info-codicon styling already exists)
  • Equality case in chatSessionOperationLog.ts

New proposed API ChatResponseInfoPart + stream.info():

  • vscode.proposed.chatParticipantAdditions.d.ts
  • extHostTypes.ts, extHostTypeConverters.ts, extHostChatAgents2.ts, extHost.api.impl.ts

/remote consumer:

  • copilotcliSession.ts now calls stream.info(...) followed by stream.button({ command: 'vscode.open', ... }) so the banner persists after click and the button opens the GitHub task page externally without a model roundtrip.

Why this approach

Reuses the existing ChatErrorWidget which already supports Info rendering — smallest, lowest-risk change. Adding a parallel content kind avoids changing the shape of the existing ChatResponseWarningPart API and avoids brittle CSS hacks on raw markdown.

Accessibility

ChatErrorWidget is keyboard-focusable (tabIndex=0); the markdown content is announced by screen readers. Same pattern as the existing warning/error variants — no regression.

Screen.Recording.2026-04-20.at.3.16.09.PM.mov

Add a new 'info' chat content kind that mirrors the existing 'warning'
path and renders via ChatErrorContentPart with ChatErrorLevel.Info, which
already has blue notification styling (.chat-info-codicon). Expose this
via a new ChatResponseInfoPart proposed API and stream.info() method.

Use the new API in copilotcli's /remote success path so the banner
renders as a native blue info notification card with a persistent
'Open on GitHub' button (vscode.open, no model roundtrip).
@eli-w-king eli-w-king self-assigned this Apr 20, 2026
@pierceboggan pierceboggan merged commit 87ce530 into pierceboggan/add-remote-slash-command Apr 20, 2026
8 checks passed
@pierceboggan pierceboggan deleted the eli/restyle-remote-slash-command branch April 20, 2026 22:29
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 20, 2026
rebornix added a commit that referenced this pull request Apr 22, 2026
…t CLI (#311393)

* Add /remote slash command with Mission Control integration

Adds a /remote slash command to Copilot CLI sessions enabling Mission
Control — allowing users to view and steer their coding session from
github.com.

Key changes:
- Register 'remote' command in CopilotCLICommand type and package.json
- Implement full Mission Control API flow: auth, git context, session
  creation, event exporting, and command polling
- Use module-level shared state (McSharedState map) to persist MC state
  across CopilotCLISession instance recreations
- Stream SDK events to MC every 500ms with event type filtering
- Poll for steering commands every 3s (user_message, abort)
- Show notification popup with 'Open in Browser' button and QR-friendly URL
- Support /remote off for teardown

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix MC history replay and steering

- Replay existing conversation events to MC when /remote starts
- Add persistent on('*') listener for MC events between requests
- Store SDK session ref in shared state for command poller
- Make command poller static to avoid stale instance capture
- Clean up persistent listener on teardown

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Filter history replay to skip session lifecycle events

Only replay user.message, assistant.message, tool.* events during
history replay. Skip session.start and other lifecycle events that
would override the remoteSteerable state.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Route MC steering through VS Code chat UI

Instead of calling SDK send() directly (which doesn't render in the
chat UI), route steering messages through the
workbench.action.chat.openSessionWithPrompt.copilotcli command.
This ensures steering messages from the web UI appear in VS Code's
chat panel with proper rendering.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix CI: remove unused import, fix _sessionResource, update test constructors

- Remove unused IRunCommandExecutionService import and constructor param
- Replace _sessionResource with SessionIdForCLI.getResource(this.sessionId)
- Add IAuthenticationService mock arg to test constructor calls

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Restyle /remote success banner as native info notification (#311516)

Add a new 'info' chat content kind that mirrors the existing 'warning'
path and renders via ChatErrorContentPart with ChatErrorLevel.Info, which
already has blue notification styling (.chat-info-codicon). Expose this
via a new ChatResponseInfoPart proposed API and stream.info() method.

Use the new API in copilotcli's /remote success path so the banner
renders as a native blue info notification card with a persistent
'Open on GitHub' button (vscode.open, no model roundtrip).

* feat: add experimental setting to gate /remote command

Add github.copilot.chat.cli.remote.enabled (default: false) to gate
the /remote slash command behind an experimental setting. The command
is hidden from the UI when disabled, and a runtime guard in
_handleRemoteControl provides a helpful message if somehow invoked.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* feat: make /remote toggle on repeated invocation

Running /remote when remote is already active now disables it.
Explicit /remote on and /remote off still work as before.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* resolve comments.

Co-authored-by: Copilot <copilot@github.com>

* 💄

Co-authored-by: Copilot <copilot@github.com>

* 💄

Co-authored-by: Copilot <copilot@github.com>

* feat: implement Mission Control API client and integrate with Copilot CLI session management

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Elijah King <elijahwilliamking@icloud.com>
Co-authored-by: Peng Lyu <penn.lv@gmail.com>
Co-authored-by: Copilot <copilot@github.com>
rebornix added a commit that referenced this pull request Apr 22, 2026
* Add /remote slash command with Mission Control integration

Adds a /remote slash command to Copilot CLI sessions enabling Mission
Control — allowing users to view and steer their coding session from
github.com.

Key changes:
- Register 'remote' command in CopilotCLICommand type and package.json
- Implement full Mission Control API flow: auth, git context, session
  creation, event exporting, and command polling
- Use module-level shared state (McSharedState map) to persist MC state
  across CopilotCLISession instance recreations
- Stream SDK events to MC every 500ms with event type filtering
- Poll for steering commands every 3s (user_message, abort)
- Show notification popup with 'Open in Browser' button and QR-friendly URL
- Support /remote off for teardown

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix MC history replay and steering

- Replay existing conversation events to MC when /remote starts
- Add persistent on('*') listener for MC events between requests
- Store SDK session ref in shared state for command poller
- Make command poller static to avoid stale instance capture
- Clean up persistent listener on teardown

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Filter history replay to skip session lifecycle events

Only replay user.message, assistant.message, tool.* events during
history replay. Skip session.start and other lifecycle events that
would override the remoteSteerable state.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Route MC steering through VS Code chat UI

Instead of calling SDK send() directly (which doesn't render in the
chat UI), route steering messages through the
workbench.action.chat.openSessionWithPrompt.copilotcli command.
This ensures steering messages from the web UI appear in VS Code's
chat panel with proper rendering.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix CI: remove unused import, fix _sessionResource, update test constructors

- Remove unused IRunCommandExecutionService import and constructor param
- Replace _sessionResource with SessionIdForCLI.getResource(this.sessionId)
- Add IAuthenticationService mock arg to test constructor calls

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Restyle /remote success banner as native info notification (#311516)

Add a new 'info' chat content kind that mirrors the existing 'warning'
path and renders via ChatErrorContentPart with ChatErrorLevel.Info, which
already has blue notification styling (.chat-info-codicon). Expose this
via a new ChatResponseInfoPart proposed API and stream.info() method.

Use the new API in copilotcli's /remote success path so the banner
renders as a native blue info notification card with a persistent
'Open on GitHub' button (vscode.open, no model roundtrip).

* feat: add experimental setting to gate /remote command

Add github.copilot.chat.cli.remote.enabled (default: false) to gate
the /remote slash command behind an experimental setting. The command
is hidden from the UI when disabled, and a runtime guard in
_handleRemoteControl provides a helpful message if somehow invoked.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* feat: make /remote toggle on repeated invocation

Running /remote when remote is already active now disables it.
Explicit /remote on and /remote off still work as before.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: add NullCopilotCLIModels to copilotCliSessionService test constructor calls

---------

Co-authored-by: Pierce Boggan <pierceboggan@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Elijah King <elijahwilliamking@icloud.com>
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.

2 participants