Update invokeTool to support Language

This commit is contained in:
bhavyaus
2025-11-24 17:33:37 -08:00
parent 5925b35321
commit 6d7b8fc9ef
5 changed files with 26 additions and 20 deletions

View File

@@ -410,6 +410,18 @@ declare module 'vscode' {
* Fired when the set of tools on a chat request changes.
*/
export const onDidChangeChatRequestTools: Event<ChatRequest>;
/**
* Invoke a tool by its full information object rather than just name.
* This allows disambiguation when multiple tools have the same name
* (e.g., from different MCP servers or model-specific implementations).
*
* @param tool The tool information object, typically obtained from {@link lm.tools}.
* @param options The options to use when invoking the tool.
* @param token A cancellation token.
* @returns The result of the tool invocation.
*/
export function invokeTool(tool: LanguageModelToolInformation, options: LanguageModelToolInvocationOptions<object>, token?: CancellationToken): Thenable<LanguageModelToolResult>;
}
export class LanguageModelToolExtensionSource {