diff --git a/chat-sample/README.md b/chat-sample/README.md index bebb944c..32fe5c65 100644 --- a/chat-sample/README.md +++ b/chat-sample/README.md @@ -2,7 +2,7 @@ This sample shows -- How to contribute a chat agent. +- How to contribute a chat participant. - How to use the chatRequestAccess API to request access to the chat. - How to respond with follow-ups. diff --git a/chat-sample/package.json b/chat-sample/package.json index 707504e9..0e515359 100644 --- a/chat-sample/package.json +++ b/chat-sample/package.json @@ -1,8 +1,8 @@ { - "name": "chat-agent-sample", + "name": "chat-sample", "publisher": "vscode-samples", - "displayName": "Copilot Chat Sample Agent", - "description": "Sample chat agent extension, a trusty cat that will help you with your code.", + "displayName": "Copilot Chat Sample", + "description": "Sample chat extension, a trusty cat that will help you with your code.", "repository": { "type": "git", "url": "https://github.com/Microsoft/vscode-extension-samples" diff --git a/chat-sample/src/extension.ts b/chat-sample/src/extension.ts index 9b0c1f05..e14cfdbf 100644 --- a/chat-sample/src/extension.ts +++ b/chat-sample/src/extension.ts @@ -12,7 +12,7 @@ const LANGUAGE_MODEL_ID = 'copilot-gpt-4'; export function activate(context: vscode.ExtensionContext) { - // Define a Cat chat agent handler. + // Define a Cat chat handler. const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, context: vscode.ChatContext, stream: vscode.ChatResponseStream, token: vscode.CancellationToken): Promise => { // To talk to an LLM in your subcommand handler implementation, your // extension can use VS Code's `requestChatAccess` API to access the Copilot API. @@ -66,13 +66,13 @@ export function activate(context: vscode.ExtensionContext) { } }; - // Agents appear as top-level options in the chat input + // Chat participants appear as top-level options in the chat input // when you type `@`, and can contribute sub-commands in the chat input // that appear when you type `/`. - const agent = vscode.chat.createChatParticipant('cat', handler); - agent.iconPath = vscode.Uri.joinPath(context.extensionUri, 'cat.jpeg'); - agent.description = vscode.l10n.t('Meow! What can I help you with?'); - agent.commandProvider = { + const cat = vscode.chat.createChatParticipant('cat', handler); + cat.iconPath = vscode.Uri.joinPath(context.extensionUri, 'cat.jpeg'); + cat.description = vscode.l10n.t('Meow! What can I help you with?'); + cat.commandProvider = { provideCommands(token) { return [ { name: 'teach', description: 'Pick at random a computer science concept then explain it in purfect way of a cat' }, @@ -81,7 +81,7 @@ export function activate(context: vscode.ExtensionContext) { } }; - agent.followupProvider = { + cat.followupProvider = { provideFollowups(result: ICatChatResult, token: vscode.CancellationToken) { return [{ prompt: 'let us play', @@ -114,7 +114,7 @@ export function activate(context: vscode.ExtensionContext) { }); context.subscriptions.push( - agent, + cat, // Register the command handler for the /meow followup vscode.commands.registerCommand(MEOW_COMMAND_ID, async () => { vscode.window.showInformationMessage('Meow!');