-
Notifications
You must be signed in to change notification settings - Fork 37.2k
Closed
Labels
apiapi-proposalchatfeature-requestRequest for new features or functionalityRequest for new features or functionalityon-testplan
Milestone
Description
This is a proposal to enable tool use/function calling from chat participants and other extensions that use language models.
Tool use sample: https://github.com/microsoft/vscode-extension-samples/tree/roblou/tool-user/chat-tools-sample
Basic chat sample: https://github.com/microsoft/vscode-extension-samples/tree/main/chat-sample
Docs: https://code.visualstudio.com/api/extension-guides/chat
Extension authors can subscribe to this issue to get updates about the proposed Tools API.
We are very interested in feedback about how you might use this API.
September TODO list
- Tools show a progress message when invoked in a chat session using invokeTool
- Enable tools to show a confirmation message before being executed
- Tools can advertise their supported content types, and invokeTool takes a list of requested contentTypes
October TODO list
- Tools can have tags
- Generic typed tool parameters
- Confirmation dialog should show up when calling invokeTool outside of a chat session
- Remove unenforceable
text/plain"requirement", but be more clear about usage in docs. Clarify that aJSON.stringifyresult be simplytext/plain. - Remove
ChatMessageprefix part on tool call/result types. - Remove
LanguageModelChatMessageToolResultPart#isError- not sure why we have this, it isn't used - Decide how to handle tool name/ID, whether it's required to pick a unique name.
- A unique
name, explain the situation in docs
- A unique
- Normalize description/modelDescription
- Could be
description: string | { description: string; userDescription?; string }
- Could be
- Confirmation message format, recommended wording, whether
participantNameis included. How it's presented in chat session confirmation vs non-chat confirmation dialog- Can do a custom markdown dialog
- Is it incorrect to have a generic parameter on
invokeTool? Should parameters always be Object on this end, since in theory you are calling the tool without knowing the types?- Remove this parameter, split the invocation options interfaces
- Decide on shape for
toolChoiceparameter - LanguageModelTool uses a remote schema for parametersSchema, but default is wrong #225727
- Remaining TODOs in dts
-
parametersshould be JSON.parsed? - Find a name for
canBeInvokedManually, or cut this from finalization - Validate JSON schema when calling a tool 💪
- An auto-continue button to skip confirmations for a request 💪
- Can we do something to make tool calling more automatic? Helper tools or just a better sample that can be copied for now with functions that can be used as a "library" 💪
isidorn
Metadata
Metadata
Assignees
Labels
apiapi-proposalchatfeature-requestRequest for new features or functionalityRequest for new features or functionalityon-testplan