From db101822b74b51393113bdab9ee4b4fee49c32d1 Mon Sep 17 00:00:00 2001 From: meganrogge Date: Mon, 7 Oct 2024 14:27:06 -0700 Subject: [PATCH 01/10] allow passing in chat variables to open chat action --- .../contrib/chat/browser/actions/chatActions.ts | 9 +++++---- src/vs/workbench/contrib/chat/browser/chat.ts | 6 +++--- .../contrib/chat/browser/chatWidget.ts | 17 +++++++++++------ 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts index 01abc19098ac8..85c88203facd6 100644 --- a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts +++ b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts @@ -38,6 +38,7 @@ import { IChatEditorOptions } from '../chatEditor.js'; import { ChatEditorInput } from '../chatEditorInput.js'; import { ChatViewPane } from '../chatViewPane.js'; import { clearChatEditor } from './chatClear.js'; +import { IChatRequestVariableEntry } from '../../common/chatModel.js'; export const CHAT_CATEGORY = localize2('chat.category', 'Chat'); export const CHAT_OPEN_ACTION_ID = 'workbench.action.chat.open'; @@ -88,7 +89,7 @@ class OpenChatGlobalAction extends Action2 { }); } - override async run(accessor: ServicesAccessor, opts?: string | IChatViewOpenOptions): Promise { + override async run(accessor: ServicesAccessor, opts?: string | IChatViewOpenOptions, variables?: IChatRequestVariableEntry[]): Promise { opts = typeof opts === 'string' ? { query: opts } : opts; const chatService = accessor.get(IChatService); @@ -98,14 +99,14 @@ class OpenChatGlobalAction extends Action2 { } if (opts?.previousRequests?.length && chatWidget.viewModel) { for (const { request, response } of opts.previousRequests) { - chatService.addCompleteRequest(chatWidget.viewModel.sessionId, request, undefined, 0, { message: response }); + chatService.addCompleteRequest(chatWidget.viewModel.sessionId, request, variables ? { variables } : undefined, 0, { message: response }); } } if (opts?.query) { if (opts.isPartialQuery) { - chatWidget.setInput(opts.query); + chatWidget.setInput(opts.query, variables); } else { - chatWidget.acceptInput(opts.query); + chatWidget.acceptInput(opts.query, undefined, variables); } } diff --git a/src/vs/workbench/contrib/chat/browser/chat.ts b/src/vs/workbench/contrib/chat/browser/chat.ts index d9c5de08873c0..dd09795052307 100644 --- a/src/vs/workbench/contrib/chat/browser/chat.ts +++ b/src/vs/workbench/contrib/chat/browser/chat.ts @@ -14,7 +14,7 @@ import { IContextKeyService } from '../../../../platform/contextkey/common/conte import { createDecorator } from '../../../../platform/instantiation/common/instantiation.js'; import { IViewsService } from '../../../services/views/common/viewsService.js'; import { ChatAgentLocation, IChatAgentCommand, IChatAgentData } from '../common/chatAgents.js'; -import { IChatResponseModel } from '../common/chatModel.js'; +import { IChatRequestVariableEntry, IChatResponseModel } from '../common/chatModel.js'; import { IParsedChatRequest } from '../common/chatParserTypes.js'; import { CHAT_PROVIDER_ID } from '../common/chatParticipantContribTypes.js'; import { IChatRequestViewModel, IChatResponseViewModel, IChatViewModel } from '../common/chatViewModel.js'; @@ -170,10 +170,10 @@ export interface IChatWidget { focus(item: ChatTreeItem): void; getSibling(item: ChatTreeItem, type: 'next' | 'previous'): ChatTreeItem | undefined; getFocus(): ChatTreeItem | undefined; - setInput(query?: string): void; + setInput(query?: string, variables?: IChatRequestVariableEntry[]): void; getInput(): string; logInputHistory(): void; - acceptInput(query?: string, isVoiceInput?: boolean): Promise; + acceptInput(query?: string, isVoiceInput?: boolean, variables?: IChatRequestVariableEntry[]): Promise; acceptInputWithPrefix(prefix: string): void; setInputPlaceholder(placeholder: string): void; resetInputPlaceholder(): void; diff --git a/src/vs/workbench/contrib/chat/browser/chatWidget.ts b/src/vs/workbench/contrib/chat/browser/chatWidget.ts index dd462c2d65356..9e3417c465e65 100644 --- a/src/vs/workbench/contrib/chat/browser/chatWidget.ts +++ b/src/vs/workbench/contrib/chat/browser/chatWidget.ts @@ -33,7 +33,7 @@ import { TerminalChatController } from '../../terminal/terminalContribChatExport import { ChatAgentLocation, IChatAgentCommand, IChatAgentData, IChatAgentService, IChatWelcomeMessageContent, isChatWelcomeMessageContent } from '../common/chatAgents.js'; import { CONTEXT_CHAT_INPUT_HAS_AGENT, CONTEXT_CHAT_LOCATION, CONTEXT_CHAT_REQUEST_IN_PROGRESS, CONTEXT_IN_CHAT_SESSION, CONTEXT_IN_QUICK_CHAT, CONTEXT_LAST_ITEM_ID, CONTEXT_PARTICIPANT_SUPPORTS_MODEL_PICKER, CONTEXT_RESPONSE_FILTERED } from '../common/chatContextKeys.js'; import { ChatEditingSessionState, IChatEditingService, IChatEditingSession } from '../common/chatEditingService.js'; -import { IChatModel, IChatResponseModel } from '../common/chatModel.js'; +import { IChatModel, IChatRequestVariableEntry, IChatResponseModel } from '../common/chatModel.js'; import { ChatRequestAgentPart, IParsedChatRequest, chatAgentLeader, chatSubcommandLeader, formatChatQuestion } from '../common/chatParserTypes.js'; import { ChatRequestParser } from '../common/chatRequestParser.js'; import { IChatFollowup, IChatLocationData, IChatService } from '../common/chatService.js'; @@ -875,8 +875,13 @@ export class ChatWidget extends Disposable implements IChatWidget { this.viewModel?.resetInputPlaceholder(); } - setInput(value = ''): void { + setInput(value = '', variables?: IChatRequestVariableEntry[]): void { this.inputPart.setValue(value, false); + if (variables) { + for (const v of variables) { + this.inputPart.attachmentModel.addContext(v); + } + } } getInput(): string { @@ -887,8 +892,8 @@ export class ChatWidget extends Disposable implements IChatWidget { this.inputPart.logInputHistory(); } - async acceptInput(query?: string, isVoiceInput?: boolean): Promise { - return this._acceptInput(query ? { query } : undefined, isVoiceInput); + async acceptInput(query?: string, isVoiceInput?: boolean, variables?: IChatRequestVariableEntry[]): Promise { + return this._acceptInput(query ? { query } : undefined, isVoiceInput, variables); } async acceptInputWithPrefix(prefix: string): Promise { @@ -905,7 +910,7 @@ export class ChatWidget extends Disposable implements IChatWidget { return inputState; } - private async _acceptInput(opts: { query: string } | { prefix: string } | undefined, isVoiceInput?: boolean): Promise { + private async _acceptInput(opts: { query: string } | { prefix: string } | undefined, isVoiceInput?: boolean, variables?: IChatRequestVariableEntry[]): Promise { if (this.viewModel) { this._onDidAcceptInput.fire(); @@ -920,7 +925,7 @@ export class ChatWidget extends Disposable implements IChatWidget { location: this.location, locationData: this._location.resolveData?.(), parserContext: { selectedAgent: this._lastSelectedAgent }, - attachedContext: [...this.attachmentModel.attachments] + attachedContext: [...this.attachmentModel.attachments, ...variables ?? []], }); if (result) { From 3757bb0f16678bb493ab25558c283e3b4ea31f31 Mon Sep 17 00:00:00 2001 From: meganrogge Date: Tue, 8 Oct 2024 09:23:08 -0700 Subject: [PATCH 02/10] refactor --- .../chat/browser/actions/chatActions.ts | 26 +++++++++++++++---- src/vs/workbench/contrib/chat/browser/chat.ts | 6 ++--- .../contrib/chat/browser/chatWidget.ts | 17 +++++------- 3 files changed, 30 insertions(+), 19 deletions(-) diff --git a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts index 85c88203facd6..56b5e7e790f5a 100644 --- a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts +++ b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts @@ -38,7 +38,6 @@ import { IChatEditorOptions } from '../chatEditor.js'; import { ChatEditorInput } from '../chatEditorInput.js'; import { ChatViewPane } from '../chatViewPane.js'; import { clearChatEditor } from './chatClear.js'; -import { IChatRequestVariableEntry } from '../../common/chatModel.js'; export const CHAT_CATEGORY = localize2('chat.category', 'Chat'); export const CHAT_OPEN_ACTION_ID = 'workbench.action.chat.open'; @@ -56,6 +55,18 @@ export interface IChatViewOpenOptions { * Any previous chat requests and responses that should be shown in the chat view. */ previousRequests?: IChatViewOpenRequestEntry[]; + + /** + * The path to the images(s) + */ + images?: IChatImageAttachment[]; +} + +export interface IChatImageAttachment { + id: string; + name: string; + value: URI | Uint8Array; + isImage: true; } export interface IChatViewOpenRequestEntry { @@ -89,7 +100,7 @@ class OpenChatGlobalAction extends Action2 { }); } - override async run(accessor: ServicesAccessor, opts?: string | IChatViewOpenOptions, variables?: IChatRequestVariableEntry[]): Promise { + override async run(accessor: ServicesAccessor, opts?: string | IChatViewOpenOptions): Promise { opts = typeof opts === 'string' ? { query: opts } : opts; const chatService = accessor.get(IChatService); @@ -99,14 +110,19 @@ class OpenChatGlobalAction extends Action2 { } if (opts?.previousRequests?.length && chatWidget.viewModel) { for (const { request, response } of opts.previousRequests) { - chatService.addCompleteRequest(chatWidget.viewModel.sessionId, request, variables ? { variables } : undefined, 0, { message: response }); + chatService.addCompleteRequest(chatWidget.viewModel.sessionId, request, undefined, 0, { message: response }); } } if (opts?.query) { if (opts.isPartialQuery) { - chatWidget.setInput(opts.query, variables); + chatWidget.setInput(opts.query); } else { - chatWidget.acceptInput(opts.query, undefined, variables); + chatWidget.acceptInput(opts.query); + } + } + if (opts?.images) { + for (const image of opts.images) { + chatWidget.attachmentModel.addContext(image); } } diff --git a/src/vs/workbench/contrib/chat/browser/chat.ts b/src/vs/workbench/contrib/chat/browser/chat.ts index dd09795052307..d9c5de08873c0 100644 --- a/src/vs/workbench/contrib/chat/browser/chat.ts +++ b/src/vs/workbench/contrib/chat/browser/chat.ts @@ -14,7 +14,7 @@ import { IContextKeyService } from '../../../../platform/contextkey/common/conte import { createDecorator } from '../../../../platform/instantiation/common/instantiation.js'; import { IViewsService } from '../../../services/views/common/viewsService.js'; import { ChatAgentLocation, IChatAgentCommand, IChatAgentData } from '../common/chatAgents.js'; -import { IChatRequestVariableEntry, IChatResponseModel } from '../common/chatModel.js'; +import { IChatResponseModel } from '../common/chatModel.js'; import { IParsedChatRequest } from '../common/chatParserTypes.js'; import { CHAT_PROVIDER_ID } from '../common/chatParticipantContribTypes.js'; import { IChatRequestViewModel, IChatResponseViewModel, IChatViewModel } from '../common/chatViewModel.js'; @@ -170,10 +170,10 @@ export interface IChatWidget { focus(item: ChatTreeItem): void; getSibling(item: ChatTreeItem, type: 'next' | 'previous'): ChatTreeItem | undefined; getFocus(): ChatTreeItem | undefined; - setInput(query?: string, variables?: IChatRequestVariableEntry[]): void; + setInput(query?: string): void; getInput(): string; logInputHistory(): void; - acceptInput(query?: string, isVoiceInput?: boolean, variables?: IChatRequestVariableEntry[]): Promise; + acceptInput(query?: string, isVoiceInput?: boolean): Promise; acceptInputWithPrefix(prefix: string): void; setInputPlaceholder(placeholder: string): void; resetInputPlaceholder(): void; diff --git a/src/vs/workbench/contrib/chat/browser/chatWidget.ts b/src/vs/workbench/contrib/chat/browser/chatWidget.ts index 9e3417c465e65..a76080f0d8d9b 100644 --- a/src/vs/workbench/contrib/chat/browser/chatWidget.ts +++ b/src/vs/workbench/contrib/chat/browser/chatWidget.ts @@ -33,7 +33,7 @@ import { TerminalChatController } from '../../terminal/terminalContribChatExport import { ChatAgentLocation, IChatAgentCommand, IChatAgentData, IChatAgentService, IChatWelcomeMessageContent, isChatWelcomeMessageContent } from '../common/chatAgents.js'; import { CONTEXT_CHAT_INPUT_HAS_AGENT, CONTEXT_CHAT_LOCATION, CONTEXT_CHAT_REQUEST_IN_PROGRESS, CONTEXT_IN_CHAT_SESSION, CONTEXT_IN_QUICK_CHAT, CONTEXT_LAST_ITEM_ID, CONTEXT_PARTICIPANT_SUPPORTS_MODEL_PICKER, CONTEXT_RESPONSE_FILTERED } from '../common/chatContextKeys.js'; import { ChatEditingSessionState, IChatEditingService, IChatEditingSession } from '../common/chatEditingService.js'; -import { IChatModel, IChatRequestVariableEntry, IChatResponseModel } from '../common/chatModel.js'; +import { IChatModel, IChatResponseModel } from '../common/chatModel.js'; import { ChatRequestAgentPart, IParsedChatRequest, chatAgentLeader, chatSubcommandLeader, formatChatQuestion } from '../common/chatParserTypes.js'; import { ChatRequestParser } from '../common/chatRequestParser.js'; import { IChatFollowup, IChatLocationData, IChatService } from '../common/chatService.js'; @@ -875,13 +875,8 @@ export class ChatWidget extends Disposable implements IChatWidget { this.viewModel?.resetInputPlaceholder(); } - setInput(value = '', variables?: IChatRequestVariableEntry[]): void { + setInput(value = ''): void { this.inputPart.setValue(value, false); - if (variables) { - for (const v of variables) { - this.inputPart.attachmentModel.addContext(v); - } - } } getInput(): string { @@ -892,8 +887,8 @@ export class ChatWidget extends Disposable implements IChatWidget { this.inputPart.logInputHistory(); } - async acceptInput(query?: string, isVoiceInput?: boolean, variables?: IChatRequestVariableEntry[]): Promise { - return this._acceptInput(query ? { query } : undefined, isVoiceInput, variables); + async acceptInput(query?: string, isVoiceInput?: boolean): Promise { + return this._acceptInput(query ? { query } : undefined, isVoiceInput); } async acceptInputWithPrefix(prefix: string): Promise { @@ -910,7 +905,7 @@ export class ChatWidget extends Disposable implements IChatWidget { return inputState; } - private async _acceptInput(opts: { query: string } | { prefix: string } | undefined, isVoiceInput?: boolean, variables?: IChatRequestVariableEntry[]): Promise { + private async _acceptInput(opts: { query: string } | { prefix: string } | undefined, isVoiceInput?: boolean): Promise { if (this.viewModel) { this._onDidAcceptInput.fire(); @@ -925,7 +920,7 @@ export class ChatWidget extends Disposable implements IChatWidget { location: this.location, locationData: this._location.resolveData?.(), parserContext: { selectedAgent: this._lastSelectedAgent }, - attachedContext: [...this.attachmentModel.attachments, ...variables ?? []], + attachedContext: [...this.attachmentModel.attachments], }); if (result) { From f85d92a64d1ac919e06dd28d950807b7c38639c1 Mon Sep 17 00:00:00 2001 From: meganrogge Date: Tue, 8 Oct 2024 09:28:23 -0700 Subject: [PATCH 03/10] rm uri --- src/vs/workbench/contrib/chat/browser/actions/chatActions.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts index 56b5e7e790f5a..bac5ab19638fb 100644 --- a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts +++ b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts @@ -10,6 +10,7 @@ import { fromNowByDay } from '../../../../../base/common/date.js'; import { KeyCode, KeyMod } from '../../../../../base/common/keyCodes.js'; import { DisposableStore } from '../../../../../base/common/lifecycle.js'; import { ThemeIcon } from '../../../../../base/common/themables.js'; +import { URI } from '../../../../../base/common/uri.js'; import { ICodeEditor } from '../../../../../editor/browser/editorBrowser.js'; import { EditorAction2, ServicesAccessor } from '../../../../../editor/browser/editorExtensions.js'; import { Position } from '../../../../../editor/common/core/position.js'; @@ -121,6 +122,7 @@ class OpenChatGlobalAction extends Action2 { } } if (opts?.images) { + chatWidget.attachmentModel.clear(); for (const image of opts.images) { chatWidget.attachmentModel.addContext(image); } From dc04c49b8585b3f6f65742265da0b4cfcff82fd6 Mon Sep 17 00:00:00 2001 From: meganrogge Date: Tue, 8 Oct 2024 09:38:00 -0700 Subject: [PATCH 04/10] rearrange --- .../contrib/chat/browser/actions/chatActions.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts index bac5ab19638fb..cae43c21c461e 100644 --- a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts +++ b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts @@ -114,6 +114,12 @@ class OpenChatGlobalAction extends Action2 { chatService.addCompleteRequest(chatWidget.viewModel.sessionId, request, undefined, 0, { message: response }); } } + if (opts?.images) { + chatWidget.attachmentModel.clear(); + for (const image of opts.images) { + chatWidget.attachmentModel.addContext(image); + } + } if (opts?.query) { if (opts.isPartialQuery) { chatWidget.setInput(opts.query); @@ -121,12 +127,6 @@ class OpenChatGlobalAction extends Action2 { chatWidget.acceptInput(opts.query); } } - if (opts?.images) { - chatWidget.attachmentModel.clear(); - for (const image of opts.images) { - chatWidget.attachmentModel.addContext(image); - } - } chatWidget.focusInput(); } From aa9f763479ad63f11450718a82535f2038e4d7fc Mon Sep 17 00:00:00 2001 From: meganrogge Date: Tue, 8 Oct 2024 10:04:37 -0700 Subject: [PATCH 05/10] add comment --- src/vs/workbench/contrib/chat/browser/actions/chatActions.ts | 4 +++- src/vs/workbench/contrib/chat/common/chatModel.ts | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts index cae43c21c461e..1a34b1c74d102 100644 --- a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts +++ b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts @@ -30,6 +30,7 @@ import { ACTIVE_GROUP, IEditorService } from '../../../../services/editor/common import { IViewsService } from '../../../../services/views/common/viewsService.js'; import { ChatAgentLocation, IChatAgentService } from '../../common/chatAgents.js'; import { CONTEXT_CHAT_ENABLED, CONTEXT_CHAT_INPUT_CURSOR_AT_TOP, CONTEXT_CHAT_LOCATION, CONTEXT_IN_CHAT_INPUT, CONTEXT_IN_CHAT_SESSION, CONTEXT_IN_QUICK_CHAT } from '../../common/chatContextKeys.js'; +import { IChatRequestVariableEntry } from '../../common/chatModel.js'; import { extractAgentAndCommand } from '../../common/chatParserTypes.js'; import { IChatDetail, IChatService } from '../../common/chatService.js'; import { IChatRequestViewModel, IChatResponseViewModel, isRequestVM } from '../../common/chatViewModel.js'; @@ -63,11 +64,12 @@ export interface IChatViewOpenOptions { images?: IChatImageAttachment[]; } -export interface IChatImageAttachment { +export interface IChatImageAttachment extends IChatRequestVariableEntry { id: string; name: string; value: URI | Uint8Array; isImage: true; + isDynamic: true; } export interface IChatViewOpenRequestEntry { diff --git a/src/vs/workbench/contrib/chat/common/chatModel.ts b/src/vs/workbench/contrib/chat/common/chatModel.ts index c3b50f2e35da2..8f551141383d5 100644 --- a/src/vs/workbench/contrib/chat/common/chatModel.ts +++ b/src/vs/workbench/contrib/chat/common/chatModel.ts @@ -35,6 +35,9 @@ export interface IChatRequestVariableEntry { references?: IChatContentReference[]; // TODO are these just a 'kind'? + /** + * True if the variable has a value vs being a reference to a variable + */ isDynamic?: boolean; isFile?: boolean; isTool?: boolean; From 647ae4e61e41e24a5a4e3c2a58a3e46c0f5031e2 Mon Sep 17 00:00:00 2001 From: meganrogge Date: Tue, 8 Oct 2024 10:13:45 -0700 Subject: [PATCH 06/10] rm props from interface --- src/vs/workbench/contrib/chat/browser/actions/chatActions.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts index 1a34b1c74d102..7b103c4efbdb3 100644 --- a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts +++ b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts @@ -68,8 +68,6 @@ export interface IChatImageAttachment extends IChatRequestVariableEntry { id: string; name: string; value: URI | Uint8Array; - isImage: true; - isDynamic: true; } export interface IChatViewOpenRequestEntry { From 98c046d80bc679e8ce1faa1d37023df663b1a374 Mon Sep 17 00:00:00 2001 From: meganrogge Date: Tue, 8 Oct 2024 10:18:07 -0700 Subject: [PATCH 07/10] tweak --- .../workbench/contrib/chat/browser/actions/chatActions.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts index 7b103c4efbdb3..e42b7cb8318c7 100644 --- a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts +++ b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts @@ -64,7 +64,7 @@ export interface IChatViewOpenOptions { images?: IChatImageAttachment[]; } -export interface IChatImageAttachment extends IChatRequestVariableEntry { +export interface IChatImageAttachment { id: string; name: string; value: URI | Uint8Array; @@ -117,7 +117,11 @@ class OpenChatGlobalAction extends Action2 { if (opts?.images) { chatWidget.attachmentModel.clear(); for (const image of opts.images) { - chatWidget.attachmentModel.addContext(image); + chatWidget.attachmentModel.addContext({ + ...image, + isDynamic: true, + isImage: true + }); } } if (opts?.query) { From 78d7094991b0f4d2b784887f36316833ffbfb25f Mon Sep 17 00:00:00 2001 From: Megan Rogge Date: Tue, 8 Oct 2024 10:20:58 -0700 Subject: [PATCH 08/10] Update src/vs/workbench/contrib/chat/browser/chatWidget.ts --- src/vs/workbench/contrib/chat/browser/chatWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/chat/browser/chatWidget.ts b/src/vs/workbench/contrib/chat/browser/chatWidget.ts index a76080f0d8d9b..dd462c2d65356 100644 --- a/src/vs/workbench/contrib/chat/browser/chatWidget.ts +++ b/src/vs/workbench/contrib/chat/browser/chatWidget.ts @@ -920,7 +920,7 @@ export class ChatWidget extends Disposable implements IChatWidget { location: this.location, locationData: this._location.resolveData?.(), parserContext: { selectedAgent: this._lastSelectedAgent }, - attachedContext: [...this.attachmentModel.attachments], + attachedContext: [...this.attachmentModel.attachments] }); if (result) { From 575e6ffe1effea9f7a6125240dbcdf077aabe493 Mon Sep 17 00:00:00 2001 From: Megan Rogge Date: Tue, 8 Oct 2024 10:22:30 -0700 Subject: [PATCH 09/10] Update src/vs/workbench/contrib/chat/browser/actions/chatActions.ts --- src/vs/workbench/contrib/chat/browser/actions/chatActions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts index e42b7cb8318c7..af0b096172517 100644 --- a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts +++ b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts @@ -59,7 +59,7 @@ export interface IChatViewOpenOptions { previousRequests?: IChatViewOpenRequestEntry[]; /** - * The path to the images(s) + * The image(s) to include in the request */ images?: IChatImageAttachment[]; } From b5e4799446e3cae1eebad6596974472f986e669e Mon Sep 17 00:00:00 2001 From: meganrogge Date: Tue, 8 Oct 2024 10:40:54 -0700 Subject: [PATCH 10/10] rm --- src/vs/workbench/contrib/chat/browser/actions/chatActions.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts index af0b096172517..e272d68126fa7 100644 --- a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts +++ b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts @@ -30,7 +30,6 @@ import { ACTIVE_GROUP, IEditorService } from '../../../../services/editor/common import { IViewsService } from '../../../../services/views/common/viewsService.js'; import { ChatAgentLocation, IChatAgentService } from '../../common/chatAgents.js'; import { CONTEXT_CHAT_ENABLED, CONTEXT_CHAT_INPUT_CURSOR_AT_TOP, CONTEXT_CHAT_LOCATION, CONTEXT_IN_CHAT_INPUT, CONTEXT_IN_CHAT_SESSION, CONTEXT_IN_QUICK_CHAT } from '../../common/chatContextKeys.js'; -import { IChatRequestVariableEntry } from '../../common/chatModel.js'; import { extractAgentAndCommand } from '../../common/chatParserTypes.js'; import { IChatDetail, IChatService } from '../../common/chatService.js'; import { IChatRequestViewModel, IChatResponseViewModel, isRequestVM } from '../../common/chatViewModel.js';