-
Notifications
You must be signed in to change notification settings - Fork 36.4k
Polish ILanguageModelToolsService #278946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
aeschli
commented
Nov 22, 2025
- add an observable for tools and toolsWithFullReferenceName to avoid recomputation
- rename qualifiedName to fullReferenceName
- make things readonly
There was a problem hiding this 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
toolsObservableandtoolsWithFullReferenceNameobservables 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 |
|
Red CI |