Enable "tools agent" (#237369)

* Add an edit tool (doesn't work)

* More

* Properly wait on text edits to be done applying

* Better editFile tool

* Fixes

* Be more insistent with editFile instructions

* Add "agent mode" UI

* Fix error thrown when calling tools sometimes

* Persist chat agent mode state

* Hide editing tools from other extensions for now

* Fix test build issues

* Allow disabling tools agent mode

* Remove comment

* Fix codeblock index properly

* Cleanup

* Cleanup

* Remove ccreq check

* Rename for clarity
This commit is contained in:
Rob Lourens
2025-01-06 21:22:42 -07:00
committed by GitHub
parent fc4e78cbfe
commit 70866d5287
17 changed files with 351 additions and 59 deletions

View File

@@ -1500,10 +1500,10 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
return extHostLanguageModelTools.registerTool(extension, name, tool);
},
invokeTool<T>(name: string, parameters: vscode.LanguageModelToolInvocationOptions<T>, token?: vscode.CancellationToken) {
return extHostLanguageModelTools.invokeTool(name, parameters, token);
return extHostLanguageModelTools.invokeTool(extension, name, parameters, token);
},
get tools() {
return extHostLanguageModelTools.tools;
return extHostLanguageModelTools.getTools(extension);
},
fileIsIgnored(uri: vscode.Uri, token: vscode.CancellationToken) {
return extHostLanguageModels.fileIsIgnored(extension, uri, token);