Skip to content

Conversation

@DonJayamanne
Copy link
Collaborator

No description provided.

@DonJayamanne DonJayamanne requested a review from rebornix November 3, 2025 10:10
@DonJayamanne DonJayamanne marked this pull request as ready for review November 3, 2025 10:18
Copilot AI review requested due to automatic review settings November 3, 2025 10:18
Copy link
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

This PR upgrades the Copilot CLI SDK from version 0.0.343 to 0.0.354-29 and adapts the codebase to work with breaking API changes in the new SDK version. The SDK has moved from an Agent-based architecture to a Session-based architecture with significant interface changes.

Key Changes:

  • Updated SDK integration to use new Session-based APIs instead of Agent APIs
  • Refactored permission handling to use a handler pattern instead of callbacks
  • Changed model provider representations from complex objects to simple string IDs
  • Replaced node-pty ESM shim with direct binary file copying approach
  • Added comprehensive unit tests for CopilotCLI session management and tool formatting

Reviewed Changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
package.json & package-lock.json Updated @github/copilot dependency from 0.0.343 to 0.0.354-29
copilotcliSession.ts Refactored to use Session.send() instead of Agent.query(), moved to event-based SDK API with on() listeners
copilotcliSessionService.ts Updated session creation/retrieval to pass SessionOptions, added auto-disposal timeout mechanism
copilotCli.ts Added CopilotCLISessionOptionsService and CopilotCLIPermissionsHandler classes, simplified model provider to string
nodePtyShim.ts Replaced ESM shim creation with direct binary file copying from VS Code installation
permissionHelpers.ts Changed from AgentOptions to SessionOptions, added typed return types for tool parameters
copilotcliToolInvocationFormatter.ts Added Edit and Create tool formatters, changed "Viewed" to "Read" for consistency
copilotCLIChatSessionsContribution.ts Updated to pass workingDirectory and use new session service signatures
chatSessions.ts Registered ICopilotCLISessionOptionsService in service collection
Test files Added comprehensive unit tests for session lifecycle, tool formatting, and permission handling

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