diff --git a/chat-sample/package.json b/chat-sample/package.json index 6f30faac0..20f5ab95b 100644 --- a/chat-sample/package.json +++ b/chat-sample/package.json @@ -26,12 +26,33 @@ "isSticky": true, "commands": [ { - "name": "teach", + "name": "randomTeach", "description": "Pick at random a computer science concept then explain it in purfect way of a cat" }, { "name": "play", - "description": "Do whatever you want, you are a cat after all" + "description": "Do whatever you want, you are a cat after all", + "disambiguation": [ + { + "categoryName": "cat_play", + "description": "The user just wants to relax and see the cat play.", + "examples": [ + "Enough learning, let the cat play with a ball of yarn", + "Can you show me a cat playing with a laser pointer?" + ] + } + ] + } + ], + "disambiguation": [ + { + "categoryName": "cat", + "description": "The user wants to learn a specific computer science topic in an informal way.", + "examples": [ + "Teach me C++ pointers using metaphors", + "Explain to me what is a linked list in a simple way", + "Can you explain to me what is a function in programming?" + ] } ] } diff --git a/chat-sample/src/extension.ts b/chat-sample/src/extension.ts index f96939705..db684874c 100644 --- a/chat-sample/src/extension.ts +++ b/chat-sample/src/extension.ts @@ -21,7 +21,7 @@ export function activate(context: vscode.ExtensionContext) { // To talk to an LLM in your subcommand handler implementation, your // extension can use VS Code's `requestChatAccess` API to access the Copilot API. // The GitHub Copilot Chat extension implements this provider. - if (request.command === 'teach') { + if (request.command === 'randomTeach') { stream.progress('Picking the right topic to teach...'); const topic = getTopic(context.history); try { @@ -47,8 +47,8 @@ export function activate(context: vscode.ExtensionContext) { title: vscode.l10n.t('Use Cat Names in Editor') }); - logger.logUsage('request', { kind: 'teach'}); - return { metadata: { command: 'teach' } }; + logger.logUsage('request', { kind: 'randomTeach'}); + return { metadata: { command: 'randomTeach' } }; } else if (request.command === 'play') { stream.progress('Throwing away the computer science books and preparing to play with some Python code...'); try {