@codingame/monaco-vscode-katex-common 26.2.1 → 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 +52 -22
- 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 +244 -80
- 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 +63 -69
- 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';
|
|
@@ -27,6 +28,7 @@ import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/w
|
|
|
27
28
|
import { ExtensionIdentifier } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
|
|
28
29
|
import * as chatThinkingContent from './media/chatThinkingContent.css';
|
|
29
30
|
import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
|
|
31
|
+
import { mainWindow } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/window';
|
|
30
32
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
31
33
|
|
|
32
34
|
registerCss(chatThinkingContent);
|
|
@@ -42,7 +44,7 @@ function getToolInvocationIcon(toolId) {
|
|
|
42
44
|
if (lowerToolId.includes("read") || lowerToolId.includes("get_file") || lowerToolId.includes("problems")) {
|
|
43
45
|
return Codicon.book;
|
|
44
46
|
}
|
|
45
|
-
if (lowerToolId.includes("edit") || lowerToolId.includes("create")) {
|
|
47
|
+
if (lowerToolId.includes("edit") || lowerToolId.includes("create") || lowerToolId.includes("replace")) {
|
|
46
48
|
return Codicon.pencil;
|
|
47
49
|
}
|
|
48
50
|
if (lowerToolId.includes("terminal")) {
|
|
@@ -66,25 +68,38 @@ var WorkingMessageCategory;
|
|
|
66
68
|
WorkingMessageCategory["Terminal"] = "terminal";
|
|
67
69
|
WorkingMessageCategory["Tool"] = "tool";
|
|
68
70
|
})(WorkingMessageCategory || (WorkingMessageCategory = {}));
|
|
69
|
-
const
|
|
70
|
-
const terminalMessages = [( localize(
|
|
71
|
-
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"))];
|
|
72
74
|
let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsibleContentPart {
|
|
73
75
|
getRandomWorkingMessage(category = WorkingMessageCategory.Tool) {
|
|
74
76
|
let pool = this.availableMessagesByCategory.get(category);
|
|
75
77
|
if (!pool || pool.length === 0) {
|
|
78
|
+
let defaults;
|
|
76
79
|
switch (category) {
|
|
77
80
|
case WorkingMessageCategory.Thinking:
|
|
78
|
-
|
|
81
|
+
defaults = [...defaultThinkingMessages];
|
|
79
82
|
break;
|
|
80
83
|
case WorkingMessageCategory.Terminal:
|
|
81
|
-
|
|
84
|
+
defaults = [...terminalMessages];
|
|
82
85
|
break;
|
|
83
86
|
case WorkingMessageCategory.Tool:
|
|
84
87
|
default:
|
|
85
|
-
|
|
88
|
+
defaults = [...toolMessages];
|
|
86
89
|
break;
|
|
87
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
|
+
}
|
|
88
103
|
this.availableMessagesByCategory.set(category, pool);
|
|
89
104
|
}
|
|
90
105
|
const index = Math.floor(Math.random() * pool.length);
|
|
@@ -102,8 +117,8 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
102
117
|
hoverService
|
|
103
118
|
) {
|
|
104
119
|
const initialText = extractTextFromPart(content);
|
|
105
|
-
const extractedTitle = extractTitleFromThinkingContent(initialText) ?? "Working
|
|
106
|
-
super(extractedTitle, context, undefined, hoverService);
|
|
120
|
+
const extractedTitle = extractTitleFromThinkingContent(initialText) ?? "Working";
|
|
121
|
+
super(extractedTitle, context, undefined, hoverService, configurationService);
|
|
107
122
|
this.chatContentMarkdownRenderer = chatContentMarkdownRenderer;
|
|
108
123
|
this.streamingCompleted = streamingCompleted;
|
|
109
124
|
this.instantiationService = instantiationService;
|
|
@@ -111,7 +126,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
111
126
|
this.chatMarkdownAnchorService = chatMarkdownAnchorService;
|
|
112
127
|
this.languageModelsService = languageModelsService;
|
|
113
128
|
this._onDidChangeHeight = this._register(( new Emitter()));
|
|
114
|
-
this.defaultTitle = ( localize(
|
|
129
|
+
this.defaultTitle = ( localize(6507, "Working"));
|
|
115
130
|
this.fixedScrollingMode = false;
|
|
116
131
|
this.autoScrollEnabled = true;
|
|
117
132
|
this.extractedTitles = [];
|
|
@@ -119,6 +134,8 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
119
134
|
this.appendedItemCount = 0;
|
|
120
135
|
this.isActive = true;
|
|
121
136
|
this.toolInvocations = [];
|
|
137
|
+
this.allThinkingParts = [];
|
|
138
|
+
this.hookCount = 0;
|
|
122
139
|
this.lazyItems = [];
|
|
123
140
|
this.hasExpandedOnce = false;
|
|
124
141
|
this.availableMessagesByCategory = ( new Map());
|
|
@@ -128,6 +145,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
128
145
|
this.isUpdatingDimensions = false;
|
|
129
146
|
this.id = content.id;
|
|
130
147
|
this.content = content;
|
|
148
|
+
this.allThinkingParts.push(content);
|
|
131
149
|
const configuredMode = this.configurationService.getValue("chat.agent.thinkingStyle") ?? ThinkingDisplayMode.Collapsed;
|
|
132
150
|
this.fixedScrollingMode = configuredMode === ThinkingDisplayMode.FixedScrolling;
|
|
133
151
|
this.currentTitle = extractedTitle;
|
|
@@ -138,7 +156,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
138
156
|
if (initialText.trim()) {
|
|
139
157
|
this.appendedItemCount++;
|
|
140
158
|
}
|
|
141
|
-
alert(( localize(
|
|
159
|
+
alert(( localize(6508, "Thinking")));
|
|
142
160
|
if (configuredMode === ThinkingDisplayMode.Collapsed) {
|
|
143
161
|
this.setExpanded(false);
|
|
144
162
|
} else if (configuredMode === ThinkingDisplayMode.CollapsedPreview) {
|
|
@@ -148,6 +166,18 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
148
166
|
}
|
|
149
167
|
const node = this.domNode;
|
|
150
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
|
+
}
|
|
151
181
|
if (this.fixedScrollingMode) {
|
|
152
182
|
node.classList.add("chat-thinking-fixed-mode");
|
|
153
183
|
this.currentTitle = this.defaultTitle;
|
|
@@ -161,18 +191,23 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
161
191
|
if (isExpanded) {
|
|
162
192
|
this._collapseButton.icon = Codicon.chevronDown;
|
|
163
193
|
} else {
|
|
164
|
-
this._collapseButton.icon =
|
|
194
|
+
this._collapseButton.icon = Codicon.circleFilled;
|
|
165
195
|
}
|
|
166
196
|
}
|
|
167
197
|
}
|
|
168
198
|
}));
|
|
169
199
|
this._register(autorun(r => {
|
|
170
|
-
|
|
200
|
+
const isExpanded = this._isExpanded.read(r);
|
|
201
|
+
if (isExpanded && !this.hasExpandedOnce && this.lazyItems.length > 0) {
|
|
171
202
|
this.hasExpandedOnce = true;
|
|
172
203
|
for (const item of this.lazyItems) {
|
|
173
204
|
this.materializeLazyItem(item);
|
|
174
205
|
}
|
|
175
206
|
}
|
|
207
|
+
if (isExpanded && !this.shouldAllowExpansion()) {
|
|
208
|
+
this.setExpanded(false);
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
176
211
|
this._onDidChangeHeight.fire();
|
|
177
212
|
}));
|
|
178
213
|
const label = this.lastExtractedTitle ?? "";
|
|
@@ -188,10 +223,13 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
188
223
|
if (expanded) {
|
|
189
224
|
this.setTitle(this.defaultTitle, true);
|
|
190
225
|
this.currentTitle = this.defaultTitle;
|
|
191
|
-
} else
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
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
|
+
}
|
|
195
233
|
}
|
|
196
234
|
}));
|
|
197
235
|
}
|
|
@@ -212,7 +250,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
212
250
|
}
|
|
213
251
|
if (!this.streamingCompleted && !this.element.isComplete) {
|
|
214
252
|
this.workingSpinnerElement = $(".chat-thinking-item.chat-thinking-spinner-item");
|
|
215
|
-
const spinnerIcon = createThinkingIcon(
|
|
253
|
+
const spinnerIcon = createThinkingIcon(Codicon.circleFilled);
|
|
216
254
|
this.workingSpinnerElement.appendChild(spinnerIcon);
|
|
217
255
|
this.workingSpinnerLabel = $("span.chat-thinking-spinner-label");
|
|
218
256
|
this.workingSpinnerLabel.textContent = this.getRandomWorkingMessage(WorkingMessageCategory.Thinking);
|
|
@@ -227,11 +265,11 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
227
265
|
alwaysConsumeMouseWheel: false
|
|
228
266
|
})));
|
|
229
267
|
this._register(this.scrollableElement.onScroll(e => this.handleScroll(e.scrollTop)));
|
|
230
|
-
const mutationObserver =
|
|
268
|
+
const mutationObserver = new mainWindow.MutationObserver(() => {
|
|
231
269
|
if (!this.streamingCompleted) {
|
|
232
270
|
this.syncDimensionsAndScheduleScroll();
|
|
233
271
|
}
|
|
234
|
-
})
|
|
272
|
+
});
|
|
235
273
|
mutationObserver.observe(this.wrapper, {
|
|
236
274
|
childList: true,
|
|
237
275
|
subtree: true,
|
|
@@ -380,21 +418,44 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
380
418
|
}
|
|
381
419
|
}
|
|
382
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
|
+
}
|
|
383
442
|
setDropdownClickable(clickable) {
|
|
384
443
|
if (this._collapseButton) {
|
|
385
444
|
this._collapseButton.element.style.pointerEvents = clickable ? "auto" : "none";
|
|
386
445
|
}
|
|
387
446
|
if (!clickable && this.streamingCompleted) {
|
|
388
|
-
|
|
447
|
+
this.setFinalizedTitle(this.lastExtractedTitle ?? this.currentTitle);
|
|
389
448
|
}
|
|
390
449
|
}
|
|
391
|
-
|
|
392
|
-
if (
|
|
393
|
-
return;
|
|
450
|
+
shouldAllowExpansion() {
|
|
451
|
+
if (this.toolInvocationCount > 0 || this.lazyItems.length > 0) {
|
|
452
|
+
return true;
|
|
394
453
|
}
|
|
395
|
-
if (this.wrapper
|
|
396
|
-
this.
|
|
397
|
-
|
|
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
|
+
}
|
|
398
459
|
}
|
|
399
460
|
const contentWithoutTitle = this.currentThinkingValue.trim();
|
|
400
461
|
const titleToCompare = this.lastExtractedTitle ?? this.currentTitle;
|
|
@@ -402,8 +463,14 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
402
463
|
return text.replace(/\*\*(.+?)\*\*/g, "$1").replace(/\*(.+?)\*/g, "$1").replace(/`(.+?)`/g, "$1").trim();
|
|
403
464
|
};
|
|
404
465
|
const strippedContent = stripMarkdown(contentWithoutTitle);
|
|
405
|
-
|
|
406
|
-
|
|
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);
|
|
407
474
|
}
|
|
408
475
|
appendToWrapper(element) {
|
|
409
476
|
if (!this.wrapper) {
|
|
@@ -465,6 +532,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
465
532
|
}
|
|
466
533
|
markAsInactive() {
|
|
467
534
|
this.isActive = false;
|
|
535
|
+
this.domNode.classList.remove("chat-thinking-active");
|
|
468
536
|
this.processPendingRemovals();
|
|
469
537
|
if (this.workingSpinnerElement) {
|
|
470
538
|
this.workingSpinnerElement.remove();
|
|
@@ -477,6 +545,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
477
545
|
if (this.wrapper) {
|
|
478
546
|
this.wrapper.classList.remove("chat-thinking-streaming");
|
|
479
547
|
}
|
|
548
|
+
this.domNode.classList.remove("chat-thinking-active");
|
|
480
549
|
this.streamingCompleted = true;
|
|
481
550
|
if (this.mutationObserverDisposable) {
|
|
482
551
|
this.mutationObserverDisposable.dispose();
|
|
@@ -494,25 +563,42 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
494
563
|
this.updateDropdownClickability();
|
|
495
564
|
if (this.content.generatedTitle) {
|
|
496
565
|
this.currentTitle = this.content.generatedTitle;
|
|
497
|
-
|
|
566
|
+
this.setFinalizedTitle(this.content.generatedTitle);
|
|
498
567
|
return;
|
|
499
568
|
}
|
|
500
|
-
const
|
|
501
|
-
if (
|
|
502
|
-
this.currentTitle =
|
|
503
|
-
this.content.generatedTitle =
|
|
504
|
-
|
|
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);
|
|
505
575
|
return;
|
|
506
576
|
}
|
|
507
|
-
if (this.appendedItemCount === 1 && this.currentThinkingValue.trim() === ""
|
|
508
|
-
this.
|
|
509
|
-
|
|
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
|
+
}
|
|
510
595
|
}
|
|
511
596
|
if (this.extractedTitles.length === 1 && this.toolInvocationCount === 0) {
|
|
512
597
|
const title = this.extractedTitles[0];
|
|
513
598
|
this.currentTitle = title;
|
|
514
599
|
this.content.generatedTitle = title;
|
|
515
|
-
|
|
600
|
+
this.setGeneratedTitleOnAllParts(title);
|
|
601
|
+
this.setFinalizedTitle(title);
|
|
516
602
|
return;
|
|
517
603
|
}
|
|
518
604
|
const generateTitles = this.configurationService.getValue(ChatConfiguration.ThinkingGenerateTitles) ?? true;
|
|
@@ -522,25 +608,22 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
522
608
|
}
|
|
523
609
|
this.generateTitleViaLLM();
|
|
524
610
|
}
|
|
525
|
-
|
|
611
|
+
setGeneratedTitleOnAllParts(title) {
|
|
526
612
|
for (const toolInvocation of this.toolInvocations) {
|
|
527
613
|
toolInvocation.generatedTitle = title;
|
|
528
614
|
}
|
|
615
|
+
for (const thinkingPart of this.allThinkingParts) {
|
|
616
|
+
thinkingPart.generatedTitle = title;
|
|
617
|
+
}
|
|
529
618
|
}
|
|
530
619
|
async generateTitleViaLLM() {
|
|
531
620
|
const cts = ( new CancellationTokenSource());
|
|
532
621
|
const timeout = setTimeout(() => cts.cancel(), 5000);
|
|
533
622
|
try {
|
|
534
|
-
|
|
623
|
+
const models = await this.languageModelsService.selectLanguageModels({
|
|
535
624
|
vendor: "copilot",
|
|
536
625
|
id: "copilot-fast"
|
|
537
626
|
});
|
|
538
|
-
if (!models.length) {
|
|
539
|
-
models = await this.languageModelsService.selectLanguageModels({
|
|
540
|
-
vendor: "copilot",
|
|
541
|
-
family: "gpt-4o-mini"
|
|
542
|
-
});
|
|
543
|
-
}
|
|
544
627
|
if (!models.length) {
|
|
545
628
|
this.setFallbackTitle();
|
|
546
629
|
return;
|
|
@@ -560,6 +643,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
560
643
|
OUTPUT FORMAT:
|
|
561
644
|
- MUST be a single sentence
|
|
562
645
|
- MUST be under 10 words
|
|
646
|
+
- The FIRST word MUST be a past tense verb (e.g. "Updated", "Reviewed", "Created", "Searched", "Analyzed")
|
|
563
647
|
- No quotes, no trailing punctuation
|
|
564
648
|
|
|
565
649
|
GENERAL:
|
|
@@ -581,13 +665,13 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
581
665
|
- For reasoning/thinking: "Considered", "Planned", "Analyzed", "Reviewed", "Evaluated"
|
|
582
666
|
- Choose the synonym that best fits the context
|
|
583
667
|
|
|
584
|
-
|
|
585
|
-
-
|
|
586
|
-
-
|
|
587
|
-
|
|
588
|
-
|
|
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.
|
|
589
673
|
|
|
590
|
-
RULES FOR TOOL CALLS:
|
|
674
|
+
`}RULES FOR TOOL CALLS:
|
|
591
675
|
1. If the SAME file was both edited AND read: Use a combined phrase like "Reviewed and updated <filename>"
|
|
592
676
|
2. If exactly ONE file was edited: Start with an edit synonym + "<filename>" (include actual filename)
|
|
593
677
|
3. If exactly ONE file was read: Start with a read synonym + "<filename>" (include actual filename)
|
|
@@ -626,13 +710,12 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
626
710
|
- "Edited Button.tsx, Edited Button.css, Edited index.ts" → "Modified 3 files"
|
|
627
711
|
- "Searched codebase for error handling" → "Looked up error handling"
|
|
628
712
|
|
|
629
|
-
|
|
630
|
-
- "
|
|
631
|
-
- "
|
|
632
|
-
- "
|
|
633
|
-
- "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"
|
|
634
717
|
|
|
635
|
-
EXAMPLES WITH REASONING HEADERS (no tools):
|
|
718
|
+
` : ""}EXAMPLES WITH REASONING HEADERS (no tools):
|
|
636
719
|
- "Analyzing component architecture" → "Considered component architecture"
|
|
637
720
|
- "Planning refactor strategy" → "Planned refactor strategy"
|
|
638
721
|
- "Reviewing error handling approach, Considering edge cases" → "Analyzed error handling approach"
|
|
@@ -680,11 +763,9 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
680
763
|
}
|
|
681
764
|
if (generatedTitle && !this._store.isDisposed) {
|
|
682
765
|
this.currentTitle = generatedTitle;
|
|
683
|
-
|
|
684
|
-
this._collapseButton.label = generatedTitle;
|
|
685
|
-
}
|
|
766
|
+
this.setFinalizedTitle(generatedTitle);
|
|
686
767
|
this.content.generatedTitle = generatedTitle;
|
|
687
|
-
this.
|
|
768
|
+
this.setGeneratedTitleOnAllParts(generatedTitle);
|
|
688
769
|
return;
|
|
689
770
|
}
|
|
690
771
|
} catch (error) {} finally {
|
|
@@ -695,7 +776,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
695
776
|
}
|
|
696
777
|
restoreSingleItemToOriginalPosition() {
|
|
697
778
|
if (!this.singleItemInfo) {
|
|
698
|
-
return;
|
|
779
|
+
return false;
|
|
699
780
|
}
|
|
700
781
|
const {
|
|
701
782
|
element,
|
|
@@ -704,7 +785,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
704
785
|
} = this.singleItemInfo;
|
|
705
786
|
if (element.childElementCount > 1) {
|
|
706
787
|
this.singleItemInfo = undefined;
|
|
707
|
-
return;
|
|
788
|
+
return false;
|
|
708
789
|
}
|
|
709
790
|
if (originalNextSibling && originalNextSibling.parentNode === originalParent) {
|
|
710
791
|
originalParent.insertBefore(element, originalNextSibling);
|
|
@@ -713,22 +794,24 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
713
794
|
}
|
|
714
795
|
hide(this.domNode);
|
|
715
796
|
this.singleItemInfo = undefined;
|
|
797
|
+
return true;
|
|
716
798
|
}
|
|
717
799
|
setFallbackTitle() {
|
|
718
800
|
const finalLabel = this.appendedItemCount > 0 ? ( localize(
|
|
719
|
-
|
|
801
|
+
6509,
|
|
720
802
|
"Finished with {0} step{1}",
|
|
721
803
|
this.appendedItemCount,
|
|
722
804
|
this.appendedItemCount === 1 ? "" : "s"
|
|
723
|
-
)) : ( localize(
|
|
805
|
+
)) : ( localize(6510, "Finished Working"));
|
|
724
806
|
this.currentTitle = finalLabel;
|
|
725
807
|
if (this.wrapper) {
|
|
726
808
|
this.wrapper.classList.remove("chat-thinking-streaming");
|
|
727
809
|
}
|
|
810
|
+
this.domNode.classList.remove("chat-thinking-active");
|
|
728
811
|
this.streamingCompleted = true;
|
|
729
812
|
if (this._collapseButton) {
|
|
730
813
|
this._collapseButton.icon = Codicon.check;
|
|
731
|
-
this.
|
|
814
|
+
this.setFinalizedTitle(finalLabel);
|
|
732
815
|
}
|
|
733
816
|
this.updateDropdownClickability();
|
|
734
817
|
}
|
|
@@ -758,7 +841,8 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
758
841
|
lazy: ( new Lazy(factory)),
|
|
759
842
|
toolInvocationId,
|
|
760
843
|
toolInvocationOrMarkdown,
|
|
761
|
-
originalParent
|
|
844
|
+
originalParent,
|
|
845
|
+
isHook: !toolInvocationOrMarkdown && !!toolInvocationId
|
|
762
846
|
};
|
|
763
847
|
this.lazyItems.push(item);
|
|
764
848
|
}
|
|
@@ -769,9 +853,14 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
769
853
|
if (index === -1) {
|
|
770
854
|
return false;
|
|
771
855
|
}
|
|
856
|
+
const removedItem = this.lazyItems[index];
|
|
772
857
|
this.lazyItems.splice(index, 1);
|
|
773
858
|
this.appendedItemCount--;
|
|
774
|
-
|
|
859
|
+
if (removedItem.kind === "tool" && removedItem.isHook) {
|
|
860
|
+
this.hookCount = Math.max(0, this.hookCount - 1);
|
|
861
|
+
} else {
|
|
862
|
+
this.toolInvocationCount--;
|
|
863
|
+
}
|
|
775
864
|
const toolInvocationsIndex = this.toolInvocations.findIndex(
|
|
776
865
|
t => (t.kind === "toolInvocation" || t.kind === "toolInvocationSerialized") && t.toolId === toolInvocationId
|
|
777
866
|
);
|
|
@@ -782,10 +871,28 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
782
871
|
return true;
|
|
783
872
|
}
|
|
784
873
|
processPendingRemovals() {
|
|
785
|
-
|
|
786
|
-
|
|
874
|
+
this.pendingRemovalFlushDisposable?.dispose();
|
|
875
|
+
this.pendingRemovalFlushDisposable = undefined;
|
|
876
|
+
if (this.pendingRemovals.length === 0) {
|
|
877
|
+
return;
|
|
787
878
|
}
|
|
879
|
+
const pendingRemovals = this.pendingRemovals;
|
|
788
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
|
+
});
|
|
789
896
|
}
|
|
790
897
|
removeStreamingToolEntry(toolCallId, toolLabel) {
|
|
791
898
|
this.toolDisposables.deleteAndDispose(toolCallId);
|
|
@@ -819,7 +926,12 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
819
926
|
if (!toolInvocationId) {
|
|
820
927
|
return;
|
|
821
928
|
}
|
|
822
|
-
|
|
929
|
+
const isHook = !toolInvocationOrMarkdown;
|
|
930
|
+
if (isHook) {
|
|
931
|
+
this.hookCount++;
|
|
932
|
+
} else {
|
|
933
|
+
this.toolInvocationCount++;
|
|
934
|
+
}
|
|
823
935
|
let toolCallLabel;
|
|
824
936
|
const isToolInvocation = toolInvocationOrMarkdown && (toolInvocationOrMarkdown.kind === "toolInvocation" || toolInvocationOrMarkdown.kind === "toolInvocationSerialized");
|
|
825
937
|
if (isToolInvocation && toolInvocationOrMarkdown.invocationMessage) {
|
|
@@ -864,6 +976,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
864
976
|
toolCallId: toolInvocationOrMarkdown.toolCallId,
|
|
865
977
|
toolLabel: currentToolLabel
|
|
866
978
|
});
|
|
979
|
+
this.schedulePendingRemovalsFlush();
|
|
867
980
|
isComplete = true;
|
|
868
981
|
return;
|
|
869
982
|
}
|
|
@@ -907,9 +1020,9 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
907
1020
|
const codeblockInfo = extractCodeblockUrisFromText(toolInvocationOrMarkdown.content.value);
|
|
908
1021
|
if (codeblockInfo?.uri) {
|
|
909
1022
|
const filename = basename(codeblockInfo.uri);
|
|
910
|
-
toolCallLabel = ( localize(
|
|
1023
|
+
toolCallLabel = ( localize(6511, "Edited {0}", filename));
|
|
911
1024
|
} else {
|
|
912
|
-
toolCallLabel = ( localize(
|
|
1025
|
+
toolCallLabel = ( localize(6512, "Edited file"));
|
|
913
1026
|
}
|
|
914
1027
|
} else {
|
|
915
1028
|
toolCallLabel = toolInvocationId;
|
|
@@ -1001,6 +1114,7 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
1001
1114
|
return;
|
|
1002
1115
|
}
|
|
1003
1116
|
this.appendedItemCount++;
|
|
1117
|
+
this.allThinkingParts.push(content);
|
|
1004
1118
|
this.textContainer = $(".chat-thinking-item.markdown-content");
|
|
1005
1119
|
if (content.value) {
|
|
1006
1120
|
if (this.isExpanded() || this.hasExpandedOnce || (this.fixedScrollingMode && !this.streamingCompleted)) {
|
|
@@ -1028,17 +1142,60 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
1028
1142
|
return;
|
|
1029
1143
|
}
|
|
1030
1144
|
if (omitPrefix) {
|
|
1031
|
-
|
|
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
|
+
}
|
|
1032
1159
|
this.currentTitle = title;
|
|
1033
1160
|
return;
|
|
1034
1161
|
}
|
|
1035
|
-
const thinkingLabel = `Working: ${title}`;
|
|
1036
1162
|
this.lastExtractedTitle = title;
|
|
1163
|
+
const thinkingLabel = `Working: ${title}`;
|
|
1037
1164
|
this.currentTitle = thinkingLabel;
|
|
1038
|
-
|
|
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());
|
|
1039
1196
|
}
|
|
1040
1197
|
hasSameContent(other, _followingContent, _element) {
|
|
1041
|
-
if (other.kind === "toolInvocation" || other.kind === "toolInvocationSerialized" || other.kind === "markdownContent") {
|
|
1198
|
+
if (other.kind === "toolInvocation" || other.kind === "toolInvocationSerialized" || other.kind === "markdownContent" || other.kind === "hook") {
|
|
1042
1199
|
return true;
|
|
1043
1200
|
}
|
|
1044
1201
|
if (other.kind !== "thinking") {
|
|
@@ -1047,15 +1204,22 @@ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsi
|
|
|
1047
1204
|
return other?.id !== this.id;
|
|
1048
1205
|
}
|
|
1049
1206
|
dispose() {
|
|
1207
|
+
this.isActive = false;
|
|
1050
1208
|
if (this.markdownResult) {
|
|
1051
1209
|
this.markdownResult.dispose();
|
|
1052
1210
|
this.markdownResult = undefined;
|
|
1053
1211
|
}
|
|
1212
|
+
if (this.titleDetailRendered) {
|
|
1213
|
+
this.titleDetailRendered.dispose();
|
|
1214
|
+
this.titleDetailRendered = undefined;
|
|
1215
|
+
}
|
|
1054
1216
|
if (this.workingSpinnerElement) {
|
|
1055
1217
|
this.workingSpinnerElement.remove();
|
|
1056
1218
|
this.workingSpinnerElement = undefined;
|
|
1057
1219
|
this.workingSpinnerLabel = undefined;
|
|
1058
1220
|
}
|
|
1221
|
+
this.pendingRemovalFlushDisposable?.dispose();
|
|
1222
|
+
this.pendingRemovalFlushDisposable = undefined;
|
|
1059
1223
|
this.pendingScrollDisposable?.dispose();
|
|
1060
1224
|
super.dispose();
|
|
1061
1225
|
}
|