@codingame/monaco-vscode-katex-common 26.1.1 → 26.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +45 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +31 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +33 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +47 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +96 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +15 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +83 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +26 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatDisabledClaudeHooksContent.css +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatHookContentPart.css +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +15 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +14 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +206 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +12 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatPendingDragAndDrop.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatPendingDragAndDrop.js +148 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +108 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +14 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +59 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.js +1 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +13 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +90 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +14 -14
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +3 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +32 -32
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.js +0 -11
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +0 -150
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +0 -338
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.js +0 -58
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.d.ts +0 -75
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +0 -364
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/interactiveEditor.css +0 -21
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/media/interactive.css +0 -36
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.d.ts +0 -110
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +0 -692
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +0 -158
|
@@ -23,10 +23,11 @@ import { IViewDescriptorService } from "@codingame/monaco-vscode-api/vscode/vs/w
|
|
|
23
23
|
import { IWorkbenchAssignmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/assignment/common/assignmentService.service";
|
|
24
24
|
import { IChatEntitlementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service";
|
|
25
25
|
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
26
|
+
import { ChatContextKeys } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys";
|
|
26
27
|
import { ChatRequestVariableSet, IChatRequestVariableEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries";
|
|
27
28
|
import { IChatMode } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes";
|
|
28
29
|
import { IChatModeService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes.service";
|
|
29
|
-
import { IChatFollowup } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
30
|
+
import { IChatFollowup, IChatQuestionCarousel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
30
31
|
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
|
|
31
32
|
import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
|
|
32
33
|
import { ChatAgentLocation, ChatModeKind } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants";
|
|
@@ -43,6 +44,8 @@ import { ChatAttachmentModel } from "../../attachments/chatAttachmentModel.js";
|
|
|
43
44
|
import { ChatImplicitContexts } from "../../attachments/chatImplicitContext.js";
|
|
44
45
|
import { IChatWidget, ISessionTypePickerDelegate, IWorkspacePickerDelegate } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
45
46
|
import { IChatContextService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.service";
|
|
47
|
+
import { ChatQuestionCarouselPart, IChatQuestionCarouselOptions } from "../chatContentParts/chatQuestionCarouselPart.js";
|
|
48
|
+
import { IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts";
|
|
46
49
|
import { ChatDragAndDrop } from "../chatDragAndDrop.js";
|
|
47
50
|
import { ChatSelectedTools } from "./chatSelectedTools.js";
|
|
48
51
|
export interface IChatInputStyles {
|
|
@@ -125,6 +128,9 @@ export declare class ChatInputPart extends Disposable implements IHistoryNavigat
|
|
|
125
128
|
private static _counter;
|
|
126
129
|
private _workingSetCollapsed;
|
|
127
130
|
private readonly _chatInputTodoListWidget;
|
|
131
|
+
private readonly _chatQuestionCarouselWidget;
|
|
132
|
+
private readonly _chatQuestionCarouselDisposables;
|
|
133
|
+
private _currentQuestionCarouselResponseId;
|
|
128
134
|
private readonly _chatEditingTodosDisposables;
|
|
129
135
|
private _lastEditingSessionResource;
|
|
130
136
|
private _onDidLoadInputState;
|
|
@@ -172,6 +178,7 @@ export declare class ChatInputPart extends Disposable implements IHistoryNavigat
|
|
|
172
178
|
private readonly attachedContextDisposables;
|
|
173
179
|
private chatEditingSessionWidgetContainer;
|
|
174
180
|
private chatInputTodoListWidgetContainer;
|
|
181
|
+
private chatQuestionCarouselContainer;
|
|
175
182
|
private chatInputWidgetsContainer;
|
|
176
183
|
private readonly _widgetController;
|
|
177
184
|
private contextUsageWidget?;
|
|
@@ -198,6 +205,7 @@ export declare class ChatInputPart extends Disposable implements IHistoryNavigat
|
|
|
198
205
|
private chatCursorAtTop;
|
|
199
206
|
private inputEditorHasFocus;
|
|
200
207
|
private currentlyEditingInputKey;
|
|
208
|
+
private editingSentRequestKey;
|
|
201
209
|
private chatModeKindKey;
|
|
202
210
|
private chatModeNameKey;
|
|
203
211
|
private withinEditSessionKey;
|
|
@@ -271,7 +279,7 @@ export declare class ChatInputPart extends Disposable implements IHistoryNavigat
|
|
|
271
279
|
private getSelectedModelStorageKey;
|
|
272
280
|
private getSelectedModelIsDefaultStorageKey;
|
|
273
281
|
private initSelectedModel;
|
|
274
|
-
setEditing(enabled: boolean): void;
|
|
282
|
+
setEditing(enabled: boolean, editingSentRequest: ChatContextKeys.EditingRequestType | undefined): void;
|
|
275
283
|
switchModel(modelMetadata: Pick<ILanguageModelChatMetadata, "vendor" | "id" | "family">): void;
|
|
276
284
|
switchModelByQualifiedName(qualifiedModelNames: readonly string[]): boolean;
|
|
277
285
|
switchToNextModel(): void;
|
|
@@ -407,6 +415,10 @@ export declare class ChatInputPart extends Disposable implements IHistoryNavigat
|
|
|
407
415
|
private handleAttachmentNavigation;
|
|
408
416
|
renderChatTodoListWidget(chatSessionResource: URI): Promise<void>;
|
|
409
417
|
clearTodoListWidget(sessionResource: URI | undefined, force: boolean): void;
|
|
418
|
+
renderQuestionCarousel(carousel: IChatQuestionCarousel, context: IChatContentPartRenderContext, options: IChatQuestionCarouselOptions): ChatQuestionCarouselPart;
|
|
419
|
+
clearQuestionCarousel(responseId?: string): void;
|
|
420
|
+
get questionCarouselResponseId(): string | undefined;
|
|
421
|
+
get questionCarousel(): ChatQuestionCarouselPart | undefined;
|
|
410
422
|
setWorkingSetCollapsed(collapsed: boolean): void;
|
|
411
423
|
renderChatEditingSessionState(chatEditingSession: IChatEditingSession | null): void;
|
|
412
424
|
private renderChatEditingSessionWithEntries;
|
|
@@ -88,6 +88,7 @@ import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/w
|
|
|
88
88
|
import { ILanguageModelChatMetadata } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels';
|
|
89
89
|
import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
|
|
90
90
|
import { getChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
|
|
91
|
+
import { isResponseVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel';
|
|
91
92
|
import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatAgents.service';
|
|
92
93
|
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
|
|
93
94
|
import { ChatHistoryNavigator } from '../../../common/widget/chatWidgetHistoryService.js';
|
|
@@ -104,6 +105,7 @@ import { resizeImage } from '@codingame/monaco-vscode-api/vscode/vs/workbench/co
|
|
|
104
105
|
import { ChatSessionPickerActionItem } from '../../chatSessions/chatSessionPickerActionItem.js';
|
|
105
106
|
import { SearchableOptionPickerActionItem } from '../../chatSessions/searchableOptionPickerActionItem.js';
|
|
106
107
|
import { IChatContextService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.service';
|
|
108
|
+
import { ChatQuestionCarouselPart } from '../chatContentParts/chatQuestionCarouselPart.js';
|
|
107
109
|
import { CollapsibleListPool } from '../chatContentParts/chatReferencesContentPart.js';
|
|
108
110
|
import { ChatTodoListWidget } from '../chatContentParts/chatTodoListWidget.js';
|
|
109
111
|
import { ChatDragAndDrop } from '../chatDragAndDrop.js';
|
|
@@ -116,6 +118,7 @@ import { ModePickerActionItem } from './modePickerActionItem.js';
|
|
|
116
118
|
import { SessionTypePickerActionItem } from './sessionTargetPickerActionItem.js';
|
|
117
119
|
import { WorkspacePickerActionItem } from './workspacePickerActionItem.js';
|
|
118
120
|
import { ChatContextUsageWidget } from '../../widgetHosts/viewPane/chatContextUsageWidget.js';
|
|
121
|
+
import { Target } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService';
|
|
119
122
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
120
123
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
121
124
|
import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
|
|
@@ -296,6 +299,8 @@ let ChatInputPart = class ChatInputPart extends Disposable {
|
|
|
296
299
|
this.viewDescriptorService = viewDescriptorService;
|
|
297
300
|
this._workingSetCollapsed = observableValue("chatInputPart.workingSetCollapsed", true);
|
|
298
301
|
this._chatInputTodoListWidget = this._register(( new MutableDisposable()));
|
|
302
|
+
this._chatQuestionCarouselWidget = this._register(( new MutableDisposable()));
|
|
303
|
+
this._chatQuestionCarouselDisposables = this._register(( new DisposableStore()));
|
|
299
304
|
this._chatEditingTodosDisposables = this._register(( new DisposableStore()));
|
|
300
305
|
this._onDidLoadInputState = this._register(( new Emitter()));
|
|
301
306
|
this.onDidLoadInputState = this._onDidLoadInputState.event;
|
|
@@ -553,8 +558,9 @@ let ChatInputPart = class ChatInputPart extends Disposable {
|
|
|
553
558
|
}
|
|
554
559
|
}));
|
|
555
560
|
}
|
|
556
|
-
setEditing(enabled) {
|
|
561
|
+
setEditing(enabled, editingSentRequest) {
|
|
557
562
|
this.currentlyEditingInputKey?.set(enabled);
|
|
563
|
+
this.editingSentRequestKey?.set(editingSentRequest);
|
|
558
564
|
}
|
|
559
565
|
switchModel(modelMetadata) {
|
|
560
566
|
const models = this.getModels();
|
|
@@ -858,40 +864,40 @@ let ChatInputPart = class ChatInputPart extends Disposable {
|
|
|
858
864
|
}
|
|
859
865
|
const mode = this._currentModeObservable.get();
|
|
860
866
|
const modelName = this._currentLanguageModel.get()?.metadata.name;
|
|
861
|
-
const modelInfo = modelName ? ( localize(
|
|
867
|
+
const modelInfo = modelName ? ( localize(6155, ", {0}. ", modelName)) : "";
|
|
862
868
|
let modeLabel = "";
|
|
863
869
|
if (!mode.isBuiltin) {
|
|
864
870
|
const mode = this.currentModeObs.get();
|
|
865
|
-
modeLabel = ( localize(
|
|
871
|
+
modeLabel = ( localize(6156, "({0}), {1}", mode.label.get(), mode.description.get()));
|
|
866
872
|
} else {
|
|
867
873
|
switch (this.currentModeKind) {
|
|
868
874
|
case ChatModeKind.Agent:
|
|
869
|
-
modeLabel = ( localize(
|
|
875
|
+
modeLabel = ( localize(6157, "(Agent), edit files in your workspace."));
|
|
870
876
|
break;
|
|
871
877
|
case ChatModeKind.Edit:
|
|
872
|
-
modeLabel = ( localize(
|
|
878
|
+
modeLabel = ( localize(6158, "(Edit), edit files in your workspace."));
|
|
873
879
|
break;
|
|
874
880
|
case ChatModeKind.Ask:
|
|
875
881
|
default:
|
|
876
|
-
modeLabel = ( localize(
|
|
882
|
+
modeLabel = ( localize(6159, "(Ask), ask questions or type / for topics."));
|
|
877
883
|
break;
|
|
878
884
|
}
|
|
879
885
|
}
|
|
880
886
|
if (verbose) {
|
|
881
887
|
return kbLabel ? ( localize(
|
|
882
|
-
|
|
888
|
+
6160,
|
|
883
889
|
"Chat Input {0}{1} Press Enter to send out the request. Use {2} for Chat Accessibility Help.",
|
|
884
890
|
modeLabel,
|
|
885
891
|
modelInfo,
|
|
886
892
|
kbLabel
|
|
887
893
|
)) : ( localize(
|
|
888
|
-
|
|
894
|
+
6161,
|
|
889
895
|
"Chat Input {0}{1} Press Enter to send out the request. Use the Chat Accessibility Help command for more information.",
|
|
890
896
|
modeLabel,
|
|
891
897
|
modelInfo
|
|
892
898
|
));
|
|
893
899
|
} else {
|
|
894
|
-
return localize(
|
|
900
|
+
return localize(6162, "Chat Input {0}{1}.", modeLabel, modelInfo);
|
|
895
901
|
}
|
|
896
902
|
}
|
|
897
903
|
validateCurrentChatMode() {
|
|
@@ -1123,7 +1129,7 @@ let ChatInputPart = class ChatInputPart extends Disposable {
|
|
|
1123
1129
|
const sessionResource = this._widget?.viewModel?.model.sessionResource;
|
|
1124
1130
|
const ctx = sessionResource ? this.chatService.getChatSessionFromInternalUri(sessionResource) : undefined;
|
|
1125
1131
|
const customAgentTarget = ctx && this.chatSessionsService.getCustomAgentTargetForSessionType(ctx.chatSessionType);
|
|
1126
|
-
this.chatSessionHasCustomAgentTarget.set(
|
|
1132
|
+
this.chatSessionHasCustomAgentTarget.set(customAgentTarget !== Target.Undefined);
|
|
1127
1133
|
if (customAgentTarget) {
|
|
1128
1134
|
const agentOption = this.chatSessionsService.getSessionOption(ctx.chatSessionResource, agentOptionId);
|
|
1129
1135
|
if (typeof agentOption !== "undefined") {
|
|
@@ -1346,10 +1352,12 @@ let ChatInputPart = class ChatInputPart extends Disposable {
|
|
|
1346
1352
|
this.refreshChatSessionPickers();
|
|
1347
1353
|
this.tryUpdateWidgetController();
|
|
1348
1354
|
this.updateContextUsageWidget();
|
|
1355
|
+
this.clearQuestionCarousel();
|
|
1349
1356
|
}));
|
|
1350
1357
|
let elements;
|
|
1351
1358
|
if (this.options.renderStyle === "compact") {
|
|
1352
1359
|
elements = h(".interactive-input-part", [h(".interactive-input-and-edit-session", [
|
|
1360
|
+
h(".chat-question-carousel-widget-container@chatQuestionCarouselContainer"),
|
|
1353
1361
|
h(".chat-input-widgets-container@chatInputWidgetsContainer"),
|
|
1354
1362
|
h(".chat-todo-list-widget-container@chatInputTodoListWidgetContainer"),
|
|
1355
1363
|
h(".chat-editing-session@chatEditingSessionWidgetContainer"),
|
|
@@ -1369,6 +1377,7 @@ let ChatInputPart = class ChatInputPart extends Disposable {
|
|
|
1369
1377
|
])]);
|
|
1370
1378
|
} else {
|
|
1371
1379
|
elements = h(".interactive-input-part", [
|
|
1380
|
+
h(".chat-question-carousel-widget-container@chatQuestionCarouselContainer"),
|
|
1372
1381
|
h(".interactive-input-followups@followupsContainer"),
|
|
1373
1382
|
h(".chat-input-widgets-container@chatInputWidgetsContainer"),
|
|
1374
1383
|
h(".chat-todo-list-widget-container@chatInputTodoListWidgetContainer"),
|
|
@@ -1403,6 +1412,7 @@ let ChatInputPart = class ChatInputPart extends Disposable {
|
|
|
1403
1412
|
const attachmentToolbarContainer = elements.attachmentToolbar;
|
|
1404
1413
|
this.chatEditingSessionWidgetContainer = elements.chatEditingSessionWidgetContainer;
|
|
1405
1414
|
this.chatInputTodoListWidgetContainer = elements.chatInputTodoListWidgetContainer;
|
|
1415
|
+
this.chatQuestionCarouselContainer = elements.chatQuestionCarouselContainer;
|
|
1406
1416
|
this.chatInputWidgetsContainer = elements.chatInputWidgetsContainer;
|
|
1407
1417
|
this.contextUsageWidgetContainer = elements.contextUsageWidgetContainer;
|
|
1408
1418
|
this.contextUsageWidget = this._register(this.instantiationService.createInstance(ChatContextUsageWidget));
|
|
@@ -1433,6 +1443,7 @@ let ChatInputPart = class ChatInputPart extends Disposable {
|
|
|
1433
1443
|
const inputScopedContextKeyService = this._register(this.contextKeyService.createScoped(inputContainer));
|
|
1434
1444
|
ChatContextKeys.inChatInput.bindTo(inputScopedContextKeyService).set(true);
|
|
1435
1445
|
this.currentlyEditingInputKey = ChatContextKeys.currentlyEditingInput.bindTo(inputScopedContextKeyService);
|
|
1446
|
+
this.editingSentRequestKey = ChatContextKeys.editingRequestType.bindTo(this.contextKeyService);
|
|
1436
1447
|
const scopedInstantiationService = this._register(this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, inputScopedContextKeyService]))));
|
|
1437
1448
|
const {
|
|
1438
1449
|
historyNavigationBackwardsEnablement,
|
|
@@ -1607,7 +1618,7 @@ let ChatInputPart = class ChatInputPart extends Disposable {
|
|
|
1607
1618
|
customAgentTarget: () => {
|
|
1608
1619
|
const sessionResource = this._widget?.viewModel?.model.sessionResource;
|
|
1609
1620
|
const ctx = sessionResource && this.chatService.getChatSessionFromInternalUri(sessionResource);
|
|
1610
|
-
return ctx && this.chatSessionsService.getCustomAgentTargetForSessionType(ctx.chatSessionType);
|
|
1621
|
+
return (ctx && this.chatSessionsService.getCustomAgentTargetForSessionType(ctx.chatSessionType)) ?? Target.Undefined;
|
|
1611
1622
|
}
|
|
1612
1623
|
};
|
|
1613
1624
|
return this.modeWidget = this.instantiationService.createInstance(ModePickerActionItem, action, delegate, pickerOptions);
|
|
@@ -1796,7 +1807,7 @@ let ChatInputPart = class ChatInputPart extends Disposable {
|
|
|
1796
1807
|
));
|
|
1797
1808
|
this.addFilesToolbar.context = {
|
|
1798
1809
|
widget,
|
|
1799
|
-
placeholder: ( localize(
|
|
1810
|
+
placeholder: ( localize(6163, "Search for files and context to add to your request"))
|
|
1800
1811
|
};
|
|
1801
1812
|
this.renderAttachedContext();
|
|
1802
1813
|
const inputResizeObserver = this._register(new DisposableResizeObserver(() => {
|
|
@@ -2120,6 +2131,39 @@ let ChatInputPart = class ChatInputPart extends Disposable {
|
|
|
2120
2131
|
clearTodoListWidget(sessionResource, force) {
|
|
2121
2132
|
this._chatInputTodoListWidget.value?.clear(sessionResource, force);
|
|
2122
2133
|
}
|
|
2134
|
+
renderQuestionCarousel(carousel, context, options) {
|
|
2135
|
+
if (this._chatQuestionCarouselWidget.value) {
|
|
2136
|
+
const existingCarousel = this._chatQuestionCarouselWidget.value;
|
|
2137
|
+
const existingResolveId = existingCarousel.carousel.resolveId;
|
|
2138
|
+
if (existingResolveId && carousel.resolveId && existingResolveId === carousel.resolveId) {
|
|
2139
|
+
return existingCarousel;
|
|
2140
|
+
}
|
|
2141
|
+
this.clearQuestionCarousel();
|
|
2142
|
+
}
|
|
2143
|
+
this._currentQuestionCarouselResponseId = isResponseVM(context.element) ? context.element.requestId : undefined;
|
|
2144
|
+
const part = this._chatQuestionCarouselDisposables.add(
|
|
2145
|
+
this.instantiationService.createInstance(ChatQuestionCarouselPart, carousel, context, options)
|
|
2146
|
+
);
|
|
2147
|
+
this._chatQuestionCarouselWidget.value = part;
|
|
2148
|
+
clearNode(this.chatQuestionCarouselContainer);
|
|
2149
|
+
append(this.chatQuestionCarouselContainer, part.domNode);
|
|
2150
|
+
return part;
|
|
2151
|
+
}
|
|
2152
|
+
clearQuestionCarousel(responseId) {
|
|
2153
|
+
if (responseId && this._currentQuestionCarouselResponseId !== responseId) {
|
|
2154
|
+
return;
|
|
2155
|
+
}
|
|
2156
|
+
this._chatQuestionCarouselDisposables.clear();
|
|
2157
|
+
this._chatQuestionCarouselWidget.clear();
|
|
2158
|
+
this._currentQuestionCarouselResponseId = undefined;
|
|
2159
|
+
clearNode(this.chatQuestionCarouselContainer);
|
|
2160
|
+
}
|
|
2161
|
+
get questionCarouselResponseId() {
|
|
2162
|
+
return this._currentQuestionCarouselResponseId;
|
|
2163
|
+
}
|
|
2164
|
+
get questionCarousel() {
|
|
2165
|
+
return this._chatQuestionCarouselWidget.value;
|
|
2166
|
+
}
|
|
2123
2167
|
setWorkingSetCollapsed(collapsed) {
|
|
2124
2168
|
this._workingSetCollapsed.set(collapsed, undefined);
|
|
2125
2169
|
}
|
|
@@ -2237,7 +2281,7 @@ let ChatInputPart = class ChatInputPart extends Disposable {
|
|
|
2237
2281
|
const button = this._chatEditsActionsDisposables.add(( new ButtonWithIcon(overviewTitle, {
|
|
2238
2282
|
supportIcons: true,
|
|
2239
2283
|
secondary: true,
|
|
2240
|
-
ariaLabel: ( localize(
|
|
2284
|
+
ariaLabel: ( localize(6164, "Toggle changed files."))
|
|
2241
2285
|
})));
|
|
2242
2286
|
const topLevelStats = derived(reader => {
|
|
2243
2287
|
const entries = editSessionEntriesObs.read(reader);
|
|
@@ -2306,10 +2350,10 @@ let ChatInputPart = class ChatInputPart extends Disposable {
|
|
|
2306
2350
|
removed,
|
|
2307
2351
|
shouldShowEditingSession
|
|
2308
2352
|
} = topLevelStats.read(reader);
|
|
2309
|
-
const buttonLabel = files === 1 ? ( localize(
|
|
2353
|
+
const buttonLabel = files === 1 ? ( localize(6165, "1 file changed")) : ( localize(6166, "{0} files changed", files));
|
|
2310
2354
|
button.label = buttonLabel;
|
|
2311
2355
|
button.element.setAttribute("aria-label", ( localize(
|
|
2312
|
-
|
|
2356
|
+
6167,
|
|
2313
2357
|
"{0}, {1} lines added, {2} lines removed",
|
|
2314
2358
|
buttonLabel,
|
|
2315
2359
|
added,
|
|
@@ -102,8 +102,7 @@ let ChatSelectedTools = class ChatSelectedTools extends Disposable {
|
|
|
102
102
|
if (!currentMap && currentMode.kind === ChatModeKind.Agent) {
|
|
103
103
|
const modeTools = currentMode.customTools?.read(r);
|
|
104
104
|
if (modeTools) {
|
|
105
|
-
|
|
106
|
-
currentMap = ToolEnablementStates.fromMap(this._toolsService.toToolAndToolSetEnablementMap(modeTools, target, lm));
|
|
105
|
+
currentMap = ToolEnablementStates.fromMap(this._toolsService.toToolAndToolSetEnablementMap(modeTools, lm));
|
|
107
106
|
}
|
|
108
107
|
}
|
|
109
108
|
if (!currentMap) {
|
|
@@ -42,13 +42,13 @@ class DelegationSessionPickerActionItem extends SessionTypePickerActionItem {
|
|
|
42
42
|
_getSessionCategory(sessionTypeItem) {
|
|
43
43
|
if (isFirstPartyAgentSessionProvider(sessionTypeItem.type)) {
|
|
44
44
|
return {
|
|
45
|
-
label: ( localize(
|
|
45
|
+
label: ( localize(6181, "Continue In")),
|
|
46
46
|
order: 1,
|
|
47
47
|
showHeader: true
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
return {
|
|
51
|
-
label: ( localize(
|
|
51
|
+
label: ( localize(6182, "Continue In (Third Party)")),
|
|
52
52
|
order: 2,
|
|
53
53
|
showHeader: false
|
|
54
54
|
};
|
|
@@ -64,7 +64,7 @@ class DelegationSessionPickerActionItem extends SessionTypePickerActionItem {
|
|
|
64
64
|
const learnMoreUrl = "https://aka.ms/vscode-continue-chat-in";
|
|
65
65
|
return {
|
|
66
66
|
id: "workbench.action.chat.agentOverview.learnMoreHandOff",
|
|
67
|
-
label: ( localize(
|
|
67
|
+
label: ( localize(6183, "Learn about agent handoff...")),
|
|
68
68
|
tooltip: learnMoreUrl,
|
|
69
69
|
class: undefined,
|
|
70
70
|
enabled: true,
|
|
@@ -77,7 +77,7 @@ class DelegationSessionPickerActionItem extends SessionTypePickerActionItem {
|
|
|
77
77
|
return [{
|
|
78
78
|
id: "newChatSession",
|
|
79
79
|
class: undefined,
|
|
80
|
-
label: ( localize(
|
|
80
|
+
label: ( localize(6184, "New Chat Session")),
|
|
81
81
|
tooltip: "",
|
|
82
82
|
hover: {
|
|
83
83
|
content: "",
|
|
@@ -87,7 +87,7 @@ class DelegationSessionPickerActionItem extends SessionTypePickerActionItem {
|
|
|
87
87
|
icon: Codicon.plus,
|
|
88
88
|
enabled: true,
|
|
89
89
|
category: {
|
|
90
|
-
label: ( localize(
|
|
90
|
+
label: ( localize(6185, "New Chat Session")),
|
|
91
91
|
order: 0,
|
|
92
92
|
showHeader: false
|
|
93
93
|
},
|
|
@@ -13,6 +13,7 @@ import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platfo
|
|
|
13
13
|
import { IChatAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatAgents.service";
|
|
14
14
|
import { IChatMode } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes";
|
|
15
15
|
import { IChatModeService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes.service";
|
|
16
|
+
import { Target } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService";
|
|
16
17
|
import { ChatInputPickerActionViewItem, IChatInputPickerOptions } from "./chatInputPickerActionItem.js";
|
|
17
18
|
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
18
19
|
export interface IModePickerDelegate {
|
|
@@ -22,7 +23,7 @@ export interface IModePickerDelegate {
|
|
|
22
23
|
* When set, the mode picker will show custom agents whose target matches this value.
|
|
23
24
|
* Custom agents without a target are always shown in all session types. If no agents match the target, shows a default "Agent" option.
|
|
24
25
|
*/
|
|
25
|
-
readonly customAgentTarget?: () =>
|
|
26
|
+
readonly customAgentTarget?: () => Target;
|
|
26
27
|
}
|
|
27
28
|
export declare class ModePickerActionItem extends ChatInputPickerActionViewItem {
|
|
28
29
|
private readonly delegate;
|
|
@@ -23,7 +23,7 @@ import { ChatMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contr
|
|
|
23
23
|
import { IChatModeService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes.service';
|
|
24
24
|
import { isOrganizationPromptFile } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/utils/promptsServiceUtils';
|
|
25
25
|
import { ChatConfiguration, ChatModeKind, ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
26
|
-
import { PromptsStorage } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService';
|
|
26
|
+
import { Target, PromptsStorage } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService';
|
|
27
27
|
import { getOpenChatActionIdForMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
28
28
|
import { ToggleAgentModeActionId } from '../../actions/chatExecuteActions.js';
|
|
29
29
|
import { ChatInputPickerActionViewItem } from './chatInputPickerActionItem.js';
|
|
@@ -48,17 +48,17 @@ let ModePickerActionItem = class ModePickerActionItem extends ChatInputPickerAct
|
|
|
48
48
|
telemetryService,
|
|
49
49
|
openerService
|
|
50
50
|
) {
|
|
51
|
-
const customAgentTarget = delegate.customAgentTarget?.();
|
|
51
|
+
const customAgentTarget = delegate.customAgentTarget?.() ?? Target.Undefined;
|
|
52
52
|
const builtInCategory = {
|
|
53
|
-
label: ( localize(
|
|
53
|
+
label: ( localize(6201, "Built-In")),
|
|
54
54
|
order: 0
|
|
55
55
|
};
|
|
56
56
|
const customCategory = {
|
|
57
|
-
label: ( localize(
|
|
57
|
+
label: ( localize(6202, "Custom")),
|
|
58
58
|
order: 1
|
|
59
59
|
};
|
|
60
60
|
const policyDisabledCategory = {
|
|
61
|
-
label: ( localize(
|
|
61
|
+
label: ( localize(6203, "Managed by your organization")),
|
|
62
62
|
order: 999,
|
|
63
63
|
showHeader: true
|
|
64
64
|
};
|
|
@@ -73,11 +73,11 @@ let ModePickerActionItem = class ModePickerActionItem extends ChatInputPickerAct
|
|
|
73
73
|
if (mode.source?.storage === PromptsStorage.extension) {
|
|
74
74
|
icon = Codicon.eye;
|
|
75
75
|
id = `viewAgent:${mode.id}`;
|
|
76
|
-
label = ( localize(
|
|
76
|
+
label = ( localize(6204, "View {0} agent", mode.label.get()));
|
|
77
77
|
} else {
|
|
78
78
|
icon = Codicon.edit;
|
|
79
79
|
id = `editAgent:${mode.id}`;
|
|
80
|
-
label = ( localize(
|
|
80
|
+
label = ( localize(6205, "Edit {0} agent", mode.label.get()));
|
|
81
81
|
}
|
|
82
82
|
const modeResource = mode.uri;
|
|
83
83
|
toolbarActions.push({
|
|
@@ -90,8 +90,8 @@ let ModePickerActionItem = class ModePickerActionItem extends ChatInputPickerAct
|
|
|
90
90
|
openerService.open(modeResource.get());
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
|
-
} else if (
|
|
94
|
-
const label = ( localize(
|
|
93
|
+
} else if (customAgentTarget === Target.Undefined) {
|
|
94
|
+
const label = ( localize(6206, "Configure tools for {0} agent", mode.label.get()));
|
|
95
95
|
toolbarActions.push({
|
|
96
96
|
id: `configureTools:${mode.id}`,
|
|
97
97
|
label,
|
|
@@ -166,8 +166,8 @@ let ModePickerActionItem = class ModePickerActionItem extends ChatInputPickerAct
|
|
|
166
166
|
const modes = chatModeService.getModes();
|
|
167
167
|
const currentMode = delegate.currentMode.get();
|
|
168
168
|
const filteredCustomModes = modes.custom.filter(mode => {
|
|
169
|
-
const target = mode.target
|
|
170
|
-
return isUserDefinedCustomAgent(mode) && (
|
|
169
|
+
const target = mode.target.get();
|
|
170
|
+
return isUserDefinedCustomAgent(mode) && (target === customAgentTarget);
|
|
171
171
|
});
|
|
172
172
|
const checked = currentMode.id === ChatMode.Agent.id;
|
|
173
173
|
const defaultAction = {
|
|
@@ -204,7 +204,7 @@ let ModePickerActionItem = class ModePickerActionItem extends ChatInputPickerAct
|
|
|
204
204
|
}
|
|
205
205
|
};
|
|
206
206
|
const modePickerActionWidgetOptions = {
|
|
207
|
-
actionProvider: customAgentTarget ? actionProviderWithCustomAgentTarget : actionProvider,
|
|
207
|
+
actionProvider: customAgentTarget !== Target.Undefined ? actionProviderWithCustomAgentTarget : actionProvider,
|
|
208
208
|
actionBarActionProvider: {
|
|
209
209
|
getActions: () => this.getModePickerActionBarActions()
|
|
210
210
|
},
|
|
@@ -29,12 +29,12 @@ function modelDelegateToWidgetActionsProvider(delegate, telemetryService, picker
|
|
|
29
29
|
checked: true,
|
|
30
30
|
category: DEFAULT_MODEL_PICKER_CATEGORY,
|
|
31
31
|
class: undefined,
|
|
32
|
-
description: ( localize(
|
|
33
|
-
tooltip: ( localize(
|
|
34
|
-
label: ( localize(
|
|
32
|
+
description: ( localize(6207, "Best for your request based on capacity and performance.")),
|
|
33
|
+
tooltip: ( localize(6208, "Auto")),
|
|
34
|
+
label: ( localize(6208, "Auto")),
|
|
35
35
|
hover: {
|
|
36
36
|
content: ( localize(
|
|
37
|
-
|
|
37
|
+
6209,
|
|
38
38
|
"Automatically selects the best model for your task based on context and complexity."
|
|
39
39
|
)),
|
|
40
40
|
position: pickerOptions.hoverPosition
|
|
@@ -78,9 +78,9 @@ function getModelPickerActionBarActionProvider(commandService, chatEntitlementSe
|
|
|
78
78
|
if (chatEntitlementService.entitlement === ChatEntitlement.Free || chatEntitlementService.entitlement === ChatEntitlement.Pro || chatEntitlementService.entitlement === ChatEntitlement.ProPlus || chatEntitlementService.entitlement === ChatEntitlement.Business || chatEntitlementService.entitlement === ChatEntitlement.Enterprise || chatEntitlementService.isInternal) {
|
|
79
79
|
additionalActions.push({
|
|
80
80
|
id: "manageModels",
|
|
81
|
-
label: ( localize(
|
|
81
|
+
label: ( localize(6210, "Manage Models...")),
|
|
82
82
|
enabled: true,
|
|
83
|
-
tooltip: ( localize(
|
|
83
|
+
tooltip: ( localize(6211, "Manage Language Models")),
|
|
84
84
|
class: undefined,
|
|
85
85
|
run: () => {
|
|
86
86
|
commandService.executeCommand(MANAGE_CHAT_COMMAND_ID);
|
|
@@ -91,9 +91,9 @@ function getModelPickerActionBarActionProvider(commandService, chatEntitlementSe
|
|
|
91
91
|
if (isNewOrAnonymousUser || chatEntitlementService.entitlement === ChatEntitlement.Free) {
|
|
92
92
|
additionalActions.push({
|
|
93
93
|
id: "moreModels",
|
|
94
|
-
label: isNewOrAnonymousUser ? ( localize(
|
|
94
|
+
label: isNewOrAnonymousUser ? ( localize(6212, "Add Language Models")) : ( localize(6213, "Add Premium Models")),
|
|
95
95
|
enabled: true,
|
|
96
|
-
tooltip: isNewOrAnonymousUser ? ( localize(
|
|
96
|
+
tooltip: isNewOrAnonymousUser ? ( localize(6214, "Add Language Models")) : ( localize(6215, "Add Premium Models")),
|
|
97
97
|
class: undefined,
|
|
98
98
|
run: () => {
|
|
99
99
|
const commandId = isNewOrAnonymousUser ? "workbench.action.chat.triggerSetup" : "workbench.action.chat.upgradePlan";
|
|
@@ -122,7 +122,7 @@ let ModelPickerActionItem = class ModelPickerActionItem extends ChatInputPickerA
|
|
|
122
122
|
) {
|
|
123
123
|
const actionWithLabel = {
|
|
124
124
|
...action,
|
|
125
|
-
label: delegate.currentModel.get()?.metadata.name ?? ( localize(
|
|
125
|
+
label: delegate.currentModel.get()?.metadata.name ?? ( localize(6208, "Auto")),
|
|
126
126
|
run: () => {}
|
|
127
127
|
};
|
|
128
128
|
const modelPickerActionWidgetOptions = {
|
|
@@ -153,7 +153,7 @@ let ModelPickerActionItem = class ModelPickerActionItem extends ChatInputPickerA
|
|
|
153
153
|
}));
|
|
154
154
|
}
|
|
155
155
|
getHoverContents() {
|
|
156
|
-
const label = `${( localize(
|
|
156
|
+
const label = `${( localize(6216, "Pick Model"))}${super.getHoverContents()}`;
|
|
157
157
|
const {
|
|
158
158
|
statusIcon,
|
|
159
159
|
tooltip
|
|
@@ -162,8 +162,8 @@ let ModelPickerActionItem = class ModelPickerActionItem extends ChatInputPickerA
|
|
|
162
162
|
}
|
|
163
163
|
setAriaLabelAttributes(element) {
|
|
164
164
|
super.setAriaLabelAttributes(element);
|
|
165
|
-
const modelName = this.currentModel?.metadata.name ?? ( localize(
|
|
166
|
-
element.ariaLabel = ( localize(
|
|
165
|
+
const modelName = this.currentModel?.metadata.name ?? ( localize(6208, "Auto"));
|
|
166
|
+
element.ariaLabel = ( localize(6217, "Pick Model, {0}", modelName));
|
|
167
167
|
}
|
|
168
168
|
renderLabel(element) {
|
|
169
169
|
const {
|
|
@@ -175,7 +175,7 @@ let ModelPickerActionItem = class ModelPickerActionItem extends ChatInputPickerA
|
|
|
175
175
|
const iconElement = renderIcon(statusIcon);
|
|
176
176
|
domChildren.push(iconElement);
|
|
177
177
|
}
|
|
178
|
-
domChildren.push($("span.chat-input-picker-label", undefined, name ?? ( localize(
|
|
178
|
+
domChildren.push($("span.chat-input-picker-label", undefined, name ?? ( localize(6208, "Auto"))));
|
|
179
179
|
domChildren.push(...renderLabelWithIcons(`$(chevron-down)`));
|
|
180
180
|
reset(element, ...domChildren);
|
|
181
181
|
this.setAriaLabelAttributes(element);
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js
CHANGED
|
@@ -11,15 +11,17 @@ import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platf
|
|
|
11
11
|
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
12
12
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
13
13
|
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
14
|
-
import { getAgentSessionProviderIcon, AgentSessionProviders, getAgentSessionProviderDescription, getAgentSessionProviderName, getAgentSessionProvider, isFirstPartyAgentSessionProvider } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
|
|
14
|
+
import { getAgentSessionProviderIcon, backgroundAgentDisplayName, AgentSessionProviders, getAgentSessionProviderDescription, getAgentSessionProviderName, getAgentSessionProvider, isFirstPartyAgentSessionProvider } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
|
|
15
15
|
import { ChatInputPickerActionViewItem } from './chatInputPickerActionItem.js';
|
|
16
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
17
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
16
18
|
|
|
17
19
|
const firstPartyCategory = {
|
|
18
|
-
label: ( localize(
|
|
20
|
+
label: ( localize(6218, "Agent Types")),
|
|
19
21
|
order: 1
|
|
20
22
|
};
|
|
21
23
|
const otherCategory = {
|
|
22
|
-
label: ( localize(
|
|
24
|
+
label: ( localize(6219, "Other")),
|
|
23
25
|
order: 2
|
|
24
26
|
};
|
|
25
27
|
let SessionTypePickerActionItem = class SessionTypePickerActionItem extends ChatInputPickerActionViewItem {
|
|
@@ -99,10 +101,16 @@ let SessionTypePickerActionItem = class SessionTypePickerActionItem extends Chat
|
|
|
99
101
|
this.commandService = commandService;
|
|
100
102
|
this.openerService = openerService;
|
|
101
103
|
this._sessionTypeItems = [];
|
|
102
|
-
this._updateAgentSessionItems();
|
|
103
104
|
this._register(this.chatSessionsService.onDidChangeAvailability(() => {
|
|
104
105
|
this._updateAgentSessionItems();
|
|
105
106
|
}));
|
|
107
|
+
this._register(autorun(reader => {
|
|
108
|
+
backgroundAgentDisplayName.read(reader);
|
|
109
|
+
this._updateAgentSessionItems();
|
|
110
|
+
if (this.element) {
|
|
111
|
+
this.renderLabel(this.element);
|
|
112
|
+
}
|
|
113
|
+
}));
|
|
106
114
|
}
|
|
107
115
|
_run(sessionTypeItem) {
|
|
108
116
|
if (this.delegate.setActiveSessionProvider) {
|
|
@@ -124,7 +132,7 @@ let SessionTypePickerActionItem = class SessionTypePickerActionItem extends Chat
|
|
|
124
132
|
const learnMoreUrl = "https://code.visualstudio.com/docs/copilot/agents/overview";
|
|
125
133
|
return {
|
|
126
134
|
id: "workbench.action.chat.agentOverview.learnMore",
|
|
127
|
-
label: ( localize(
|
|
135
|
+
label: ( localize(6220, "Learn about agent types...")),
|
|
128
136
|
tooltip: learnMoreUrl,
|
|
129
137
|
class: undefined,
|
|
130
138
|
enabled: true,
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js
CHANGED
|
@@ -48,10 +48,10 @@ let WorkspacePickerActionItem = class WorkspacePickerActionItem extends ChatInpu
|
|
|
48
48
|
actions.push({
|
|
49
49
|
...action,
|
|
50
50
|
id: "workspace.openFolder",
|
|
51
|
-
label: ( localize(
|
|
51
|
+
label: ( localize(6221, "Open Folder...")),
|
|
52
52
|
checked: false,
|
|
53
53
|
enabled: true,
|
|
54
|
-
tooltip: ( localize(
|
|
54
|
+
tooltip: ( localize(6222, "Open Folder...")),
|
|
55
55
|
run: async () => {
|
|
56
56
|
this.commandService.executeCommand(this.delegate.openFolderCommand);
|
|
57
57
|
}
|
|
@@ -103,7 +103,7 @@ let WorkspacePickerActionItem = class WorkspacePickerActionItem extends ChatInpu
|
|
|
103
103
|
labelElements.push($("span.chat-input-picker-label", undefined, label));
|
|
104
104
|
} else {
|
|
105
105
|
labelElements.push(...renderLabelWithIcons(`$(folder)`));
|
|
106
|
-
labelElements.push($("span.chat-input-picker-label", undefined, ( localize(
|
|
106
|
+
labelElements.push($("span.chat-input-picker-label", undefined, ( localize(6223, "Workspace"))));
|
|
107
107
|
}
|
|
108
108
|
labelElements.push(...renderLabelWithIcons(`$(chevron-down)`));
|
|
109
109
|
reset(element, ...labelElements);
|