From d6a2d4f3bc50e44e32543077565bf5c122ed5533 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Fri, 1 Mar 2024 11:33:06 -0300 Subject: [PATCH] Adopt provideFollowups API change (#978) --- chat-sample/src/extension.ts | 2 +- chat-sample/src/vscode.proposed.chatParticipant.d.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/chat-sample/src/extension.ts b/chat-sample/src/extension.ts index f159b8ac..a8cfb110 100644 --- a/chat-sample/src/extension.ts +++ b/chat-sample/src/extension.ts @@ -72,7 +72,7 @@ export function activate(context: vscode.ExtensionContext) { cat.isSticky = true; // Cat is persistant, whenever a user starts interacting with @cat, @cat will automatically be added to the following messages cat.iconPath = vscode.Uri.joinPath(context.extensionUri, 'cat.jpeg'); cat.followupProvider = { - provideFollowups(result: ICatChatResult, token: vscode.CancellationToken) { + provideFollowups(result: ICatChatResult, context: vscode.ChatContext, token: vscode.CancellationToken) { return [{ prompt: 'let us play', label: vscode.l10n.t('Play with the cat'), diff --git a/chat-sample/src/vscode.proposed.chatParticipant.d.ts b/chat-sample/src/vscode.proposed.chatParticipant.d.ts index b6794145..f3b59ac9 100644 --- a/chat-sample/src/vscode.proposed.chatParticipant.d.ts +++ b/chat-sample/src/vscode.proposed.chatParticipant.d.ts @@ -178,7 +178,7 @@ declare module 'vscode' { * @param result This instance has the same properties as the result returned from the participant callback, including `metadata`, but is not the same instance. * @param token A cancellation token. */ - provideFollowups(result: ChatResult, token: CancellationToken): ProviderResult; + provideFollowups(result: ChatResult, context: ChatContext, token: CancellationToken): ProviderResult; } /** @@ -273,7 +273,7 @@ declare module 'vscode' { /** * The prompt as entered by the user. * - * Information about variables used in this request are is stored in {@link ChatRequest.variables}. + * Information about variables used in this request is stored in {@link ChatRequest.variables}. * * *Note* that the {@link ChatParticipant.name name} of the participant and the {@link ChatCommand.name command} * are not part of the prompt.