Expose verso_* tools to Copilot agent mode - #102
Open
4D-Bird wants to merge 1 commit into
Open
Conversation
All 20 language model tools declared canBeReferencedInPrompt: false, which excludes them from the agent-mode tool set and the tools picker; they were only reachable through the @verso participant. Set canBeReferencedInPrompt: true and add the required toolReferenceName (the tool's own name) for every tool. Signed-off-by: 4D-Bird <180421459+4D-Bird@users.noreply.github.com>
Contributor
|
Thanks for submitting this PR, it's a great catch. The one thing holding it up is the sign off. Verso takes contributions under the DCO, and for an MIT project the value of that is a clean provenance chain on every commit, so CONTRIBUTING.md asks for a real name and a reachable email rather than a handle and a GitHub noreply address. If that's not something you want to update your commit with, it's okay. Let me know and I'll recreate your work on my end and make sure you get credited for it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The VS Code extension's README states:
On current VS Code this does not work: none of the
verso_*tools appear in the agent-mode tool set or the tools picker. They are only reachable through the@versoparticipant, which runs its own tool-calling loop and doesn't share the main agent's conversation context.Root cause
All 20 tools in
vscode/package.jsondeclare"canBeReferencedInPrompt": false. VS Code uses this flag to decide which extension tools enter agent mode:src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.ts— tools included onlyif (tool.canBeReferencedInPrompt)src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.ts— same filter in the tools pickerThe fix (and why
toolReferenceNameis mandatory)Setting only
canBeReferencedInPrompt: truebreaks the extension: VS Code rejects such tools at scan time (languageModelToolsContribution.ts: "CANNOT register tool with 'canBeReferencedInPrompt' set without a 'toolReferenceName'"), and everyvscode.lm.registerTool()call then fails withError: Tool "verso_listCells" was not contributed.— which also breaks@versoitself.This PR sets, for every tool:
"canBeReferencedInPrompt": true+"toolReferenceName": "<tool name>"(pattern^[\w-]+$— tool names already qualify).Verification
Patched a local v1.2.1 install (VS Code 1.133.0): after reload, all 20 tools appear and work: list/add/update/remove/move cells, change type & language (C#→F#), run cell/run-all (stdout + final-expression values), list/inspect variables, add/update/remove parameters, get/update cell properties, list/switch layouts.
@versocontinues to work unchanged.