@codingame/monaco-vscode-katex-common 29.1.0 → 30.0.0
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/platform/actions/browser/buttonbar.js +14 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +34 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +12 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +208 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +637 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +202 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +17 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +53 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +296 -63
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +59 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +55 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +110 -59
- 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/searchableOptionPickerActionItem.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +384 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.d.ts +12 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.js +220 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +1 -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/chatAttachmentsContentPart.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +14 -1
- 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/chatCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +3 -3
- 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.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +40 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -8
- 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 +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +97 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +5 -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/chatResourceGroupWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +8 -7
- 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.d.ts +15 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +155 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +36 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +2 -2
- 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/chatThinkingContent.css +13 -0
- 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/chatMissingSandboxDepsConfirmationSubPart.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMissingSandboxDepsConfirmationSubPart.js +68 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +33 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +12 -3
- 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 +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +5 -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 +4 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +37 -113
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +10 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +66 -39
- 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 +13 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +103 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +35 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.js +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +39 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +44 -18
- 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 +60 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.js +4 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +5 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +6 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +39 -39
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +746 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +300 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +55 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +273 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +1963 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +314 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +258 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +886 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +118 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +71 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +40 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +313 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +51 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +265 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +185 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +104 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +43 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +41 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +69 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +469 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +149 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +933 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +180 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +32 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +102 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +643 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +197 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +75 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +539 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +39 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +90 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +92 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +0 -152
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +0 -1317
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalPromptFileSystem.d.ts +0 -47
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalPromptFileSystem.js +0 -95
|
@@ -80,7 +80,7 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
80
80
|
});
|
|
81
81
|
this.domNode.tabIndex = 0;
|
|
82
82
|
this.domNode.setAttribute("role", "region");
|
|
83
|
-
this.domNode.setAttribute("aria-roledescription", ( localize(
|
|
83
|
+
this.domNode.setAttribute("aria-roledescription", ( localize(6771, "chat question")));
|
|
84
84
|
this._updateAriaLabel();
|
|
85
85
|
if (carousel instanceof ChatQuestionCarouselData) {
|
|
86
86
|
if (typeof carousel.draftCurrentIndex === "number") {
|
|
@@ -112,7 +112,7 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
112
112
|
this._questionContainer = $(".chat-question-carousel-content");
|
|
113
113
|
this.domNode.append(this._questionContainer);
|
|
114
114
|
this._headerActionsContainer = $(".chat-question-header-actions");
|
|
115
|
-
const collapseToggleTitle = ( localize(
|
|
115
|
+
const collapseToggleTitle = ( localize(6772, "Collapse Questions"));
|
|
116
116
|
const collapseButton = interactiveStore.add(( new Button(this._headerActionsContainer, {
|
|
117
117
|
...defaultButtonStyles,
|
|
118
118
|
secondary: true,
|
|
@@ -123,7 +123,7 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
123
123
|
this._collapseButton = collapseButton;
|
|
124
124
|
if (carousel.allowSkip) {
|
|
125
125
|
this._closeButtonContainer = $(".chat-question-close-container");
|
|
126
|
-
const skipAllTitle = ( localize(
|
|
126
|
+
const skipAllTitle = ( localize(6773, "Skip all questions"));
|
|
127
127
|
const skipAllButton = interactiveStore.add(( new Button(this._closeButtonContainer, {
|
|
128
128
|
...defaultButtonStyles,
|
|
129
129
|
secondary: true,
|
|
@@ -205,7 +205,7 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
205
205
|
this.domNode.classList.toggle("chat-question-carousel-collapsed", this._isCollapsed);
|
|
206
206
|
if (this._collapseButton) {
|
|
207
207
|
const collapsed = this._isCollapsed;
|
|
208
|
-
const buttonTitle = collapsed ? ( localize(
|
|
208
|
+
const buttonTitle = collapsed ? ( localize(6774, "Expand Questions")) : ( localize(6772, "Collapse Questions"));
|
|
209
209
|
const contentId = this.domNode.id;
|
|
210
210
|
this._collapseButton.label = collapsed ? `$(${Codicon.chevronUp.id})` : `$(${Codicon.chevronDown.id})`;
|
|
211
211
|
this._collapseButton.element.setAttribute("aria-label", buttonTitle);
|
|
@@ -260,7 +260,7 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
260
260
|
const messageContent = this.getQuestionText(questionText);
|
|
261
261
|
const questionCount = this.carousel.questions.length;
|
|
262
262
|
const alertMessage = questionCount === 1 ? messageContent : ( localize(
|
|
263
|
-
|
|
263
|
+
6775,
|
|
264
264
|
"Question {0} of {1}: {2}",
|
|
265
265
|
this._currentIndex + 1,
|
|
266
266
|
questionCount,
|
|
@@ -407,17 +407,17 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
407
407
|
_updateAriaLabel() {
|
|
408
408
|
const question = this.carousel.questions[this._currentIndex];
|
|
409
409
|
if (!question) {
|
|
410
|
-
this.domNode.setAttribute("aria-label", ( localize(
|
|
410
|
+
this.domNode.setAttribute("aria-label", ( localize(6776, "Chat question")));
|
|
411
411
|
return;
|
|
412
412
|
}
|
|
413
413
|
const questionText = question.message ?? question.title;
|
|
414
414
|
const messageContent = this.getQuestionText(questionText);
|
|
415
415
|
const questionCount = this.carousel.questions.length;
|
|
416
416
|
if (questionCount === 1) {
|
|
417
|
-
this.domNode.setAttribute("aria-label", ( localize(
|
|
417
|
+
this.domNode.setAttribute("aria-label", ( localize(6777, "Chat question: {0}", messageContent)));
|
|
418
418
|
} else {
|
|
419
419
|
this.domNode.setAttribute("aria-label", ( localize(
|
|
420
|
-
|
|
420
|
+
6778,
|
|
421
421
|
"Chat question {0} of {1}: {2}",
|
|
422
422
|
this._currentIndex + 1,
|
|
423
423
|
questionCount,
|
|
@@ -566,9 +566,9 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
566
566
|
this._footerRow = $(".chat-question-footer-row");
|
|
567
567
|
const leftControls = $(".chat-question-footer-left.chat-question-carousel-nav");
|
|
568
568
|
leftControls.setAttribute("role", "navigation");
|
|
569
|
-
leftControls.setAttribute("aria-label", ( localize(
|
|
569
|
+
leftControls.setAttribute("aria-label", ( localize(6779, "Question navigation")));
|
|
570
570
|
const arrowsContainer = $(".chat-question-nav-arrows");
|
|
571
|
-
const previousLabel = this.getLabelWithKeybinding(( localize(
|
|
571
|
+
const previousLabel = this.getLabelWithKeybinding(( localize(6780, "Previous")), PREVIOUS_QUESTION_ACTION_ID);
|
|
572
572
|
const prevButton = interactiveStore.add(( new Button(arrowsContainer, {
|
|
573
573
|
...defaultButtonStyles,
|
|
574
574
|
secondary: true,
|
|
@@ -582,7 +582,7 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
582
582
|
}));
|
|
583
583
|
interactiveStore.add(prevButton.onDidClick(() => this.navigate(-1)));
|
|
584
584
|
this._prevButton = prevButton;
|
|
585
|
-
const nextLabel = this.getLabelWithKeybinding(( localize(
|
|
585
|
+
const nextLabel = this.getLabelWithKeybinding(( localize(6781, "Next")), NEXT_QUESTION_ACTION_ID);
|
|
586
586
|
const nextButton = interactiveStore.add(( new Button(arrowsContainer, {
|
|
587
587
|
...defaultButtonStyles,
|
|
588
588
|
secondary: true,
|
|
@@ -602,14 +602,14 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
602
602
|
this._footerRow.appendChild(leftControls);
|
|
603
603
|
const rightControls = $(".chat-question-footer-right");
|
|
604
604
|
const hint = $("span.chat-question-submit-hint");
|
|
605
|
-
hint.textContent = isMacintosh ? ( localize(
|
|
605
|
+
hint.textContent = isMacintosh ? ( localize(6782, "⌘⏎ to submit")) : ( localize(6783, "Ctrl+Enter to submit"));
|
|
606
606
|
rightControls.appendChild(hint);
|
|
607
607
|
this._submitHint = hint;
|
|
608
608
|
const submitButton = interactiveStore.add(( new Button(rightControls, {
|
|
609
609
|
...defaultButtonStyles
|
|
610
610
|
})));
|
|
611
611
|
submitButton.element.classList.add("chat-question-submit-button");
|
|
612
|
-
submitButton.label = ( localize(
|
|
612
|
+
submitButton.label = ( localize(6784, "Submit"));
|
|
613
613
|
interactiveStore.add(submitButton.onDidClick(() => this.submit()));
|
|
614
614
|
this._submitButton = submitButton;
|
|
615
615
|
this._footerRow.appendChild(rightControls);
|
|
@@ -630,7 +630,7 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
630
630
|
this._nextButton.enabled = canAdvance && (!question?.required || hasAnswer) && !hasValidationError;
|
|
631
631
|
}
|
|
632
632
|
if (this._stepIndicator) {
|
|
633
|
-
this._stepIndicator.textContent = ( localize(
|
|
633
|
+
this._stepIndicator.textContent = ( localize(6785, "{0}/{1}", this._currentIndex + 1, this.carousel.questions.length));
|
|
634
634
|
}
|
|
635
635
|
if (this._submitButton) {
|
|
636
636
|
const isLastQuestion = this._currentIndex === this.carousel.questions.length - 1;
|
|
@@ -649,18 +649,18 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
649
649
|
this._footerRow = $(".chat-question-footer-row");
|
|
650
650
|
const leftControls = $(".chat-question-footer-left.chat-question-carousel-nav");
|
|
651
651
|
leftControls.setAttribute("role", "navigation");
|
|
652
|
-
leftControls.setAttribute("aria-label", ( localize(
|
|
652
|
+
leftControls.setAttribute("aria-label", ( localize(6779, "Question navigation")));
|
|
653
653
|
this._footerRow.appendChild(leftControls);
|
|
654
654
|
const rightControls = $(".chat-question-footer-right");
|
|
655
655
|
const hint = $("span.chat-question-submit-hint");
|
|
656
|
-
hint.textContent = isMacintosh ? ( localize(
|
|
656
|
+
hint.textContent = isMacintosh ? ( localize(6782, "⌘⏎ to submit")) : ( localize(6783, "Ctrl+Enter to submit"));
|
|
657
657
|
rightControls.appendChild(hint);
|
|
658
658
|
this._submitHint = hint;
|
|
659
659
|
const submitButton = interactiveStore.add(( new Button(rightControls, {
|
|
660
660
|
...defaultButtonStyles
|
|
661
661
|
})));
|
|
662
662
|
submitButton.element.classList.add("chat-question-submit-button");
|
|
663
|
-
submitButton.label = ( localize(
|
|
663
|
+
submitButton.label = ( localize(6784, "Submit"));
|
|
664
664
|
interactiveStore.add(submitButton.onDidClick(() => this.submit()));
|
|
665
665
|
this._submitButton = submitButton;
|
|
666
666
|
this._footerRow.appendChild(rightControls);
|
|
@@ -669,7 +669,7 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
669
669
|
}
|
|
670
670
|
getLabelWithKeybinding(label, actionId) {
|
|
671
671
|
const keybindingLabel = this._keybindingService.lookupKeybinding(actionId, this._contextKeyService)?.getLabel();
|
|
672
|
-
return keybindingLabel ? ( localize(
|
|
672
|
+
return keybindingLabel ? ( localize(6786, "{0} ({1})", label, keybindingLabel)) : label;
|
|
673
673
|
}
|
|
674
674
|
renderInput(container, question) {
|
|
675
675
|
switch (question.type) {
|
|
@@ -698,7 +698,7 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
698
698
|
}
|
|
699
699
|
renderTextInput(container, question) {
|
|
700
700
|
const inputBox = this._inputBoxes.add(( new InputBox(container, undefined, {
|
|
701
|
-
placeholder: ( localize(
|
|
701
|
+
placeholder: ( localize(6787, "Enter your answer")),
|
|
702
702
|
inputBoxStyles: defaultInputBoxStyles,
|
|
703
703
|
validationOptions: question.validation ? {
|
|
704
704
|
validation: value => {
|
|
@@ -733,7 +733,7 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
733
733
|
}
|
|
734
734
|
}
|
|
735
735
|
renderSingleSelect(container, question) {
|
|
736
|
-
const
|
|
736
|
+
const orderedOptions = this.getOptionsWithDefaultsFirst(question);
|
|
737
737
|
const selectContainer = $(".chat-question-list");
|
|
738
738
|
selectContainer.setAttribute("role", "listbox");
|
|
739
739
|
selectContainer.setAttribute("aria-label", question.title);
|
|
@@ -747,7 +747,12 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
747
747
|
const previousSelectedValue = prevSingle?.selectedValue;
|
|
748
748
|
const defaultOptionId = typeof question.defaultValue === "string" ? question.defaultValue : undefined;
|
|
749
749
|
let selectedIndex = -1;
|
|
750
|
-
|
|
750
|
+
orderedOptions.forEach((
|
|
751
|
+
{
|
|
752
|
+
option
|
|
753
|
+
},
|
|
754
|
+
index
|
|
755
|
+
) => {
|
|
751
756
|
if (previousSelectedValue !== undefined && option.value === previousSelectedValue) {
|
|
752
757
|
selectedIndex = index;
|
|
753
758
|
} else if (selectedIndex === -1 && !previousFreeform && defaultOptionId !== undefined && option.id === defaultOptionId) {
|
|
@@ -774,12 +779,17 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
774
779
|
}
|
|
775
780
|
this.saveCurrentAnswer();
|
|
776
781
|
};
|
|
777
|
-
|
|
782
|
+
orderedOptions.forEach((
|
|
783
|
+
{
|
|
784
|
+
option
|
|
785
|
+
},
|
|
786
|
+
index
|
|
787
|
+
) => {
|
|
778
788
|
const isSelected = index === selectedIndex;
|
|
779
789
|
const listItem = $(".chat-question-list-item");
|
|
780
790
|
listItem.setAttribute("role", "option");
|
|
781
791
|
listItem.setAttribute("aria-selected", String(isSelected));
|
|
782
|
-
listItem.setAttribute("aria-label", ( localize(
|
|
792
|
+
listItem.setAttribute("aria-label", ( localize(6788, "Option {0}: {1}", index + 1, option.label)));
|
|
783
793
|
listItem.id = `option-${question.id}-${index}`;
|
|
784
794
|
listItem.tabIndex = -1;
|
|
785
795
|
const number = $(".chat-question-list-number");
|
|
@@ -832,7 +842,8 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
832
842
|
});
|
|
833
843
|
this._singleSelectItems.set(question.id, {
|
|
834
844
|
items: listItems,
|
|
835
|
-
selectedIndex
|
|
845
|
+
selectedIndex,
|
|
846
|
+
optionIndices: ( orderedOptions.map(o => o.originalIndex))
|
|
836
847
|
});
|
|
837
848
|
if (selectedIndex >= 0 && selectedIndex < listItems.length) {
|
|
838
849
|
selectContainer.setAttribute("aria-activedescendant", listItems[selectedIndex].id);
|
|
@@ -841,10 +852,10 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
841
852
|
if (question.allowFreeformInput !== false) {
|
|
842
853
|
const freeformContainer = $(".chat-question-freeform");
|
|
843
854
|
const freeformNumber = $(".chat-question-freeform-number");
|
|
844
|
-
freeformNumber.textContent = `${
|
|
855
|
+
freeformNumber.textContent = `${orderedOptions.length + 1}`;
|
|
845
856
|
freeformContainer.appendChild(freeformNumber);
|
|
846
857
|
freeformTextarea = $("textarea.chat-question-freeform-textarea");
|
|
847
|
-
freeformTextarea.placeholder = ( localize(
|
|
858
|
+
freeformTextarea.placeholder = ( localize(6789, "Enter custom answer"));
|
|
848
859
|
freeformTextarea.rows = 1;
|
|
849
860
|
if (previousFreeform !== undefined) {
|
|
850
861
|
freeformTextarea.value = previousFreeform;
|
|
@@ -923,7 +934,7 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
923
934
|
}
|
|
924
935
|
}
|
|
925
936
|
renderMultiSelect(container, question) {
|
|
926
|
-
const
|
|
937
|
+
const orderedOptions = this.getOptionsWithDefaultsFirst(question);
|
|
927
938
|
const selectContainer = $(".chat-question-list");
|
|
928
939
|
selectContainer.setAttribute("role", "listbox");
|
|
929
940
|
selectContainer.setAttribute("aria-multiselectable", "true");
|
|
@@ -941,7 +952,12 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
941
952
|
const listItems = [];
|
|
942
953
|
let focusedIndex = 0;
|
|
943
954
|
let firstCheckedIndex = -1;
|
|
944
|
-
|
|
955
|
+
orderedOptions.forEach((
|
|
956
|
+
{
|
|
957
|
+
option
|
|
958
|
+
},
|
|
959
|
+
index
|
|
960
|
+
) => {
|
|
945
961
|
let isChecked = false;
|
|
946
962
|
if (previousSelectedValues && previousSelectedValues.length > 0) {
|
|
947
963
|
isChecked = previousSelectedValues.includes(option.value);
|
|
@@ -951,7 +967,7 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
951
967
|
const listItem = $(".chat-question-list-item.multi-select");
|
|
952
968
|
listItem.setAttribute("role", "option");
|
|
953
969
|
listItem.setAttribute("aria-selected", String(isChecked));
|
|
954
|
-
listItem.setAttribute("aria-label", ( localize(
|
|
970
|
+
listItem.setAttribute("aria-label", ( localize(6788, "Option {0}: {1}", index + 1, option.label)));
|
|
955
971
|
listItem.id = `option-${question.id}-${index}`;
|
|
956
972
|
listItem.tabIndex = -1;
|
|
957
973
|
const number = $(".chat-question-list-number");
|
|
@@ -1005,15 +1021,18 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
1005
1021
|
checkboxes.push(checkbox);
|
|
1006
1022
|
listItems.push(listItem);
|
|
1007
1023
|
});
|
|
1008
|
-
this._multiSelectCheckboxes.set(question.id,
|
|
1024
|
+
this._multiSelectCheckboxes.set(question.id, {
|
|
1025
|
+
checkboxes,
|
|
1026
|
+
optionIndices: ( orderedOptions.map(o => o.originalIndex))
|
|
1027
|
+
});
|
|
1009
1028
|
let freeformTextarea;
|
|
1010
1029
|
if (question.allowFreeformInput !== false) {
|
|
1011
1030
|
const freeformContainer = $(".chat-question-freeform");
|
|
1012
1031
|
const freeformNumber = $(".chat-question-freeform-number");
|
|
1013
|
-
freeformNumber.textContent = `${
|
|
1032
|
+
freeformNumber.textContent = `${orderedOptions.length + 1}`;
|
|
1014
1033
|
freeformContainer.appendChild(freeformNumber);
|
|
1015
1034
|
freeformTextarea = $("textarea.chat-question-freeform-textarea");
|
|
1016
|
-
freeformTextarea.placeholder = ( localize(
|
|
1035
|
+
freeformTextarea.placeholder = ( localize(6789, "Enter custom answer"));
|
|
1017
1036
|
freeformTextarea.rows = 1;
|
|
1018
1037
|
if (previousFreeform !== undefined) {
|
|
1019
1038
|
freeformTextarea.value = previousFreeform;
|
|
@@ -1101,7 +1120,8 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
1101
1120
|
const data = this._singleSelectItems.get(question.id);
|
|
1102
1121
|
let selectedValue = undefined;
|
|
1103
1122
|
if (data && data.selectedIndex >= 0) {
|
|
1104
|
-
|
|
1123
|
+
const originalIndex = data.optionIndices[data.selectedIndex];
|
|
1124
|
+
selectedValue = originalIndex !== undefined ? question.options?.[originalIndex]?.value : undefined;
|
|
1105
1125
|
}
|
|
1106
1126
|
if (selectedValue === undefined && typeof question.defaultValue === "string") {
|
|
1107
1127
|
const defaultOption = question.options?.find(opt => opt.id === question.defaultValue);
|
|
@@ -1125,12 +1145,13 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
1125
1145
|
}
|
|
1126
1146
|
case "multiSelect":
|
|
1127
1147
|
{
|
|
1128
|
-
const
|
|
1148
|
+
const data = this._multiSelectCheckboxes.get(question.id);
|
|
1129
1149
|
const selectedValues = [];
|
|
1130
|
-
if (
|
|
1131
|
-
checkboxes.forEach((checkbox, index) => {
|
|
1150
|
+
if (data) {
|
|
1151
|
+
data.checkboxes.forEach((checkbox, index) => {
|
|
1132
1152
|
if (checkbox.checked) {
|
|
1133
|
-
const
|
|
1153
|
+
const originalIndex = data.optionIndices[index];
|
|
1154
|
+
const value = originalIndex !== undefined ? question.options?.[originalIndex]?.value : undefined;
|
|
1134
1155
|
if (value !== undefined) {
|
|
1135
1156
|
selectedValues.push(value);
|
|
1136
1157
|
}
|
|
@@ -1153,10 +1174,32 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
1153
1174
|
} : undefined;
|
|
1154
1175
|
}
|
|
1155
1176
|
}
|
|
1177
|
+
getOptionsWithDefaultsFirst(question) {
|
|
1178
|
+
const options = question.options ?? [];
|
|
1179
|
+
const orderedOptions = ( options.map((option, index) => ({
|
|
1180
|
+
option,
|
|
1181
|
+
originalIndex: index
|
|
1182
|
+
})));
|
|
1183
|
+
const defaultOptionIds = Array.isArray(question.defaultValue) ? question.defaultValue : (typeof question.defaultValue === "string" ? [question.defaultValue] : []);
|
|
1184
|
+
if (defaultOptionIds.length === 0) {
|
|
1185
|
+
return orderedOptions;
|
|
1186
|
+
}
|
|
1187
|
+
const defaultIds = ( new Set(defaultOptionIds));
|
|
1188
|
+
const defaults = [];
|
|
1189
|
+
const nonDefaults = [];
|
|
1190
|
+
for (const item of orderedOptions) {
|
|
1191
|
+
if (( defaultIds.has(item.option.id))) {
|
|
1192
|
+
defaults.push(item);
|
|
1193
|
+
} else {
|
|
1194
|
+
nonDefaults.push(item);
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
return [...defaults, ...nonDefaults];
|
|
1198
|
+
}
|
|
1156
1199
|
renderSkippedMessage() {
|
|
1157
1200
|
const skippedContainer = $(".chat-question-carousel-summary");
|
|
1158
1201
|
const skippedMessage = $(".chat-question-summary-skipped");
|
|
1159
|
-
skippedMessage.textContent = ( localize(
|
|
1202
|
+
skippedMessage.textContent = ( localize(6790, "Skipped"));
|
|
1160
1203
|
skippedContainer.appendChild(skippedMessage);
|
|
1161
1204
|
this.domNode.appendChild(skippedContainer);
|
|
1162
1205
|
}
|
|
@@ -1175,16 +1218,16 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
1175
1218
|
const questionText = question.message ?? question.title;
|
|
1176
1219
|
let labelText = typeof questionText === "string" ? questionText : questionText.value;
|
|
1177
1220
|
labelText = labelText.replace(/[:\s]+$/, "");
|
|
1178
|
-
questionRow.textContent = ( localize(
|
|
1221
|
+
questionRow.textContent = ( localize(6791, "Q: {0}", labelText));
|
|
1179
1222
|
summaryItem.appendChild(questionRow);
|
|
1180
1223
|
if (answer !== undefined) {
|
|
1181
1224
|
const formattedAnswer = this.formatAnswerForSummary(question, answer);
|
|
1182
1225
|
const answerRow = $("div.chat-question-summary-answer-title");
|
|
1183
|
-
answerRow.textContent = ( localize(
|
|
1226
|
+
answerRow.textContent = ( localize(6792, "A: {0}", formattedAnswer));
|
|
1184
1227
|
summaryItem.appendChild(answerRow);
|
|
1185
1228
|
} else {
|
|
1186
1229
|
const unanswered = $("div.chat-question-summary-unanswered");
|
|
1187
|
-
unanswered.textContent = ( localize(
|
|
1230
|
+
unanswered.textContent = ( localize(6793, "Not answered yet"));
|
|
1188
1231
|
summaryItem.appendChild(unanswered);
|
|
1189
1232
|
}
|
|
1190
1233
|
summaryContainer.appendChild(summaryItem);
|
|
@@ -1224,7 +1267,7 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
1224
1267
|
if (freeformValue) {
|
|
1225
1268
|
labels.push(freeformValue);
|
|
1226
1269
|
}
|
|
1227
|
-
return labels.join(( localize(
|
|
1270
|
+
return labels.join(( localize(6794, ", ")));
|
|
1228
1271
|
}
|
|
1229
1272
|
return String(answer);
|
|
1230
1273
|
}
|
|
@@ -1243,7 +1286,7 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
1243
1286
|
}
|
|
1244
1287
|
const answer = this._answers.get(question.id);
|
|
1245
1288
|
if (question.required && (answer === undefined || answer === "")) {
|
|
1246
|
-
this.showValidationError(( localize(
|
|
1289
|
+
this.showValidationError(( localize(6795, "This field is required")));
|
|
1247
1290
|
return false;
|
|
1248
1291
|
}
|
|
1249
1292
|
if (question.type === "text" && question.validation && typeof answer === "string" && answer !== "") {
|
|
@@ -1268,7 +1311,7 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
1268
1311
|
this._currentIndex = i;
|
|
1269
1312
|
this.persistDraftState();
|
|
1270
1313
|
this.renderCurrentQuestion(true);
|
|
1271
|
-
this.showValidationError(( localize(
|
|
1314
|
+
this.showValidationError(( localize(6795, "This field is required")));
|
|
1272
1315
|
return false;
|
|
1273
1316
|
}
|
|
1274
1317
|
}
|
|
@@ -1276,34 +1319,34 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
1276
1319
|
}
|
|
1277
1320
|
getValidationError(value, validation) {
|
|
1278
1321
|
if (validation.minLength !== undefined && value.length < validation.minLength) {
|
|
1279
|
-
return localize(
|
|
1322
|
+
return localize(6796, "Minimum length is {0}", validation.minLength);
|
|
1280
1323
|
}
|
|
1281
1324
|
if (validation.maxLength !== undefined && value.length > validation.maxLength) {
|
|
1282
|
-
return localize(
|
|
1325
|
+
return localize(6797, "Maximum length is {0}", validation.maxLength);
|
|
1283
1326
|
}
|
|
1284
1327
|
if (validation.format) {
|
|
1285
1328
|
switch (validation.format) {
|
|
1286
1329
|
case "email":
|
|
1287
1330
|
if (!value.includes("@")) {
|
|
1288
|
-
return localize(
|
|
1331
|
+
return localize(6798, "Please enter a valid email address");
|
|
1289
1332
|
}
|
|
1290
1333
|
break;
|
|
1291
1334
|
case "uri":
|
|
1292
1335
|
if (!URL.canParse(value)) {
|
|
1293
|
-
return localize(
|
|
1336
|
+
return localize(6799, "Please enter a valid URI");
|
|
1294
1337
|
}
|
|
1295
1338
|
break;
|
|
1296
1339
|
case "date":
|
|
1297
1340
|
{
|
|
1298
1341
|
const dateRegex = /^\d{4}-\d{2}-\d{2}$/;
|
|
1299
1342
|
if (!dateRegex.test(value) || isNaN(( new Date(value)).getTime())) {
|
|
1300
|
-
return localize(
|
|
1343
|
+
return localize(6800, "Please enter a valid date (YYYY-MM-DD)");
|
|
1301
1344
|
}
|
|
1302
1345
|
break;
|
|
1303
1346
|
}
|
|
1304
1347
|
case "date-time":
|
|
1305
1348
|
if (isNaN(( new Date(value)).getTime())) {
|
|
1306
|
-
return localize(
|
|
1349
|
+
return localize(6801, "Please enter a valid date-time");
|
|
1307
1350
|
}
|
|
1308
1351
|
break;
|
|
1309
1352
|
}
|
|
@@ -1311,16 +1354,16 @@ let ChatQuestionCarouselPart = class ChatQuestionCarouselPart extends Disposable
|
|
|
1311
1354
|
if (validation.isInteger !== undefined || validation.minimum !== undefined || validation.maximum !== undefined) {
|
|
1312
1355
|
const num = Number(value);
|
|
1313
1356
|
if (isNaN(num)) {
|
|
1314
|
-
return localize(
|
|
1357
|
+
return localize(6802, "Please enter a valid number");
|
|
1315
1358
|
}
|
|
1316
1359
|
if (validation.isInteger && !Number.isInteger(num)) {
|
|
1317
|
-
return localize(
|
|
1360
|
+
return localize(6803, "Please enter a valid integer");
|
|
1318
1361
|
}
|
|
1319
1362
|
if (validation.minimum !== undefined && num < validation.minimum) {
|
|
1320
|
-
return localize(
|
|
1363
|
+
return localize(6804, "Minimum value is {0}", validation.minimum);
|
|
1321
1364
|
}
|
|
1322
1365
|
if (validation.maximum !== undefined && num > validation.maximum) {
|
|
1323
|
-
return localize(
|
|
1366
|
+
return localize(6805, "Maximum value is {0}", validation.maximum);
|
|
1324
1367
|
}
|
|
1325
1368
|
}
|
|
1326
1369
|
return undefined;
|
|
@@ -51,12 +51,13 @@ let ChatQuotaExceededPart = class ChatQuotaExceededPart extends Disposable {
|
|
|
51
51
|
append(messageContainer, markdownContent.element);
|
|
52
52
|
let primaryButtonLabel;
|
|
53
53
|
switch (chatEntitlementService.entitlement) {
|
|
54
|
+
case ChatEntitlement.EDU:
|
|
54
55
|
case ChatEntitlement.Pro:
|
|
55
56
|
case ChatEntitlement.ProPlus:
|
|
56
|
-
primaryButtonLabel = ( localize(
|
|
57
|
+
primaryButtonLabel = ( localize(6806, "Manage Paid Premium Requests"));
|
|
57
58
|
break;
|
|
58
59
|
case ChatEntitlement.Free:
|
|
59
|
-
primaryButtonLabel = ( localize(
|
|
60
|
+
primaryButtonLabel = ( localize(6807, "Upgrade to GitHub Copilot Pro"));
|
|
60
61
|
break;
|
|
61
62
|
}
|
|
62
63
|
let hasAddedWaitWarning = false;
|
|
@@ -65,7 +66,7 @@ let ChatQuotaExceededPart = class ChatQuotaExceededPart extends Disposable {
|
|
|
65
66
|
return;
|
|
66
67
|
}
|
|
67
68
|
hasAddedWaitWarning = true;
|
|
68
|
-
append(messageContainer, $(".chat-quota-wait-warning", undefined, ( localize(
|
|
69
|
+
append(messageContainer, $(".chat-quota-wait-warning", undefined, ( localize(6808, "Changes may take a few minutes to take effect."))));
|
|
69
70
|
};
|
|
70
71
|
let hasAddedRetryButton = false;
|
|
71
72
|
const addRetryButtonIfNeeded = () => {
|
|
@@ -78,7 +79,7 @@ let ChatQuotaExceededPart = class ChatQuotaExceededPart extends Disposable {
|
|
|
78
79
|
buttonForeground: asCssVariable(textLinkForeground)
|
|
79
80
|
})));
|
|
80
81
|
retryButton.element.classList.add("chat-quota-error-secondary-button");
|
|
81
|
-
retryButton.label = ( localize(
|
|
82
|
+
retryButton.label = ( localize(6809, "Click to Retry"));
|
|
82
83
|
this._register(retryButton.onDidClick(() => {
|
|
83
84
|
const widget = chatWidgetService.getWidgetBySessionResource(element.sessionResource);
|
|
84
85
|
if (!widget) {
|
|
@@ -57,7 +57,7 @@ let ChatCollapsibleListContentPart = class ChatCollapsibleListContentPart extend
|
|
|
57
57
|
hoverService,
|
|
58
58
|
configurationService
|
|
59
59
|
) {
|
|
60
|
-
super(labelOverride ?? (data.length > 1 ? ( localize(
|
|
60
|
+
super(labelOverride ?? (data.length > 1 ? ( localize(6810, "Used {0} references", data.length)) : ( localize(6811, "Used {0} reference", 1))), context, hoverMessage, hoverService, configurationService);
|
|
61
61
|
this.data = data;
|
|
62
62
|
this.contentReferencesListPool = contentReferencesListPool;
|
|
63
63
|
this.openerService = openerService;
|
|
@@ -214,7 +214,7 @@ let CollapsibleListPool = class CollapsibleListPool extends Disposable {
|
|
|
214
214
|
return basename(reference.uri.path);
|
|
215
215
|
}
|
|
216
216
|
},
|
|
217
|
-
getWidgetAriaLabel: () => ( localize(
|
|
217
|
+
getWidgetAriaLabel: () => ( localize(6812, "Collapsible Chat References List"))
|
|
218
218
|
},
|
|
219
219
|
dnd: {
|
|
220
220
|
getDragURI: element => getResourceForElement(element)?.toString() ?? null,
|
|
@@ -402,7 +402,7 @@ let CollapsibleListRenderer = class CollapsibleListRenderer {
|
|
|
402
402
|
name: settingId
|
|
403
403
|
}, {
|
|
404
404
|
icon: Codicon.settingsGear,
|
|
405
|
-
title: ( localize(
|
|
405
|
+
title: ( localize(6813, "Open setting '{0}'", settingId)),
|
|
406
406
|
strikethrough: data.excluded,
|
|
407
407
|
extraClasses
|
|
408
408
|
});
|
|
@@ -447,7 +447,7 @@ let CollapsibleListRenderer = class CollapsibleListRenderer {
|
|
|
447
447
|
templateData.addedSpan.textContent = `+${diffMeta.added}`;
|
|
448
448
|
templateData.removedSpan.textContent = `-${diffMeta.removed}`;
|
|
449
449
|
templateData.fileDiffsContainer.setAttribute("aria-label", ( localize(
|
|
450
|
-
|
|
450
|
+
6814,
|
|
451
451
|
"{0} lines added, {1} lines removed",
|
|
452
452
|
diffMeta.added,
|
|
453
453
|
diffMeta.removed
|
|
@@ -528,7 +528,7 @@ registerAction2(class AddToChatAction extends Action2 {
|
|
|
528
528
|
super({
|
|
529
529
|
id: AddToChatAction.id,
|
|
530
530
|
title: {
|
|
531
|
-
...( localize2(
|
|
531
|
+
...( localize2(6815, "Add File to Chat"))
|
|
532
532
|
},
|
|
533
533
|
f1: false,
|
|
534
534
|
menu: [{
|
|
@@ -558,7 +558,7 @@ registerAction2(class OpenChatReferenceLinkAction extends Action2 {
|
|
|
558
558
|
super({
|
|
559
559
|
id: OpenChatReferenceLinkAction.id,
|
|
560
560
|
title: {
|
|
561
|
-
...( localize2(
|
|
561
|
+
...( localize2(6816, "Copy Link"))
|
|
562
562
|
},
|
|
563
563
|
f1: false,
|
|
564
564
|
menu: [{
|
|
@@ -188,7 +188,7 @@ class SaveResourcesAction extends Action2 {
|
|
|
188
188
|
constructor() {
|
|
189
189
|
super({
|
|
190
190
|
id: SaveResourcesAction.ID,
|
|
191
|
-
title: ( localize2(
|
|
191
|
+
title: ( localize2(6817, "Save...")),
|
|
192
192
|
icon: Codicon.cloudDownload,
|
|
193
193
|
menu: [{
|
|
194
194
|
id: MenuId.ChatToolOutputResourceToolbar,
|
|
@@ -218,14 +218,14 @@ class SaveResourcesAction extends Action2 {
|
|
|
218
218
|
await fileService.writeFile(target, contents.value);
|
|
219
219
|
}
|
|
220
220
|
} catch (e) {
|
|
221
|
-
notificationService.error(( localize(
|
|
221
|
+
notificationService.error(( localize(6818, "Failed to save {0}: {1}", basename(part.uri), e)));
|
|
222
222
|
}
|
|
223
223
|
};
|
|
224
224
|
const withProgress = async (thenReveal, todo) => {
|
|
225
225
|
await progressService.withProgress({
|
|
226
226
|
location: ProgressLocation.Notification,
|
|
227
227
|
delay: 5_000,
|
|
228
|
-
title: ( localize(
|
|
228
|
+
title: ( localize(6819, "Saving resources..."))
|
|
229
229
|
}, async report => {
|
|
230
230
|
for (const task of todo) {
|
|
231
231
|
await task();
|
|
@@ -238,7 +238,7 @@ class SaveResourcesAction extends Action2 {
|
|
|
238
238
|
if (workspaceContextService.isInsideWorkspace(thenReveal)) {
|
|
239
239
|
commandService.executeCommand(REVEAL_IN_EXPLORER_COMMAND_ID, thenReveal);
|
|
240
240
|
} else {
|
|
241
|
-
notificationService.info(( localize(
|
|
241
|
+
notificationService.info(( localize(6820, "Saved resources to {0}", labelService.getUriLabel(thenReveal))));
|
|
242
242
|
}
|
|
243
243
|
};
|
|
244
244
|
if (context.parts.length === 1) {
|
|
@@ -250,7 +250,7 @@ class SaveResourcesAction extends Action2 {
|
|
|
250
250
|
await withProgress(uri, [() => savePart(part, false, uri)]);
|
|
251
251
|
} else {
|
|
252
252
|
const uris = await fileDialog.showOpenDialog({
|
|
253
|
-
title: ( localize(
|
|
253
|
+
title: ( localize(6821, "Pick folder to save resources")),
|
|
254
254
|
canSelectFiles: false,
|
|
255
255
|
canSelectFolders: true,
|
|
256
256
|
canSelectMany: false,
|
|
@@ -30,7 +30,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
30
30
|
return toolInvocation.toolSpecificData?.kind === "subagent" && !toolInvocation.subAgentInvocationId;
|
|
31
31
|
}
|
|
32
32
|
static extractSubagentInfo(toolInvocation) {
|
|
33
|
-
const defaultDescription = ( localize(
|
|
33
|
+
const defaultDescription = ( localize(6822, "Running subagent"));
|
|
34
34
|
if (!ChatSubagentContentPart_1.isParentSubagentTool(toolInvocation)) {
|
|
35
35
|
return {
|
|
36
36
|
description: defaultDescription,
|
|
@@ -85,7 +85,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
85
85
|
prompt,
|
|
86
86
|
modelName
|
|
87
87
|
} = ChatSubagentContentPart_1.extractSubagentInfo(toolInvocation);
|
|
88
|
-
const prefix = agentName || ( localize(
|
|
88
|
+
const prefix = agentName || ( localize(6823, "Subagent"));
|
|
89
89
|
const initialTitle = `${prefix}: ${description}`;
|
|
90
90
|
super(initialTitle, context, undefined, hoverService, configurationService);
|
|
91
91
|
this.subAgentInvocationId = subAgentInvocationId;
|
|
@@ -191,7 +191,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
191
191
|
return;
|
|
192
192
|
}
|
|
193
193
|
const lines = this.prompt.split("\n");
|
|
194
|
-
const rawFirstLine = lines[0] || ( localize(
|
|
194
|
+
const rawFirstLine = lines[0] || ( localize(6824, "Prompt"));
|
|
195
195
|
const restOfLines = lines.slice(1).join("\n").trim();
|
|
196
196
|
const titleContent = rcut(rawFirstLine, MAX_TITLE_LENGTH);
|
|
197
197
|
const wasTruncated = rawFirstLine.length > MAX_TITLE_LENGTH;
|
|
@@ -239,7 +239,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
updateTitle() {
|
|
242
|
-
const prefix = this.agentName || ( localize(
|
|
242
|
+
const prefix = this.agentName || ( localize(6823, "Subagent"));
|
|
243
243
|
const shimmerText = `${prefix}: ${this.description}`;
|
|
244
244
|
const toolCallText = this.currentRunningToolMessage && this.isActive ? ` \u2014 ${this.currentRunningToolMessage}` : ``;
|
|
245
245
|
if (!this._collapseButton) {
|
|
@@ -299,7 +299,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
299
299
|
return;
|
|
300
300
|
}
|
|
301
301
|
this._hoverDisposable.value = this.hoverService.setupDelayedHover(this._collapseButton.element, {
|
|
302
|
-
content: ( localize(
|
|
302
|
+
content: ( localize(6825, "Model: {0}", this.modelName))
|
|
303
303
|
});
|
|
304
304
|
}
|
|
305
305
|
trackToolState(toolInvocation) {
|
|
@@ -451,7 +451,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
453
|
appendHookItem(factory, hookPart) {
|
|
454
|
-
const hookMessage = hookPart.stopReason ? (hookPart.toolDisplayName ? ( localize(
|
|
454
|
+
const hookMessage = hookPart.stopReason ? (hookPart.toolDisplayName ? ( localize(6826, "Blocked {0}", hookPart.toolDisplayName)) : ( localize(6827, "Blocked by hook"))) : (hookPart.toolDisplayName ? ( localize(6828, "Warning for {0}", hookPart.toolDisplayName)) : ( localize(6829, "Hook warning")));
|
|
455
455
|
this.currentRunningToolMessage = hookMessage;
|
|
456
456
|
this.updateTitle();
|
|
457
457
|
if (this.isExpanded() || this.hasExpandedOnce) {
|