@codingame/monaco-vscode-katex-common 30.0.1 → 31.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/actionbar.d.ts +16 -0
- package/vscode/src/vs/platform/actions/browser/actionbar.js +22 -0
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +2 -2
- package/vscode/src/vs/platform/networkFilter/common/domainMatcher.d.ts +50 -0
- package/vscode/src/vs/platform/networkFilter/common/domainMatcher.js +138 -0
- package/vscode/src/vs/platform/networkFilter/common/settings.d.ts +12 -0
- package/vscode/src/vs/platform/networkFilter/common/settings.js +14 -0
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.d.ts +18 -0
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.js +13 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +73 -0
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.js +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +51 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +64 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +17 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +17 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +73 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentModel.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentModel.js +20 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +73 -49
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +41 -99
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +13 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +14 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.d.ts +11 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.js +339 -161
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +9 -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 +9 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +33 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.d.ts +43 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.js +147 -2
- 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.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +55 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.js +7 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.js +42 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/animations/animation.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/animations/animationRegistry.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/animations/animationRegistry.js +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/animations/blockAnimations.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/animations/blockAnimations.js +33 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/buffer.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/bufferRegistry.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/bufferRegistry.js +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/offBuffer.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/offBuffer.js +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/paragraphBuffer.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/paragraphBuffer.js +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/wordBuffer.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/wordBuffer.js +68 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/chatIncrementalRendering.d.ts +77 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/chatIncrementalRendering.js +170 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/media/chatIncrementalRendering.css +112 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +26 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +24 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +111 -145
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.js +425 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.d.ts +16 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +68 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +101 -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.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +36 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +217 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +6 -6
- 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 +23 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +168 -60
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +18 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +1 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +7 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.d.ts +1 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +7 -19
- 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 +24 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +104 -78
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +11 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatPlanReview.css +257 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatSubagentContent.css +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatToolConfirmationCarousel.css +286 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMissingSandboxDepsConfirmationSubPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.js +15 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +1 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +25 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +29 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +258 -321
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationCarouselPart.d.ts +53 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationCarouselPart.js +392 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +24 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +9 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.d.ts +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.js +2 -3
- 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 +38 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +577 -113
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +4 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +1 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +58 -75
- 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 +44 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +362 -188
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +4 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +42 -95
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +9 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +57 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +21 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/{modelPickerActionItem2.js → modelPickerActionItem.js} +5 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +38 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +4 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +94 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.js +218 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +6 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +15 -15
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +12 -21
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +2 -32
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +355 -156
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +2 -13
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +72 -65
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +4 -43
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +238 -204
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +4 -19
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +128 -115
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +6 -9
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +152 -49
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +64 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +40 -40
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +24 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +7 -7
- 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/replNotebook/browser/replEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminal/terminalContribChatExports.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.js +41 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/commandFileWriteParser.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.js +142 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +165 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +53 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +163 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +142 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +144 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +174 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +43 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +256 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +94 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +221 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js +392 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +243 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.js +10 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +310 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +168 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +33 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/commandLinePresenter.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.js +37 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.js +37 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.js +44 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +22 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.js +47 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.js +27 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.js +29 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.js +33 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +32 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +108 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +412 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.js +23 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +192 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +2258 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +43 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +118 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove.js +44 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/toolIds.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +141 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +85 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +608 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +0 -196
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.d.ts +0 -29
- package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.d.ts +0 -46
- package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.js +0 -215
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +0 -107
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
|
|
2
|
+
import { match } from '@codingame/monaco-vscode-api/vscode/vs/base/common/glob';
|
|
3
|
+
import { getExtensionForMimeType } from '@codingame/monaco-vscode-api/vscode/vs/base/common/mime';
|
|
4
|
+
import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
|
|
5
|
+
import { basename as basename$1 } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
6
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
7
|
+
import { IChatToolInvocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
8
|
+
import { ChatResponseResource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel';
|
|
9
|
+
import { isToolResultInputOutputDetails } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
10
|
+
|
|
11
|
+
const CHAT_MEMORY_FILE_SCHEME = "chat-memory-file";
|
|
12
|
+
const MEMORY_TOOL_ID = "copilot_memory";
|
|
13
|
+
var ChatMemoryFileResource;
|
|
14
|
+
(function(ChatMemoryFileResource) {
|
|
15
|
+
function createUri(memoryPath, sessionResource) {
|
|
16
|
+
return ( URI.from({
|
|
17
|
+
scheme: CHAT_MEMORY_FILE_SCHEME,
|
|
18
|
+
path: memoryPath,
|
|
19
|
+
query: ( sessionResource.toString())
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
ChatMemoryFileResource.createUri = createUri;
|
|
23
|
+
function isChatMemoryFileUri(uri) {
|
|
24
|
+
return uri.scheme === CHAT_MEMORY_FILE_SCHEME;
|
|
25
|
+
}
|
|
26
|
+
ChatMemoryFileResource.isChatMemoryFileUri = isChatMemoryFileUri;
|
|
27
|
+
function parse(uri) {
|
|
28
|
+
return {
|
|
29
|
+
memoryPath: uri.path,
|
|
30
|
+
sessionResource: uri.query
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
ChatMemoryFileResource.parse = parse;
|
|
34
|
+
})(ChatMemoryFileResource || (ChatMemoryFileResource = {}));
|
|
35
|
+
function matchMimeType(pattern, mimeType) {
|
|
36
|
+
if (pattern === mimeType) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
const [patternType, patternSubtype] = pattern.split("/");
|
|
40
|
+
const [type] = mimeType.split("/");
|
|
41
|
+
return patternSubtype === "*" && patternType === type;
|
|
42
|
+
}
|
|
43
|
+
function findFilePathRule(filePath, byFilePath) {
|
|
44
|
+
const fileBasename = basename(filePath);
|
|
45
|
+
for (const [pattern, config] of Object.entries(byFilePath)) {
|
|
46
|
+
if (match(pattern, filePath) || match(pattern, fileBasename)) {
|
|
47
|
+
return config;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
function findMimeTypeRule(mimeType, byMimeType) {
|
|
53
|
+
for (const [pattern, config] of Object.entries(byMimeType)) {
|
|
54
|
+
if (matchMimeType(pattern, mimeType)) {
|
|
55
|
+
return config;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return undefined;
|
|
59
|
+
}
|
|
60
|
+
function isToolResultOutputDetailsSerialized(obj) {
|
|
61
|
+
return typeof obj === "object" && obj !== null && "output" in obj && typeof obj.output === "object" && obj.output?.type === "data" && typeof obj.output?.mimeType === "string";
|
|
62
|
+
}
|
|
63
|
+
function getMemoryPathFromParams(params) {
|
|
64
|
+
if (typeof params !== "object" || params === null) {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
const path = params["path"];
|
|
68
|
+
return typeof path === "string" ? path : undefined;
|
|
69
|
+
}
|
|
70
|
+
const memoryWriteCommands = ( new Set(["create", "str_replace", "insert"]));
|
|
71
|
+
function isMemoryWriteCommand(params) {
|
|
72
|
+
if (typeof params !== "object" || params === null) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
const command = params["command"];
|
|
76
|
+
return typeof command === "string" && ( memoryWriteCommands.has(command));
|
|
77
|
+
}
|
|
78
|
+
function extractArtifactsFromResponse(response, sessionResource, byMimeType, byFilePath, byMemoryFilePath = {}) {
|
|
79
|
+
const artifacts = [];
|
|
80
|
+
const seenUris = ( new Set());
|
|
81
|
+
for (const part of response.value) {
|
|
82
|
+
if (part.kind === "codeblockUri") {
|
|
83
|
+
const uri = part.uri;
|
|
84
|
+
const uriStr = ( uri.toString());
|
|
85
|
+
if (( seenUris.has(uriStr))) {
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
const rule = findFilePathRule(uri.path, byFilePath);
|
|
89
|
+
if (rule) {
|
|
90
|
+
seenUris.add(uriStr);
|
|
91
|
+
artifacts.push({
|
|
92
|
+
label: basename$1(uri),
|
|
93
|
+
uri: uriStr,
|
|
94
|
+
type: "plan",
|
|
95
|
+
groupName: rule.groupName,
|
|
96
|
+
onlyShowGroup: rule.onlyShowGroup
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if (part.kind === "textEditGroup") {
|
|
101
|
+
const uri = part.uri;
|
|
102
|
+
const uriStr = ( uri.toString());
|
|
103
|
+
if (( seenUris.has(uriStr))) {
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
const rule = findFilePathRule(uri.path, byFilePath);
|
|
107
|
+
if (rule) {
|
|
108
|
+
seenUris.add(uriStr);
|
|
109
|
+
artifacts.push({
|
|
110
|
+
label: basename$1(uri),
|
|
111
|
+
uri: uriStr,
|
|
112
|
+
type: "plan",
|
|
113
|
+
groupName: rule.groupName,
|
|
114
|
+
onlyShowGroup: rule.onlyShowGroup
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (part.kind === "workspaceEdit") {
|
|
119
|
+
for (const edit of part.edits) {
|
|
120
|
+
const uri = edit.newResource ?? edit.oldResource;
|
|
121
|
+
if (!uri) {
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
const uriStr = ( uri.toString());
|
|
125
|
+
if (( seenUris.has(uriStr))) {
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
const rule = findFilePathRule(uri.path, byFilePath);
|
|
129
|
+
if (rule) {
|
|
130
|
+
seenUris.add(uriStr);
|
|
131
|
+
artifacts.push({
|
|
132
|
+
label: basename$1(uri),
|
|
133
|
+
uri: uriStr,
|
|
134
|
+
type: "plan",
|
|
135
|
+
groupName: rule.groupName,
|
|
136
|
+
onlyShowGroup: rule.onlyShowGroup
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
if ((part.kind === "toolInvocation" || part.kind === "toolInvocationSerialized") && part.toolId === MEMORY_TOOL_ID) {
|
|
142
|
+
const params = IChatToolInvocation.getParameters(part);
|
|
143
|
+
const memoryPath = getMemoryPathFromParams(params);
|
|
144
|
+
if (memoryPath && isMemoryWriteCommand(params)) {
|
|
145
|
+
const rule = findFilePathRule(memoryPath, byMemoryFilePath);
|
|
146
|
+
if (rule) {
|
|
147
|
+
const key = `memory:${part.toolCallId}:${memoryPath}`;
|
|
148
|
+
if (!( seenUris.has(key))) {
|
|
149
|
+
seenUris.add(key);
|
|
150
|
+
artifacts.push({
|
|
151
|
+
label: basename(memoryPath),
|
|
152
|
+
uri: ( ChatMemoryFileResource.createUri(memoryPath, sessionResource).toString()),
|
|
153
|
+
type: "plan",
|
|
154
|
+
groupName: rule.groupName,
|
|
155
|
+
onlyShowGroup: rule.onlyShowGroup
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
if (part.kind === "toolInvocation" || part.kind === "toolInvocationSerialized") {
|
|
162
|
+
const details = IChatToolInvocation.resultDetails(part);
|
|
163
|
+
if (!details) {
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
if (isToolResultInputOutputDetails(details)) {
|
|
167
|
+
for (let i = 0; i < details.output.length; i++) {
|
|
168
|
+
const outputPart = details.output[i];
|
|
169
|
+
if (outputPart.type === "embed" && !outputPart.isText && outputPart.mimeType) {
|
|
170
|
+
const rule = findMimeTypeRule(outputPart.mimeType, byMimeType);
|
|
171
|
+
if (rule) {
|
|
172
|
+
const key = `${part.toolCallId}:${i}`;
|
|
173
|
+
if (!( seenUris.has(key))) {
|
|
174
|
+
seenUris.add(key);
|
|
175
|
+
const ext = getExtensionForMimeType(outputPart.mimeType);
|
|
176
|
+
const permalinkBasename = ext ? `file${ext}` : "file.bin";
|
|
177
|
+
const artifactUri = ChatResponseResource.createUri(sessionResource, part.toolCallId, i, permalinkBasename);
|
|
178
|
+
artifacts.push({
|
|
179
|
+
label: outputPart.uri?.path.split("/").pop() ?? `${rule.groupName} ${i + 1}`,
|
|
180
|
+
uri: ( artifactUri.toString()),
|
|
181
|
+
toolCallId: part.toolCallId,
|
|
182
|
+
dataPartIndex: i,
|
|
183
|
+
type: "screenshot",
|
|
184
|
+
groupName: rule.groupName,
|
|
185
|
+
onlyShowGroup: rule.onlyShowGroup
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
if (isToolResultOutputDetailsSerialized(details)) {
|
|
193
|
+
const rule = findMimeTypeRule(details.output.mimeType, byMimeType);
|
|
194
|
+
if (rule) {
|
|
195
|
+
const key = `${part.toolCallId}:0`;
|
|
196
|
+
if (!( seenUris.has(key))) {
|
|
197
|
+
seenUris.add(key);
|
|
198
|
+
const ext = getExtensionForMimeType(details.output.mimeType);
|
|
199
|
+
const permalinkBasename = ext ? `file${ext}` : "file.bin";
|
|
200
|
+
const artifactUri = ChatResponseResource.createUri(sessionResource, part.toolCallId, 0, permalinkBasename);
|
|
201
|
+
artifacts.push({
|
|
202
|
+
label: `${rule.groupName}`,
|
|
203
|
+
uri: ( artifactUri.toString()),
|
|
204
|
+
toolCallId: part.toolCallId,
|
|
205
|
+
dataPartIndex: 0,
|
|
206
|
+
type: "screenshot",
|
|
207
|
+
groupName: rule.groupName,
|
|
208
|
+
onlyShowGroup: rule.onlyShowGroup
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return artifacts;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export { ChatMemoryFileResource, extractArtifactsFromResponse };
|
|
@@ -26,7 +26,7 @@ async function extractImagesFromChatResponse(response, readFile) {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
const request = response.session.getItems().find(item => isRequestVM(item) && item.id === response.requestId);
|
|
29
|
-
const title = request ? request.messageText : ( localize(
|
|
29
|
+
const title = request ? request.messageText : ( localize(7371, "Images"));
|
|
30
30
|
return {
|
|
31
31
|
id: ( response.sessionResource.toString()) + "_" + response.id,
|
|
32
32
|
title,
|
|
@@ -45,10 +45,10 @@ function extractImagesFromToolInvocationOutputDetails(toolInvocation, sessionRes
|
|
|
45
45
|
images.push({
|
|
46
46
|
id: `${toolInvocation.toolCallId}_${outputIndex}`,
|
|
47
47
|
uri,
|
|
48
|
-
name: ( localize(
|
|
48
|
+
name: ( localize(7372, "Image {0}", images.length + 1)),
|
|
49
49
|
mimeType,
|
|
50
50
|
data,
|
|
51
|
-
source: ( localize(
|
|
51
|
+
source: ( localize(7373, "Tool: {0}", toolInvocation.toolId)),
|
|
52
52
|
caption
|
|
53
53
|
});
|
|
54
54
|
};
|
|
@@ -93,7 +93,7 @@ async function extractImagesFromToolInvocationMessages(toolInvocation, readFile)
|
|
|
93
93
|
name,
|
|
94
94
|
mimeType,
|
|
95
95
|
data,
|
|
96
|
-
source: ( localize(
|
|
96
|
+
source: ( localize(7373, "Tool: {0}", toolInvocation.toolId)),
|
|
97
97
|
caption: message.value
|
|
98
98
|
});
|
|
99
99
|
}
|
|
@@ -131,7 +131,7 @@ async function extractImageFromInlineReference(part, readFile) {
|
|
|
131
131
|
name,
|
|
132
132
|
mimeType: mime,
|
|
133
133
|
data,
|
|
134
|
-
source: ( localize(
|
|
134
|
+
source: ( localize(7374, "File")),
|
|
135
135
|
caption: undefined
|
|
136
136
|
};
|
|
137
137
|
}
|
|
@@ -152,7 +152,7 @@ function extractImagesFromChatRequest(request) {
|
|
|
152
152
|
const uri = variable.references?.[0]?.reference;
|
|
153
153
|
const imageUri = URI.isUri(uri) ? uri : ( URI.from({
|
|
154
154
|
scheme: "data",
|
|
155
|
-
path: variable.name
|
|
155
|
+
path: `${variable.id}/${encodeURIComponent(variable.name)}`
|
|
156
156
|
}));
|
|
157
157
|
images.push({
|
|
158
158
|
id: ( imageUri.toString()),
|
|
@@ -160,7 +160,7 @@ function extractImagesFromChatRequest(request) {
|
|
|
160
160
|
name: variable.name,
|
|
161
161
|
mimeType,
|
|
162
162
|
data: VSBuffer.wrap(buffer),
|
|
163
|
-
source: ( localize(
|
|
163
|
+
source: ( localize(7375, "Attachment")),
|
|
164
164
|
caption: undefined
|
|
165
165
|
});
|
|
166
166
|
}
|
|
@@ -190,7 +190,12 @@ function extractCodeblockUrisFromText(text) {
|
|
|
190
190
|
if (match) {
|
|
191
191
|
const [all, isEdit,, encodedSubAgentId, uriString] = match;
|
|
192
192
|
if (uriString) {
|
|
193
|
-
|
|
193
|
+
let result;
|
|
194
|
+
try {
|
|
195
|
+
result = ( URI.parse(uriString));
|
|
196
|
+
} catch {
|
|
197
|
+
return undefined;
|
|
198
|
+
}
|
|
194
199
|
const textWithoutResult = text.substring(0, match.index) + text.substring(match.index + all.length);
|
|
195
200
|
let subAgentInvocationId;
|
|
196
201
|
if (encodedSubAgentId) {
|
|
@@ -18,45 +18,45 @@ registerColor("agentStatusIndicator.background", {
|
|
|
18
18
|
light: ( Color.black.transparent(0.05)),
|
|
19
19
|
hcDark: null,
|
|
20
20
|
hcLight: null
|
|
21
|
-
}, ( localize(
|
|
21
|
+
}, ( localize(7817, "Background color of the agent status indicator in the titlebar.")));
|
|
22
22
|
registerColor("chat.requestBorder", {
|
|
23
23
|
dark: ( new Color(( new RGBA(255, 255, 255, 0.10)))),
|
|
24
24
|
light: ( new Color(( new RGBA(0, 0, 0, 0.10)))),
|
|
25
25
|
hcDark: contrastBorder,
|
|
26
26
|
hcLight: contrastBorder
|
|
27
|
-
}, ( localize(
|
|
27
|
+
}, ( localize(7818, "The border color of a chat request.")));
|
|
28
28
|
const chatRequestBackground = registerColor("chat.requestBackground", {
|
|
29
29
|
dark: ( transparent(editorBackground, 0.62)),
|
|
30
30
|
light: ( transparent(editorBackground, 0.62)),
|
|
31
31
|
hcDark: editorWidgetBackground,
|
|
32
32
|
hcLight: null
|
|
33
|
-
}, ( localize(
|
|
33
|
+
}, ( localize(7819, "The background color of a chat request.")));
|
|
34
34
|
const chatSlashCommandBackground = registerColor("chat.slashCommandBackground", {
|
|
35
35
|
dark: "#26477866",
|
|
36
36
|
light: "#adceff7a",
|
|
37
37
|
hcDark: Color.white,
|
|
38
38
|
hcLight: badgeBackground
|
|
39
|
-
}, ( localize(
|
|
39
|
+
}, ( localize(7820, "The background color of a chat slash command.")));
|
|
40
40
|
const chatSlashCommandForeground = registerColor("chat.slashCommandForeground", {
|
|
41
41
|
dark: "#85b6ff",
|
|
42
42
|
light: "#26569e",
|
|
43
43
|
hcDark: Color.black,
|
|
44
44
|
hcLight: badgeForeground
|
|
45
|
-
}, ( localize(
|
|
45
|
+
}, ( localize(7821, "The foreground color of a chat slash command.")));
|
|
46
46
|
registerColor("chat.avatarBackground", {
|
|
47
47
|
dark: "#1f1f1f",
|
|
48
48
|
light: "#f2f2f2",
|
|
49
49
|
hcDark: Color.black,
|
|
50
50
|
hcLight: Color.white
|
|
51
|
-
}, ( localize(
|
|
52
|
-
registerColor("chat.avatarForeground", foreground, ( localize(
|
|
51
|
+
}, ( localize(7822, "The background color of a chat avatar.")));
|
|
52
|
+
registerColor("chat.avatarForeground", foreground, ( localize(7823, "The foreground color of a chat avatar.")));
|
|
53
53
|
registerColor("chat.editedFileForeground", {
|
|
54
54
|
light: "#895503",
|
|
55
55
|
dark: "#E2C08D",
|
|
56
56
|
hcDark: "#E2C08D",
|
|
57
57
|
hcLight: "#895503"
|
|
58
58
|
}, ( localize(
|
|
59
|
-
|
|
59
|
+
7824,
|
|
60
60
|
"The foreground color of a chat edited file in the edited file list."
|
|
61
61
|
)));
|
|
62
62
|
registerColor("chat.requestCodeBorder", {
|
|
@@ -64,42 +64,42 @@ registerColor("chat.requestCodeBorder", {
|
|
|
64
64
|
light: "#0e639c40",
|
|
65
65
|
hcDark: null,
|
|
66
66
|
hcLight: null
|
|
67
|
-
}, ( localize(
|
|
67
|
+
}, ( localize(7825, "Border color of code blocks within the chat request bubble.")), true);
|
|
68
68
|
registerColor("chat.requestBubbleBackground", {
|
|
69
69
|
light: ( transparent(editorSelectionBackground, 0.3)),
|
|
70
70
|
dark: ( transparent(editorSelectionBackground, 0.3)),
|
|
71
71
|
hcDark: null,
|
|
72
72
|
hcLight: null
|
|
73
|
-
}, ( localize(
|
|
73
|
+
}, ( localize(7826, "Background color of the chat request bubble.")), true);
|
|
74
74
|
registerColor("chat.requestBubbleHoverBackground", {
|
|
75
75
|
dark: ( transparent(editorSelectionBackground, 0.6)),
|
|
76
76
|
light: ( transparent(editorSelectionBackground, 0.6)),
|
|
77
77
|
hcDark: null,
|
|
78
78
|
hcLight: null
|
|
79
|
-
}, ( localize(
|
|
79
|
+
}, ( localize(7827, "Background color of the chat request bubble on hover.")), true);
|
|
80
80
|
registerColor("chat.checkpointSeparator", {
|
|
81
81
|
dark: "#585858",
|
|
82
82
|
light: "#a9a9a9",
|
|
83
83
|
hcDark: "#a9a9a9",
|
|
84
84
|
hcLight: "#a5a5a5"
|
|
85
|
-
}, ( localize(
|
|
85
|
+
}, ( localize(7828, "Chat checkpoint separator color.")));
|
|
86
86
|
registerColor("chat.linesAddedForeground", {
|
|
87
87
|
dark: "#54B054",
|
|
88
88
|
light: "#107C10",
|
|
89
89
|
hcDark: "#54B054",
|
|
90
90
|
hcLight: "#107C10"
|
|
91
|
-
}, ( localize(
|
|
91
|
+
}, ( localize(7829, "Foreground color of lines added in chat code block pill.")), true);
|
|
92
92
|
registerColor("chat.linesRemovedForeground", {
|
|
93
93
|
dark: "#FC6A6A",
|
|
94
94
|
light: "#BC2F32",
|
|
95
95
|
hcDark: "#F48771",
|
|
96
96
|
hcLight: "#B5200D"
|
|
97
|
-
}, ( localize(
|
|
97
|
+
}, ( localize(7830, "Foreground color of lines removed in chat code block pill.")), true);
|
|
98
98
|
registerColor("chat.thinkingShimmer", {
|
|
99
99
|
dark: "#ffffff",
|
|
100
100
|
light: "#000000",
|
|
101
101
|
hcDark: "#ffffff",
|
|
102
102
|
hcLight: "#000000"
|
|
103
|
-
}, ( localize(
|
|
103
|
+
}, ( localize(7831, "Shimmer highlight for thinking/working labels.")), true);
|
|
104
104
|
|
|
105
105
|
export { chatRequestBackground, chatSlashCommandBackground, chatSlashCommandForeground };
|
|
@@ -10,7 +10,6 @@ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
10
10
|
import { observableConfigValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/observable/common/platformObservableUtils';
|
|
11
11
|
import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
|
|
12
12
|
import { InlineChatEditorAffordance } from './inlineChatEditorAffordance.js';
|
|
13
|
-
import { InlineChatGutterAffordance } from './inlineChatGutterAffordance.js';
|
|
14
13
|
import { SelectionDirection } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/selection';
|
|
15
14
|
import { assertType } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
16
15
|
import { CursorChangeReason } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/cursorEvents';
|
|
@@ -18,7 +17,6 @@ import { IInlineChatSessionService } from '@codingame/monaco-vscode-api/vscode/v
|
|
|
18
17
|
import { CodeActionController } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/codeAction/browser/codeActionController';
|
|
19
18
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
20
19
|
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
21
|
-
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
22
20
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
23
21
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
24
22
|
import { debouncedObservable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils/utils';
|
|
@@ -73,7 +71,7 @@ let InlineChatAffordance = class InlineChatAffordance extends Disposable {
|
|
|
73
71
|
}
|
|
74
72
|
affordanceId = generateUuid();
|
|
75
73
|
const mode = affordance.read(undefined);
|
|
76
|
-
if (mode === "
|
|
74
|
+
if (mode === "editor") {
|
|
77
75
|
telemetryService.publicLog2("inlineChatAffordance/shown", {
|
|
78
76
|
mode,
|
|
79
77
|
id: affordanceId,
|
|
@@ -108,33 +106,26 @@ let InlineChatAffordance = class InlineChatAffordance extends Disposable {
|
|
|
108
106
|
this._store.add(autorun(r => {
|
|
109
107
|
const sel = selectionData.read(r);
|
|
110
108
|
const mode = affordance.read(r);
|
|
111
|
-
ctxAffordanceVisible.set(sel !== undefined &&
|
|
109
|
+
ctxAffordanceVisible.set(sel !== undefined && mode === "editor");
|
|
112
110
|
}));
|
|
113
|
-
const gutterAffordance = this._store.add(this.#instantiationService.createInstance(
|
|
114
|
-
InlineChatGutterAffordance,
|
|
115
|
-
editorObs,
|
|
116
|
-
derived(r => affordance.read(r) === "gutter" ? selectionData.read(r) : undefined)
|
|
117
|
-
));
|
|
118
111
|
const editorAffordance = this.#instantiationService.createInstance(
|
|
119
112
|
InlineChatEditorAffordance,
|
|
120
113
|
this.#editor,
|
|
121
114
|
derived(r => affordance.read(r) === "editor" ? selectionData.read(r) : undefined)
|
|
122
115
|
);
|
|
123
116
|
this._store.add(editorAffordance);
|
|
124
|
-
this._store.add(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
})
|
|
134
|
-
);
|
|
117
|
+
this._store.add(editorAffordance.onDidRunAction(commandId => {
|
|
118
|
+
if (affordanceId) {
|
|
119
|
+
telemetryService.publicLog2("inlineChatAffordance/selected", {
|
|
120
|
+
mode: affordance.get(),
|
|
121
|
+
id: affordanceId,
|
|
122
|
+
commandId
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}));
|
|
135
126
|
this._store.add(autorun(r => {
|
|
136
127
|
const mode = affordance.read(r);
|
|
137
|
-
const hideWithSelection = mode === "editor"
|
|
128
|
+
const hideWithSelection = mode === "editor";
|
|
138
129
|
const controller = CodeActionController.get(this.#editor);
|
|
139
130
|
if (controller) {
|
|
140
131
|
controller.onlyLightBulbWithEmptySelection = hideWithSelection;
|
|
@@ -41,38 +41,14 @@ export declare abstract class InlineChatRunOptions {
|
|
|
41
41
|
static isInlineChatRunOptions(options: unknown): options is InlineChatRunOptions;
|
|
42
42
|
}
|
|
43
43
|
export declare class InlineChatController implements IEditorContribution {
|
|
44
|
-
private
|
|
45
|
-
private readonly _instaService;
|
|
46
|
-
private readonly _notebookEditorService;
|
|
47
|
-
private readonly _inlineChatSessionService;
|
|
48
|
-
private readonly _configurationService;
|
|
49
|
-
private readonly _webContentExtractorService;
|
|
50
|
-
private readonly _fileService;
|
|
51
|
-
private readonly _chatAttachmentResolveService;
|
|
52
|
-
private readonly _editorService;
|
|
53
|
-
private readonly _markerDecorationsService;
|
|
54
|
-
private readonly _languageModelService;
|
|
55
|
-
private readonly _logService;
|
|
56
|
-
private readonly _chatEditingService;
|
|
57
|
-
private readonly _chatService;
|
|
44
|
+
#private;
|
|
58
45
|
static readonly ID = "editor.contrib.inlineChatController";
|
|
59
46
|
static get(editor: ICodeEditor): InlineChatController | undefined;
|
|
60
|
-
/**
|
|
61
|
-
* Stores the user's explicitly chosen model (qualified name) from a previous inline chat request in the same session.
|
|
62
|
-
* When set, this takes priority over the inlineChat.defaultModel setting.
|
|
63
|
-
*/
|
|
64
|
-
private static _userSelectedModel;
|
|
65
|
-
private readonly _store;
|
|
66
|
-
private readonly _isActiveController;
|
|
67
|
-
private readonly _renderMode;
|
|
68
|
-
private readonly _zone;
|
|
69
47
|
readonly inputOverlayWidget: InlineChatAffordance;
|
|
70
|
-
private readonly _inputWidget;
|
|
71
|
-
private readonly _currentSession;
|
|
72
48
|
get widget(): EditorBasedInlineChatWidget;
|
|
73
49
|
get isActive(): boolean;
|
|
74
50
|
get inputWidget(): InlineChatInputWidget;
|
|
75
|
-
constructor(
|
|
51
|
+
constructor(editor: ICodeEditor, instaService: IInstantiationService, notebookEditorService: INotebookEditorService, inlineChatSessionService: IInlineChatSessionService, codeEditorService: ICodeEditorService, contextKeyService: IContextKeyService, configurationService: IConfigurationService, webContentExtractorService: ISharedWebContentExtractorService, fileService: IFileService, chatAttachmentResolveService: IChatAttachmentResolveService, editorService: IEditorService, markerDecorationsService: IMarkerDecorationsService, languageModelService: ILanguageModelsService, logService: ILogService, chatEditingService: IChatEditingService, chatService: IChatService);
|
|
76
52
|
dispose(): void;
|
|
77
53
|
getWidgetPosition(): Position | undefined;
|
|
78
54
|
focus(): void;
|
|
@@ -81,12 +57,6 @@ export declare class InlineChatController implements IEditorContribution {
|
|
|
81
57
|
rejectSession(): Promise<void>;
|
|
82
58
|
continueSessionInChat(): Promise<void>;
|
|
83
59
|
rephraseSession(): Promise<void>;
|
|
84
|
-
private _selectVendorDefaultModel;
|
|
85
|
-
/**
|
|
86
|
-
* Applies model defaults based on settings and tracks user model changes.
|
|
87
|
-
* Prioritization: user session choice > inlineChat.defaultModel setting > vendor default
|
|
88
|
-
*/
|
|
89
|
-
private _applyModelDefaults;
|
|
90
60
|
createImageAttachment(attachment: URI): Promise<IChatRequestVariableEntry | undefined>;
|
|
91
61
|
}
|
|
92
62
|
export declare function reviewEdits(accessor: ServicesAccessor, editor: ICodeEditor, stream: AsyncIterable<TextEdit[]>, token: CancellationToken, applyCodeBlockSuggestionId: EditSuggestionId | undefined): Promise<boolean>;
|