@codingame/monaco-vscode-katex-common 24.3.0 → 25.0.1
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 +3 -3
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAccessibilityProvider.d.ts → accessibility/chatAccessibilityProvider.d.ts} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAccessibilityProvider.js → accessibility/chatAccessibilityProvider.js} +25 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +31 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAttachmentModel.d.ts → attachments/chatAttachmentModel.d.ts} +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAttachmentModel.js → attachments/chatAttachmentModel.js} +24 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAttachmentWidgets.d.ts → attachments/chatAttachmentWidgets.d.ts} +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAttachmentWidgets.js → attachments/chatAttachmentWidgets.js} +80 -89
- package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → attachments}/chatImplicitContext.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → attachments}/chatImplicitContext.js +23 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → attachments}/chatInputRelatedFilesContrib.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → attachments}/chatInputRelatedFilesContrib.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +47 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +39 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAgentHover.d.ts → widget/chatAgentHover.d.ts} +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAgentHover.js → widget/chatAgentHover.js} +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatAgentCommandContentPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatAgentCommandContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatAnonymousRateLimitedPart.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatAnonymousRateLimitedPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatAttachmentsContentPart.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatAttachmentsContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatChangesSummaryPart.d.ts +10 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatChangesSummaryPart.js +59 -119
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatCodeCitationContentPart.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatCodeCitationContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatCollapsibleContentPart.d.ts +11 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatCollapsibleContentPart.js +31 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatCommandContentPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatCommandContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatConfirmationContentPart.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatConfirmationContentPart.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatConfirmationWidget.d.ts +9 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatConfirmationWidget.js +31 -99
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatContentCodePools.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatContentCodePools.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatDiffBlockPart.d.ts → widget/chatContentParts/chatDiffBlockPart.d.ts} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatElicitationContentPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatElicitationContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatErrorConfirmationPart.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatErrorConfirmationPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatErrorContentPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatErrorContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatExtensionsContentPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatExtensionsContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatInlineAnchorWidget.d.ts → widget/chatContentParts/chatInlineAnchorWidget.d.ts} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatInlineAnchorWidget.js → widget/chatContentParts/chatInlineAnchorWidget.js} +18 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatMarkdownContentPart.d.ts +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatMarkdownContentPart.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatMarkdownDecorationsRenderer.d.ts → widget/chatContentParts/chatMarkdownDecorationsRenderer.d.ts} +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatMarkdownDecorationsRenderer.js → widget/chatContentParts/chatMarkdownDecorationsRenderer.js} +9 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatMcpServersInteractionContentPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatMcpServersInteractionContentPart.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatMultiDiffContentPart.d.ts +4 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatMultiDiffContentPart.js +31 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatProgressContentPart.d.ts +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatProgressContentPart.js +9 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatPullRequestContentPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatPullRequestContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatQuotaExceededPart.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatQuotaExceededPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatReferencesContentPart.d.ts +7 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatReferencesContentPart.js +20 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatSuggestNextWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatTaskContentPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatTaskContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatTextEditContentPart.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatTextEditContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatTextEditContentPart.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatThinkingContentPart.d.ts +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatThinkingContentPart.js +71 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatTodoListWidget.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatTodoListWidget.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatToolInputOutputContentPart.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatToolInputOutputContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatToolOutputContentSubPart.d.ts +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatToolOutputContentSubPart.js +27 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatTreeContentPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatTreeContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{codeBlockPart.d.ts → widget/chatContentParts/codeBlockPart.d.ts} +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{codeBlockPart.js → widget/chatContentParts/codeBlockPart.js} +19 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/media/chatThinkingContent.css +17 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/abstractToolConfirmationSubPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatExtensionsInstallToolSubPart.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatExtensionsInstallToolSubPart.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +4 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatResultListSubPart.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatResultListSubPart.js +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +107 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatTerminalToolProgressPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatTerminalToolProgressPart.js +19 -132
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolConfirmationSubPart.d.ts +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolConfirmationSubPart.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolInvocationPart.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolInvocationPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolInvocationSubPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolInvocationSubPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolOutputPart.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolOutputPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +11 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolProgressPart.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolProgressPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatDragAndDrop.d.ts → widget/chatDragAndDrop.d.ts} +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatDragAndDrop.js → widget/chatDragAndDrop.js} +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatListRenderer.d.ts → widget/chatListRenderer.d.ts} +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatListRenderer.js → widget/chatListRenderer.js} +41 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatWidget.d.ts → widget/chatWidget.d.ts} +18 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatWidget.js → widget/chatWidget.js} +77 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatFollowups.d.ts → widget/input/chatFollowups.d.ts} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatFollowups.js → widget/input/chatFollowups.js} +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatInputPart.d.ts → widget/input/chatInputPart.d.ts} +14 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatInputPart.js → widget/input/chatInputPart.js} +75 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatSelectedTools.d.ts → widget/input/chatSelectedTools.d.ts} +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatSelectedTools.js → widget/input/chatSelectedTools.js} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/chatInputCompletions.js +36 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/{modelPicker → widget/input}/modePickerActionItem.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{modelPicker → widget/input}/modePickerActionItem.js +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/{modelPicker → widget/input}/modelPickerActionItem.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{modelPicker → widget/input}/modelPickerActionItem.js +21 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/{media → widget/media}/chat.css +17 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/{media → widget/media}/chatViewWelcome.css +3 -1
- package/vscode/src/vs/workbench/contrib/chat/common/{chatColors.js → widget/chatColors.js} +13 -13
- package/vscode/src/vs/workbench/contrib/chat/common/{chatWidgetHistoryService.d.ts → widget/chatWidgetHistoryService.d.ts} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/{chatWidgetHistoryService.js → widget/chatWidgetHistoryService.js} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/{codeBlockModelCollection.d.ts → widget/codeBlockModelCollection.d.ts} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/{codeBlockModelCollection.js → widget/codeBlockModelCollection.js} +4 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +7 -8
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +63 -63
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +3 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +16 -18
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.d.ts +1 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +8 -18
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +12 -12
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +35 -54
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.d.ts +35 -4
- package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +129 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.js +0 -76
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +0 -48
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +0 -373
- /package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/media/{chatSessionAction.css → chatSessionPickerActionItem.css} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentMarkdownRenderer.d.ts → widget/chatContentMarkdownRenderer.d.ts} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentMarkdownRenderer.js → widget/chatContentMarkdownRenderer.js} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatCollections.d.ts +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatCollections.js +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatDiffBlockPart.js → widget/chatContentParts/chatDiffBlockPart.js} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatSuggestNextWidget.d.ts +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatTextEditContentPart.service.js +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → widget/chatContentParts/media}/chatCodeBlockPill.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/media/chatConfirmationWidget.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/media/chatExtensionsContent.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → widget/chatContentParts/media}/chatInlineAnchorWidget.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/media/chatMarkdownPart.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/media/chatMcpServersInteractionContent.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/media/chatPullRequestContent.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/media/chatTerminalToolProgressPart.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{codeBlockPart.css → widget/chatContentParts/media/codeBlockPart.css} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatOptions.d.ts → widget/chatOptions.d.ts} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatOptions.js → widget/chatOptions.js} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatInputPartWidgets.d.ts → widget/input/chatInputPartWidgets.d.ts} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatInputPartWidgets.js → widget/input/chatInputPartWidgets.js} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/chatInputCompletions.d.ts +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → widget/media}/chatAgentHover.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/common/{chatColors.d.ts → widget/chatColors.d.ts} +0 -0
|
@@ -31,8 +31,8 @@ import { IPreferencesService } from '@codingame/monaco-vscode-api/vscode/vs/work
|
|
|
31
31
|
import { ITerminalChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service';
|
|
32
32
|
import { TerminalContribSettingId, TerminalContribCommandId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/terminalContribExports';
|
|
33
33
|
import { migrateLegacyTerminalToolSpecificData } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chat';
|
|
34
|
-
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
35
|
-
import { ToolConfirmKind, IChatToolInvocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
34
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
35
|
+
import { ToolConfirmKind, IChatToolInvocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
36
36
|
import { AcceptToolConfirmationActionId, SkipToolConfirmationActionId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatConstants';
|
|
37
37
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
38
38
|
import { ChatCustomConfirmationWidget } from '../chatConfirmationWidget.js';
|
|
@@ -79,7 +79,7 @@ let ChatTerminalToolConfirmationSubPart = class ChatTerminalToolConfirmationSubP
|
|
|
79
79
|
moreActions = [];
|
|
80
80
|
if (!autoApproveWarningAccepted) {
|
|
81
81
|
moreActions.push({
|
|
82
|
-
label: ( localize(
|
|
82
|
+
label: ( localize(5716, 'Enable Auto Approve...')),
|
|
83
83
|
data: {
|
|
84
84
|
type: 'enable'
|
|
85
85
|
}
|
|
@@ -112,7 +112,8 @@ let ChatTerminalToolConfirmationSubPart = class ChatTerminalToolConfirmationSubP
|
|
|
112
112
|
}
|
|
113
113
|
};
|
|
114
114
|
const languageId = this.languageService.getLanguageIdByLanguageName(terminalData.language ?? 'sh') ?? 'shellscript';
|
|
115
|
-
const
|
|
115
|
+
const initialContent = (terminalData.commandLine.toolEdited ?? terminalData.commandLine.original).trimStart();
|
|
116
|
+
const model = this._register(this.modelService.createModel(initialContent, this.languageService.createById(languageId), this._getUniqueCodeBlockUri(), true));
|
|
116
117
|
thenRegisterOrDispose(textModelService.createModelReference(model.uri), this._store);
|
|
117
118
|
const editor = this._register(this.editorPool.get());
|
|
118
119
|
const renderPromise = editor.object.render({
|
|
@@ -140,7 +141,8 @@ let ChatTerminalToolConfirmationSubPart = class ChatTerminalToolConfirmationSubP
|
|
|
140
141
|
this._onDidChangeHeight.fire();
|
|
141
142
|
}));
|
|
142
143
|
this._register(model.onDidChangeContent(e => {
|
|
143
|
-
|
|
144
|
+
const currentValue = model.getValue();
|
|
145
|
+
terminalData.commandLine.userEdited = currentValue !== initialContent ? currentValue : undefined;
|
|
144
146
|
}));
|
|
145
147
|
const elements = h('.chat-confirmation-message-terminal', [
|
|
146
148
|
h('.chat-confirmation-message-terminal-editor@editor'),
|
|
@@ -182,10 +184,10 @@ let ChatTerminalToolConfirmationSubPart = class ChatTerminalToolConfirmationSubP
|
|
|
182
184
|
const optedIn = await this._showAutoApproveWarning();
|
|
183
185
|
if (optedIn) {
|
|
184
186
|
this.storageService.store(TerminalToolConfirmationStorageKeys.TerminalAutoApproveWarningAccepted, true, StorageScope.APPLICATION, StorageTarget.USER);
|
|
185
|
-
if (
|
|
187
|
+
if (terminalData.autoApproveInfo) {
|
|
186
188
|
toolConfirmKind = ToolConfirmKind.UserAction;
|
|
187
189
|
}
|
|
188
|
-
else {
|
|
190
|
+
else if (terminalCustomActions) {
|
|
189
191
|
for (const action of terminalCustomActions) {
|
|
190
192
|
if (!(action instanceof Separator)) {
|
|
191
193
|
action.disabled = false;
|
|
@@ -206,30 +208,59 @@ let ChatTerminalToolConfirmationSubPart = class ChatTerminalToolConfirmationSubP
|
|
|
206
208
|
}
|
|
207
209
|
case 'newRule': {
|
|
208
210
|
const newRules = asArray(data.rule);
|
|
209
|
-
const
|
|
210
|
-
const
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
211
|
+
const sessionRules = newRules.filter(r => r.scope === 'session');
|
|
212
|
+
const workspaceRules = newRules.filter(r => r.scope === 'workspace');
|
|
213
|
+
const userRules = newRules.filter(r => r.scope === 'user');
|
|
214
|
+
const chatSessionId = this.context.element.sessionId;
|
|
215
|
+
for (const rule of sessionRules) {
|
|
216
|
+
this.terminalChatService.addSessionAutoApproveRule(chatSessionId, rule.key, rule.value);
|
|
217
|
+
}
|
|
218
|
+
if (workspaceRules.length > 0) {
|
|
219
|
+
const inspect = this.configurationService.inspect(TerminalContribSettingId.AutoApprove);
|
|
220
|
+
const oldValue = inspect.workspaceValue ?? {};
|
|
221
|
+
if (isObject(oldValue)) {
|
|
222
|
+
const newValue = { ...oldValue };
|
|
223
|
+
for (const rule of workspaceRules) {
|
|
224
|
+
newValue[rule.key] = rule.value;
|
|
225
|
+
}
|
|
226
|
+
await this.configurationService.updateValue(TerminalContribSettingId.AutoApprove, newValue, ConfigurationTarget.WORKSPACE);
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
this.preferencesService.openSettings({
|
|
230
|
+
jsonEditor: true,
|
|
231
|
+
target: ConfigurationTarget.WORKSPACE,
|
|
232
|
+
revealSetting: { key: TerminalContribSettingId.AutoApprove },
|
|
233
|
+
});
|
|
234
|
+
throw ( new ErrorNoTelemetry(`Cannot add new rule, existing workspace setting is unexpected format`));
|
|
216
235
|
}
|
|
217
236
|
}
|
|
218
|
-
|
|
219
|
-
this.
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
237
|
+
if (userRules.length > 0) {
|
|
238
|
+
const inspect = this.configurationService.inspect(TerminalContribSettingId.AutoApprove);
|
|
239
|
+
const oldValue = inspect.userValue ?? {};
|
|
240
|
+
if (isObject(oldValue)) {
|
|
241
|
+
const newValue = { ...oldValue };
|
|
242
|
+
for (const rule of userRules) {
|
|
243
|
+
newValue[rule.key] = rule.value;
|
|
244
|
+
}
|
|
245
|
+
await this.configurationService.updateValue(TerminalContribSettingId.AutoApprove, newValue, ConfigurationTarget.USER);
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
this.preferencesService.openSettings({
|
|
249
|
+
jsonEditor: true,
|
|
250
|
+
target: ConfigurationTarget.USER,
|
|
251
|
+
revealSetting: { key: TerminalContribSettingId.AutoApprove },
|
|
252
|
+
});
|
|
253
|
+
throw ( new ErrorNoTelemetry(`Cannot add new rule, existing setting is unexpected format`));
|
|
254
|
+
}
|
|
227
255
|
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
256
|
+
function formatRuleLinks(rules, scope) {
|
|
257
|
+
return ( rules.map(e => {
|
|
258
|
+
if (scope === 'session') {
|
|
259
|
+
return `\`${e.key}\``;
|
|
260
|
+
}
|
|
261
|
+
const target = scope === 'workspace' ? ConfigurationTarget.WORKSPACE : ConfigurationTarget.USER;
|
|
262
|
+
const settingsUri = createCommandUri(TerminalContribCommandId.OpenTerminalSettingsLink, target);
|
|
263
|
+
return `[\`${e.key}\`](${( settingsUri.toString())} "${( localize(5717, 'View rule in settings'))}")`;
|
|
233
264
|
})).join(', ');
|
|
234
265
|
}
|
|
235
266
|
const mdTrustSettings = {
|
|
@@ -237,11 +268,48 @@ let ChatTerminalToolConfirmationSubPart = class ChatTerminalToolConfirmationSubP
|
|
|
237
268
|
enabledCommands: [TerminalContribCommandId.OpenTerminalSettingsLink]
|
|
238
269
|
}
|
|
239
270
|
};
|
|
240
|
-
|
|
241
|
-
|
|
271
|
+
const parts = [];
|
|
272
|
+
if (sessionRules.length > 0) {
|
|
273
|
+
parts.push(sessionRules.length === 1
|
|
274
|
+
? ( localize(
|
|
275
|
+
5718,
|
|
276
|
+
'Session auto approve rule {0} added',
|
|
277
|
+
formatRuleLinks(sessionRules, 'session')
|
|
278
|
+
))
|
|
279
|
+
: ( localize(
|
|
280
|
+
5719,
|
|
281
|
+
'Session auto approve rules {0} added',
|
|
282
|
+
formatRuleLinks(sessionRules, 'session')
|
|
283
|
+
)));
|
|
284
|
+
}
|
|
285
|
+
if (workspaceRules.length > 0) {
|
|
286
|
+
parts.push(workspaceRules.length === 1
|
|
287
|
+
? ( localize(
|
|
288
|
+
5720,
|
|
289
|
+
'Workspace auto approve rule {0} added',
|
|
290
|
+
formatRuleLinks(workspaceRules, 'workspace')
|
|
291
|
+
))
|
|
292
|
+
: ( localize(
|
|
293
|
+
5721,
|
|
294
|
+
'Workspace auto approve rules {0} added',
|
|
295
|
+
formatRuleLinks(workspaceRules, 'workspace')
|
|
296
|
+
)));
|
|
297
|
+
}
|
|
298
|
+
if (userRules.length > 0) {
|
|
299
|
+
parts.push(userRules.length === 1
|
|
300
|
+
? ( localize(
|
|
301
|
+
5722,
|
|
302
|
+
'User auto approve rule {0} added',
|
|
303
|
+
formatRuleLinks(userRules, 'user')
|
|
304
|
+
))
|
|
305
|
+
: ( localize(
|
|
306
|
+
5723,
|
|
307
|
+
'User auto approve rules {0} added',
|
|
308
|
+
formatRuleLinks(userRules, 'user')
|
|
309
|
+
)));
|
|
242
310
|
}
|
|
243
|
-
|
|
244
|
-
terminalData.autoApproveInfo = ( new MarkdownString((
|
|
311
|
+
if (parts.length > 0) {
|
|
312
|
+
terminalData.autoApproveInfo = ( new MarkdownString(parts.join(', '), mdTrustSettings));
|
|
245
313
|
}
|
|
246
314
|
toolConfirmKind = ToolConfirmKind.UserAction;
|
|
247
315
|
break;
|
|
@@ -263,7 +331,7 @@ let ChatTerminalToolConfirmationSubPart = class ChatTerminalToolConfirmationSubP
|
|
|
263
331
|
enabledCommands: [TerminalContribCommandId.DisableSessionAutoApproval]
|
|
264
332
|
}
|
|
265
333
|
};
|
|
266
|
-
terminalData.autoApproveInfo = ( new MarkdownString(`${( localize(
|
|
334
|
+
terminalData.autoApproveInfo = ( new MarkdownString(`${( localize(5724, 'All commands will be auto approved for this session'))} ([${( localize(5725, 'Disable'))}](${( disableUri.toString())}))`, mdTrustSettings));
|
|
267
335
|
toolConfirmKind = ToolConfirmKind.UserAction;
|
|
268
336
|
break;
|
|
269
337
|
}
|
|
@@ -285,12 +353,12 @@ let ChatTerminalToolConfirmationSubPart = class ChatTerminalToolConfirmationSubP
|
|
|
285
353
|
};
|
|
286
354
|
return [
|
|
287
355
|
{
|
|
288
|
-
...getLabelAndTooltip(( localize(
|
|
356
|
+
...getLabelAndTooltip(( localize(5726, "Allow")), AcceptToolConfirmationActionId),
|
|
289
357
|
data: true,
|
|
290
358
|
moreActions,
|
|
291
359
|
},
|
|
292
360
|
{
|
|
293
|
-
...getLabelAndTooltip(( localize(
|
|
361
|
+
...getLabelAndTooltip(( localize(5727, "Skip")), SkipToolConfirmationActionId, ( localize(5728, 'Proceed without executing this command'))),
|
|
294
362
|
data: { type: 'skip' },
|
|
295
363
|
isSecondary: true,
|
|
296
364
|
},
|
|
@@ -299,9 +367,9 @@ let ChatTerminalToolConfirmationSubPart = class ChatTerminalToolConfirmationSubP
|
|
|
299
367
|
async _showAutoApproveWarning() {
|
|
300
368
|
const promptResult = await this.dialogService.prompt({
|
|
301
369
|
type: Severity.Info,
|
|
302
|
-
message: ( localize(
|
|
370
|
+
message: ( localize(5729, 'Enable terminal auto approve?')),
|
|
303
371
|
buttons: [{
|
|
304
|
-
label: ( localize(
|
|
372
|
+
label: ( localize(5730, 'Enable')),
|
|
305
373
|
run: () => true
|
|
306
374
|
}],
|
|
307
375
|
cancelButton: true,
|
|
@@ -309,11 +377,11 @@ let ChatTerminalToolConfirmationSubPart = class ChatTerminalToolConfirmationSubP
|
|
|
309
377
|
icon: Codicon.shield,
|
|
310
378
|
markdownDetails: [{
|
|
311
379
|
markdown: ( new MarkdownString(( localize(
|
|
312
|
-
|
|
380
|
+
5731,
|
|
313
381
|
'This will enable a configurable subset of commands to run in the terminal autonomously. It provides *best effort protections* and assumes the agent is not acting maliciously.'
|
|
314
382
|
)))),
|
|
315
383
|
}, {
|
|
316
|
-
markdown: ( new MarkdownString(`[${( localize(
|
|
384
|
+
markdown: ( new MarkdownString(`[${( localize(5732, 'Learn more about the potential risks and how to avoid them.'))}](https://code.visualstudio.com/docs/copilot/security#_security-considerations)`))
|
|
317
385
|
}],
|
|
318
386
|
}
|
|
319
387
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
2
|
-
import { IChatToolInvocation, IChatToolInvocationSerialized, type IChatTerminalToolInvocationData, type ILegacyChatTerminalToolInvocationData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
3
|
-
import { CodeBlockModelCollection } from "
|
|
2
|
+
import { IChatToolInvocation, IChatToolInvocationSerialized, type IChatTerminalToolInvocationData, type ILegacyChatTerminalToolInvocationData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
3
|
+
import { CodeBlockModelCollection } from "../../../../common/widget/codeBlockModelCollection.js";
|
|
4
4
|
import { IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
5
5
|
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
6
|
-
import { IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts";
|
|
6
|
+
import { IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts";
|
|
7
7
|
import { BaseChatToolInvocationSubPart } from "./chatToolInvocationSubPart.js";
|
|
8
8
|
import { Action, IAction } from "@codingame/monaco-vscode-api/vscode/vs/base/common/actions";
|
|
9
9
|
import { IChatTerminalToolProgressPart, ITerminalInstance } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal";
|
|
@@ -28,18 +28,15 @@ import { stripIcons } from '@codingame/monaco-vscode-api/vscode/vs/base/common/i
|
|
|
28
28
|
import { IAccessibleViewService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView.service';
|
|
29
29
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
30
30
|
import { AccessibilityVerbositySettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
31
|
-
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
31
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
32
32
|
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
33
|
-
import { DetachedTerminalCommandMirror } from '
|
|
34
|
-
import { DetachedProcessInfo } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/detachedTerminal';
|
|
33
|
+
import { DetachedTerminalCommandMirror, DetachedTerminalSnapshotMirror } from '../../../../../terminal/browser/chatTerminalCommandMirror.js';
|
|
35
34
|
import { TerminalLocation } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal';
|
|
36
35
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
37
36
|
import { TerminalContribCommandId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/terminalContribExports';
|
|
38
37
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
39
38
|
import { isNumber } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
40
39
|
import { removeAnsiEscapeCodes } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
41
|
-
import { Color } from '@codingame/monaco-vscode-api/vscode/vs/base/common/color';
|
|
42
|
-
import { TERMINAL_BACKGROUND_COLOR } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/common/terminalColorRegistry';
|
|
43
40
|
import { PANEL_BACKGROUND } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/theme';
|
|
44
41
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colorUtils';
|
|
45
42
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/baseColors';
|
|
@@ -186,7 +183,7 @@ let ChatTerminalToolProgressPart = class ChatTerminalToolProgressPart extends Ba
|
|
|
186
183
|
h('.chat-terminal-content-message@message')
|
|
187
184
|
]);
|
|
188
185
|
this._titleElement = elements.title;
|
|
189
|
-
const command = terminalData.commandLine.userEdited ?? terminalData.commandLine.toolEdited ?? terminalData.commandLine.original;
|
|
186
|
+
const command = (terminalData.commandLine.userEdited ?? terminalData.commandLine.toolEdited ?? terminalData.commandLine.original).trimStart();
|
|
190
187
|
this._commandText = command;
|
|
191
188
|
this._terminalOutputContextKey = ChatContextKeys.inChatTerminalToolOutput.bindTo(this._contextKeyService);
|
|
192
189
|
this._decoration = this._register(this._instantiationService.createInstance(TerminalCommandDecoration, {
|
|
@@ -241,7 +238,7 @@ let ChatTerminalToolProgressPart = class ChatTerminalToolProgressPart extends Ba
|
|
|
241
238
|
const markdownOptions = {
|
|
242
239
|
codeBlockRenderOptions,
|
|
243
240
|
accessibilityOptions: pastTenseMessage ? {
|
|
244
|
-
statusMessage: ( localize(
|
|
241
|
+
statusMessage: ( localize(5733, '{0}', stripIcons(pastTenseMessage)))
|
|
245
242
|
} : undefined
|
|
246
243
|
};
|
|
247
244
|
this.markdownPart = this._register(_instantiationService.createInstance(ChatMarkdownContentPart, chatMarkdownContent, context, editorPool, false, codeBlockStartIndex, renderer, {}, currentWidthDelegate(), codeBlockModelCollection, markdownOptions));
|
|
@@ -614,7 +611,7 @@ let ChatTerminalToolOutputSection = class ChatTerminalToolOutputSection extends
|
|
|
614
611
|
if (!commandText) {
|
|
615
612
|
return;
|
|
616
613
|
}
|
|
617
|
-
const ariaLabel = ( localize(
|
|
614
|
+
const ariaLabel = ( localize(5734, 'Terminal output for {0}', commandText));
|
|
618
615
|
const scrollableDomNode = this._scrollableContainer.getDomNode();
|
|
619
616
|
scrollableDomNode.setAttribute('role', 'region');
|
|
620
617
|
const accessibleViewHint = this._accessibleViewService.getOpenAriaHint(AccessibilityVerbositySettingId.TerminalChatOutput);
|
|
@@ -629,26 +626,26 @@ let ChatTerminalToolOutputSection = class ChatTerminalToolOutputSection extends
|
|
|
629
626
|
if (!commandText) {
|
|
630
627
|
return undefined;
|
|
631
628
|
}
|
|
632
|
-
const commandHeader = ( localize(
|
|
629
|
+
const commandHeader = ( localize(5735, 'Command: {0}', commandText));
|
|
633
630
|
if (command) {
|
|
634
631
|
const rawOutput = command.getOutput();
|
|
635
632
|
if (!rawOutput || rawOutput.trim().length === 0) {
|
|
636
|
-
return `${commandHeader}\n${( localize(
|
|
633
|
+
return `${commandHeader}\n${( localize(5736, 'No output was produced by the command.'))}`;
|
|
637
634
|
}
|
|
638
635
|
const lines = rawOutput.split('\n');
|
|
639
636
|
return `${commandHeader}\n${lines.join('\n').trimEnd()}`;
|
|
640
637
|
}
|
|
641
638
|
const snapshot = this._getTerminalCommandOutput();
|
|
642
639
|
if (!snapshot) {
|
|
643
|
-
return `${commandHeader}\n${( localize(
|
|
640
|
+
return `${commandHeader}\n${( localize(5737, 'Command output is no longer available.'))}`;
|
|
644
641
|
}
|
|
645
642
|
const plain = removeAnsiEscapeCodes((snapshot.text ?? ''));
|
|
646
643
|
if (!plain.trim().length) {
|
|
647
|
-
return `${commandHeader}\n${( localize(
|
|
644
|
+
return `${commandHeader}\n${( localize(5736, 'No output was produced by the command.'))}`;
|
|
648
645
|
}
|
|
649
646
|
let outputText = plain.trimEnd();
|
|
650
647
|
if (snapshot.truncated) {
|
|
651
|
-
outputText += `\n${( localize(
|
|
648
|
+
outputText += `\n${( localize(5738, 'Output truncated.'))}`;
|
|
652
649
|
}
|
|
653
650
|
return `${commandHeader}\n${outputText}`;
|
|
654
651
|
}
|
|
@@ -697,7 +694,7 @@ let ChatTerminalToolOutputSection = class ChatTerminalToolOutputSection extends
|
|
|
697
694
|
await this._mirror.attach(this._terminalContainer);
|
|
698
695
|
const result = await this._mirror.renderCommand();
|
|
699
696
|
if (!result || result.lineCount === 0) {
|
|
700
|
-
this._showEmptyMessage(( localize(
|
|
697
|
+
this._showEmptyMessage(( localize(5736, 'No output was produced by the command.')));
|
|
701
698
|
}
|
|
702
699
|
else {
|
|
703
700
|
this._hideEmptyMessage();
|
|
@@ -720,7 +717,7 @@ let ChatTerminalToolOutputSection = class ChatTerminalToolOutputSection extends
|
|
|
720
717
|
this._hideEmptyMessage();
|
|
721
718
|
}
|
|
722
719
|
else {
|
|
723
|
-
this._showEmptyMessage(( localize(
|
|
720
|
+
this._showEmptyMessage(( localize(5736, 'No output was produced by the command.')));
|
|
724
721
|
}
|
|
725
722
|
const lineCount = result?.lineCount ?? snapshot.lineCount ?? 0;
|
|
726
723
|
this._layoutOutput(lineCount);
|
|
@@ -729,10 +726,10 @@ let ChatTerminalToolOutputSection = class ChatTerminalToolOutputSection extends
|
|
|
729
726
|
clearNode(this._terminalContainer);
|
|
730
727
|
this._lastRenderedLineCount = undefined;
|
|
731
728
|
if (!liveTerminalInstance) {
|
|
732
|
-
this._showEmptyMessage(( localize(
|
|
729
|
+
this._showEmptyMessage(( localize(5739, 'Terminal is no longer available.')));
|
|
733
730
|
}
|
|
734
731
|
else {
|
|
735
|
-
this._showEmptyMessage(( localize(
|
|
732
|
+
this._showEmptyMessage(( localize(5740, 'Command information is not available.')));
|
|
736
733
|
}
|
|
737
734
|
}
|
|
738
735
|
async _resolveLiveTerminal() {
|
|
@@ -848,119 +845,9 @@ ChatTerminalToolOutputSection = ( __decorate([
|
|
|
848
845
|
( __param(9, IThemeService)),
|
|
849
846
|
( __param(10, IContextKeyService))
|
|
850
847
|
], ChatTerminalToolOutputSection));
|
|
851
|
-
let DetachedTerminalSnapshotMirror = class DetachedTerminalSnapshotMirror extends Disposable {
|
|
852
|
-
constructor(output, _getTheme, _terminalService, _contextKeyService) {
|
|
853
|
-
super();
|
|
854
|
-
this._getTheme = _getTheme;
|
|
855
|
-
this._terminalService = _terminalService;
|
|
856
|
-
this._contextKeyService = _contextKeyService;
|
|
857
|
-
this._dirty = true;
|
|
858
|
-
this._output = output;
|
|
859
|
-
}
|
|
860
|
-
setOutput(output) {
|
|
861
|
-
this._output = output;
|
|
862
|
-
this._dirty = true;
|
|
863
|
-
}
|
|
864
|
-
async attach(container) {
|
|
865
|
-
const terminal = await this._getTerminal();
|
|
866
|
-
container.classList.add('chat-terminal-output-terminal');
|
|
867
|
-
if (this._attachedContainer !== container || container.firstChild === null) {
|
|
868
|
-
terminal.attachToElement(container);
|
|
869
|
-
this._attachedContainer = container;
|
|
870
|
-
}
|
|
871
|
-
this._container = container;
|
|
872
|
-
this._applyTheme(container);
|
|
873
|
-
}
|
|
874
|
-
async render() {
|
|
875
|
-
const output = this._output;
|
|
876
|
-
if (!output) {
|
|
877
|
-
return undefined;
|
|
878
|
-
}
|
|
879
|
-
if (!this._dirty) {
|
|
880
|
-
return { lineCount: this._lastRenderedLineCount ?? output.lineCount };
|
|
881
|
-
}
|
|
882
|
-
const terminal = await this._getTerminal();
|
|
883
|
-
terminal.xterm.clearBuffer();
|
|
884
|
-
terminal.xterm.clearSearchDecorations?.();
|
|
885
|
-
if (this._container) {
|
|
886
|
-
this._applyTheme(this._container);
|
|
887
|
-
}
|
|
888
|
-
const text = output.text ?? '';
|
|
889
|
-
const lineCount = output.lineCount ?? this._estimateLineCount(text);
|
|
890
|
-
if (!text) {
|
|
891
|
-
this._dirty = false;
|
|
892
|
-
this._lastRenderedLineCount = lineCount;
|
|
893
|
-
return { lineCount: 0 };
|
|
894
|
-
}
|
|
895
|
-
await ( new Promise(resolve => terminal.xterm.write(text, resolve)));
|
|
896
|
-
this._dirty = false;
|
|
897
|
-
this._lastRenderedLineCount = lineCount;
|
|
898
|
-
return { lineCount };
|
|
899
|
-
}
|
|
900
|
-
_estimateLineCount(text) {
|
|
901
|
-
if (!text) {
|
|
902
|
-
return 0;
|
|
903
|
-
}
|
|
904
|
-
const sanitized = text.replace(/\r/g, '');
|
|
905
|
-
const segments = sanitized.split('\n');
|
|
906
|
-
const count = sanitized.endsWith('\n') ? segments.length - 1 : segments.length;
|
|
907
|
-
return Math.max(count, 1);
|
|
908
|
-
}
|
|
909
|
-
_applyTheme(container) {
|
|
910
|
-
const theme = this._getTheme();
|
|
911
|
-
if (!theme) {
|
|
912
|
-
container.style.removeProperty('background-color');
|
|
913
|
-
container.style.removeProperty('color');
|
|
914
|
-
return;
|
|
915
|
-
}
|
|
916
|
-
if (theme.background) {
|
|
917
|
-
container.style.backgroundColor = theme.background;
|
|
918
|
-
}
|
|
919
|
-
if (theme.foreground) {
|
|
920
|
-
container.style.color = theme.foreground;
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
async _getTerminal() {
|
|
924
|
-
if (!this._detachedTerminal) {
|
|
925
|
-
this._detachedTerminal = this._createTerminal();
|
|
926
|
-
}
|
|
927
|
-
return this._detachedTerminal;
|
|
928
|
-
}
|
|
929
|
-
async _createTerminal() {
|
|
930
|
-
const terminal = await this._terminalService.createDetachedTerminal({
|
|
931
|
-
cols: 80,
|
|
932
|
-
rows: 10,
|
|
933
|
-
readonly: true,
|
|
934
|
-
processInfo: ( new DetachedProcessInfo({ initialCwd: '' })),
|
|
935
|
-
disableOverviewRuler: true,
|
|
936
|
-
colorProvider: {
|
|
937
|
-
getBackgroundColor: theme => {
|
|
938
|
-
const storedBackground = this._getTheme()?.background;
|
|
939
|
-
if (storedBackground) {
|
|
940
|
-
const color = ( Color.fromHex(storedBackground));
|
|
941
|
-
if (color) {
|
|
942
|
-
return color;
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
const terminalBackground = theme.getColor(TERMINAL_BACKGROUND_COLOR);
|
|
946
|
-
if (terminalBackground) {
|
|
947
|
-
return terminalBackground;
|
|
948
|
-
}
|
|
949
|
-
const isInEditor = ChatContextKeys.inChatEditor.getValue(this._contextKeyService);
|
|
950
|
-
return theme.getColor(isInEditor ? editorBackground : PANEL_BACKGROUND);
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
});
|
|
954
|
-
return this._register(terminal);
|
|
955
|
-
}
|
|
956
|
-
};
|
|
957
|
-
DetachedTerminalSnapshotMirror = ( __decorate([
|
|
958
|
-
( __param(2, ITerminalService)),
|
|
959
|
-
( __param(3, IContextKeyService))
|
|
960
|
-
], DetachedTerminalSnapshotMirror));
|
|
961
848
|
let ToggleChatTerminalOutputAction = class ToggleChatTerminalOutputAction extends Action {
|
|
962
849
|
constructor(_toggle, _keybindingService, _telemetryService) {
|
|
963
|
-
super(TerminalContribCommandId.ToggleChatTerminalOutput, ( localize(
|
|
850
|
+
super(TerminalContribCommandId.ToggleChatTerminalOutput, ( localize(5741, 'Show Output')), ThemeIcon.asClassName(Codicon.chevronRight), true);
|
|
964
851
|
this._toggle = _toggle;
|
|
965
852
|
this._keybindingService = _keybindingService;
|
|
966
853
|
this._telemetryService = _telemetryService;
|
|
@@ -983,11 +870,11 @@ let ToggleChatTerminalOutputAction = class ToggleChatTerminalOutputAction extend
|
|
|
983
870
|
}
|
|
984
871
|
_updatePresentation() {
|
|
985
872
|
if (this._expanded) {
|
|
986
|
-
this.label = ( localize(
|
|
873
|
+
this.label = ( localize(5742, 'Hide Output'));
|
|
987
874
|
this.class = ThemeIcon.asClassName(Codicon.chevronDown);
|
|
988
875
|
}
|
|
989
876
|
else {
|
|
990
|
-
this.label = ( localize(
|
|
877
|
+
this.label = ( localize(5741, 'Show Output'));
|
|
991
878
|
this.class = ThemeIcon.asClassName(Codicon.chevronRight);
|
|
992
879
|
}
|
|
993
880
|
}
|
|
@@ -1003,7 +890,7 @@ ToggleChatTerminalOutputAction = ( __decorate([
|
|
|
1003
890
|
], ToggleChatTerminalOutputAction));
|
|
1004
891
|
let FocusChatInstanceAction = class FocusChatInstanceAction extends Action {
|
|
1005
892
|
constructor(_instance, _command, _commandUri, _commandId, isTerminalHidden, _terminalService, _terminalEditorService, _terminalGroupService, _keybindingService, _telemetryService) {
|
|
1006
|
-
super(TerminalContribCommandId.FocusChatInstanceAction, isTerminalHidden ? ( localize(
|
|
893
|
+
super(TerminalContribCommandId.FocusChatInstanceAction, isTerminalHidden ? ( localize(5743, 'Show and Focus Terminal')) : ( localize(5744, 'Focus Terminal')), ThemeIcon.asClassName(Codicon.openInProduct), true);
|
|
1007
894
|
this._instance = _instance;
|
|
1008
895
|
this._command = _command;
|
|
1009
896
|
this._commandUri = _commandUri;
|
|
@@ -1016,7 +903,7 @@ let FocusChatInstanceAction = class FocusChatInstanceAction extends Action {
|
|
|
1016
903
|
this._updateTooltip();
|
|
1017
904
|
}
|
|
1018
905
|
async run() {
|
|
1019
|
-
this.label = ( localize(
|
|
906
|
+
this.label = this._instance?.shellLaunchConfig.hideFromUser ? ( localize(5745, 'Show and Focus Terminal')) : ( localize(5744, 'Focus Terminal'));
|
|
1020
907
|
this._updateTooltip();
|
|
1021
908
|
let target = 'none';
|
|
1022
909
|
let location = 'panel';
|
|
@@ -7,14 +7,14 @@ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
7
7
|
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
8
8
|
import { IMarkdownRenderer } from "@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer";
|
|
9
9
|
import { IMarkerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/markers/common/markers.service";
|
|
10
|
-
import { IChatToolInvocation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
11
|
-
import { CodeBlockModelCollection } from "
|
|
12
|
-
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service";
|
|
13
|
-
import { ILanguageModelToolsConfirmationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsConfirmationService.service";
|
|
10
|
+
import { IChatToolInvocation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
11
|
+
import { CodeBlockModelCollection } from "../../../../common/widget/codeBlockModelCollection.js";
|
|
12
|
+
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service";
|
|
13
|
+
import { ILanguageModelToolsConfirmationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsConfirmationService.service";
|
|
14
14
|
import { IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
15
15
|
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
16
|
-
import { IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts";
|
|
17
|
-
import { IChatMarkdownAnchorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.service";
|
|
16
|
+
import { IChatContentPartRenderContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts";
|
|
17
|
+
import { IChatMarkdownAnchorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownAnchorService.service";
|
|
18
18
|
import { AbstractToolConfirmationSubPart } from "./abstractToolConfirmationSubPart.js";
|
|
19
19
|
import { EditorPool } from "../chatContentCodePools.js";
|
|
20
20
|
export declare class ToolConfirmationSubPart extends AbstractToolConfirmationSubPart {
|
|
@@ -18,14 +18,14 @@ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
18
18
|
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
19
19
|
import { MarkerSeverity } from '@codingame/monaco-vscode-api/vscode/vs/platform/markers/common/markers';
|
|
20
20
|
import { IMarkerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markers/common/markers.service';
|
|
21
|
-
import { ToolConfirmKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
22
|
-
import { createToolInputUri, createToolSchemaUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService';
|
|
23
|
-
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service';
|
|
24
|
-
import { ILanguageModelToolsConfirmationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsConfirmationService.service';
|
|
21
|
+
import { ToolConfirmKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
22
|
+
import { createToolInputUri, createToolSchemaUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
23
|
+
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
|
|
24
|
+
import { ILanguageModelToolsConfirmationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsConfirmationService.service';
|
|
25
25
|
import { SkipToolConfirmationActionId, AcceptToolConfirmationActionId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatConstants';
|
|
26
26
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
27
|
-
import { renderFileWidgets } from '
|
|
28
|
-
import { IChatMarkdownAnchorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.service';
|
|
27
|
+
import { renderFileWidgets } from '../chatInlineAnchorWidget.js';
|
|
28
|
+
import { IChatMarkdownAnchorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownAnchorService.service';
|
|
29
29
|
import { ChatMarkdownContentPart } from '../chatMarkdownContentPart.js';
|
|
30
30
|
import { AbstractToolConfirmationSubPart } from './abstractToolConfirmationSubPart.js';
|
|
31
31
|
|
|
@@ -54,8 +54,8 @@ let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractTool
|
|
|
54
54
|
this.render({
|
|
55
55
|
allowActionId: AcceptToolConfirmationActionId,
|
|
56
56
|
skipActionId: SkipToolConfirmationActionId,
|
|
57
|
-
allowLabel: toolInvocation.confirmationMessages.confirmResults ? ( localize(
|
|
58
|
-
skipLabel: ( localize(
|
|
57
|
+
allowLabel: toolInvocation.confirmationMessages.confirmResults ? ( localize(5746, "Allow and Review")) : ( localize(5747, "Allow")),
|
|
58
|
+
skipLabel: ( localize(5748, 'Proceed without running this tool')),
|
|
59
59
|
partType: 'chatToolConfirmation',
|
|
60
60
|
subtitle: typeof toolInvocation.originMessage === 'string' ? toolInvocation.originMessage : toolInvocation.originMessage?.value,
|
|
61
61
|
});
|
|
@@ -89,7 +89,7 @@ let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractTool
|
|
|
89
89
|
}
|
|
90
90
|
if (this.toolInvocation.confirmationMessages?.confirmResults) {
|
|
91
91
|
actions.unshift({
|
|
92
|
-
label: ( localize(
|
|
92
|
+
label: ( localize(5749, 'Allow and Skip Reviewing Result')),
|
|
93
93
|
data: () => {
|
|
94
94
|
this.toolInvocation.confirmationMessages.confirmResults = undefined;
|
|
95
95
|
this.confirmWith(this.toolInvocation, { type: ToolConfirmKind.UserAction });
|
|
@@ -118,7 +118,7 @@ let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractTool
|
|
|
118
118
|
h('.message@messageContainer', [
|
|
119
119
|
h('.message-wrapper@message'),
|
|
120
120
|
h('.see-more@showMore', [
|
|
121
|
-
h('a', [( localize(
|
|
121
|
+
h('a', [( localize(5750, "Show More"))])
|
|
122
122
|
]),
|
|
123
123
|
]),
|
|
124
124
|
h('.editor@editor'),
|
|
@@ -126,7 +126,7 @@ let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractTool
|
|
|
126
126
|
]);
|
|
127
127
|
if (toolInvocation.toolSpecificData?.kind === 'input' && toolInvocation.toolSpecificData.rawInput && !isEmptyObject(toolInvocation.toolSpecificData.rawInput)) {
|
|
128
128
|
const titleEl = createElement('h3');
|
|
129
|
-
titleEl.textContent = ( localize(
|
|
129
|
+
titleEl.textContent = ( localize(5751, "Input"));
|
|
130
130
|
elements.editor.appendChild(titleEl);
|
|
131
131
|
const inputData = toolInvocation.toolSpecificData;
|
|
132
132
|
const codeBlockRenderOptions = {
|
|
@@ -203,7 +203,7 @@ let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractTool
|
|
|
203
203
|
elements.editor.append(editor.object.element);
|
|
204
204
|
if (canSeeMore) {
|
|
205
205
|
const seeMore = h('div.see-more', [h('a@link')]);
|
|
206
|
-
seeMore.link.textContent = ( localize(
|
|
206
|
+
seeMore.link.textContent = ( localize(5752, "See more"));
|
|
207
207
|
this._register(addDisposableGenericMouseDownListener(seeMore.link, () => {
|
|
208
208
|
try {
|
|
209
209
|
const parsed = JSON.parse(model.getValue());
|
|
@@ -250,7 +250,7 @@ let ToolConfirmationSubPart = class ToolConfirmationSubPart extends AbstractTool
|
|
|
250
250
|
_makeMarkdownPart(container, message, codeBlockRenderOptions) {
|
|
251
251
|
const part = this._register(this.instantiationService.createInstance(ChatMarkdownContentPart, {
|
|
252
252
|
kind: 'markdownContent',
|
|
253
|
-
content: typeof message === 'string' ? ( new MarkdownString()).appendMarkdown(message) : message
|
|
253
|
+
content: typeof message === 'string' ? ( new MarkdownString()).appendMarkdown(message) : message,
|
|
254
254
|
}, this.context, this.editorPool, false, this.codeBlockStartIndex, this.renderer, undefined, this.currentWidthDelegate(), this.codeBlockModelCollection, { codeBlockRenderOptions }));
|
|
255
255
|
renderFileWidgets(part.domNode, this.instantiationService, this.chatMarkdownAnchorService, this._store);
|
|
256
256
|
container.append(part.domNode);
|