Description
We have finalized the Language Model and Chat Participant API 🚀
Thus, you can now publish your extensions to the VS Marketplace. This API is finalized in VS Code Insiders, and will be finalized in VS Code Stable in July. In your package.json, you should set
"engines": {
"vscode": "^1.90.0"
},
and VS Code Stable will gracefully handle your extensions and ignore your usage of Language Model and Chat API until the API gets finalized in Stable in July. Full docs https://code.visualstudio.com/api/extension-guides/chat
We are excited to see what you build ✨
-- Proposal dts: https://github.com/microsoft/vscode/blob/main/src/vscode-dts/vscode.proposed.chatParticipant.d.ts
- 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 chat agent API. There may still be breaking changes coming, and I will post here whenever a breaking change is made.
I'm also interested in feedback about how you might use this API.
Current TODOs
- Need to enable agents to identify sessions uniquely and store state, including across a window reload
- Should be able to use
shouldRepopulate
for agents- Maybe this should be the default behavior for agents
-
ChatAgentReplyFollowup
should parameterize the agent and slash command names, don't require the agent to include them in the prompt as text- Maybe this goes for variables too, but variables like
#file
are complex
- Maybe this goes for variables too, but variables like
- Enable references and progress messages from chat variable resolvers #204539
- ChatAgentContentReference needs to support https URIs #203822
- Change the history context shape to be a flat list of messages, instead of request/response pairs
- Understand how duplicate agent IDs should be handled
-
Enable agents to resolve a variable value on-demand, instead of resolving all variables before invoking the agent
- Add a
persist
flag toChatAgentProgressMessage
for it to stay visible with a ✔️ even when more content has been added.- This would be useful when you want the progress message to remain and show what happened, eg in representing a function call. I've seen multiple extension authors add their own version of this just with text.
- Better support for /help with chat agents #197081
-
ChatAgentCommandFollowup
should become a progress message instead of a followup - In history, agents have to parse agent names and slash commands from the raw
ChatMessage
. They shouldn't have to understand the input syntax- the type in history should be related to the request and progress/result types that we already have. - Add generic type parameter for the type of the result, which can include custom properties
- 'variables' proposal is referenced from chatAgents2, need to merge it in
- Merge ChatAgentTask and ChatAgentProgressMessage #200598