From 79a433e01e7d965bb32f53b036614ade604f181f Mon Sep 17 00:00:00 2001 From: Johannes Date: Fri, 15 Mar 2024 16:09:23 +0100 Subject: [PATCH] enumerate all chat locations --- src/vs/workbench/api/common/extHostTypeConverters.ts | 1 + src/vs/workbench/api/common/extHostTypes.ts | 3 ++- src/vs/workbench/contrib/chat/common/chatAgents.ts | 8 ++++---- src/vscode-dts/vscode.proposed.chatParticipant.d.ts | 6 +++++- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/api/common/extHostTypeConverters.ts b/src/vs/workbench/api/common/extHostTypeConverters.ts index c997c0fb383..08ff189d0b0 100644 --- a/src/vs/workbench/api/common/extHostTypeConverters.ts +++ b/src/vs/workbench/api/common/extHostTypeConverters.ts @@ -2626,6 +2626,7 @@ export namespace ChatLocation { case ChatAgentLocation.Notebook: return types.ChatLocation.Notebook; case ChatAgentLocation.Terminal: return types.ChatLocation.Terminal; case ChatAgentLocation.Panel: return types.ChatLocation.Panel; + case ChatAgentLocation.Editor: return types.ChatLocation.Editor; } } } diff --git a/src/vs/workbench/api/common/extHostTypes.ts b/src/vs/workbench/api/common/extHostTypes.ts index 5b7fb23081d..e6c5262e303 100644 --- a/src/vs/workbench/api/common/extHostTypes.ts +++ b/src/vs/workbench/api/common/extHostTypes.ts @@ -4323,7 +4323,8 @@ export class ChatResponseTurn implements vscode.ChatResponseTurn { export enum ChatLocation { Panel = 1, Terminal = 2, - Notebook = 3 + Notebook = 3, + Editor = 4, } export class LanguageModelChatSystemMessage { diff --git a/src/vs/workbench/contrib/chat/common/chatAgents.ts b/src/vs/workbench/contrib/chat/common/chatAgents.ts index 5815a725469..43f64b29821 100644 --- a/src/vs/workbench/contrib/chat/common/chatAgents.ts +++ b/src/vs/workbench/contrib/chat/common/chatAgents.ts @@ -28,10 +28,10 @@ export interface IChatAgentHistoryEntry { } export enum ChatAgentLocation { - Panel = 1, - Terminal = 2, - Notebook = 3, - // Editor = 4 + Panel = 'panel', + Terminal = 'terminal', + Notebook = 'notebook', + Editor = 'editor' } export namespace ChatAgentLocation { diff --git a/src/vscode-dts/vscode.proposed.chatParticipant.d.ts b/src/vscode-dts/vscode.proposed.chatParticipant.d.ts index acdf2320b60..b2602cbf815 100644 --- a/src/vscode-dts/vscode.proposed.chatParticipant.d.ts +++ b/src/vscode-dts/vscode.proposed.chatParticipant.d.ts @@ -287,7 +287,11 @@ declare module 'vscode' { /** * Notebook inline chat */ - Notebook = 3 + Notebook = 3, + /** + * Code editor inline chat + */ + Editor = 4 } export interface ChatRequest {