@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
|
@@ -53,10 +53,10 @@ let ChatQuotaExceededPart = class ChatQuotaExceededPart extends Disposable {
|
|
|
53
53
|
switch (chatEntitlementService.entitlement) {
|
|
54
54
|
case ChatEntitlement.Pro:
|
|
55
55
|
case ChatEntitlement.ProPlus:
|
|
56
|
-
primaryButtonLabel = ( localize(
|
|
56
|
+
primaryButtonLabel = ( localize(5958, "Manage Paid Premium Requests"));
|
|
57
57
|
break;
|
|
58
58
|
case ChatEntitlement.Free:
|
|
59
|
-
primaryButtonLabel = ( localize(
|
|
59
|
+
primaryButtonLabel = ( localize(5959, "Upgrade to GitHub Copilot Pro"));
|
|
60
60
|
break;
|
|
61
61
|
}
|
|
62
62
|
let hasAddedWaitWarning = false;
|
|
@@ -65,7 +65,7 @@ let ChatQuotaExceededPart = class ChatQuotaExceededPart extends Disposable {
|
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
67
|
hasAddedWaitWarning = true;
|
|
68
|
-
append(messageContainer, $(".chat-quota-wait-warning", undefined, ( localize(
|
|
68
|
+
append(messageContainer, $(".chat-quota-wait-warning", undefined, ( localize(5960, "Changes may take a few minutes to take effect."))));
|
|
69
69
|
};
|
|
70
70
|
let hasAddedRetryButton = false;
|
|
71
71
|
const addRetryButtonIfNeeded = () => {
|
|
@@ -78,7 +78,7 @@ let ChatQuotaExceededPart = class ChatQuotaExceededPart extends Disposable {
|
|
|
78
78
|
buttonForeground: asCssVariable(textLinkForeground)
|
|
79
79
|
})));
|
|
80
80
|
retryButton.element.classList.add("chat-quota-error-secondary-button");
|
|
81
|
-
retryButton.label = ( localize(
|
|
81
|
+
retryButton.label = ( localize(5961, "Click to Retry"));
|
|
82
82
|
this._register(retryButton.onDidClick(() => {
|
|
83
83
|
const widget = chatWidgetService.getWidgetBySessionResource(element.sessionResource);
|
|
84
84
|
if (!widget) {
|
|
@@ -55,7 +55,7 @@ let ChatCollapsibleListContentPart = class ChatCollapsibleListContentPart extend
|
|
|
55
55
|
contextMenuService,
|
|
56
56
|
hoverService
|
|
57
57
|
) {
|
|
58
|
-
super(labelOverride ?? (data.length > 1 ? ( localize(
|
|
58
|
+
super(labelOverride ?? (data.length > 1 ? ( localize(5962, "Used {0} references", data.length)) : ( localize(5963, "Used {0} reference", 1))), context, hoverMessage, hoverService);
|
|
59
59
|
this.data = data;
|
|
60
60
|
this.contentReferencesListPool = contentReferencesListPool;
|
|
61
61
|
this.openerService = openerService;
|
|
@@ -209,7 +209,7 @@ let CollapsibleListPool = class CollapsibleListPool extends Disposable {
|
|
|
209
209
|
return basename(reference.uri.path);
|
|
210
210
|
}
|
|
211
211
|
},
|
|
212
|
-
getWidgetAriaLabel: () => ( localize(
|
|
212
|
+
getWidgetAriaLabel: () => ( localize(5964, "Collapsible Chat References List"))
|
|
213
213
|
},
|
|
214
214
|
dnd: {
|
|
215
215
|
getDragURI: element => getResourceForElement(element)?.toString() ?? null,
|
|
@@ -395,7 +395,7 @@ let CollapsibleListRenderer = class CollapsibleListRenderer {
|
|
|
395
395
|
name: settingId
|
|
396
396
|
}, {
|
|
397
397
|
icon: Codicon.settingsGear,
|
|
398
|
-
title: ( localize(
|
|
398
|
+
title: ( localize(5965, "Open setting '{0}'", settingId)),
|
|
399
399
|
strikethrough: data.excluded,
|
|
400
400
|
extraClasses
|
|
401
401
|
});
|
|
@@ -440,7 +440,7 @@ let CollapsibleListRenderer = class CollapsibleListRenderer {
|
|
|
440
440
|
templateData.addedSpan.textContent = `+${diffMeta.added}`;
|
|
441
441
|
templateData.removedSpan.textContent = `-${diffMeta.removed}`;
|
|
442
442
|
templateData.fileDiffsContainer.setAttribute("aria-label", ( localize(
|
|
443
|
-
|
|
443
|
+
5966,
|
|
444
444
|
"{0} lines added, {1} lines removed",
|
|
445
445
|
diffMeta.added,
|
|
446
446
|
diffMeta.removed
|
|
@@ -521,7 +521,7 @@ registerAction2(class AddToChatAction extends Action2 {
|
|
|
521
521
|
super({
|
|
522
522
|
id: AddToChatAction.id,
|
|
523
523
|
title: {
|
|
524
|
-
...( localize2(
|
|
524
|
+
...( localize2(5967, "Add File to Chat"))
|
|
525
525
|
},
|
|
526
526
|
f1: false,
|
|
527
527
|
menu: [{
|
|
@@ -551,7 +551,7 @@ registerAction2(class OpenChatReferenceLinkAction extends Action2 {
|
|
|
551
551
|
super({
|
|
552
552
|
id: OpenChatReferenceLinkAction.id,
|
|
553
553
|
title: {
|
|
554
|
-
...( localize2(
|
|
554
|
+
...( localize2(5968, "Copy Link"))
|
|
555
555
|
},
|
|
556
556
|
f1: false,
|
|
557
557
|
menu: [{
|
|
@@ -6,7 +6,7 @@ import { IChatRendererContent } from "@codingame/monaco-vscode-api/vscode/vs/wor
|
|
|
6
6
|
import { ChatTreeItem } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
7
7
|
import { IChatContentPart, IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts";
|
|
8
8
|
import { ChatCollapsibleContentPart } from "./chatCollapsibleContentPart.js";
|
|
9
|
-
import { IChatMarkdownContent, IChatToolInvocation, IChatToolInvocationSerialized } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
9
|
+
import { IChatHookPart, IChatMarkdownContent, IChatToolInvocation, IChatToolInvocationSerialized } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
10
10
|
import { CollapsibleListPool } from "./chatReferencesContentPart.js";
|
|
11
11
|
import { EditorPool } from "./chatContentCodePools.js";
|
|
12
12
|
import { CodeBlockModelCollection } from "../../../common/widget/codeBlockModelCollection.js";
|
|
@@ -42,6 +42,8 @@ export declare class ChatSubagentContentPart extends ChatCollapsibleContentPart
|
|
|
42
42
|
private pendingPromptRender;
|
|
43
43
|
private pendingResultText;
|
|
44
44
|
private currentRunningToolMessage;
|
|
45
|
+
private modelName;
|
|
46
|
+
private readonly _hoverDisposable;
|
|
45
47
|
private toolsWaitingForConfirmation;
|
|
46
48
|
private userManuallyExpanded;
|
|
47
49
|
private autoExpandedForConfirmation;
|
|
@@ -62,6 +64,7 @@ export declare class ChatSubagentContentPart extends ChatCollapsibleContentPart
|
|
|
62
64
|
markAsInactive(): void;
|
|
63
65
|
finalizeTitle(): void;
|
|
64
66
|
private updateTitle;
|
|
67
|
+
private updateHover;
|
|
65
68
|
/**
|
|
66
69
|
* Tracks a tool invocation's state for:
|
|
67
70
|
* 1. Updating the title with the current tool message (persists even after completion)
|
|
@@ -96,6 +99,17 @@ export declare class ChatSubagentContentPart extends ChatCollapsibleContentPart
|
|
|
96
99
|
domNode: HTMLElement;
|
|
97
100
|
disposable?: IDisposable;
|
|
98
101
|
}, _codeblocksPartId: string | undefined, _markdown: IChatMarkdownContent, _originalParent?: HTMLElement): void;
|
|
102
|
+
/**
|
|
103
|
+
* Appends a hook item (blocked/warning) to the subagent content part.
|
|
104
|
+
*/
|
|
105
|
+
appendHookItem(factory: () => {
|
|
106
|
+
domNode: HTMLElement;
|
|
107
|
+
disposable?: IDisposable;
|
|
108
|
+
}, hookPart: IChatHookPart): void;
|
|
109
|
+
/**
|
|
110
|
+
* Appends a hook item's DOM node to the wrapper.
|
|
111
|
+
*/
|
|
112
|
+
private appendHookItemToDOM;
|
|
99
113
|
/**
|
|
100
114
|
* Appends a markdown item's DOM node to the wrapper.
|
|
101
115
|
*/
|
|
@@ -3,6 +3,7 @@ import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
|
3
3
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
4
4
|
import { AnimationFrameScheduler, $, DisposableResizeObserver, append } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
5
5
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
6
|
+
import { MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
7
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
7
8
|
import { rcut } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
8
9
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
@@ -26,19 +27,21 @@ registerCss(chatSubagentContent);
|
|
|
26
27
|
const MAX_TITLE_LENGTH = 100;
|
|
27
28
|
let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentContentPart extends ChatCollapsibleContentPart {
|
|
28
29
|
static extractSubagentInfo(toolInvocation) {
|
|
29
|
-
const defaultDescription = ( localize(
|
|
30
|
+
const defaultDescription = ( localize(5969, "Running subagent..."));
|
|
30
31
|
if (toolInvocation.toolId !== RunSubagentTool.Id) {
|
|
31
32
|
return {
|
|
32
33
|
description: defaultDescription,
|
|
33
34
|
agentName: undefined,
|
|
34
|
-
prompt: undefined
|
|
35
|
+
prompt: undefined,
|
|
36
|
+
modelName: undefined
|
|
35
37
|
};
|
|
36
38
|
}
|
|
37
39
|
if (toolInvocation.toolSpecificData?.kind === "subagent") {
|
|
38
40
|
return {
|
|
39
41
|
description: toolInvocation.toolSpecificData.description ?? defaultDescription,
|
|
40
42
|
agentName: toolInvocation.toolSpecificData.agentName,
|
|
41
|
-
prompt: toolInvocation.toolSpecificData.prompt
|
|
43
|
+
prompt: toolInvocation.toolSpecificData.prompt,
|
|
44
|
+
modelName: toolInvocation.toolSpecificData.modelName
|
|
42
45
|
};
|
|
43
46
|
}
|
|
44
47
|
if (toolInvocation.kind === "toolInvocation") {
|
|
@@ -47,13 +50,15 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
47
50
|
return {
|
|
48
51
|
description: params?.description ?? defaultDescription,
|
|
49
52
|
agentName: params?.agentName,
|
|
50
|
-
prompt: params?.prompt
|
|
53
|
+
prompt: params?.prompt,
|
|
54
|
+
modelName: undefined
|
|
51
55
|
};
|
|
52
56
|
}
|
|
53
57
|
return {
|
|
54
58
|
description: defaultDescription,
|
|
55
59
|
agentName: undefined,
|
|
56
|
-
prompt: undefined
|
|
60
|
+
prompt: undefined,
|
|
61
|
+
modelName: undefined
|
|
57
62
|
};
|
|
58
63
|
}
|
|
59
64
|
constructor(
|
|
@@ -73,9 +78,10 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
73
78
|
const {
|
|
74
79
|
description,
|
|
75
80
|
agentName,
|
|
76
|
-
prompt
|
|
81
|
+
prompt,
|
|
82
|
+
modelName
|
|
77
83
|
} = ChatSubagentContentPart_1.extractSubagentInfo(toolInvocation);
|
|
78
|
-
const prefix = agentName || ( localize(
|
|
84
|
+
const prefix = agentName || ( localize(5970, "Subagent"));
|
|
79
85
|
const initialTitle = `${prefix}: ${description}`;
|
|
80
86
|
super(initialTitle, context, undefined, hoverService);
|
|
81
87
|
this.subAgentInvocationId = subAgentInvocationId;
|
|
@@ -93,12 +99,14 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
93
99
|
this.lazyItems = [];
|
|
94
100
|
this.hasExpandedOnce = false;
|
|
95
101
|
this.pendingPromptRender = false;
|
|
102
|
+
this._hoverDisposable = this._register(( new MutableDisposable()));
|
|
96
103
|
this.toolsWaitingForConfirmation = 0;
|
|
97
104
|
this.userManuallyExpanded = false;
|
|
98
105
|
this.autoExpandedForConfirmation = false;
|
|
99
106
|
this.description = description;
|
|
100
107
|
this.agentName = agentName;
|
|
101
108
|
this.prompt = prompt;
|
|
109
|
+
this.modelName = modelName;
|
|
102
110
|
this.isInitiallyComplete = this.element.isComplete;
|
|
103
111
|
const node = this.domNode;
|
|
104
112
|
node.classList.add("chat-thinking-box", "chat-thinking-fixed-mode", "chat-subagent-part");
|
|
@@ -138,6 +146,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
138
146
|
}
|
|
139
147
|
}));
|
|
140
148
|
this.layoutScheduler = this._register(( new AnimationFrameScheduler(this.domNode, () => this.performLayout())));
|
|
149
|
+
this.updateHover();
|
|
141
150
|
this.renderPromptSection();
|
|
142
151
|
this.watchToolCompletion(toolInvocation);
|
|
143
152
|
}
|
|
@@ -167,7 +176,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
167
176
|
return;
|
|
168
177
|
}
|
|
169
178
|
const lines = this.prompt.split("\n");
|
|
170
|
-
const rawFirstLine = lines[0] || ( localize(
|
|
179
|
+
const rawFirstLine = lines[0] || ( localize(5971, "Prompt"));
|
|
171
180
|
const restOfLines = lines.slice(1).join("\n").trim();
|
|
172
181
|
const titleContent = rcut(rawFirstLine, MAX_TITLE_LENGTH);
|
|
173
182
|
const wasTruncated = rawFirstLine.length > MAX_TITLE_LENGTH;
|
|
@@ -214,13 +223,21 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
214
223
|
}
|
|
215
224
|
}
|
|
216
225
|
updateTitle() {
|
|
217
|
-
const prefix = this.agentName || ( localize(
|
|
226
|
+
const prefix = this.agentName || ( localize(5970, "Subagent"));
|
|
218
227
|
let finalLabel = `${prefix}: ${this.description}`;
|
|
219
228
|
if (this.currentRunningToolMessage && this.isActive) {
|
|
220
229
|
finalLabel += ` \u2014 ${this.currentRunningToolMessage}`;
|
|
221
230
|
}
|
|
222
231
|
this.setTitleWithWidgets(( new MarkdownString(finalLabel)), this.instantiationService, this.chatMarkdownAnchorService, this.chatContentMarkdownRenderer);
|
|
223
232
|
}
|
|
233
|
+
updateHover() {
|
|
234
|
+
if (!this.modelName || !this._collapseButton) {
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
this._hoverDisposable.value = this.hoverService.setupDelayedHover(this._collapseButton.element, {
|
|
238
|
+
content: ( localize(5972, "Model: {0}", this.modelName))
|
|
239
|
+
});
|
|
240
|
+
}
|
|
224
241
|
trackToolState(toolInvocation) {
|
|
225
242
|
if (toolInvocation.kind !== "toolInvocation") {
|
|
226
243
|
return;
|
|
@@ -263,17 +280,26 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
263
280
|
if (textParts.length > 0) {
|
|
264
281
|
this.renderResultText(textParts.join("\n"));
|
|
265
282
|
}
|
|
283
|
+
if (toolInvocation.toolSpecificData?.kind === "subagent" && toolInvocation.toolSpecificData.modelName) {
|
|
284
|
+
this.modelName = toolInvocation.toolSpecificData.modelName;
|
|
285
|
+
this.updateHover();
|
|
286
|
+
}
|
|
266
287
|
this.markAsInactive();
|
|
267
288
|
} else if (wasStreaming && state.type !== IChatToolInvocation.StateKind.Streaming) {
|
|
268
289
|
wasStreaming = false;
|
|
269
290
|
const {
|
|
270
291
|
description,
|
|
271
292
|
agentName,
|
|
272
|
-
prompt
|
|
293
|
+
prompt,
|
|
294
|
+
modelName
|
|
273
295
|
} = ChatSubagentContentPart_1.extractSubagentInfo(toolInvocation);
|
|
274
296
|
this.description = description;
|
|
275
297
|
this.agentName = agentName;
|
|
276
298
|
this.prompt = prompt;
|
|
299
|
+
if (modelName) {
|
|
300
|
+
this.modelName = modelName;
|
|
301
|
+
this.updateHover();
|
|
302
|
+
}
|
|
277
303
|
this.renderPromptSection();
|
|
278
304
|
this.updateTitle();
|
|
279
305
|
}
|
|
@@ -360,6 +386,44 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
360
386
|
this.lazyItems.push(item);
|
|
361
387
|
}
|
|
362
388
|
}
|
|
389
|
+
appendHookItem(factory, hookPart) {
|
|
390
|
+
if (this.isExpanded() || this.hasExpandedOnce) {
|
|
391
|
+
const result = factory();
|
|
392
|
+
this.appendHookItemToDOM(result.domNode, hookPart);
|
|
393
|
+
if (result.disposable) {
|
|
394
|
+
this._register(result.disposable);
|
|
395
|
+
}
|
|
396
|
+
} else {
|
|
397
|
+
const item = {
|
|
398
|
+
kind: "hook",
|
|
399
|
+
lazy: ( new Lazy(factory)),
|
|
400
|
+
hookPart
|
|
401
|
+
};
|
|
402
|
+
this.lazyItems.push(item);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
appendHookItemToDOM(domNode, hookPart) {
|
|
406
|
+
const itemWrapper = $(".chat-thinking-tool-wrapper");
|
|
407
|
+
const icon = hookPart.stopReason ? Codicon.error : Codicon.warning;
|
|
408
|
+
const iconElement = createThinkingIcon(icon);
|
|
409
|
+
itemWrapper.appendChild(iconElement);
|
|
410
|
+
itemWrapper.appendChild(domNode);
|
|
411
|
+
if (!this.hasToolItems) {
|
|
412
|
+
this.hasToolItems = true;
|
|
413
|
+
if (this.wrapper) {
|
|
414
|
+
this.wrapper.style.display = "";
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
if (this.wrapper) {
|
|
418
|
+
if (this.resultContainer) {
|
|
419
|
+
this.wrapper.insertBefore(itemWrapper, this.resultContainer);
|
|
420
|
+
} else {
|
|
421
|
+
this.wrapper.appendChild(itemWrapper);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
this.lastItemWrapper = itemWrapper;
|
|
425
|
+
this.layoutScheduler.schedule();
|
|
426
|
+
}
|
|
363
427
|
appendMarkdownItemToDOM(domNode) {
|
|
364
428
|
if (!domNode.hasChildNodes() || domNode.textContent?.trim() === "") {
|
|
365
429
|
return;
|
|
@@ -442,6 +506,12 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
442
506
|
if (result.disposable) {
|
|
443
507
|
this._register(result.disposable);
|
|
444
508
|
}
|
|
509
|
+
} else if (item.kind === "hook") {
|
|
510
|
+
const result = item.lazy.value;
|
|
511
|
+
this.appendHookItemToDOM(result.domNode, item.hookPart);
|
|
512
|
+
if (result.disposable) {
|
|
513
|
+
this._register(result.disposable);
|
|
514
|
+
}
|
|
445
515
|
}
|
|
446
516
|
}
|
|
447
517
|
materializePendingContent() {
|
|
@@ -477,6 +547,9 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
477
547
|
if (other.kind === "markdownContent") {
|
|
478
548
|
return true;
|
|
479
549
|
}
|
|
550
|
+
if (other.kind === "hook" && other.subAgentInvocationId) {
|
|
551
|
+
return this.subAgentInvocationId === other.subAgentInvocationId;
|
|
552
|
+
}
|
|
480
553
|
if ((other.kind === "toolInvocation" || other.kind === "toolInvocationSerialized") && (other.subAgentInvocationId || other.toolId === RunSubagentTool.Id)) {
|
|
481
554
|
const otherEffectiveId = other.toolId === RunSubagentTool.Id ? other.toolCallId : other.subAgentInvocationId;
|
|
482
555
|
if (this.subAgentInvocationId && otherEffectiveId) {
|
|
@@ -42,8 +42,8 @@ let ChatSuggestNextWidget = class ChatSuggestNextWidget extends Disposable {
|
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
this._currentMode = mode;
|
|
45
|
-
const modeName = mode.name.get() || mode.label.get() || ( localize(
|
|
46
|
-
this.titleElement.textContent = ( localize(
|
|
45
|
+
const modeName = mode.name.get() || mode.label.get() || ( localize(5973, "current mode"));
|
|
46
|
+
this.titleElement.textContent = ( localize(5974, "Proceed from {0}", modeName));
|
|
47
47
|
const childrenToRemove = [];
|
|
48
48
|
for (let i = 1; i < this.promptsContainer.children.length; i++) {
|
|
49
49
|
childrenToRemove.push(this.promptsContainer.children[i]);
|
|
@@ -73,7 +73,7 @@ let ChatSuggestNextWidget = class ChatSuggestNextWidget extends Disposable {
|
|
|
73
73
|
const button = $(".chat-welcome-view-suggested-prompt");
|
|
74
74
|
button.setAttribute("tabindex", "0");
|
|
75
75
|
button.setAttribute("role", "button");
|
|
76
|
-
button.setAttribute("aria-label", ( localize(
|
|
76
|
+
button.setAttribute("aria-label", ( localize(5975, "{0}", handoff.label)));
|
|
77
77
|
const titleElement = append(button, $(".chat-welcome-view-suggested-prompt-title"));
|
|
78
78
|
titleElement.textContent = handoff.label;
|
|
79
79
|
const showContinueOn = handoff.showContinueOn ?? true;
|
|
@@ -90,7 +90,7 @@ let ChatSuggestNextWidget = class ChatSuggestNextWidget extends Disposable {
|
|
|
90
90
|
const dropdownContainer = append(button, $(".chat-suggest-next-dropdown"));
|
|
91
91
|
dropdownContainer.setAttribute("tabindex", "0");
|
|
92
92
|
dropdownContainer.setAttribute("role", "button");
|
|
93
|
-
dropdownContainer.setAttribute("aria-label", ( localize(
|
|
93
|
+
dropdownContainer.setAttribute("aria-label", ( localize(5976, "More options for {0}", handoff.label)));
|
|
94
94
|
dropdownContainer.setAttribute("aria-haspopup", "true");
|
|
95
95
|
const separator = append(dropdownContainer, $(".chat-suggest-next-separator"));
|
|
96
96
|
separator.setAttribute("aria-hidden", "true");
|
|
@@ -105,7 +105,7 @@ let ChatSuggestNextWidget = class ChatSuggestNextWidget extends Disposable {
|
|
|
105
105
|
const name = getAgentSessionProviderName(provider);
|
|
106
106
|
return (new Action(
|
|
107
107
|
contrib.type,
|
|
108
|
-
localize(
|
|
108
|
+
localize(5977, "Continue in {0}", name),
|
|
109
109
|
ThemeIcon.isThemeIcon(icon) ? ThemeIcon.asClassName(icon) : undefined,
|
|
110
110
|
true,
|
|
111
111
|
() => {
|
|
@@ -39,7 +39,7 @@ let ChatTextEditContentPart = class ChatTextEditContentPart extends Disposable {
|
|
|
39
39
|
this.domNode = $(
|
|
40
40
|
".interactive-edits-summary",
|
|
41
41
|
undefined,
|
|
42
|
-
!element.isComplete ? "" : element.isCanceled ? ( localize(
|
|
42
|
+
!element.isComplete ? "" : element.isCanceled ? ( localize(5978, "Making changes was aborted.")) : ( localize(5979, "Made changes."))
|
|
43
43
|
);
|
|
44
44
|
} else {
|
|
45
45
|
this.domNode = $("div");
|
|
@@ -66,9 +66,9 @@ var WorkingMessageCategory;
|
|
|
66
66
|
WorkingMessageCategory["Terminal"] = "terminal";
|
|
67
67
|
WorkingMessageCategory["Tool"] = "tool";
|
|
68
68
|
})(WorkingMessageCategory || (WorkingMessageCategory = {}));
|
|
69
|
-
const thinkingMessages = [( localize(
|
|
70
|
-
const terminalMessages = [( localize(
|
|
71
|
-
const toolMessages = [( localize(
|
|
69
|
+
const thinkingMessages = [( localize(5980, "Thinking...")), ( localize(5981, "Reasoning...")), ( localize(5982, "Considering...")), ( localize(5983, "Analyzing...")), ( localize(5984, "Evaluating..."))];
|
|
70
|
+
const terminalMessages = [( localize(5985, "Executing...")), ( localize(5986, "Running...")), ( localize(5987, "Processing..."))];
|
|
71
|
+
const toolMessages = [( localize(5988, "Processing...")), ( localize(5989, "Preparing...")), ( localize(5990, "Loading...")), ( localize(5991, "Analyzing...")), ( localize(5992, "Evaluating..."))];
|
|
72
72
|
let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsibleContentPart {
|
|
73
73
|
getRandomWorkingMessage(category = WorkingMessageCategory.Tool) {
|
|
74
74
|
let pool = this.availableMessagesByCategory.get(category);
|
|
@@ -111,7 +111,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
111
111
|
this.chatMarkdownAnchorService = chatMarkdownAnchorService;
|
|
112
112
|
this.languageModelsService = languageModelsService;
|
|
113
113
|
this._onDidChangeHeight = this._register(( new Emitter()));
|
|
114
|
-
this.defaultTitle = ( localize(
|
|
114
|
+
this.defaultTitle = ( localize(5993, "Working..."));
|
|
115
115
|
this.fixedScrollingMode = false;
|
|
116
116
|
this.autoScrollEnabled = true;
|
|
117
117
|
this.extractedTitles = [];
|
|
@@ -138,7 +138,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
138
138
|
if (initialText.trim()) {
|
|
139
139
|
this.appendedItemCount++;
|
|
140
140
|
}
|
|
141
|
-
alert(( localize(
|
|
141
|
+
alert(( localize(5994, "Thinking")));
|
|
142
142
|
if (configuredMode === ThinkingDisplayMode.Collapsed) {
|
|
143
143
|
this.setExpanded(false);
|
|
144
144
|
} else if (configuredMode === ThinkingDisplayMode.CollapsedPreview) {
|
|
@@ -581,6 +581,12 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
581
581
|
- For reasoning/thinking: "Considered", "Planned", "Analyzed", "Reviewed", "Evaluated"
|
|
582
582
|
- Choose the synonym that best fits the context
|
|
583
583
|
|
|
584
|
+
PRIORITY RULE - BLOCKED/DENIED CONTENT:
|
|
585
|
+
- If any item mentions being "blocked" (e.g. "Tried to use X, but was blocked"), it MUST be reflected in the title
|
|
586
|
+
- Blocked content takes priority over all other tool calls
|
|
587
|
+
- Use natural phrasing like "Tried to <action>, but was blocked" or "Attempted <tool> but was denied"
|
|
588
|
+
- If there are both blocked items AND normal tool calls, mention both: e.g. "Tried to run terminal but was blocked, edited file.ts"
|
|
589
|
+
|
|
584
590
|
RULES FOR TOOL CALLS:
|
|
585
591
|
1. If the SAME file was both edited AND read: Use a combined phrase like "Reviewed and updated <filename>"
|
|
586
592
|
2. If exactly ONE file was edited: Start with an edit synonym + "<filename>" (include actual filename)
|
|
@@ -620,6 +626,12 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
620
626
|
- "Edited Button.tsx, Edited Button.css, Edited index.ts" → "Modified 3 files"
|
|
621
627
|
- "Searched codebase for error handling" → "Looked up error handling"
|
|
622
628
|
|
|
629
|
+
EXAMPLES WITH BLOCKED CONTENT:
|
|
630
|
+
- "Tried to use Run in Terminal, but was blocked" → "Tried to run command, but was blocked"
|
|
631
|
+
- "Tried to use Run in Terminal, but was blocked, Edited config.ts" → "Tried to run command but was blocked, edited config.ts"
|
|
632
|
+
- "Tried to use Edit File, but was blocked, Tried to use Run in Terminal, but was blocked" → "Tried to use 2 tools, but was blocked"
|
|
633
|
+
- "Used Read File, but received a warning, Edited utils.ts" → "Read file with a warning, edited utils.ts"
|
|
634
|
+
|
|
623
635
|
EXAMPLES WITH REASONING HEADERS (no tools):
|
|
624
636
|
- "Analyzing component architecture" → "Considered component architecture"
|
|
625
637
|
- "Planning refactor strategy" → "Planned refactor strategy"
|
|
@@ -704,11 +716,11 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
704
716
|
}
|
|
705
717
|
setFallbackTitle() {
|
|
706
718
|
const finalLabel = this.appendedItemCount > 0 ? ( localize(
|
|
707
|
-
|
|
719
|
+
5995,
|
|
708
720
|
"Finished with {0} step{1}",
|
|
709
721
|
this.appendedItemCount,
|
|
710
722
|
this.appendedItemCount === 1 ? "" : "s"
|
|
711
|
-
)) : ( localize(
|
|
723
|
+
)) : ( localize(5996, "Finished Working"));
|
|
712
724
|
this.currentTitle = finalLabel;
|
|
713
725
|
if (this.wrapper) {
|
|
714
726
|
this.wrapper.classList.remove("chat-thinking-streaming");
|
|
@@ -895,12 +907,12 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
895
907
|
const codeblockInfo = extractCodeblockUrisFromText(toolInvocationOrMarkdown.content.value);
|
|
896
908
|
if (codeblockInfo?.uri) {
|
|
897
909
|
const filename = basename(codeblockInfo.uri);
|
|
898
|
-
toolCallLabel = ( localize(
|
|
910
|
+
toolCallLabel = ( localize(5997, "Edited {0}", filename));
|
|
899
911
|
} else {
|
|
900
|
-
toolCallLabel = ( localize(
|
|
912
|
+
toolCallLabel = ( localize(5998, "Edited file"));
|
|
901
913
|
}
|
|
902
914
|
} else {
|
|
903
|
-
toolCallLabel =
|
|
915
|
+
toolCallLabel = toolInvocationId;
|
|
904
916
|
}
|
|
905
917
|
if (!this.extractedTitles.includes(toolCallLabel)) {
|
|
906
918
|
this.extractedTitles.push(toolCallLabel);
|
|
@@ -933,6 +945,10 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
933
945
|
const terminalData = toolInvocationOrMarkdown.toolSpecificData;
|
|
934
946
|
const exitCode = terminalData?.terminalCommandState?.exitCode;
|
|
935
947
|
icon = exitCode !== undefined && exitCode !== 0 ? Codicon.error : Codicon.terminal;
|
|
948
|
+
} else if (content.classList.contains("chat-hook-outcome-blocked")) {
|
|
949
|
+
icon = Codicon.error;
|
|
950
|
+
} else if (content.classList.contains("chat-hook-outcome-warning")) {
|
|
951
|
+
icon = Codicon.warning;
|
|
936
952
|
} else {
|
|
937
953
|
icon = toolInvocationId ? getToolInvocationIcon(toolInvocationId) : Codicon.tools;
|
|
938
954
|
}
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js
CHANGED
|
@@ -55,7 +55,7 @@ class TodoListRenderer {
|
|
|
55
55
|
statusIcon.style.color = this.getStatusIconColor(todo.status);
|
|
56
56
|
iconLabel.setLabel(todo.title);
|
|
57
57
|
const statusText = this.getStatusText(todo.status);
|
|
58
|
-
const ariaLabel = ( localize(
|
|
58
|
+
const ariaLabel = ( localize(5999, "{0}, {1}", todo.title, statusText));
|
|
59
59
|
todoElement.setAttribute("aria-label", ariaLabel);
|
|
60
60
|
}
|
|
61
61
|
disposeTemplate(templateData) {
|
|
@@ -64,12 +64,12 @@ class TodoListRenderer {
|
|
|
64
64
|
getStatusText(status) {
|
|
65
65
|
switch (status) {
|
|
66
66
|
case "completed":
|
|
67
|
-
return localize(
|
|
67
|
+
return localize(6000, "completed");
|
|
68
68
|
case "in-progress":
|
|
69
|
-
return localize(
|
|
69
|
+
return localize(6001, "in progress");
|
|
70
70
|
case "not-started":
|
|
71
71
|
default:
|
|
72
|
-
return localize(
|
|
72
|
+
return localize(6002, "not started");
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
getStatusIconClass(status) {
|
|
@@ -131,7 +131,7 @@ let ChatTodoListWidget = class ChatTodoListWidget extends Disposable {
|
|
|
131
131
|
this.expandIcon.setAttribute("aria-hidden", "true");
|
|
132
132
|
this.titleElement = $(".todo-list-title");
|
|
133
133
|
this.titleElement.id = "todo-list-title";
|
|
134
|
-
this.titleElement.textContent = ( localize(
|
|
134
|
+
this.titleElement.textContent = ( localize(6003, "Todos"));
|
|
135
135
|
this.clearButtonContainer = $(".todo-clear-button-container");
|
|
136
136
|
this.createClearButton();
|
|
137
137
|
titleSection.appendChild(this.expandIcon);
|
|
@@ -215,9 +215,9 @@ let ChatTodoListWidget = class ChatTodoListWidget extends Disposable {
|
|
|
215
215
|
accessibilityProvider: {
|
|
216
216
|
getAriaLabel: todo => {
|
|
217
217
|
const statusText = this.getStatusText(todo.status);
|
|
218
|
-
return localize(
|
|
218
|
+
return localize(5999, "{0}, {1}", todo.title, statusText);
|
|
219
219
|
},
|
|
220
|
-
getWidgetAriaLabel: () => ( localize(
|
|
220
|
+
getWidgetAriaLabel: () => ( localize(6004, "Chat Todo List"))
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
));
|
|
@@ -268,9 +268,9 @@ let ChatTodoListWidget = class ChatTodoListWidget extends Disposable {
|
|
|
268
268
|
const shouldDisable = isRequestInProgress && hasInProgressTask;
|
|
269
269
|
this.clearButton.enabled = !shouldDisable;
|
|
270
270
|
if (shouldDisable) {
|
|
271
|
-
this.clearButton.setTitle(( localize(
|
|
271
|
+
this.clearButton.setTitle(( localize(6005, "Cannot clear todos while a task is in progress")));
|
|
272
272
|
} else {
|
|
273
|
-
this.clearButton.setTitle(( localize(
|
|
273
|
+
this.clearButton.setTitle(( localize(6006, "Clear all todos")));
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
updateTitleElement(titleElement, todoList) {
|
|
@@ -282,12 +282,12 @@ let ChatTodoListWidget = class ChatTodoListWidget extends Disposable {
|
|
|
282
282
|
const notStartedTodos = todoList.filter(todo => todo.status === "not-started");
|
|
283
283
|
const firstNotStartedTodo = notStartedTodos.length > 0 ? notStartedTodos[0] : undefined;
|
|
284
284
|
const currentTaskNumber = inProgressTodos.length > 0 ? completedCount + 1 : Math.max(1, completedCount);
|
|
285
|
-
const expandButtonLabel = this._isExpanded ? ( localize(
|
|
285
|
+
const expandButtonLabel = this._isExpanded ? ( localize(6007, "Collapse Todos")) : ( localize(6008, "Expand Todos"));
|
|
286
286
|
this.expandoButton.element.setAttribute("aria-label", expandButtonLabel);
|
|
287
287
|
this.expandoButton.element.setAttribute("aria-expanded", this._isExpanded ? "true" : "false");
|
|
288
288
|
if (this._isExpanded) {
|
|
289
289
|
const titleText = $("span");
|
|
290
|
-
titleText.textContent = totalCount > 0 ? ( localize(
|
|
290
|
+
titleText.textContent = totalCount > 0 ? ( localize(6009, "Todos ({0}/{1})", currentTaskNumber, totalCount)) : ( localize(6003, "Todos"));
|
|
291
291
|
titleElement.appendChild(titleText);
|
|
292
292
|
} else {
|
|
293
293
|
const todoToShow = firstInProgressTodo || firstNotStartedTodo;
|
|
@@ -304,7 +304,7 @@ let ChatTodoListWidget = class ChatTodoListWidget extends Disposable {
|
|
|
304
304
|
icon.style.verticalAlign = "middle";
|
|
305
305
|
titleElement.appendChild(icon);
|
|
306
306
|
const todoText = $("span");
|
|
307
|
-
todoText.textContent = ( localize(
|
|
307
|
+
todoText.textContent = ( localize(6010, "{0} ({1}/{2})", todoToShow.title, currentTaskNumber, totalCount));
|
|
308
308
|
todoText.style.verticalAlign = "middle";
|
|
309
309
|
todoText.style.overflow = "hidden";
|
|
310
310
|
todoText.style.textOverflow = "ellipsis";
|
|
@@ -314,7 +314,7 @@ let ChatTodoListWidget = class ChatTodoListWidget extends Disposable {
|
|
|
314
314
|
}
|
|
315
315
|
else if (completedCount > 0 && completedCount === totalCount) {
|
|
316
316
|
const doneText = $("span");
|
|
317
|
-
doneText.textContent = ( localize(
|
|
317
|
+
doneText.textContent = ( localize(6009, "Todos ({0}/{1})", totalCount, totalCount));
|
|
318
318
|
doneText.style.verticalAlign = "middle";
|
|
319
319
|
titleElement.appendChild(doneText);
|
|
320
320
|
}
|
|
@@ -323,12 +323,12 @@ let ChatTodoListWidget = class ChatTodoListWidget extends Disposable {
|
|
|
323
323
|
getStatusText(status) {
|
|
324
324
|
switch (status) {
|
|
325
325
|
case "completed":
|
|
326
|
-
return localize(
|
|
326
|
+
return localize(6000, "completed");
|
|
327
327
|
case "in-progress":
|
|
328
|
-
return localize(
|
|
328
|
+
return localize(6001, "in progress");
|
|
329
329
|
case "not-started":
|
|
330
330
|
default:
|
|
331
|
-
return localize(
|
|
331
|
+
return localize(6002, "not started");
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
};
|
|
@@ -129,13 +129,13 @@ let ChatCollapsibleInputOutputContentPart = class ChatCollapsibleInputOutputCont
|
|
|
129
129
|
input,
|
|
130
130
|
output
|
|
131
131
|
} = this;
|
|
132
|
-
contents.inputTitle.textContent = ( localize(
|
|
132
|
+
contents.inputTitle.textContent = ( localize(6011, "Input"));
|
|
133
133
|
this.addCodeBlock(input, contents.input);
|
|
134
134
|
if (!output) {
|
|
135
135
|
contents.output.remove();
|
|
136
136
|
contents.outputTitle.remove();
|
|
137
137
|
} else {
|
|
138
|
-
contents.outputTitle.textContent = ( localize(
|
|
138
|
+
contents.outputTitle.textContent = ( localize(6012, "Output"));
|
|
139
139
|
const outputSubPart = this._register(
|
|
140
140
|
this._instantiationService.createInstance(ChatToolOutputContentSubPart, this.context, output.parts)
|
|
141
141
|
);
|