-
Notifications
You must be signed in to change notification settings - Fork 750
Open
Labels
Description
Describe the feature or problem you'd like to solve
The VS Code Copilot extension implements sophisticated context management strategies that appear to be missing from the CLI. Currently, the CLI uses a strict sliding window strategy (truncation) for conversation history. This causes it to "forget" instructions from the beginning of a long session as soon as the token limit is reached, making it difficult to maintain context in long-running agentic tasks.
Proposed solution
Please bring the "Smart Context" capabilities from the VS Code extension to the gh copilot CLI:
- Auto-Summarization: Implement the summarization logic (similar to the Summarizer class in the VS Code extension) to compress older conversation turns into a summary instead of dropping them completely.
- Smart Code Folding: Use tree-sitter or similar parsing to condense code blocks in the context (keeping signatures, hiding bodies) to allow more files to fit in the window.
This would significantly improve the CLI's ability to handle complex tasks and make the terminal experience comparable to the VS Code Chat experience
Example prompts or workflows
No response
Additional context
No response