Skip to content

Refactor: remove unused input state handling in CopilotCLIChatSessionContentProvider#309945

Merged
DonJayamanne merged 1 commit intomainfrom
don/academic-ape
Apr 14, 2026
Merged

Refactor: remove unused input state handling in CopilotCLIChatSessionContentProvider#309945
DonJayamanne merged 1 commit intomainfrom
don/academic-ape

Conversation

@DonJayamanne
Copy link
Copy Markdown
Contributor

Eliminate unnecessary input state handling in the CopilotCLIChatSessionContentProvider to streamline the code and improve maintainability. This change simplifies the session management logic by removing redundant state management. Testing can be done by verifying that chat sessions function correctly without the removed input state handling.

Copilot AI review requested due to automatic review settings April 14, 2026 19:03
@DonJayamanne DonJayamanne self-assigned this Apr 14, 2026
Copy link
Copy Markdown
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

Note

Copilot was unable to run its full agentic suite in this review.

This PR removes newly-created-session input state caching and related workaround logic in CopilotCLIChatSessionContentProvider to simplify chat session management.

Changes:

  • Removed ResourceMap<WeakRef<ChatSessionInputState>> caching for new sessions.
  • Removed precomputing/storing option groups in newChatSessionItemHandler.
  • Simplified getChatSessionInputState to rely on context.previousInputState.
Show a summary per file
File Description
extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessions.ts Removes new-session input state caching/workaround and uses context.previousInputState directly when building option groups.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 2

@DonJayamanne DonJayamanne marked this pull request as ready for review April 14, 2026 19:15
@DonJayamanne DonJayamanne merged commit 1a6b1ce into main Apr 14, 2026
30 checks passed
@DonJayamanne DonJayamanne deleted the don/academic-ape branch April 14, 2026 20:52
@vs-code-engineering vs-code-engineering bot added this to the 1.117.0 milestone Apr 14, 2026
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.

3 participants