Restyle /remote success banner as native info notification#311516
Merged
pierceboggan merged 1 commit intopierceboggan/add-remote-slash-commandfrom Apr 20, 2026
Merged
Conversation
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).
87ce530
into
pierceboggan/add-remote-slash-command
8 checks passed
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>
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.
Builds on #311393.
Restyles the
/remotesuccess message to use a native blue info notification card with a persistent Open on GitHub button.Changes
New
infochat content kind — mirrors the existingwarningpath end-to-end:IChatInfoMessageinchatService.ts, added to model/progress unionschatListRenderer.ts→ instantiatesChatErrorContentPartwithChatErrorLevel.Info(blue.chat-info-codiconstyling already exists)chatSessionOperationLog.tsNew proposed API
ChatResponseInfoPart+stream.info():vscode.proposed.chatParticipantAdditions.d.tsextHostTypes.ts,extHostTypeConverters.ts,extHostChatAgents2.ts,extHost.api.impl.ts/remoteconsumer:copilotcliSession.tsnow callsstream.info(...)followed bystream.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
ChatErrorWidgetwhich already supportsInforendering — smallest, lowest-risk change. Adding a parallel content kind avoids changing the shape of the existingChatResponseWarningPartAPI and avoids brittle CSS hacks on raw markdown.Accessibility
ChatErrorWidgetis 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