From 1e0fba6d7ffeddbcd20cf5ef79c8e7a132dd8ca2 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 5 Feb 2024 20:07:26 +0100 Subject: [PATCH] updates api notes (#204386) --- src/vscode-dts/vscode.proposed.chatAgents2.d.ts | 3 +++ src/vscode-dts/vscode.proposed.chatProvider.d.ts | 2 ++ src/vscode-dts/vscode.proposed.chatRequestAccess.d.ts | 10 ++++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/vscode-dts/vscode.proposed.chatAgents2.d.ts b/src/vscode-dts/vscode.proposed.chatAgents2.d.ts index c784e32dd3e..bed707cf559 100644 --- a/src/vscode-dts/vscode.proposed.chatAgents2.d.ts +++ b/src/vscode-dts/vscode.proposed.chatAgents2.d.ts @@ -64,6 +64,9 @@ declare module 'vscode' { * If the request resulted in an error, this property defines the error details. */ errorDetails?: ChatAgentErrorDetails; + + // TODO@API + // add CATCH-all signature [name:string]: string|boolean|number instead of `T extends...` } /** diff --git a/src/vscode-dts/vscode.proposed.chatProvider.d.ts b/src/vscode-dts/vscode.proposed.chatProvider.d.ts index 259ee594bf8..3ff89cca683 100644 --- a/src/vscode-dts/vscode.proposed.chatProvider.d.ts +++ b/src/vscode-dts/vscode.proposed.chatProvider.d.ts @@ -10,6 +10,8 @@ declare module 'vscode' { part: string; } + // @API extension ship a d.ts files for their options + /** * Represents a large language model that accepts ChatML messages and produces a streaming response */ diff --git a/src/vscode-dts/vscode.proposed.chatRequestAccess.d.ts b/src/vscode-dts/vscode.proposed.chatRequestAccess.d.ts index f696289c062..b7bdef94fb1 100644 --- a/src/vscode-dts/vscode.proposed.chatRequestAccess.d.ts +++ b/src/vscode-dts/vscode.proposed.chatRequestAccess.d.ts @@ -65,13 +65,15 @@ declare module 'vscode' { * Whether the access to chat has been revoked. This happens when the condition that allowed for * chat access doesn't hold anymore, e.g a user interaction has ended. */ - isRevoked: boolean; + readonly isRevoked: boolean; + + // @API do we need an event for revocation /** * The name of the model that is used for this chat access. It is expected that the model name can * be used to lookup properties like token limits and ChatML support */ - model: string; + readonly model: string; /** * Make a chat request. @@ -101,5 +103,9 @@ declare module 'vscode' { * @param id The id of the chat provider, e.g `copilot` */ export function requestChatAccess(id: string): Thenable; + + //@API add those + // export const chatAccesses: string[]; + // export const onDidChangeChatAccesses: Event; } }