Skip to content

copilot agent type cleanup#312611

Merged
roblourens merged 1 commit intomainfrom
roblou/favourable-asp
Apr 26, 2026
Merged

copilot agent type cleanup#312611
roblourens merged 1 commit intomainfrom
roblou/favourable-asp

Conversation

@roblourens
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 26, 2026 17:09
@roblourens roblourens enabled auto-merge (squash) April 26, 2026 17:09
@roblourens roblourens self-assigned this Apr 26, 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

This PR performs a small type-alignment cleanup around Copilot SDK session hooks and tool types in the agent host implementation and its tests, so local code tracks the SDK’s canonical shapes instead of maintaining hand-rolled duplicates.

Changes:

  • Replace locally-defined hook/input shapes with types derived from @github/copilot-sdk (Parameters<>, ReturnType<>, Awaited<>).
  • Update hook invocations in tests to match the SDK hook input shape (e.g. adding timestamp, cwd, and toolResult where required).
  • Tighten tool handler typing in tests by using Tool/Pick<Tool, ...> instead of ad-hoc structural types.
Show a summary per file
File Description
src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts Updates test hook payloads and tool typing to match the SDK’s current hook/tool contracts.
src/vs/platform/agentHost/node/copilot/copilotPluginConverters.ts Derives hook input types directly from SessionConfig['hooks'] and applies them to generated SDK hook handlers.
src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts Removes local duplicated SDK request/response interfaces and derives user-input + tool-hook input types from the SDK config types.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 0

@roblourens roblourens merged commit bccdfa8 into main Apr 26, 2026
30 checks passed
@roblourens roblourens deleted the roblou/favourable-asp branch April 26, 2026 18:33
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 26, 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