@codingame/monaco-vscode-katex-common 26.2.2 → 27.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/actionWidget/browser/actionWidgetDropdown.d.ts +10 -4
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +35 -11
- package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +3 -0
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +15 -4
- package/vscode/src/vs/platform/mcp/common/modelContextProtocolApps.d.ts +548 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +168 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +67 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +12 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +42 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +12 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +63 -40
- 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 +7 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +77 -73
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +69 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +23 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +381 -83
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +28 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +38 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +109 -113
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +16 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +28 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +226 -123
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +9 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +7 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.js +22 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.js +11 -3
- 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/chatDiffBlockPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.js +0 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.js +6 -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.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +26 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +51 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -7
- 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.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +20 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.js +11 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +36 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +166 -45
- 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 +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +16 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +14 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +98 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.js +1 -0
- 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 +10 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +241 -78
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.d.ts +29 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +252 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +39 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +36 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.d.ts +5 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +42 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatCodeBlockPill.css +12 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +48 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatHookContentPart.css +9 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatInlineAnchorWidget.css +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +351 -422
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +14 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +102 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTipContent.css +69 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/codeBlockPart.css +48 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +47 -23
- 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 +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +0 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.js +103 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +15 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +61 -66
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +7 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +41 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +13 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.js +2 -1
- 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 +17 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +310 -79
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +13 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.js +441 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +24 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +392 -86
- 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 +52 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +271 -187
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +68 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +668 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +12 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +57 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +2 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +78 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.js +86 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +9 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +393 -134
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatViewWelcome.css +36 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +20 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +25 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +141 -79
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageWidget.css +18 -13
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +108 -27
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +20 -14
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +4 -6
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +74 -32
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +11 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +68 -27
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +125 -13
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.d.ts +8 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +54 -45
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +11 -10
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +172 -112
- 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/inlineChat.css +0 -42
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatEditorAffordance.css +27 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +83 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +58 -33
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.d.ts +1 -548
- 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/input/modelPickerActionItem.js +0 -187
- /package/vscode/src/vs/{workbench/contrib → platform}/mcp/common/modelContextProtocolApps.js +0 -0
|
@@ -6,13 +6,14 @@ import { alert } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/ar
|
|
|
6
6
|
import { DomScrollableElement } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/scrollbar/scrollableElement';
|
|
7
7
|
import { ScrollbarVisibility } from '@codingame/monaco-vscode-api/vscode/vs/base/common/scrollable';
|
|
8
8
|
import { IChatToolInvocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
9
|
-
import {
|
|
9
|
+
import { ChatConfiguration, ThinkingDisplayMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
10
10
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
11
11
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
12
12
|
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
13
13
|
import { extractCodeblockUrisFromText } from '../../../common/widget/annotations.js';
|
|
14
14
|
import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
15
15
|
import { ChatCollapsibleContentPart } from './chatCollapsibleContentPart.js';
|
|
16
|
+
import { renderFileWidgets } from './chatInlineAnchorWidget.js';
|
|
16
17
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
17
18
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
18
19
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
@@ -43,7 +44,7 @@ function getToolInvocationIcon(toolId) {
|
|
|
43
44
|
if (lowerToolId.includes("read") || lowerToolId.includes("get_file") || lowerToolId.includes("problems")) {
|
|
44
45
|
return Codicon.book;
|
|
45
46
|
}
|
|
46
|
-
if (lowerToolId.includes("edit") || lowerToolId.includes("create")) {
|
|
47
|
+
if (lowerToolId.includes("edit") || lowerToolId.includes("create") || lowerToolId.includes("replace")) {
|
|
47
48
|
return Codicon.pencil;
|
|
48
49
|
}
|
|
49
50
|
if (lowerToolId.includes("terminal")) {
|
|
@@ -67,25 +68,38 @@ var WorkingMessageCategory;
|
|
|
67
68
|
WorkingMessageCategory["Terminal"] = "terminal";
|
|
68
69
|
WorkingMessageCategory["Tool"] = "tool";
|
|
69
70
|
})(WorkingMessageCategory || (WorkingMessageCategory = {}));
|
|
70
|
-
const
|
|
71
|
-
const terminalMessages = [( localize(
|
|
72
|
-
const toolMessages = [( localize(
|
|
71
|
+
const defaultThinkingMessages = [( localize(6494, "Thinking")), ( localize(6495, "Reasoning")), ( localize(6496, "Considering")), ( localize(6497, "Analyzing")), ( localize(6498, "Evaluating"))];
|
|
72
|
+
const terminalMessages = [( localize(6499, "Executing")), ( localize(6500, "Running")), ( localize(6501, "Processing"))];
|
|
73
|
+
const toolMessages = [( localize(6502, "Processing")), ( localize(6503, "Preparing")), ( localize(6504, "Loading")), ( localize(6505, "Analyzing")), ( localize(6506, "Evaluating"))];
|
|
73
74
|
let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsibleContentPart {
|
|
74
75
|
getRandomWorkingMessage(category = WorkingMessageCategory.Tool) {
|
|
75
76
|
let pool = this.availableMessagesByCategory.get(category);
|
|
76
77
|
if (!pool || pool.length === 0) {
|
|
78
|
+
let defaults;
|
|
77
79
|
switch (category) {
|
|
78
80
|
case WorkingMessageCategory.Thinking:
|
|
79
|
-
|
|
81
|
+
defaults = [...defaultThinkingMessages];
|
|
80
82
|
break;
|
|
81
83
|
case WorkingMessageCategory.Terminal:
|
|
82
|
-
|
|
84
|
+
defaults = [...terminalMessages];
|
|
83
85
|
break;
|
|
84
86
|
case WorkingMessageCategory.Tool:
|
|
85
87
|
default:
|
|
86
|
-
|
|
88
|
+
defaults = [...toolMessages];
|
|
87
89
|
break;
|
|
88
90
|
}
|
|
91
|
+
const config = this.configurationService.getValue(ChatConfiguration.ThinkingPhrases);
|
|
92
|
+
const customPhrases = Array.isArray(config?.phrases) ? ( config.phrases.filter(phrase => typeof phrase === "string").map(phrase => phrase.trim())).filter(phrase => phrase.length > 0) : [];
|
|
93
|
+
const mode = config?.mode === "replace" ? "replace" : "append";
|
|
94
|
+
if (customPhrases.length > 0) {
|
|
95
|
+
if (mode === "replace") {
|
|
96
|
+
pool = [...customPhrases];
|
|
97
|
+
} else {
|
|
98
|
+
pool = [...defaults, ...customPhrases];
|
|
99
|
+
}
|
|
100
|
+
} else {
|
|
101
|
+
pool = defaults;
|
|
102
|
+
}
|
|
89
103
|
this.availableMessagesByCategory.set(category, pool);
|
|
90
104
|
}
|
|
91
105
|
const index = Math.floor(Math.random() * pool.length);
|
|
@@ -103,8 +117,8 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
103
117
|
hoverService
|
|
104
118
|
) {
|
|
105
119
|
const initialText = extractTextFromPart(content);
|
|
106
|
-
const extractedTitle = extractTitleFromThinkingContent(initialText) ?? "Working
|
|
107
|
-
super(extractedTitle, context, undefined, hoverService);
|
|
120
|
+
const extractedTitle = extractTitleFromThinkingContent(initialText) ?? "Working";
|
|
121
|
+
super(extractedTitle, context, undefined, hoverService, configurationService);
|
|
108
122
|
this.chatContentMarkdownRenderer = chatContentMarkdownRenderer;
|
|
109
123
|
this.streamingCompleted = streamingCompleted;
|
|
110
124
|
this.instantiationService = instantiationService;
|
|
@@ -112,7 +126,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
112
126
|
this.chatMarkdownAnchorService = chatMarkdownAnchorService;
|
|
113
127
|
this.languageModelsService = languageModelsService;
|
|
114
128
|
this._onDidChangeHeight = this._register(( new Emitter()));
|
|
115
|
-
this.defaultTitle = ( localize(
|
|
129
|
+
this.defaultTitle = ( localize(6507, "Working"));
|
|
116
130
|
this.fixedScrollingMode = false;
|
|
117
131
|
this.autoScrollEnabled = true;
|
|
118
132
|
this.extractedTitles = [];
|
|
@@ -120,6 +134,8 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
120
134
|
this.appendedItemCount = 0;
|
|
121
135
|
this.isActive = true;
|
|
122
136
|
this.toolInvocations = [];
|
|
137
|
+
this.allThinkingParts = [];
|
|
138
|
+
this.hookCount = 0;
|
|
123
139
|
this.lazyItems = [];
|
|
124
140
|
this.hasExpandedOnce = false;
|
|
125
141
|
this.availableMessagesByCategory = ( new Map());
|
|
@@ -129,6 +145,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
129
145
|
this.isUpdatingDimensions = false;
|
|
130
146
|
this.id = content.id;
|
|
131
147
|
this.content = content;
|
|
148
|
+
this.allThinkingParts.push(content);
|
|
132
149
|
const configuredMode = this.configurationService.getValue("chat.agent.thinkingStyle") ?? ThinkingDisplayMode.Collapsed;
|
|
133
150
|
this.fixedScrollingMode = configuredMode === ThinkingDisplayMode.FixedScrolling;
|
|
134
151
|
this.currentTitle = extractedTitle;
|
|
@@ -139,7 +156,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
139
156
|
if (initialText.trim()) {
|
|
140
157
|
this.appendedItemCount++;
|
|
141
158
|
}
|
|
142
|
-
alert(( localize(
|
|
159
|
+
alert(( localize(6508, "Thinking")));
|
|
143
160
|
if (configuredMode === ThinkingDisplayMode.Collapsed) {
|
|
144
161
|
this.setExpanded(false);
|
|
145
162
|
} else if (configuredMode === ThinkingDisplayMode.CollapsedPreview) {
|
|
@@ -149,6 +166,18 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
149
166
|
}
|
|
150
167
|
const node = this.domNode;
|
|
151
168
|
node.classList.add("chat-thinking-box");
|
|
169
|
+
if (!this.streamingCompleted && !this.element.isComplete) {
|
|
170
|
+
if (!this.fixedScrollingMode) {
|
|
171
|
+
node.classList.add("chat-thinking-active");
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
if (!this.fixedScrollingMode && !this.streamingCompleted && !this.element.isComplete && this._collapseButton) {
|
|
175
|
+
const labelElement = this._collapseButton.labelElement;
|
|
176
|
+
labelElement.textContent = "";
|
|
177
|
+
this.titleShimmerSpan = $("span.chat-thinking-title-shimmer");
|
|
178
|
+
this.titleShimmerSpan.textContent = extractedTitle;
|
|
179
|
+
labelElement.appendChild(this.titleShimmerSpan);
|
|
180
|
+
}
|
|
152
181
|
if (this.fixedScrollingMode) {
|
|
153
182
|
node.classList.add("chat-thinking-fixed-mode");
|
|
154
183
|
this.currentTitle = this.defaultTitle;
|
|
@@ -162,18 +191,23 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
162
191
|
if (isExpanded) {
|
|
163
192
|
this._collapseButton.icon = Codicon.chevronDown;
|
|
164
193
|
} else {
|
|
165
|
-
this._collapseButton.icon =
|
|
194
|
+
this._collapseButton.icon = Codicon.circleFilled;
|
|
166
195
|
}
|
|
167
196
|
}
|
|
168
197
|
}
|
|
169
198
|
}));
|
|
170
199
|
this._register(autorun(r => {
|
|
171
|
-
|
|
200
|
+
const isExpanded = this._isExpanded.read(r);
|
|
201
|
+
if (isExpanded && !this.hasExpandedOnce && this.lazyItems.length > 0) {
|
|
172
202
|
this.hasExpandedOnce = true;
|
|
173
203
|
for (const item of this.lazyItems) {
|
|
174
204
|
this.materializeLazyItem(item);
|
|
175
205
|
}
|
|
176
206
|
}
|
|
207
|
+
if (isExpanded && !this.shouldAllowExpansion()) {
|
|
208
|
+
this.setExpanded(false);
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
177
211
|
this._onDidChangeHeight.fire();
|
|
178
212
|
}));
|
|
179
213
|
const label = this.lastExtractedTitle ?? "";
|
|
@@ -189,10 +223,13 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
189
223
|
if (expanded) {
|
|
190
224
|
this.setTitle(this.defaultTitle, true);
|
|
191
225
|
this.currentTitle = this.defaultTitle;
|
|
192
|
-
} else
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
226
|
+
} else {
|
|
227
|
+
if (this.lastExtractedTitle) {
|
|
228
|
+
this.setTitle(this.lastExtractedTitle);
|
|
229
|
+
} else {
|
|
230
|
+
this.setTitle(this.defaultTitle, true);
|
|
231
|
+
this.currentTitle = this.defaultTitle;
|
|
232
|
+
}
|
|
196
233
|
}
|
|
197
234
|
}));
|
|
198
235
|
}
|
|
@@ -213,7 +250,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
213
250
|
}
|
|
214
251
|
if (!this.streamingCompleted && !this.element.isComplete) {
|
|
215
252
|
this.workingSpinnerElement = $(".chat-thinking-item.chat-thinking-spinner-item");
|
|
216
|
-
const spinnerIcon = createThinkingIcon(
|
|
253
|
+
const spinnerIcon = createThinkingIcon(Codicon.circleFilled);
|
|
217
254
|
this.workingSpinnerElement.appendChild(spinnerIcon);
|
|
218
255
|
this.workingSpinnerLabel = $("span.chat-thinking-spinner-label");
|
|
219
256
|
this.workingSpinnerLabel.textContent = this.getRandomWorkingMessage(WorkingMessageCategory.Thinking);
|
|
@@ -381,21 +418,44 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
381
418
|
}
|
|
382
419
|
}
|
|
383
420
|
}
|
|
421
|
+
setFinalizedTitle(title) {
|
|
422
|
+
if (!this._collapseButton) {
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
425
|
+
const labelElement = this._collapseButton.labelElement;
|
|
426
|
+
labelElement.textContent = "";
|
|
427
|
+
const firstSpaceIndex = title.indexOf(" ");
|
|
428
|
+
if (firstSpaceIndex === -1) {
|
|
429
|
+
labelElement.textContent = title;
|
|
430
|
+
} else {
|
|
431
|
+
const verb = title.substring(0, firstSpaceIndex);
|
|
432
|
+
const rest = title.substring(firstSpaceIndex);
|
|
433
|
+
const verbSpan = $("span");
|
|
434
|
+
verbSpan.textContent = verb;
|
|
435
|
+
labelElement.appendChild(verbSpan);
|
|
436
|
+
const restSpan = $("span.chat-thinking-title-detail-text");
|
|
437
|
+
restSpan.textContent = rest;
|
|
438
|
+
labelElement.appendChild(restSpan);
|
|
439
|
+
}
|
|
440
|
+
this._collapseButton.element.ariaLabel = title;
|
|
441
|
+
}
|
|
384
442
|
setDropdownClickable(clickable) {
|
|
385
443
|
if (this._collapseButton) {
|
|
386
444
|
this._collapseButton.element.style.pointerEvents = clickable ? "auto" : "none";
|
|
387
445
|
}
|
|
388
446
|
if (!clickable && this.streamingCompleted) {
|
|
389
|
-
|
|
447
|
+
this.setFinalizedTitle(this.lastExtractedTitle ?? this.currentTitle);
|
|
390
448
|
}
|
|
391
449
|
}
|
|
392
|
-
|
|
393
|
-
if (
|
|
394
|
-
return;
|
|
450
|
+
shouldAllowExpansion() {
|
|
451
|
+
if (this.toolInvocationCount > 0 || this.lazyItems.length > 0) {
|
|
452
|
+
return true;
|
|
395
453
|
}
|
|
396
|
-
if (this.wrapper
|
|
397
|
-
this.
|
|
398
|
-
|
|
454
|
+
if (this.wrapper) {
|
|
455
|
+
const meaningfulChildren = Array.from(this.wrapper.children).filter(child => child !== this.workingSpinnerElement).length;
|
|
456
|
+
if (meaningfulChildren > 1) {
|
|
457
|
+
return true;
|
|
458
|
+
}
|
|
399
459
|
}
|
|
400
460
|
const contentWithoutTitle = this.currentThinkingValue.trim();
|
|
401
461
|
const titleToCompare = this.lastExtractedTitle ?? this.currentTitle;
|
|
@@ -403,8 +463,14 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
403
463
|
return text.replace(/\*\*(.+?)\*\*/g, "$1").replace(/\*(.+?)\*/g, "$1").replace(/`(.+?)`/g, "$1").trim();
|
|
404
464
|
};
|
|
405
465
|
const strippedContent = stripMarkdown(contentWithoutTitle);
|
|
406
|
-
|
|
407
|
-
|
|
466
|
+
return !(!strippedContent || strippedContent === titleToCompare);
|
|
467
|
+
}
|
|
468
|
+
updateDropdownClickability() {
|
|
469
|
+
const allowExpansion = this.shouldAllowExpansion();
|
|
470
|
+
if (!allowExpansion && this.isExpanded()) {
|
|
471
|
+
this.setExpanded(false);
|
|
472
|
+
}
|
|
473
|
+
this.setDropdownClickable(allowExpansion);
|
|
408
474
|
}
|
|
409
475
|
appendToWrapper(element) {
|
|
410
476
|
if (!this.wrapper) {
|
|
@@ -466,6 +532,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
466
532
|
}
|
|
467
533
|
markAsInactive() {
|
|
468
534
|
this.isActive = false;
|
|
535
|
+
this.domNode.classList.remove("chat-thinking-active");
|
|
469
536
|
this.processPendingRemovals();
|
|
470
537
|
if (this.workingSpinnerElement) {
|
|
471
538
|
this.workingSpinnerElement.remove();
|
|
@@ -478,6 +545,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
478
545
|
if (this.wrapper) {
|
|
479
546
|
this.wrapper.classList.remove("chat-thinking-streaming");
|
|
480
547
|
}
|
|
548
|
+
this.domNode.classList.remove("chat-thinking-active");
|
|
481
549
|
this.streamingCompleted = true;
|
|
482
550
|
if (this.mutationObserverDisposable) {
|
|
483
551
|
this.mutationObserverDisposable.dispose();
|
|
@@ -495,25 +563,42 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
495
563
|
this.updateDropdownClickability();
|
|
496
564
|
if (this.content.generatedTitle) {
|
|
497
565
|
this.currentTitle = this.content.generatedTitle;
|
|
498
|
-
|
|
566
|
+
this.setFinalizedTitle(this.content.generatedTitle);
|
|
499
567
|
return;
|
|
500
568
|
}
|
|
501
|
-
const
|
|
502
|
-
if (
|
|
503
|
-
this.currentTitle =
|
|
504
|
-
this.content.generatedTitle =
|
|
505
|
-
|
|
569
|
+
const existingTitle = this.toolInvocations.find(t => t.generatedTitle)?.generatedTitle ?? this.allThinkingParts.find(t => t.generatedTitle)?.generatedTitle;
|
|
570
|
+
if (existingTitle) {
|
|
571
|
+
this.currentTitle = existingTitle;
|
|
572
|
+
this.content.generatedTitle = existingTitle;
|
|
573
|
+
this.setGeneratedTitleOnAllParts(existingTitle);
|
|
574
|
+
this.setFinalizedTitle(existingTitle);
|
|
506
575
|
return;
|
|
507
576
|
}
|
|
508
|
-
if (this.appendedItemCount === 1 && this.currentThinkingValue.trim() === ""
|
|
509
|
-
this.
|
|
510
|
-
|
|
577
|
+
if (this.appendedItemCount === 1 && this.currentThinkingValue.trim() === "") {
|
|
578
|
+
if (!this.singleItemInfo) {
|
|
579
|
+
const lazyItem = this.lazyItems.find(item => item.kind === "tool" && item.originalParent);
|
|
580
|
+
if (lazyItem && lazyItem.kind === "tool") {
|
|
581
|
+
const result = lazyItem.lazy.value;
|
|
582
|
+
this.singleItemInfo = {
|
|
583
|
+
element: result.domNode,
|
|
584
|
+
originalParent: lazyItem.originalParent,
|
|
585
|
+
originalNextSibling: this.domNode
|
|
586
|
+
};
|
|
587
|
+
if (result.disposable) {
|
|
588
|
+
this._register(result.disposable);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
if (this.singleItemInfo && this.restoreSingleItemToOriginalPosition()) {
|
|
593
|
+
return;
|
|
594
|
+
}
|
|
511
595
|
}
|
|
512
596
|
if (this.extractedTitles.length === 1 && this.toolInvocationCount === 0) {
|
|
513
597
|
const title = this.extractedTitles[0];
|
|
514
598
|
this.currentTitle = title;
|
|
515
599
|
this.content.generatedTitle = title;
|
|
516
|
-
|
|
600
|
+
this.setGeneratedTitleOnAllParts(title);
|
|
601
|
+
this.setFinalizedTitle(title);
|
|
517
602
|
return;
|
|
518
603
|
}
|
|
519
604
|
const generateTitles = this.configurationService.getValue(ChatConfiguration.ThinkingGenerateTitles) ?? true;
|
|
@@ -523,25 +608,22 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
523
608
|
}
|
|
524
609
|
this.generateTitleViaLLM();
|
|
525
610
|
}
|
|
526
|
-
|
|
611
|
+
setGeneratedTitleOnAllParts(title) {
|
|
527
612
|
for (const toolInvocation of this.toolInvocations) {
|
|
528
613
|
toolInvocation.generatedTitle = title;
|
|
529
614
|
}
|
|
615
|
+
for (const thinkingPart of this.allThinkingParts) {
|
|
616
|
+
thinkingPart.generatedTitle = title;
|
|
617
|
+
}
|
|
530
618
|
}
|
|
531
619
|
async generateTitleViaLLM() {
|
|
532
620
|
const cts = ( new CancellationTokenSource());
|
|
533
621
|
const timeout = setTimeout(() => cts.cancel(), 5000);
|
|
534
622
|
try {
|
|
535
|
-
|
|
623
|
+
const models = await this.languageModelsService.selectLanguageModels({
|
|
536
624
|
vendor: "copilot",
|
|
537
625
|
id: "copilot-fast"
|
|
538
626
|
});
|
|
539
|
-
if (!models.length) {
|
|
540
|
-
models = await this.languageModelsService.selectLanguageModels({
|
|
541
|
-
vendor: "copilot",
|
|
542
|
-
family: "gpt-4o-mini"
|
|
543
|
-
});
|
|
544
|
-
}
|
|
545
627
|
if (!models.length) {
|
|
546
628
|
this.setFallbackTitle();
|
|
547
629
|
return;
|
|
@@ -561,6 +643,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
561
643
|
OUTPUT FORMAT:
|
|
562
644
|
- MUST be a single sentence
|
|
563
645
|
- MUST be under 10 words
|
|
646
|
+
- The FIRST word MUST be a past tense verb (e.g. "Updated", "Reviewed", "Created", "Searched", "Analyzed")
|
|
564
647
|
- No quotes, no trailing punctuation
|
|
565
648
|
|
|
566
649
|
GENERAL:
|
|
@@ -582,13 +665,13 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
582
665
|
- For reasoning/thinking: "Considered", "Planned", "Analyzed", "Reviewed", "Evaluated"
|
|
583
666
|
- Choose the synonym that best fits the context
|
|
584
667
|
|
|
585
|
-
|
|
586
|
-
-
|
|
587
|
-
-
|
|
588
|
-
|
|
589
|
-
|
|
668
|
+
${this.hookCount > 0 ? `BLOCKED/DENIED CONTENT (hooks detected):
|
|
669
|
+
- Only mention "blocked" if the content explicitly includes hook results that blocked or warned about a tool (e.g. "Blocked terminal" or "Warning for read_file")
|
|
670
|
+
- If blocked items are present alongside normal tool calls, briefly note the block but do NOT let it dominate the summary: e.g. "Updated file.ts, blocked terminal"
|
|
671
|
+
|
|
672
|
+
` : `IMPORTANT: Do NOT use words like "blocked", "denied", or "tried" in the summary - there are no hooks or blocked items in this content. Just summarize normally.
|
|
590
673
|
|
|
591
|
-
RULES FOR TOOL CALLS:
|
|
674
|
+
`}RULES FOR TOOL CALLS:
|
|
592
675
|
1. If the SAME file was both edited AND read: Use a combined phrase like "Reviewed and updated <filename>"
|
|
593
676
|
2. If exactly ONE file was edited: Start with an edit synonym + "<filename>" (include actual filename)
|
|
594
677
|
3. If exactly ONE file was read: Start with a read synonym + "<filename>" (include actual filename)
|
|
@@ -627,13 +710,12 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
627
710
|
- "Edited Button.tsx, Edited Button.css, Edited index.ts" → "Modified 3 files"
|
|
628
711
|
- "Searched codebase for error handling" → "Looked up error handling"
|
|
629
712
|
|
|
630
|
-
|
|
631
|
-
- "
|
|
632
|
-
- "
|
|
633
|
-
- "
|
|
634
|
-
- "Used Read File, but received a warning, Edited utils.ts" → "Read file with a warning, edited utils.ts"
|
|
713
|
+
${this.hookCount > 0 ? `EXAMPLES WITH BLOCKED CONTENT (from hooks):
|
|
714
|
+
- "Blocked terminal, Edited config.ts" → "Edited config.ts, terminal was blocked"
|
|
715
|
+
- "Blocked terminal, Blocked read_file" → "Two tools were blocked by hooks"
|
|
716
|
+
- "Warning for read_file, Edited utils.ts" → "Edited utils.ts with a hook warning"
|
|
635
717
|
|
|
636
|
-
EXAMPLES WITH REASONING HEADERS (no tools):
|
|
718
|
+
` : ""}EXAMPLES WITH REASONING HEADERS (no tools):
|
|
637
719
|
- "Analyzing component architecture" → "Considered component architecture"
|
|
638
720
|
- "Planning refactor strategy" → "Planned refactor strategy"
|
|
639
721
|
- "Reviewing error handling approach, Considering edge cases" → "Analyzed error handling approach"
|
|
@@ -681,11 +763,9 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
681
763
|
}
|
|
682
764
|
if (generatedTitle && !this._store.isDisposed) {
|
|
683
765
|
this.currentTitle = generatedTitle;
|
|
684
|
-
|
|
685
|
-
this._collapseButton.label = generatedTitle;
|
|
686
|
-
}
|
|
766
|
+
this.setFinalizedTitle(generatedTitle);
|
|
687
767
|
this.content.generatedTitle = generatedTitle;
|
|
688
|
-
this.
|
|
768
|
+
this.setGeneratedTitleOnAllParts(generatedTitle);
|
|
689
769
|
return;
|
|
690
770
|
}
|
|
691
771
|
} catch (error) {} finally {
|
|
@@ -696,7 +776,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
696
776
|
}
|
|
697
777
|
restoreSingleItemToOriginalPosition() {
|
|
698
778
|
if (!this.singleItemInfo) {
|
|
699
|
-
return;
|
|
779
|
+
return false;
|
|
700
780
|
}
|
|
701
781
|
const {
|
|
702
782
|
element,
|
|
@@ -705,7 +785,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
705
785
|
} = this.singleItemInfo;
|
|
706
786
|
if (element.childElementCount > 1) {
|
|
707
787
|
this.singleItemInfo = undefined;
|
|
708
|
-
return;
|
|
788
|
+
return false;
|
|
709
789
|
}
|
|
710
790
|
if (originalNextSibling && originalNextSibling.parentNode === originalParent) {
|
|
711
791
|
originalParent.insertBefore(element, originalNextSibling);
|
|
@@ -714,22 +794,24 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
714
794
|
}
|
|
715
795
|
hide(this.domNode);
|
|
716
796
|
this.singleItemInfo = undefined;
|
|
797
|
+
return true;
|
|
717
798
|
}
|
|
718
799
|
setFallbackTitle() {
|
|
719
800
|
const finalLabel = this.appendedItemCount > 0 ? ( localize(
|
|
720
|
-
|
|
801
|
+
6509,
|
|
721
802
|
"Finished with {0} step{1}",
|
|
722
803
|
this.appendedItemCount,
|
|
723
804
|
this.appendedItemCount === 1 ? "" : "s"
|
|
724
|
-
)) : ( localize(
|
|
805
|
+
)) : ( localize(6510, "Finished Working"));
|
|
725
806
|
this.currentTitle = finalLabel;
|
|
726
807
|
if (this.wrapper) {
|
|
727
808
|
this.wrapper.classList.remove("chat-thinking-streaming");
|
|
728
809
|
}
|
|
810
|
+
this.domNode.classList.remove("chat-thinking-active");
|
|
729
811
|
this.streamingCompleted = true;
|
|
730
812
|
if (this._collapseButton) {
|
|
731
813
|
this._collapseButton.icon = Codicon.check;
|
|
732
|
-
this.
|
|
814
|
+
this.setFinalizedTitle(finalLabel);
|
|
733
815
|
}
|
|
734
816
|
this.updateDropdownClickability();
|
|
735
817
|
}
|
|
@@ -759,7 +841,8 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
759
841
|
lazy: ( new Lazy(factory)),
|
|
760
842
|
toolInvocationId,
|
|
761
843
|
toolInvocationOrMarkdown,
|
|
762
|
-
originalParent
|
|
844
|
+
originalParent,
|
|
845
|
+
isHook: !toolInvocationOrMarkdown && !!toolInvocationId
|
|
763
846
|
};
|
|
764
847
|
this.lazyItems.push(item);
|
|
765
848
|
}
|
|
@@ -770,9 +853,14 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
770
853
|
if (index === -1) {
|
|
771
854
|
return false;
|
|
772
855
|
}
|
|
856
|
+
const removedItem = this.lazyItems[index];
|
|
773
857
|
this.lazyItems.splice(index, 1);
|
|
774
858
|
this.appendedItemCount--;
|
|
775
|
-
|
|
859
|
+
if (removedItem.kind === "tool" && removedItem.isHook) {
|
|
860
|
+
this.hookCount = Math.max(0, this.hookCount - 1);
|
|
861
|
+
} else {
|
|
862
|
+
this.toolInvocationCount--;
|
|
863
|
+
}
|
|
776
864
|
const toolInvocationsIndex = this.toolInvocations.findIndex(
|
|
777
865
|
t => (t.kind === "toolInvocation" || t.kind === "toolInvocationSerialized") && t.toolId === toolInvocationId
|
|
778
866
|
);
|
|
@@ -783,10 +871,28 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
783
871
|
return true;
|
|
784
872
|
}
|
|
785
873
|
processPendingRemovals() {
|
|
786
|
-
|
|
787
|
-
|
|
874
|
+
this.pendingRemovalFlushDisposable?.dispose();
|
|
875
|
+
this.pendingRemovalFlushDisposable = undefined;
|
|
876
|
+
if (this.pendingRemovals.length === 0) {
|
|
877
|
+
return;
|
|
788
878
|
}
|
|
879
|
+
const pendingRemovals = this.pendingRemovals;
|
|
789
880
|
this.pendingRemovals = [];
|
|
881
|
+
for (const pending of pendingRemovals) {
|
|
882
|
+
this.removeStreamingToolEntry(pending.toolCallId, pending.toolLabel);
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
schedulePendingRemovalsFlush() {
|
|
886
|
+
if (this.pendingRemovalFlushDisposable) {
|
|
887
|
+
return;
|
|
888
|
+
}
|
|
889
|
+
this.pendingRemovalFlushDisposable = scheduleAtNextAnimationFrame(getWindow(this.domNode), () => {
|
|
890
|
+
this.pendingRemovalFlushDisposable = undefined;
|
|
891
|
+
if (this._store.isDisposed) {
|
|
892
|
+
return;
|
|
893
|
+
}
|
|
894
|
+
this.processPendingRemovals();
|
|
895
|
+
});
|
|
790
896
|
}
|
|
791
897
|
removeStreamingToolEntry(toolCallId, toolLabel) {
|
|
792
898
|
this.toolDisposables.deleteAndDispose(toolCallId);
|
|
@@ -820,7 +926,12 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
820
926
|
if (!toolInvocationId) {
|
|
821
927
|
return;
|
|
822
928
|
}
|
|
823
|
-
|
|
929
|
+
const isHook = !toolInvocationOrMarkdown;
|
|
930
|
+
if (isHook) {
|
|
931
|
+
this.hookCount++;
|
|
932
|
+
} else {
|
|
933
|
+
this.toolInvocationCount++;
|
|
934
|
+
}
|
|
824
935
|
let toolCallLabel;
|
|
825
936
|
const isToolInvocation = toolInvocationOrMarkdown && (toolInvocationOrMarkdown.kind === "toolInvocation" || toolInvocationOrMarkdown.kind === "toolInvocationSerialized");
|
|
826
937
|
if (isToolInvocation && toolInvocationOrMarkdown.invocationMessage) {
|
|
@@ -865,6 +976,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
865
976
|
toolCallId: toolInvocationOrMarkdown.toolCallId,
|
|
866
977
|
toolLabel: currentToolLabel
|
|
867
978
|
});
|
|
979
|
+
this.schedulePendingRemovalsFlush();
|
|
868
980
|
isComplete = true;
|
|
869
981
|
return;
|
|
870
982
|
}
|
|
@@ -908,9 +1020,9 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
908
1020
|
const codeblockInfo = extractCodeblockUrisFromText(toolInvocationOrMarkdown.content.value);
|
|
909
1021
|
if (codeblockInfo?.uri) {
|
|
910
1022
|
const filename = basename(codeblockInfo.uri);
|
|
911
|
-
toolCallLabel = ( localize(
|
|
1023
|
+
toolCallLabel = ( localize(6511, "Edited {0}", filename));
|
|
912
1024
|
} else {
|
|
913
|
-
toolCallLabel = ( localize(
|
|
1025
|
+
toolCallLabel = ( localize(6512, "Edited file"));
|
|
914
1026
|
}
|
|
915
1027
|
} else {
|
|
916
1028
|
toolCallLabel = toolInvocationId;
|
|
@@ -1002,6 +1114,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
1002
1114
|
return;
|
|
1003
1115
|
}
|
|
1004
1116
|
this.appendedItemCount++;
|
|
1117
|
+
this.allThinkingParts.push(content);
|
|
1005
1118
|
this.textContainer = $(".chat-thinking-item.markdown-content");
|
|
1006
1119
|
if (content.value) {
|
|
1007
1120
|
if (this.isExpanded() || this.hasExpandedOnce || (this.fixedScrollingMode && !this.streamingCompleted)) {
|
|
@@ -1029,17 +1142,60 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
1029
1142
|
return;
|
|
1030
1143
|
}
|
|
1031
1144
|
if (omitPrefix) {
|
|
1032
|
-
|
|
1145
|
+
if (this._collapseButton) {
|
|
1146
|
+
const labelElement = this._collapseButton.labelElement;
|
|
1147
|
+
labelElement.textContent = "";
|
|
1148
|
+
const plainSpan = $("span");
|
|
1149
|
+
plainSpan.textContent = title;
|
|
1150
|
+
labelElement.appendChild(plainSpan);
|
|
1151
|
+
this._collapseButton.element.ariaLabel = title;
|
|
1152
|
+
}
|
|
1153
|
+
this.titleShimmerSpan = undefined;
|
|
1154
|
+
this.titleDetailContainer = undefined;
|
|
1155
|
+
if (this.titleDetailRendered) {
|
|
1156
|
+
this.titleDetailRendered.dispose();
|
|
1157
|
+
this.titleDetailRendered = undefined;
|
|
1158
|
+
}
|
|
1033
1159
|
this.currentTitle = title;
|
|
1034
1160
|
return;
|
|
1035
1161
|
}
|
|
1036
|
-
const thinkingLabel = `Working: ${title}`;
|
|
1037
1162
|
this.lastExtractedTitle = title;
|
|
1163
|
+
const thinkingLabel = `Working: ${title}`;
|
|
1038
1164
|
this.currentTitle = thinkingLabel;
|
|
1039
|
-
|
|
1165
|
+
if (!this._collapseButton) {
|
|
1166
|
+
return;
|
|
1167
|
+
}
|
|
1168
|
+
const labelElement = this._collapseButton.labelElement;
|
|
1169
|
+
if (!this.titleShimmerSpan || !this.titleShimmerSpan.parentElement) {
|
|
1170
|
+
labelElement.textContent = "";
|
|
1171
|
+
this.titleShimmerSpan = $("span.chat-thinking-title-shimmer");
|
|
1172
|
+
labelElement.appendChild(this.titleShimmerSpan);
|
|
1173
|
+
}
|
|
1174
|
+
this.titleShimmerSpan.textContent = "Working: ";
|
|
1175
|
+
if (this.titleDetailRendered) {
|
|
1176
|
+
this.titleDetailRendered.dispose();
|
|
1177
|
+
this.titleDetailRendered = undefined;
|
|
1178
|
+
}
|
|
1179
|
+
const result = this.chatContentMarkdownRenderer.render(( new MarkdownString(title)));
|
|
1180
|
+
result.element.classList.add("collapsible-title-content", "chat-thinking-title-detail");
|
|
1181
|
+
renderFileWidgets(
|
|
1182
|
+
result.element,
|
|
1183
|
+
this.instantiationService,
|
|
1184
|
+
this.chatMarkdownAnchorService,
|
|
1185
|
+
this._store
|
|
1186
|
+
);
|
|
1187
|
+
this.titleDetailRendered = result;
|
|
1188
|
+
if (this.titleDetailContainer) {
|
|
1189
|
+
this.titleDetailContainer.replaceWith(result.element);
|
|
1190
|
+
} else {
|
|
1191
|
+
labelElement.appendChild(result.element);
|
|
1192
|
+
}
|
|
1193
|
+
this.titleDetailContainer = result.element;
|
|
1194
|
+
this._collapseButton.element.ariaLabel = thinkingLabel;
|
|
1195
|
+
this._collapseButton.element.ariaExpanded = String(this.isExpanded());
|
|
1040
1196
|
}
|
|
1041
1197
|
hasSameContent(other, _followingContent, _element) {
|
|
1042
|
-
if (other.kind === "toolInvocation" || other.kind === "toolInvocationSerialized" || other.kind === "markdownContent") {
|
|
1198
|
+
if (other.kind === "toolInvocation" || other.kind === "toolInvocationSerialized" || other.kind === "markdownContent" || other.kind === "hook") {
|
|
1043
1199
|
return true;
|
|
1044
1200
|
}
|
|
1045
1201
|
if (other.kind !== "thinking") {
|
|
@@ -1048,15 +1204,22 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
1048
1204
|
return other?.id !== this.id;
|
|
1049
1205
|
}
|
|
1050
1206
|
dispose() {
|
|
1207
|
+
this.isActive = false;
|
|
1051
1208
|
if (this.markdownResult) {
|
|
1052
1209
|
this.markdownResult.dispose();
|
|
1053
1210
|
this.markdownResult = undefined;
|
|
1054
1211
|
}
|
|
1212
|
+
if (this.titleDetailRendered) {
|
|
1213
|
+
this.titleDetailRendered.dispose();
|
|
1214
|
+
this.titleDetailRendered = undefined;
|
|
1215
|
+
}
|
|
1055
1216
|
if (this.workingSpinnerElement) {
|
|
1056
1217
|
this.workingSpinnerElement.remove();
|
|
1057
1218
|
this.workingSpinnerElement = undefined;
|
|
1058
1219
|
this.workingSpinnerLabel = undefined;
|
|
1059
1220
|
}
|
|
1221
|
+
this.pendingRemovalFlushDisposable?.dispose();
|
|
1222
|
+
this.pendingRemovalFlushDisposable = undefined;
|
|
1060
1223
|
this.pendingScrollDisposable?.dispose();
|
|
1061
1224
|
super.dispose();
|
|
1062
1225
|
}
|