feat: add /summarize command to agent mode#3352
Merged
roblourens merged 10 commits intomicrosoft:mainfrom Feb 7, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new /summarize command to the agent mode chat participant, allowing users to manually trigger summarization of conversation history. The feature is controlled by a configuration setting and provides user-friendly feedback for various scenarios.
Changes:
- Added a
/summarizecommand handler inAgentIntentthat leverages the existingSummarizedConversationHistorycomponent - Implemented comprehensive unit tests covering enabled/disabled states, empty history, and successful summarization scenarios
- Registered the command in VS Code's contribution points with conditional visibility based on configuration
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/extension/intents/node/test/agentSummarizeCommand.spec.ts | New test file with 3 test cases covering different scenarios for the /summarize command |
| src/extension/intents/node/agentIntent.ts | Added handleRequest override and handleSummarizeCommand method to handle the new command |
| package.nls.json | Added localized description string for the summarize command |
| package.json | Registered the /summarize command with conditional visibility |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Member
|
Similar to my exploration here #3137 |
roblourens
previously approved these changes
Feb 7, 2026
Member
roblourens
left a comment
There was a problem hiding this comment.
Thanks for the PR- this did not fully work when I started testing it but it was easy to fix up and I think this approach is fine.
roblourens
approved these changes
Feb 7, 2026
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.
Adds a new
/summarizecommand to Agent mode that triggers conversation history summarization using the existingSummarizedConversationHistoryprompt infrastructure. The command returnsChatResult.metadata.summaryso downstream components can store/use the generated summary.What’s included
/summarizeconfig.github.copilot.chat.summarizeAgentConversationHistory.enabled/summarizehandling inAgentIntent:/summarizeturn from the history being summarized{ metadata: { summary: { toolCallRoundId, text } } }User-facing behavior
Testing
npm run test:unit -- src/extension/intents/node/test/agentSummarizeCommand.spec.ts