@codingame/monaco-vscode-katex-common 28.4.0 → 29.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 +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +17 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +2 -2
- 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.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +158 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +22 -17
- 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 +16 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +121 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +15 -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 +29 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +349 -109
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +47 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +104 -62
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +13 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +34 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +21 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +13 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +29 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +261 -282
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +7 -5
- 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 +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.js +184 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +4 -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/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/chatDisabledClaudeHooksContentPart.js +4 -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 +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +42 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +14 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +11 -9
- 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 +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +25 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +332 -114
- 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.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +10 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +11 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +66 -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 +28 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +272 -107
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingExternalResourcesWidget.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingExternalResourcesWidget.js +70 -0
- 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.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +6 -3
- 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/chatConfirmationWidget.css +151 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatInlineAnchorWidget.css +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +96 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +86 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +5 -2
- 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/chatInputOutputMarkdownProgressPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +8 -6
- 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/chatModifiedFilesConfirmationSubPart.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.js +273 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.js +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +28 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +22 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +81 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +20 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +11 -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.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +21 -7
- 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 +2 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +112 -163
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +137 -52
- 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 +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +108 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +385 -247
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +23 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.js +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +3 -3
- 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 +124 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +24 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +30 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +84 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +170 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalPromptFileSystem.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalPromptFileSystem.js +95 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +4 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +15 -15
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +4 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +38 -6
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +31 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +12 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +130 -23
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +41 -0
- 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/browser/media/inlineChatOverlayWidget.css +55 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +50 -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/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/widget/chatQuestionCarouselAutoReply.d.ts +0 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.js +0 -440
|
@@ -16,7 +16,6 @@ import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/even
|
|
|
16
16
|
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
17
17
|
import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
|
|
18
18
|
import { KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
19
|
-
import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
20
19
|
import { Disposable, DisposableStore, dispose, toDisposable, thenIfNotDisposed } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
21
20
|
import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
22
21
|
import { FileAccess, Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
@@ -42,7 +41,7 @@ import { IAccessibilitySignalService } from '@codingame/monaco-vscode-api/vscode
|
|
|
42
41
|
import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
|
|
43
42
|
import { IWorkbenchIssueService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/issue/common/issue.service';
|
|
44
43
|
import { CodiconActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView';
|
|
45
|
-
import { annotateSpecialMarkdownContent, hasEditCodeblockUriTag, extractSubAgentInvocationIdFromText } from '../../common/widget/annotations.js';
|
|
44
|
+
import { annotateSpecialMarkdownContent, hasEditCodeblockUriTag, hasCodeblockUriTag, extractSubAgentInvocationIdFromText } from '../../common/widget/annotations.js';
|
|
46
45
|
import { checkModeOption } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chat';
|
|
47
46
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
48
47
|
import { chatSubcommandLeader } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes';
|
|
@@ -54,7 +53,7 @@ import { getChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workb
|
|
|
54
53
|
import { isResponseVM, isPendingDividerVM, isRequestVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel';
|
|
55
54
|
import { getNWords } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatWordCounter';
|
|
56
55
|
import { CodeBlockModelCollection } from '../../common/widget/codeBlockModelCollection.js';
|
|
57
|
-
import {
|
|
56
|
+
import { ChatConfiguration, ChatAgentLocation, CollapsedToolsDisplayMode, ThinkingDisplayMode, ChatModeKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
58
57
|
import { ClickAnimation } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/animations/animations';
|
|
59
58
|
import { MarkUnhelpfulActionId, MarkHelpfulActionId } from '../actions/chatTitleActions.js';
|
|
60
59
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
@@ -96,9 +95,9 @@ import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/reso
|
|
|
96
95
|
import { IAccessibilityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service';
|
|
97
96
|
import { ChatHookContentPart } from './chatContentParts/chatHookContentPart.js';
|
|
98
97
|
import { HookType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookTypes';
|
|
99
|
-
import { ChatQuestionCarouselAutoReply } from './chatQuestionCarouselAutoReply.js';
|
|
100
98
|
import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
101
99
|
import { AccessibilityWorkbenchSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
100
|
+
import { isMcpToolInvocation } from './chatContentParts/toolInvocationParts/chatToolPartUtilities.js';
|
|
102
101
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
103
102
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
104
103
|
|
|
@@ -173,7 +172,6 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
173
172
|
this.templateDataByRequestId = ( new Map());
|
|
174
173
|
this.responseTemplateDataByRequestId = ( new Map());
|
|
175
174
|
this.pendingQuestionCarousels = ( new ResourceMap());
|
|
176
|
-
this._autoRepliedQuestionCarousels = ( new Set());
|
|
177
175
|
this._notifiedQuestionCarousels = ( new Set());
|
|
178
176
|
this._onDidClickFollowup = this._register(( new Emitter()));
|
|
179
177
|
this.onDidClickFollowup = this._onDidClickFollowup.event;
|
|
@@ -219,7 +217,6 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
219
217
|
this._toolInvocationCodeBlockCollection = this._register(
|
|
220
218
|
this.instantiationService.createInstance(CodeBlockModelCollection, "tools")
|
|
221
219
|
);
|
|
222
|
-
this._autoReply = this._register(this.instantiationService.createInstance(ChatQuestionCarouselAutoReply));
|
|
223
220
|
this._register(this.chatService.onDidSubmitRequest(e => {
|
|
224
221
|
const carousels = this.pendingQuestionCarousels.get(e.chatSessionResource);
|
|
225
222
|
if (carousels) {
|
|
@@ -229,6 +226,16 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
229
226
|
carousels.clear();
|
|
230
227
|
}
|
|
231
228
|
}));
|
|
229
|
+
this._register(this.configService.onDidChangeConfiguration(e => {
|
|
230
|
+
if (e.affectsConfiguration(ChatConfiguration.AutoReply) && this.configService.getValue(ChatConfiguration.AutoReply)) {
|
|
231
|
+
for (const [, carousels] of this.pendingQuestionCarousels) {
|
|
232
|
+
for (const carousel of carousels) {
|
|
233
|
+
carousel.skip();
|
|
234
|
+
}
|
|
235
|
+
carousels.clear();
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}));
|
|
232
239
|
}
|
|
233
240
|
set pendingDragController(controller) {
|
|
234
241
|
this._pendingDragController = controller;
|
|
@@ -294,7 +301,6 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
294
301
|
updateViewModel(viewModel) {
|
|
295
302
|
this.viewModel = viewModel;
|
|
296
303
|
this._announcedToolProgressKeys.clear();
|
|
297
|
-
this._autoRepliedQuestionCarousels.clear();
|
|
298
304
|
this._notifiedQuestionCarousels.clear();
|
|
299
305
|
this.codeBlocksByEditorUri.clear();
|
|
300
306
|
this.codeBlocksByResponseId.clear();
|
|
@@ -458,7 +464,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
458
464
|
const checkpointRestoreContainer = append(rowContainer, $(".checkpoint-restore-container"));
|
|
459
465
|
append(checkpointRestoreContainer, $(".checkpoint-line-left"));
|
|
460
466
|
const label = append(checkpointRestoreContainer, $("span.checkpoint-label-text"));
|
|
461
|
-
label.textContent = ( localize(
|
|
467
|
+
label.textContent = ( localize(6933, "Checkpoint Restored"));
|
|
462
468
|
const dot = append(checkpointRestoreContainer, $("span.checkpoint-dot-separator"));
|
|
463
469
|
dot.textContent = "·";
|
|
464
470
|
dot.setAttribute("aria-hidden", "true");
|
|
@@ -584,6 +590,8 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
584
590
|
dispose(coalesce(templateData.renderedParts));
|
|
585
591
|
templateData.renderedParts = undefined;
|
|
586
592
|
clearNode(templateData.value);
|
|
593
|
+
} else if (isPendingDividerVM(templateData.currentElement)) {
|
|
594
|
+
clearNode(templateData.value);
|
|
587
595
|
}
|
|
588
596
|
if (templateData.titleToolbar) {
|
|
589
597
|
templateData.titleToolbar.context = undefined;
|
|
@@ -606,6 +614,16 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
606
614
|
}
|
|
607
615
|
templateData.currentElement = element;
|
|
608
616
|
this.templateDataByRequestId.set(element.id, templateData);
|
|
617
|
+
templateData.rowContainer.classList.remove(
|
|
618
|
+
"pending-item",
|
|
619
|
+
"pending-divider",
|
|
620
|
+
"pending-request",
|
|
621
|
+
"chat-pending-dragging"
|
|
622
|
+
);
|
|
623
|
+
templateData.dragHandle?.remove();
|
|
624
|
+
templateData.dragHandle = undefined;
|
|
625
|
+
delete templateData.rowContainer.dataset.pendingRequestId;
|
|
626
|
+
delete templateData.rowContainer.dataset.pendingKind;
|
|
609
627
|
if (isPendingDividerVM(element)) {
|
|
610
628
|
this.renderPendingDivider(element, templateData);
|
|
611
629
|
return;
|
|
@@ -642,11 +660,6 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
642
660
|
templateData.rowContainer.classList.toggle("editing-session", location === ChatAgentLocation.Chat);
|
|
643
661
|
templateData.rowContainer.classList.toggle("interactive-request", isRequestVM(element));
|
|
644
662
|
templateData.rowContainer.classList.toggle("interactive-response", isResponseVM(element));
|
|
645
|
-
templateData.rowContainer.classList.remove("pending-item", "pending-divider", "pending-request");
|
|
646
|
-
templateData.dragHandle?.remove();
|
|
647
|
-
templateData.dragHandle = undefined;
|
|
648
|
-
delete templateData.rowContainer.dataset.pendingRequestId;
|
|
649
|
-
delete templateData.rowContainer.dataset.pendingKind;
|
|
650
663
|
const progressMessageAtBottomOfResponse = checkModeOption(
|
|
651
664
|
this.delegate.currentChatMode(),
|
|
652
665
|
this.rendererOptions.progressMessageAtBottomOfResponse
|
|
@@ -655,6 +668,16 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
655
668
|
"show-detail-progress",
|
|
656
669
|
isResponseVM(element) && !element.isComplete && !element.progressMessages.length && !progressMessageAtBottomOfResponse
|
|
657
670
|
);
|
|
671
|
+
const updateContainerCheckmarks = () => templateData.rowContainer.classList.toggle(
|
|
672
|
+
"show-checkmarks",
|
|
673
|
+
!!this.configService.getValue(AccessibilityWorkbenchSettingId.ShowChatCheckmarks)
|
|
674
|
+
);
|
|
675
|
+
updateContainerCheckmarks();
|
|
676
|
+
templateData.elementDisposables.add(this.configService.onDidChangeConfiguration(e => {
|
|
677
|
+
if (e.affectsConfiguration(AccessibilityWorkbenchSettingId.ShowChatCheckmarks)) {
|
|
678
|
+
updateContainerCheckmarks();
|
|
679
|
+
}
|
|
680
|
+
}));
|
|
658
681
|
if (!this.rendererOptions.noHeader) {
|
|
659
682
|
this.renderAvatar(element, templateData);
|
|
660
683
|
}
|
|
@@ -673,7 +696,8 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
673
696
|
this.renderDetail(element, templateData);
|
|
674
697
|
}
|
|
675
698
|
templateData.checkpointToolbar.context = element;
|
|
676
|
-
const
|
|
699
|
+
const supportsForkOrRestoration = this.rendererOptions.supportsFork || (this.rendererOptions.restorable ?? true);
|
|
700
|
+
const checkpointEnabled = this.configService.getValue(ChatConfiguration.CheckpointsEnabled) && supportsForkOrRestoration;
|
|
677
701
|
const isPendingRequest = isRequestVM(element) && !!element.pendingKind;
|
|
678
702
|
templateData.checkpointContainer.classList.toggle("hidden", isResponseVM(element) || isPendingRequest || !checkpointEnabled);
|
|
679
703
|
templateData.footerToolbar.refresh();
|
|
@@ -790,11 +814,11 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
790
814
|
const dividerContent = $$1(".pending-divider-content");
|
|
791
815
|
const label = append(dividerContent, $$1("span.pending-divider-label"));
|
|
792
816
|
if (element.dividerKind === ChatRequestQueueKind.Steering) {
|
|
793
|
-
label.textContent = ( localize(
|
|
794
|
-
label.title = ( localize(
|
|
817
|
+
label.textContent = ( localize(6934, "Steering"));
|
|
818
|
+
label.title = ( localize(6935, "Steering message will be sent after the next tool call happens"));
|
|
795
819
|
} else {
|
|
796
|
-
label.textContent = ( localize(
|
|
797
|
-
label.title = ( localize(
|
|
820
|
+
label.textContent = ( localize(6936, "Queued"));
|
|
821
|
+
label.title = ( localize(6937, "Queued messages will be sent after the current request completes"));
|
|
798
822
|
}
|
|
799
823
|
templateData.value.appendChild(dividerContent);
|
|
800
824
|
}
|
|
@@ -802,10 +826,10 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
802
826
|
clearNode(templateData.detail);
|
|
803
827
|
if (element.agentOrSlashCommandDetected) {
|
|
804
828
|
const msg = element.slashCommand ? ( localize(
|
|
805
|
-
|
|
829
|
+
6938,
|
|
806
830
|
"used {0} [[(rerun without)]]",
|
|
807
831
|
`${chatSubcommandLeader}${element.slashCommand.name}`
|
|
808
|
-
)) : ( localize(
|
|
832
|
+
)) : ( localize(6939, "[[(rerun without)]]"));
|
|
809
833
|
reset(templateData.detail, renderFormattedText(msg, {
|
|
810
834
|
actionHandler: {
|
|
811
835
|
disposables: templateData.elementDisposables,
|
|
@@ -818,7 +842,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
818
842
|
this.delegate.currentChatMode(),
|
|
819
843
|
this.rendererOptions.progressMessageAtBottomOfResponse
|
|
820
844
|
)) {
|
|
821
|
-
templateData.detail.textContent = ( localize(
|
|
845
|
+
templateData.detail.textContent = ( localize(6940, "Working"));
|
|
822
846
|
}
|
|
823
847
|
}
|
|
824
848
|
renderConfirmationAction(element, templateData) {
|
|
@@ -827,19 +851,9 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
827
851
|
append(templateData.detail, $("span.codicon.codicon-check", {
|
|
828
852
|
"aria-hidden": "true"
|
|
829
853
|
}));
|
|
830
|
-
append(templateData.detail, $("span.confirmation-text", undefined, ( localize(
|
|
854
|
+
append(templateData.detail, $("span.confirmation-text", undefined, ( localize(6941, "Selected \"{0}\"", element.confirmation))));
|
|
831
855
|
templateData.header?.classList.remove("header-disabled");
|
|
832
856
|
templateData.header?.classList.add("partially-disabled");
|
|
833
|
-
const updateCheckmarks = () => templateData.detail.classList.toggle(
|
|
834
|
-
"show-checkmarks",
|
|
835
|
-
!!this.configService.getValue(AccessibilityWorkbenchSettingId.ShowChatCheckmarks)
|
|
836
|
-
);
|
|
837
|
-
updateCheckmarks();
|
|
838
|
-
templateData.elementDisposables.add(this.configService.onDidChangeConfiguration(e => {
|
|
839
|
-
if (e.affectsConfiguration(AccessibilityWorkbenchSettingId.ShowChatCheckmarks)) {
|
|
840
|
-
updateCheckmarks();
|
|
841
|
-
}
|
|
842
|
-
}));
|
|
843
857
|
}
|
|
844
858
|
}
|
|
845
859
|
renderAvatar(element, templateData) {
|
|
@@ -913,7 +927,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
913
927
|
const diff = this.diff(templateData.renderedParts ?? [], content, element);
|
|
914
928
|
this.renderChatContentDiff(diff, content, element, index, templateData);
|
|
915
929
|
}
|
|
916
|
-
shouldShowWorkingProgress(element, partsToRender, templateData) {
|
|
930
|
+
shouldShowWorkingProgress(element, partsToRender, moreContentAvailable, templateData) {
|
|
917
931
|
if (element.agentOrSlashCommandDetected || this.rendererOptions.renderStyle === "minimal" || element.isComplete || !checkModeOption(
|
|
918
932
|
this.delegate.currentChatMode(),
|
|
919
933
|
this.rendererOptions.progressMessageAtBottomOfResponse
|
|
@@ -925,22 +939,27 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
925
939
|
))) {
|
|
926
940
|
return false;
|
|
927
941
|
}
|
|
942
|
+
if (( partsToRender.some(
|
|
943
|
+
part => part.kind === "toolInvocation" && !IChatToolInvocation.isComplete(part) && isMcpToolInvocation(part)
|
|
944
|
+
))) {
|
|
945
|
+
return false;
|
|
946
|
+
}
|
|
928
947
|
const lastPart = findLast(
|
|
929
948
|
partsToRender,
|
|
930
949
|
part => part.kind !== "markdownContent" || part.content.value.trim().length > 0
|
|
931
950
|
);
|
|
932
|
-
if (( partsToRender.some(part => part.kind === "thinking"))) {
|
|
933
|
-
return false;
|
|
934
|
-
}
|
|
935
951
|
const lastThinking = this.getLastThinkingPart(templateData.renderedParts);
|
|
936
952
|
if (lastThinking) {
|
|
937
953
|
return false;
|
|
938
954
|
}
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
955
|
+
if (lastPart && (lastPart.kind === "toolInvocation" || lastPart.kind === "toolInvocationSerialized")) {
|
|
956
|
+
if (lastPart.isAttachedToThinking) {
|
|
957
|
+
return false;
|
|
958
|
+
}
|
|
959
|
+
const collapsedToolsMode = this.configService.getValue("chat.agent.thinking.collapsedTools");
|
|
960
|
+
if (collapsedToolsMode !== CollapsedToolsDisplayMode.Off && this.shouldPinPart(lastPart, isResponseVM(element) ? element : undefined)) {
|
|
961
|
+
return false;
|
|
962
|
+
}
|
|
944
963
|
}
|
|
945
964
|
const hasRenderedThinkingPart = ( (templateData.renderedParts ?? []).some(part => part instanceof ChatThinkingContentPart));
|
|
946
965
|
const hasEditPillMarkdown = ( partsToRender.some(part => part.kind === "markdownContent" && this.hasEditCodeblockUri(part)));
|
|
@@ -950,7 +969,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
950
969
|
if (this.getSubagentPart(templateData.renderedParts)) {
|
|
951
970
|
return false;
|
|
952
971
|
}
|
|
953
|
-
if (!lastPart || lastPart.kind === "references" || ((lastPart.kind === "toolInvocation" || lastPart.kind === "toolInvocationSerialized") && (IChatToolInvocation.isComplete(lastPart) || lastPart.presentation === "hidden")) || ((lastPart.kind === "textEditGroup" || lastPart.kind === "notebookEditGroup") && lastPart.done && !( partsToRender.some(
|
|
972
|
+
if (!lastPart || lastPart.kind === "references" || (lastPart.kind === "markdownContent" && !moreContentAvailable) || ((lastPart.kind === "toolInvocation" || lastPart.kind === "toolInvocationSerialized") && (IChatToolInvocation.isComplete(lastPart) || lastPart.presentation === "hidden")) || ((lastPart.kind === "textEditGroup" || lastPart.kind === "notebookEditGroup") && lastPart.done && !( partsToRender.some(
|
|
954
973
|
part => part.kind === "toolInvocation" && !IChatToolInvocation.isComplete(part)
|
|
955
974
|
))) || (lastPart.kind === "progressTask" && lastPart.deferred.isSettled) || lastPart.kind === "mcpServersStarting" || lastPart.kind === "disabledClaudeHooks" || lastPart.kind === "hook") {
|
|
956
975
|
return true;
|
|
@@ -1029,6 +1048,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1029
1048
|
clearNode(templateData.value);
|
|
1030
1049
|
const parts = [];
|
|
1031
1050
|
let inlineSlashCommandRendered = false;
|
|
1051
|
+
let codeBlockStartIndex = 0;
|
|
1032
1052
|
content.forEach((data, contentIndex) => {
|
|
1033
1053
|
const context = {
|
|
1034
1054
|
element,
|
|
@@ -1042,12 +1062,8 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1042
1062
|
currentWidth: this._currentLayoutWidth,
|
|
1043
1063
|
onDidChangeVisibility: this._onDidChangeVisibility.event,
|
|
1044
1064
|
inlineTextModels: this._inlineTextModels,
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
},
|
|
1048
|
-
get treeStartIndex() {
|
|
1049
|
-
return parts.filter(part => part instanceof ChatTreeContentPart).length;
|
|
1050
|
-
}
|
|
1065
|
+
codeBlockStartIndex,
|
|
1066
|
+
treeStartIndex: 0
|
|
1051
1067
|
};
|
|
1052
1068
|
const newPart = this.renderChatContentPart(data, templateData, context);
|
|
1053
1069
|
if (newPart) {
|
|
@@ -1072,6 +1088,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1072
1088
|
templateData.value.appendChild(newPart.domNode);
|
|
1073
1089
|
}
|
|
1074
1090
|
parts.push(newPart);
|
|
1091
|
+
codeBlockStartIndex += newPart.codeblocks?.length ?? 0;
|
|
1075
1092
|
}
|
|
1076
1093
|
});
|
|
1077
1094
|
if (templateData.renderedParts) {
|
|
@@ -1134,10 +1151,19 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1134
1151
|
renderChatContentDiff(partsToRender, contentForThisTurn, element, elementIndex, templateData) {
|
|
1135
1152
|
const renderedParts = templateData.renderedParts ?? [];
|
|
1136
1153
|
templateData.renderedParts = renderedParts;
|
|
1137
|
-
|
|
1154
|
+
let codeBlockStartIndex = 0;
|
|
1155
|
+
let treeStartIndex = 0;
|
|
1138
1156
|
partsToRender.forEach((partToRender, contentIndex) => {
|
|
1157
|
+
if (contentIndex > 0) {
|
|
1158
|
+
const prevPart = renderedParts[contentIndex - 1];
|
|
1159
|
+
if (prevPart) {
|
|
1160
|
+
codeBlockStartIndex += prevPart.codeblocks?.length ?? 0;
|
|
1161
|
+
if (prevPart instanceof ChatTreeContentPart) {
|
|
1162
|
+
treeStartIndex++;
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1139
1166
|
const alreadyRenderedPart = templateData.renderedParts?.[contentIndex];
|
|
1140
|
-
const isFinalAnswerPart = partToRender?.kind === "markdownContent" && contentIndex === lastMarkdownIndex && element.isComplete;
|
|
1141
1167
|
if (!partToRender) {
|
|
1142
1168
|
if (!templateData.renderedPartsMounted) {
|
|
1143
1169
|
alreadyRenderedPart?.onDidRemount?.();
|
|
@@ -1151,7 +1177,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1151
1177
|
}
|
|
1152
1178
|
renderedParts[contentIndex] = alreadyRenderedPart;
|
|
1153
1179
|
return;
|
|
1154
|
-
} else if (alreadyRenderedPart instanceof ChatThinkingContentPart && this.shouldPinPart(partToRender, element)
|
|
1180
|
+
} else if (alreadyRenderedPart instanceof ChatThinkingContentPart && this.shouldPinPart(partToRender, element)) {
|
|
1155
1181
|
renderedParts[contentIndex] = alreadyRenderedPart;
|
|
1156
1182
|
return;
|
|
1157
1183
|
}
|
|
@@ -1163,7 +1189,6 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1163
1189
|
}
|
|
1164
1190
|
}
|
|
1165
1191
|
}
|
|
1166
|
-
const preceedingContentParts = renderedParts.slice(0, contentIndex);
|
|
1167
1192
|
const context = {
|
|
1168
1193
|
element,
|
|
1169
1194
|
elementIndex: elementIndex,
|
|
@@ -1176,15 +1201,11 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1176
1201
|
currentWidth: this._currentLayoutWidth,
|
|
1177
1202
|
onDidChangeVisibility: this._onDidChangeVisibility.event,
|
|
1178
1203
|
inlineTextModels: this._inlineTextModels,
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
},
|
|
1182
|
-
get treeStartIndex() {
|
|
1183
|
-
return preceedingContentParts.filter(part => part instanceof ChatTreeContentPart).length;
|
|
1184
|
-
}
|
|
1204
|
+
codeBlockStartIndex,
|
|
1205
|
+
treeStartIndex
|
|
1185
1206
|
};
|
|
1186
1207
|
const lastThinking = this.getLastThinkingPart(renderedParts);
|
|
1187
|
-
if (lastThinking && (partToRender.kind === "toolInvocation" || partToRender.kind === "toolInvocationSerialized" || partToRender.kind === "markdownContent" || partToRender.kind === "textEditGroup" || partToRender.kind === "hook") && this.shouldPinPart(partToRender, element)
|
|
1208
|
+
if (lastThinking && (partToRender.kind === "toolInvocation" || partToRender.kind === "toolInvocationSerialized" || partToRender.kind === "markdownContent" || partToRender.kind === "textEditGroup" || partToRender.kind === "hook") && this.shouldPinPart(partToRender, element)) {
|
|
1188
1209
|
const newPart = this.renderChatContentPart(partToRender, templateData, context);
|
|
1189
1210
|
if (newPart) {
|
|
1190
1211
|
renderedParts[contentIndex] = newPart;
|
|
@@ -1288,7 +1309,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1288
1309
|
renderedParts: partsToRender
|
|
1289
1310
|
};
|
|
1290
1311
|
}
|
|
1291
|
-
if (this.shouldShowWorkingProgress(element, partsToRender, templateData)) {
|
|
1312
|
+
if (this.shouldShowWorkingProgress(element, partsToRender, moreContentAvailable, templateData)) {
|
|
1292
1313
|
partsToRender.push({
|
|
1293
1314
|
kind: "working"
|
|
1294
1315
|
});
|
|
@@ -1330,16 +1351,9 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1330
1351
|
}
|
|
1331
1352
|
diff(renderedParts, contentToRender, element) {
|
|
1332
1353
|
const diff = [];
|
|
1333
|
-
const elementIsComplete = isResponseVM(element) && element.isComplete;
|
|
1334
|
-
const lastMarkdownContentIndex = contentToRender.findLastIndex(part => part.kind === "markdownContent");
|
|
1335
1354
|
for (let i = 0; i < contentToRender.length; i++) {
|
|
1336
1355
|
const content = contentToRender[i];
|
|
1337
1356
|
const renderedPart = renderedParts[i];
|
|
1338
|
-
const isFinalAnswerPart = content.kind === "markdownContent" && i === lastMarkdownContentIndex && elementIsComplete;
|
|
1339
|
-
if (isFinalAnswerPart && this.isRenderedPartInsideThinking(renderedPart)) {
|
|
1340
|
-
diff.push(content);
|
|
1341
|
-
continue;
|
|
1342
|
-
}
|
|
1343
1357
|
if (!renderedPart || !renderedPart.hasSameContent(content, contentToRender.slice(i + 1), element)) {
|
|
1344
1358
|
diff.push(content);
|
|
1345
1359
|
} else {
|
|
@@ -1348,12 +1362,6 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1348
1362
|
}
|
|
1349
1363
|
return diff;
|
|
1350
1364
|
}
|
|
1351
|
-
isRenderedPartInsideThinking(renderedPart) {
|
|
1352
|
-
if (!renderedPart?.domNode) {
|
|
1353
|
-
return false;
|
|
1354
|
-
}
|
|
1355
|
-
return !!findParentWithClass(renderedPart.domNode, "chat-thinking-box");
|
|
1356
|
-
}
|
|
1357
1365
|
hasEditCodeblockUri(part) {
|
|
1358
1366
|
if (part.kind !== "markdownContent") {
|
|
1359
1367
|
return false;
|
|
@@ -1386,7 +1394,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1386
1394
|
if (this.hasEditCodeblockUri(part) || part.kind === "textEditGroup") {
|
|
1387
1395
|
return true;
|
|
1388
1396
|
}
|
|
1389
|
-
const isMcpTool = (part.kind === "toolInvocation" || part.kind === "toolInvocationSerialized") && part
|
|
1397
|
+
const isMcpTool = (part.kind === "toolInvocation" || part.kind === "toolInvocationSerialized") && isMcpToolInvocation(part);
|
|
1390
1398
|
if (isMcpTool) {
|
|
1391
1399
|
return false;
|
|
1392
1400
|
}
|
|
@@ -1628,7 +1636,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1628
1636
|
"ChatListItemRenderer#renderChatContentPart: error rendering content",
|
|
1629
1637
|
toErrorMessage(err, true)
|
|
1630
1638
|
);
|
|
1631
|
-
const errorPart = this.instantiationService.createInstance(ChatErrorContentPart, ChatErrorLevel.Error, ( new MarkdownString(( localize(
|
|
1639
|
+
const errorPart = this.instantiationService.createInstance(ChatErrorContentPart, ChatErrorLevel.Error, ( new MarkdownString(( localize(6942, "Failed to render content")) + `: ${toErrorMessage(err, false)}`)), content, this.chatContentMarkdownRenderer);
|
|
1632
1640
|
return {
|
|
1633
1641
|
dispose: () => errorPart.dispose(),
|
|
1634
1642
|
domNode: errorPart.domNode,
|
|
@@ -1777,6 +1785,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1777
1785
|
this.handleRenderedCodeblocks(context.element, lazilyCreatedPart, codeBlockStartIndex);
|
|
1778
1786
|
return {
|
|
1779
1787
|
domNode: lazilyCreatedPart.domNode,
|
|
1788
|
+
disposable: lazilyCreatedPart,
|
|
1780
1789
|
part: lazilyCreatedPart
|
|
1781
1790
|
};
|
|
1782
1791
|
};
|
|
@@ -1788,6 +1797,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1788
1797
|
kind: "thinking"
|
|
1789
1798
|
}, context, templateData);
|
|
1790
1799
|
if (thinkingPart instanceof ChatThinkingContentPart) {
|
|
1800
|
+
toolInvocation.isAttachedToThinking = true;
|
|
1791
1801
|
thinkingPart.appendItem(createToolPart, toolInvocation.toolId, toolInvocation, templateData.value);
|
|
1792
1802
|
this.setupConfirmationTransitionWatcher(
|
|
1793
1803
|
toolInvocation,
|
|
@@ -1802,6 +1812,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1802
1812
|
}
|
|
1803
1813
|
if (this.shouldPinPart(toolInvocation, context.element)) {
|
|
1804
1814
|
if (lastThinking && toolInvocation.presentation !== "hidden") {
|
|
1815
|
+
toolInvocation.isAttachedToThinking = true;
|
|
1805
1816
|
lastThinking.appendItem(createToolPart, toolInvocation.toolId, toolInvocation, templateData.value);
|
|
1806
1817
|
this.setupConfirmationTransitionWatcher(
|
|
1807
1818
|
toolInvocation,
|
|
@@ -1841,12 +1852,14 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1841
1852
|
}
|
|
1842
1853
|
const removeConfirmationWidget = () => {
|
|
1843
1854
|
const createdPart = getCreatedPart();
|
|
1855
|
+
toolInvocation.isAttachedToThinking = false;
|
|
1844
1856
|
if (createdPart?.domNode) {
|
|
1845
1857
|
const wrapper = createdPart.domNode.parentElement;
|
|
1846
1858
|
if (wrapper?.classList.contains("chat-thinking-tool-wrapper")) {
|
|
1847
1859
|
wrapper.remove();
|
|
1848
1860
|
}
|
|
1849
1861
|
templateData.value.appendChild(createdPart.domNode);
|
|
1862
|
+
thinkingPart.removeMaterializedItem(toolInvocation.toolCallId);
|
|
1850
1863
|
} else {
|
|
1851
1864
|
thinkingPart.removeLazyItem(toolInvocation.toolId);
|
|
1852
1865
|
const {
|
|
@@ -1855,6 +1868,10 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1855
1868
|
templateData.value.appendChild(domNode);
|
|
1856
1869
|
}
|
|
1857
1870
|
this.finalizeCurrentThinkingPart(context, templateData);
|
|
1871
|
+
if (thinkingPart.isEffectivelyEmpty()) {
|
|
1872
|
+
thinkingPart.domNode?.remove();
|
|
1873
|
+
thinkingPart.dispose();
|
|
1874
|
+
}
|
|
1858
1875
|
};
|
|
1859
1876
|
const currentState = toolInvocation.state.get();
|
|
1860
1877
|
if (currentState.type === IChatToolInvocation.StateKind.WaitingForConfirmation || currentState.type === IChatToolInvocation.StateKind.WaitingForPostApproval) {
|
|
@@ -1904,7 +1921,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1904
1921
|
}
|
|
1905
1922
|
const shouldPinToThinking = hookPart.hookType === HookType.PreToolUse || hookPart.hookType === HookType.PostToolUse;
|
|
1906
1923
|
if (shouldPinToThinking) {
|
|
1907
|
-
const hookTitle = hookPart.stopReason ? (hookPart.toolDisplayName ? ( localize(
|
|
1924
|
+
const hookTitle = hookPart.stopReason ? (hookPart.toolDisplayName ? ( localize(6943, "Blocked {0}", hookPart.toolDisplayName)) : ( localize(6944, "Blocked by hook"))) : (hookPart.toolDisplayName ? ( localize(6945, "Used {0}, but received a warning", hookPart.toolDisplayName)) : ( localize(6946, "Tool call received a warning")));
|
|
1908
1925
|
let thinkingPart = this.getLastThinkingPart(templateData.renderedParts);
|
|
1909
1926
|
if (!thinkingPart) {
|
|
1910
1927
|
const newThinking = this.renderThinkingPart({
|
|
@@ -1962,9 +1979,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
1962
1979
|
this._notifyOnQuestionCarousel(context, carousel);
|
|
1963
1980
|
const widget = isResponseVM(context.element) ? this.chatWidgetService.getWidgetBySessionResource(context.element.sessionResource) : undefined;
|
|
1964
1981
|
const shouldAutoFocus = widget ? widget.getInput() === "" : true;
|
|
1965
|
-
const modelName = widget?.input.currentLanguageModel;
|
|
1966
1982
|
const responseId = isResponseVM(context.element) ? context.element.requestId : undefined;
|
|
1967
|
-
const requestMessageText = isResponseVM(context.element) ? this.getRequestMessageText(context.element) : undefined;
|
|
1968
1983
|
const handleSubmit = async (answers, part) => {
|
|
1969
1984
|
const answersRecord = answers ? Object.fromEntries(answers) : undefined;
|
|
1970
1985
|
carousel.data = answersRecord ?? {};
|
|
@@ -2018,24 +2033,8 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
2018
2033
|
shouldAutoFocus,
|
|
2019
2034
|
onSubmit: async answers => handleSubmit(answers, fallbackPart)
|
|
2020
2035
|
});
|
|
2021
|
-
this.maybeAutoReplyToQuestionCarousel(
|
|
2022
|
-
context,
|
|
2023
|
-
carousel,
|
|
2024
|
-
fallbackPart,
|
|
2025
|
-
answers => handleSubmit(answers, fallbackPart),
|
|
2026
|
-
modelName,
|
|
2027
|
-
requestMessageText
|
|
2028
|
-
);
|
|
2029
2036
|
return fallbackPart;
|
|
2030
2037
|
}
|
|
2031
|
-
this.maybeAutoReplyToQuestionCarousel(
|
|
2032
|
-
context,
|
|
2033
|
-
carousel,
|
|
2034
|
-
part,
|
|
2035
|
-
answers => handleSubmit(answers, part),
|
|
2036
|
-
modelName,
|
|
2037
|
-
requestMessageText
|
|
2038
|
-
);
|
|
2039
2038
|
if (isResponseVM(context.element) && carousel.allowSkip && !carousel.isUsed) {
|
|
2040
2039
|
let carousels = this.pendingQuestionCarousels.get(context.element.sessionResource);
|
|
2041
2040
|
if (!carousels) {
|
|
@@ -2079,10 +2078,10 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
2079
2078
|
return;
|
|
2080
2079
|
}
|
|
2081
2080
|
const questionCount = carousel.questions.length;
|
|
2082
|
-
const question = carousel.questions.length > 0 && carousel.questions[0].message ? carousel.questions[0].message : ( localize(
|
|
2081
|
+
const question = carousel.questions.length > 0 && carousel.questions[0].message ? carousel.questions[0].message : ( localize(6947, "Chat input required."));
|
|
2083
2082
|
const stringQuestion = typeof question === "string" ? question : question.value;
|
|
2084
|
-
const alertMessage = questionCount === 1 ? ( localize(
|
|
2085
|
-
|
|
2083
|
+
const alertMessage = questionCount === 1 ? ( localize(6948, "Chat input required (1 question): {0}", stringQuestion)) : ( localize(
|
|
2084
|
+
6949,
|
|
2086
2085
|
"Chat input required ({0} questions): {1}",
|
|
2087
2086
|
questionCount,
|
|
2088
2087
|
stringQuestion
|
|
@@ -2091,59 +2090,12 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
2091
2090
|
if (stableKey) {
|
|
2092
2091
|
this._notifiedQuestionCarousels.add(stableKey);
|
|
2093
2092
|
}
|
|
2094
|
-
const signalMessage = questionCount === 1 ? ( localize(
|
|
2093
|
+
const signalMessage = questionCount === 1 ? ( localize(6950, "Chat needs your input (1 question).")) : ( localize(6951, "Chat needs your input ({0} questions).", questionCount));
|
|
2095
2094
|
this.accessibilitySignalService.playSignal(AccessibilitySignal.chatUserActionRequired, {
|
|
2096
2095
|
allowManyInParallel: true,
|
|
2097
2096
|
customAlertMessage: signalMessage
|
|
2098
2097
|
});
|
|
2099
2098
|
}
|
|
2100
|
-
maybeAutoReplyToQuestionCarousel(context, carousel, part, submit, modelName, requestMessageText) {
|
|
2101
|
-
if (carousel.isUsed) {
|
|
2102
|
-
return;
|
|
2103
|
-
}
|
|
2104
|
-
const stableKey = this._getCarouselStableKey(context, carousel);
|
|
2105
|
-
if (stableKey) {
|
|
2106
|
-
if (( this._autoRepliedQuestionCarousels.has(stableKey))) {
|
|
2107
|
-
return;
|
|
2108
|
-
}
|
|
2109
|
-
this._autoRepliedQuestionCarousels.add(stableKey);
|
|
2110
|
-
}
|
|
2111
|
-
void this._autoReply.shouldAutoReply().then(shouldAutoReply => {
|
|
2112
|
-
const isAutopilot = this._isAutopilotForContext(context);
|
|
2113
|
-
if (!shouldAutoReply && !isAutopilot) {
|
|
2114
|
-
if (stableKey) {
|
|
2115
|
-
this._autoRepliedQuestionCarousels.delete(stableKey);
|
|
2116
|
-
}
|
|
2117
|
-
return;
|
|
2118
|
-
}
|
|
2119
|
-
const cts = ( new CancellationTokenSource());
|
|
2120
|
-
part.addDisposable(toDisposable(() => {
|
|
2121
|
-
cts.cancel();
|
|
2122
|
-
cts.dispose();
|
|
2123
|
-
}));
|
|
2124
|
-
this._autoReply.autoReply(carousel, submit, modelName, requestMessageText, cts.token).catch(err => {
|
|
2125
|
-
this.logService.debug("#ChatQuestionCarousel: Auto reply failed", toErrorMessage(err));
|
|
2126
|
-
});
|
|
2127
|
-
});
|
|
2128
|
-
}
|
|
2129
|
-
getRequestMessageText(response) {
|
|
2130
|
-
const requestId = response.requestId;
|
|
2131
|
-
const items = response.session.getItems();
|
|
2132
|
-
const request = items.find(item => isRequestVM(item) && item.id === requestId);
|
|
2133
|
-
return request?.messageText;
|
|
2134
|
-
}
|
|
2135
|
-
_isAutopilotForContext(context) {
|
|
2136
|
-
if (isResponseVM(context.element) && context.element.model.request?.modeInfo?.permissionLevel === ChatPermissionLevel.Autopilot) {
|
|
2137
|
-
return true;
|
|
2138
|
-
}
|
|
2139
|
-
if (isResponseVM(context.element)) {
|
|
2140
|
-
const widget = this.chatWidgetService.getWidgetBySessionResource(context.element.sessionResource) ?? this.chatWidgetService.lastFocusedWidget;
|
|
2141
|
-
if (widget?.input.currentModeInfo.permissionLevel === ChatPermissionLevel.Autopilot) {
|
|
2142
|
-
return true;
|
|
2143
|
-
}
|
|
2144
|
-
}
|
|
2145
|
-
return false;
|
|
2146
|
-
}
|
|
2147
2099
|
removeCarouselFromTracking(context, part) {
|
|
2148
2100
|
if (isResponseVM(context.element)) {
|
|
2149
2101
|
const carousels = this.pendingQuestionCarousels.get(context.element.sessionResource);
|
|
@@ -2176,12 +2128,9 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
2176
2128
|
}
|
|
2177
2129
|
renderMarkdown(markdown, templateData, context) {
|
|
2178
2130
|
const element = context.element;
|
|
2179
|
-
const
|
|
2180
|
-
const
|
|
2181
|
-
|
|
2182
|
-
) : -1;
|
|
2183
|
-
const isFinalAnswerPart = isFinalRenderPass && context.contentIndex > lastPinnedPartIndex;
|
|
2184
|
-
if (!this.hasEditCodeblockUri(markdown) || isFinalAnswerPart) {
|
|
2131
|
+
const isBlankMarkdown = !markdown.content.value.trim();
|
|
2132
|
+
const hasPendingEditCodeblock = isResponseVM(element) && !element.isComplete && hasCodeblockUriTag(markdown.content.value) && !codeblockHasClosingBackticks(markdown.content.value);
|
|
2133
|
+
if (!this.hasEditCodeblockUri(markdown) && !isBlankMarkdown && !hasPendingEditCodeblock) {
|
|
2185
2134
|
this.finalizeCurrentThinkingPart(context, templateData);
|
|
2186
2135
|
}
|
|
2187
2136
|
const fillInIncompleteTokens = isResponseVM(element) && (!element.isComplete || element.isCanceled || element.errorDetails?.responseIsFiltered || element.errorDetails?.responseIsIncomplete || !!element.renderData);
|
|
@@ -2232,7 +2181,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
2232
2181
|
})
|
|
2233
2182
|
);
|
|
2234
2183
|
markdownPart.addDisposable(
|
|
2235
|
-
this.hoverService.setupManagedHover(getDefaultHoverDelegate("element"), markdownPart.domNode, ( localize(
|
|
2184
|
+
this.hoverService.setupManagedHover(getDefaultHoverDelegate("element"), markdownPart.domNode, ( localize(6952, "Click to Edit")), {
|
|
2236
2185
|
trapFocus: true
|
|
2237
2186
|
})
|
|
2238
2187
|
);
|
|
@@ -2250,7 +2199,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
2250
2199
|
}
|
|
2251
2200
|
this.handleRenderedCodeblocks(element, markdownPart, codeBlockStartIndex);
|
|
2252
2201
|
const collapsedToolsMode = this.configService.getValue("chat.agent.thinking.collapsedTools");
|
|
2253
|
-
if (isResponseVM(context.element) && collapsedToolsMode !== CollapsedToolsDisplayMode.Off
|
|
2202
|
+
if (isResponseVM(context.element) && collapsedToolsMode !== CollapsedToolsDisplayMode.Off) {
|
|
2254
2203
|
const isComplete = this.isCodeblockComplete(markdown, context.element);
|
|
2255
2204
|
const subAgentInvocationId = extractSubAgentInvocationIdFromText(markdown.content.value);
|
|
2256
2205
|
if (subAgentInvocationId) {
|
|
@@ -2283,7 +2232,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
|
|
|
2283
2232
|
disposable: markdownPart
|
|
2284
2233
|
}), markdownPart.codeblocksPartId, markdown, templateData.value);
|
|
2285
2234
|
}
|
|
2286
|
-
} else if (!this.shouldPinPart(markdown, context.element)) {
|
|
2235
|
+
} else if (!this.shouldPinPart(markdown, context.element) && !isBlankMarkdown && !hasPendingEditCodeblock) {
|
|
2287
2236
|
this.finalizeCurrentThinkingPart(context, templateData);
|
|
2288
2237
|
}
|
|
2289
2238
|
}
|
|
@@ -2394,15 +2343,15 @@ class ChatListDelegate extends CachedListVirtualDelegate {
|
|
|
2394
2343
|
}
|
|
2395
2344
|
}
|
|
2396
2345
|
const voteDownDetailLabels = {
|
|
2397
|
-
[ChatAgentVoteDownReason.IncorrectCode]: ( localize(
|
|
2398
|
-
[ChatAgentVoteDownReason.DidNotFollowInstructions]: ( localize(
|
|
2399
|
-
[ChatAgentVoteDownReason.MissingContext]: ( localize(
|
|
2400
|
-
[ChatAgentVoteDownReason.OffensiveOrUnsafe]: ( localize(
|
|
2401
|
-
[ChatAgentVoteDownReason.PoorlyWrittenOrFormatted]: ( localize(
|
|
2402
|
-
[ChatAgentVoteDownReason.RefusedAValidRequest]: ( localize(
|
|
2403
|
-
[ChatAgentVoteDownReason.IncompleteCode]: ( localize(
|
|
2404
|
-
[ChatAgentVoteDownReason.WillReportIssue]: ( localize(
|
|
2405
|
-
[ChatAgentVoteDownReason.Other]: ( localize(
|
|
2346
|
+
[ChatAgentVoteDownReason.IncorrectCode]: ( localize(6953, "Suggested incorrect code")),
|
|
2347
|
+
[ChatAgentVoteDownReason.DidNotFollowInstructions]: ( localize(6954, "Didn't follow instructions")),
|
|
2348
|
+
[ChatAgentVoteDownReason.MissingContext]: ( localize(6955, "Missing context")),
|
|
2349
|
+
[ChatAgentVoteDownReason.OffensiveOrUnsafe]: ( localize(6956, "Offensive or unsafe")),
|
|
2350
|
+
[ChatAgentVoteDownReason.PoorlyWrittenOrFormatted]: ( localize(6957, "Poorly written or formatted")),
|
|
2351
|
+
[ChatAgentVoteDownReason.RefusedAValidRequest]: ( localize(6958, "Refused a valid request")),
|
|
2352
|
+
[ChatAgentVoteDownReason.IncompleteCode]: ( localize(6959, "Incomplete code")),
|
|
2353
|
+
[ChatAgentVoteDownReason.WillReportIssue]: ( localize(6960, "Report an issue")),
|
|
2354
|
+
[ChatAgentVoteDownReason.Other]: ( localize(6961, "Other"))
|
|
2406
2355
|
};
|
|
2407
2356
|
let ChatVoteDownButton = class ChatVoteDownButton extends DropdownMenuActionViewItem {
|
|
2408
2357
|
constructor(
|