Skip to content

Conversation

@aeschli
Copy link
Contributor

@aeschli aeschli commented Nov 22, 2025

  • add an observable for tools and toolsWithFullReferenceName to avoid recomputation
  • rename qualifiedName to fullReferenceName
  • make things readonly

Copilot AI review requested due to automatic review settings November 22, 2025 12:47
@aeschli aeschli enabled auto-merge (squash) November 22, 2025 12:47
@aeschli aeschli self-assigned this Nov 22, 2025
@vs-code-engineering vs-code-engineering bot added this to the November 2025 milestone Nov 22, 2025
Copilot finished reviewing on behalf of aeschli November 22, 2025 12:49
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 polishes the ILanguageModelToolsService interface and implementation with three main improvements: (1) adding observable properties for tools and toolsWithFullReferenceName to avoid recomputation, (2) renaming "qualifiedName" terminology to "fullReferenceName" for better clarity, and (3) making IToolData properties readonly for immutability.

Key Changes

  • Added toolsObservable and toolsWithFullReferenceName observables with proper equality checking to optimize reactive recomputations
  • Renamed all methods and variables from "qualifiedName" to "fullReferenceName" throughout the codebase for consistency
  • Made all IToolData interface properties readonly to ensure immutability after creation

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/vs/workbench/contrib/chat/common/languageModelToolsService.ts Updated IToolData interface with readonly modifiers; renamed interface methods from qualifiedName to fullReferenceName
src/vs/workbench/contrib/chat/browser/languageModelToolsService.ts Added toolsObservable and toolsWithFullReferenceName observables; made private fields readonly; updated all method implementations with new naming
src/vs/workbench/contrib/chat/test/browser/languageModelToolsService.test.ts Updated all test names and assertions to use fullReferenceName terminology
src/vs/workbench/contrib/chat/test/common/mockLanguageModelToolsService.ts Updated mock service to match interface changes with toolsObservable property
src/vs/workbench/contrib/chat/test/common/mockLanguageModelToolsConfirmationService.ts Updated method signature to use readonly modifier
src/vs/workbench/contrib/chat/browser/languageModelToolsConfirmationService.ts Updated method signature to use readonly modifier
src/vs/workbench/contrib/chat/common/languageModelToolsConfirmationService.ts Updated interface method signature to use readonly modifier
src/vs/workbench/contrib/chat/common/tools/runSubagentTool.ts Refactored to build inputSchema before creating IToolData object (required for readonly properties)
src/vs/workbench/contrib/chat/browser/chatSelectedTools.ts Removed local _allTools observable in favor of service's toolsObservable; removed unused observableFromEvent import
src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/*.ts Updated all prompt syntax language providers to use new fullReferenceName methods
src/vs/workbench/api/common/extHost.protocol.ts Updated IToolDataDto to use readonly modifiers for array properties

@bpasero
Copy link
Member

bpasero commented Nov 22, 2025

Red CI

@aeschli aeschli closed this Nov 22, 2025
auto-merge was automatically disabled November 22, 2025 20:03

Pull request was closed

@aeschli aeschli reopened this Nov 22, 2025
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