@codingame/monaco-vscode-katex-common 33.0.7 → 34.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/vscode/src/vs/base/browser/ui/pixelSpinner/pixelSpinner.css +169 -0
- package/vscode/src/vs/base/browser/ui/pixelSpinner/pixelSpinner.d.ts +28 -0
- package/vscode/src/vs/base/browser/ui/pixelSpinner/pixelSpinner.js +61 -0
- package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.d.ts +1 -1
- package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.js +1 -1
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +18 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +40 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.contribution.d.ts +1 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.contribution.js +4 -48
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.d.ts +16 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.js +81 -69
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostGenericConfigChips.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostGenericConfigChips.js +5 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionUri.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionUri.js +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/media/agentHostChatInputPicker.css +18 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +9 -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 +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +13 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +177 -80
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +34 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +69 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/chatToolRiskAssessmentService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +25 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.js +4 -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.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatEditPillElement.d.ts +93 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatEditPillElement.js +140 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExternalEditContentPart.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExternalEditContentPart.js +134 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +2 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +49 -117
- 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.js +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +47 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +52 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +18 -14
- 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 +23 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +13 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.d.ts +15 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +87 -11
- 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 +21 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +102 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatCodeBlockPill.css +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +22 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +21 -2
- 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 +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +35 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +62 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationCarouselPart.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +15 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +10 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.js +13 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/toolRiskBadgeWidget.js +4 -4
- 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 +19 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +154 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatOptions.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatOptions.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +17 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +113 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatGoalBannerWidget.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatGoalBannerWidget.js +64 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.d.ts +10 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.js +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationWidget.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationWidget.js +18 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +361 -66
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputStatusActionViewItem.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputStatusActionViewItem.js +147 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +11 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +133 -87
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatPhoneInputPresenter.js +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +13 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatGoalBannerWidget.css +81 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatInputNotificationWidget.css +32 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +39 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +23 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +66 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +3 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +373 -32
- 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 +5 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.js +18 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionWarnings.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatWidgetHistoryService.d.ts +12 -2
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatWidgetHistoryService.js +54 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +3 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +30 -30
- 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/platform/actionWidget/browser/actionWidgetDropdown.d.ts +0 -76
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +0 -191
- package/vscode/src/vs/platform/networkFilter/common/domainMatcher.d.ts +0 -50
- package/vscode/src/vs/platform/networkFilter/common/domainMatcher.js +0 -138
- package/vscode/src/vs/platform/networkFilter/common/settings.d.ts +0 -12
- package/vscode/src/vs/platform/networkFilter/common/settings.js +0 -14
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.d.ts +0 -18
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.js +0 -13
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +0 -87
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.js +0 -10
- package/vscode/src/vs/workbench/contrib/terminal/terminalContribChatExports.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.js +0 -41
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/commandFileWriteParser.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.d.ts +0 -26
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.js +0 -142
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +0 -52
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +0 -232
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +0 -65
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +0 -225
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +0 -143
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +0 -37
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +0 -205
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +0 -174
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +0 -43
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +0 -52
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +0 -260
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +0 -44
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +0 -98
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +0 -42
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +0 -225
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.d.ts +0 -31
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js +0 -392
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.d.ts +0 -45
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +0 -243
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +0 -53
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.js +0 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +0 -310
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +0 -177
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.d.ts +0 -11
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +0 -33
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/commandLinePresenter.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.js +0 -37
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.js +0 -37
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.js +0 -44
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +0 -22
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.d.ts +0 -42
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.js +0 -102
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.js +0 -27
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.d.ts +0 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.js +0 -29
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.js +0 -33
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.d.ts +0 -15
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +0 -53
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +0 -177
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +0 -512
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +0 -42
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.js +0 -23
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +0 -258
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +0 -2623
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +0 -43
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +0 -118
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove.js +0 -44
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/toolIds.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +0 -58
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +0 -223
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxCommandRules.d.ts +0 -31
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxCommandRules.js +0 -49
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxReadAllowList.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxReadAllowList.js +0 -302
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxRuntimeConfigurationPerOperation.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxRuntimeConfigurationPerOperation.js +0 -118
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +0 -114
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +0 -788
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { append, $, addDisposableListener, EventType, addStandardDisposableListener, EventHelper,
|
|
3
|
+
import { append, $, addDisposableListener, EventType, addStandardDisposableListener, EventHelper, getWindow, createTextNode } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
4
|
import { StandardKeyboardEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/keyboardEvent';
|
|
5
5
|
import { StandardMouseEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/mouseEvent';
|
|
6
6
|
import { Button } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
|
|
7
|
+
import { VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
7
8
|
import { HoverStyle } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hover';
|
|
8
9
|
import { createInstantHoverDelegate } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
|
|
9
10
|
import { HoverPosition } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverWidget';
|
|
@@ -13,9 +14,10 @@ import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/comm
|
|
|
13
14
|
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
14
15
|
import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
|
|
15
16
|
import { KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
16
|
-
import { Disposable, DisposableStore, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
17
|
+
import { Disposable, DisposableStore, MutableDisposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
17
18
|
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
18
19
|
import { basename, dirname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
|
|
20
|
+
import { joinPath } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
19
21
|
import { ScrollbarVisibility } from '@codingame/monaco-vscode-api/vscode/vs/base/common/scrollable';
|
|
20
22
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
21
23
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
@@ -34,6 +36,7 @@ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
34
36
|
import { RawContextKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
35
37
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
36
38
|
import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
|
|
39
|
+
import { IFileDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
37
40
|
import { fillInSymbolsDragData } from '@codingame/monaco-vscode-api/vscode/vs/platform/dnd/browser/dnd';
|
|
38
41
|
import { registerOpenEditorListeners } from '../../../../../platform/editor/browser/editor.js';
|
|
39
42
|
import { FileKind } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
|
|
@@ -42,6 +45,7 @@ import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/h
|
|
|
42
45
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
43
46
|
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
44
47
|
import { IMarkdownRendererService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service';
|
|
48
|
+
import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
|
|
45
49
|
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
46
50
|
import { FolderThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService';
|
|
47
51
|
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
@@ -68,6 +72,7 @@ import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/
|
|
|
68
72
|
import { getCleanPromptName } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations';
|
|
69
73
|
import { IChatContextService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.service';
|
|
70
74
|
import { IChatImageCarouselService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatImageCarouselService.service';
|
|
75
|
+
import { getOrCreateImageThumbnail } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatImageUtils';
|
|
71
76
|
|
|
72
77
|
const commonHoverOptions = {
|
|
73
78
|
style: HoverStyle.Pointer,
|
|
@@ -142,7 +147,7 @@ let AbstractChatAttachmentWidget = class AbstractChatAttachmentWidget extends Di
|
|
|
142
147
|
if (!this._hasClearButton) {
|
|
143
148
|
return ariaLabel;
|
|
144
149
|
}
|
|
145
|
-
return localize(
|
|
150
|
+
return localize(5812, "{0} (Delete)", ariaLabel);
|
|
146
151
|
}
|
|
147
152
|
attachClearButton() {
|
|
148
153
|
if (this.attachment.range || !this.options.supportsDeletion) {
|
|
@@ -152,7 +157,7 @@ let AbstractChatAttachmentWidget = class AbstractChatAttachmentWidget extends Di
|
|
|
152
157
|
const clearButton = ( new Button(this.element, {
|
|
153
158
|
supportIcons: true,
|
|
154
159
|
hoverDelegate: createInstantHoverDelegate(),
|
|
155
|
-
title: ( localize(
|
|
160
|
+
title: ( localize(5813, "Remove from context"))
|
|
156
161
|
}));
|
|
157
162
|
clearButton.element.tabIndex = -1;
|
|
158
163
|
clearButton.icon = Codicon.close;
|
|
@@ -225,7 +230,10 @@ let FileAttachmentWidget = class FileAttachmentWidget extends AbstractChatAttach
|
|
|
225
230
|
themeService,
|
|
226
231
|
hoverService,
|
|
227
232
|
languageModelsService,
|
|
228
|
-
instantiationService
|
|
233
|
+
instantiationService,
|
|
234
|
+
fileDialogService,
|
|
235
|
+
fileService,
|
|
236
|
+
notificationService
|
|
229
237
|
) {
|
|
230
238
|
super(
|
|
231
239
|
attachment,
|
|
@@ -241,18 +249,21 @@ let FileAttachmentWidget = class FileAttachmentWidget extends AbstractChatAttach
|
|
|
241
249
|
this.hoverService = hoverService;
|
|
242
250
|
this.languageModelsService = languageModelsService;
|
|
243
251
|
this.instantiationService = instantiationService;
|
|
252
|
+
this.fileDialogService = fileDialogService;
|
|
253
|
+
this.fileService = fileService;
|
|
254
|
+
this.notificationService = notificationService;
|
|
244
255
|
const fileBasename = basename(resource.path);
|
|
245
256
|
const fileDirname = dirname(resource.path);
|
|
246
257
|
const friendlyName = `${fileBasename} ${fileDirname}`;
|
|
247
258
|
let ariaLabel = range ? ( localize(
|
|
248
|
-
|
|
259
|
+
5814,
|
|
249
260
|
"Attached file, {0}, line {1} to line {2}",
|
|
250
261
|
friendlyName,
|
|
251
262
|
range.startLineNumber,
|
|
252
263
|
range.endLineNumber
|
|
253
|
-
)) : ( localize(
|
|
264
|
+
)) : ( localize(5815, "Attached file, {0}", friendlyName));
|
|
254
265
|
if (attachment.omittedState === OmittedState.Full) {
|
|
255
|
-
ariaLabel = ( localize(
|
|
266
|
+
ariaLabel = ( localize(5816, "Omitted this file: {0}", attachment.name));
|
|
256
267
|
this.renderOmittedWarning(friendlyName, ariaLabel);
|
|
257
268
|
} else {
|
|
258
269
|
const fileOptions = {
|
|
@@ -276,6 +287,9 @@ let FileAttachmentWidget = class FileAttachmentWidget extends AbstractChatAttach
|
|
|
276
287
|
}
|
|
277
288
|
}
|
|
278
289
|
this.element.ariaLabel = this.appendDeletionHint(ariaLabel);
|
|
290
|
+
if (attachment.kind === "file") {
|
|
291
|
+
this.attachSaveButton(resource, fileBasename, options.supportsDeletion);
|
|
292
|
+
}
|
|
279
293
|
this.instantiationService.invokeFunction(accessor => {
|
|
280
294
|
this._register(
|
|
281
295
|
hookUpResourceAttachmentDragAndContextMenu(accessor, this.element, resource)
|
|
@@ -283,6 +297,37 @@ let FileAttachmentWidget = class FileAttachmentWidget extends AbstractChatAttach
|
|
|
283
297
|
});
|
|
284
298
|
this.addResourceOpenHandlers(resource, range);
|
|
285
299
|
}
|
|
300
|
+
attachSaveButton(resource, name, supportsDeletion) {
|
|
301
|
+
if (supportsDeletion) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
const saveButton = ( new Button(this.element, {
|
|
305
|
+
supportIcons: true,
|
|
306
|
+
hoverDelegate: createInstantHoverDelegate(),
|
|
307
|
+
title: ( localize(5817, "Save As..."))
|
|
308
|
+
}));
|
|
309
|
+
saveButton.element.classList.add("chat-attached-context-download-button");
|
|
310
|
+
saveButton.element.tabIndex = -1;
|
|
311
|
+
saveButton.icon = Codicon.cloudDownload;
|
|
312
|
+
this.element.insertBefore(saveButton.element, this.label.element);
|
|
313
|
+
this._register(saveButton);
|
|
314
|
+
this._register(saveButton.onDidClick(async e => {
|
|
315
|
+
e.preventDefault();
|
|
316
|
+
e.stopPropagation();
|
|
317
|
+
const defaultUri = joinPath(await this.fileDialogService.defaultFilePath(), name);
|
|
318
|
+
const target = await this.fileDialogService.showSaveDialog({
|
|
319
|
+
defaultUri
|
|
320
|
+
});
|
|
321
|
+
if (!target) {
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
try {
|
|
325
|
+
await this.fileService.copy(resource, target, true);
|
|
326
|
+
} catch (error) {
|
|
327
|
+
this.notificationService.error(( localize(5818, "Failed to save file: {0}", error)));
|
|
328
|
+
}
|
|
329
|
+
}));
|
|
330
|
+
}
|
|
286
331
|
renderOmittedWarning(friendlyName, ariaLabel) {
|
|
287
332
|
const pillIcon = $(
|
|
288
333
|
"div.chat-attached-context-pill",
|
|
@@ -296,7 +341,7 @@ let FileAttachmentWidget = class FileAttachmentWidget extends AbstractChatAttach
|
|
|
296
341
|
hoverElement.setAttribute("aria-label", ariaLabel);
|
|
297
342
|
this.element.classList.add("warning");
|
|
298
343
|
hoverElement.textContent = ( localize(
|
|
299
|
-
|
|
344
|
+
5819,
|
|
300
345
|
"{0} does not support this file type.",
|
|
301
346
|
this.currentLanguageModel ? this.languageModelsService.lookupLanguageModel(this.currentLanguageModel.identifier)?.name : this.currentLanguageModel ?? "This model"
|
|
302
347
|
));
|
|
@@ -309,7 +354,7 @@ let FileAttachmentWidget = class FileAttachmentWidget extends AbstractChatAttach
|
|
|
309
354
|
this.element.classList.add("warning");
|
|
310
355
|
const hoverElement = $("div.chat-attached-context-hover");
|
|
311
356
|
hoverElement.textContent = ( localize(
|
|
312
|
-
|
|
357
|
+
5820,
|
|
313
358
|
"This folder contains {0} images, which exceeds the maximum of {1} images per request. Older images will not be sent.",
|
|
314
359
|
imageCount,
|
|
315
360
|
limit
|
|
@@ -320,7 +365,7 @@ let FileAttachmentWidget = class FileAttachmentWidget extends AbstractChatAttach
|
|
|
320
365
|
}, commonHoverLifecycleOptions));
|
|
321
366
|
}
|
|
322
367
|
};
|
|
323
|
-
FileAttachmentWidget = ( __decorate([( __param(8, ICommandService)), ( __param(9, IOpenerService)), ( __param(10, IConfigurationService)), ( __param(11, IThemeService)), ( __param(12, IHoverService)), ( __param(13, ILanguageModelsService)), ( __param(14, IInstantiationService))], FileAttachmentWidget));
|
|
368
|
+
FileAttachmentWidget = ( __decorate([( __param(8, ICommandService)), ( __param(9, IOpenerService)), ( __param(10, IConfigurationService)), ( __param(11, IThemeService)), ( __param(12, IHoverService)), ( __param(13, ILanguageModelsService)), ( __param(14, IInstantiationService)), ( __param(15, IFileDialogService)), ( __param(16, IFileService)), ( __param(17, INotificationService))], FileAttachmentWidget));
|
|
324
369
|
let TerminalCommandAttachmentWidget = class TerminalCommandAttachmentWidget extends AbstractChatAttachmentWidget {
|
|
325
370
|
constructor(
|
|
326
371
|
attachment,
|
|
@@ -347,7 +392,7 @@ let TerminalCommandAttachmentWidget = class TerminalCommandAttachmentWidget exte
|
|
|
347
392
|
);
|
|
348
393
|
this.hoverService = hoverService;
|
|
349
394
|
this.terminalService = terminalService;
|
|
350
|
-
const ariaLabel = ( localize(
|
|
395
|
+
const ariaLabel = ( localize(5821, "Terminal command, {0}", attachment.command));
|
|
351
396
|
const clickHandler = () => this.openResource(attachment.resource, {
|
|
352
397
|
editorOptions: {
|
|
353
398
|
preserveFocus: true
|
|
@@ -401,16 +446,16 @@ function getHoverContent(ariaLabel, attachment) {
|
|
|
401
446
|
const hoverElement = $("div.chat-attached-context-hover");
|
|
402
447
|
hoverElement.setAttribute("aria-label", ariaLabel);
|
|
403
448
|
const commandTitle = $("div", {}, typeof attachment.exitCode === "number" ? ( localize(
|
|
404
|
-
|
|
449
|
+
5822,
|
|
405
450
|
"Command: {0}, exit code: {1}",
|
|
406
451
|
attachment.command,
|
|
407
452
|
attachment.exitCode
|
|
408
|
-
)) : ( localize(
|
|
453
|
+
)) : ( localize(5823, "Command")));
|
|
409
454
|
commandTitle.classList.add("attachment-additional-info");
|
|
410
455
|
const commandBlock = $("pre.chat-terminal-command-block");
|
|
411
456
|
hoverElement.append(commandTitle, commandBlock);
|
|
412
457
|
if (attachment.output && attachment.output.trim().length > 0) {
|
|
413
|
-
const outputTitle = $("div", {}, ( localize(
|
|
458
|
+
const outputTitle = $("div", {}, ( localize(5824, "Output:")));
|
|
414
459
|
outputTitle.classList.add("attachment-additional-info");
|
|
415
460
|
const outputBlock = $("pre.chat-terminal-command-output");
|
|
416
461
|
const fullOutputLines = attachment.output.split("\n");
|
|
@@ -455,7 +500,10 @@ let ImageAttachmentWidget = class ImageAttachmentWidget extends AbstractChatAtta
|
|
|
455
500
|
instantiationService,
|
|
456
501
|
labelService,
|
|
457
502
|
chatEntitlementService,
|
|
458
|
-
chatImageCarouselService
|
|
503
|
+
chatImageCarouselService,
|
|
504
|
+
fileDialogService,
|
|
505
|
+
fileService,
|
|
506
|
+
notificationService
|
|
459
507
|
) {
|
|
460
508
|
super(
|
|
461
509
|
attachment,
|
|
@@ -472,15 +520,19 @@ let ImageAttachmentWidget = class ImageAttachmentWidget extends AbstractChatAtta
|
|
|
472
520
|
this.labelService = labelService;
|
|
473
521
|
this.chatEntitlementService = chatEntitlementService;
|
|
474
522
|
this.chatImageCarouselService = chatImageCarouselService;
|
|
523
|
+
this.fileDialogService = fileDialogService;
|
|
524
|
+
this.fileService = fileService;
|
|
525
|
+
this.notificationService = notificationService;
|
|
526
|
+
this.element.classList.add("image-attachment");
|
|
475
527
|
let ariaLabel;
|
|
476
528
|
if (attachment.omittedState === OmittedState.Full) {
|
|
477
|
-
ariaLabel = ( localize(
|
|
529
|
+
ariaLabel = ( localize(5825, "Omitted this image: {0}", attachment.name));
|
|
478
530
|
} else if (attachment.omittedState === OmittedState.Partial) {
|
|
479
|
-
ariaLabel = ( localize(
|
|
531
|
+
ariaLabel = ( localize(5826, "Partially omitted this image: {0}", attachment.name));
|
|
480
532
|
} else if (attachment.omittedState === OmittedState.ImageLimitExceeded) {
|
|
481
|
-
ariaLabel = ( localize(
|
|
533
|
+
ariaLabel = ( localize(5827, "Image not sent due to limit: {0}", attachment.name));
|
|
482
534
|
} else {
|
|
483
|
-
ariaLabel = ( localize(
|
|
535
|
+
ariaLabel = ( localize(5828, "Attached image, {0}", attachment.name));
|
|
484
536
|
}
|
|
485
537
|
const ref = attachment.references?.[0]?.reference;
|
|
486
538
|
resource = ref && URI.isUri(ref) ? ref : undefined;
|
|
@@ -504,6 +556,7 @@ let ImageAttachmentWidget = class ImageAttachmentWidget extends AbstractChatAtta
|
|
|
504
556
|
fullName,
|
|
505
557
|
this.element,
|
|
506
558
|
imageData ?? attachment.value,
|
|
559
|
+
attachment.id,
|
|
507
560
|
this.hoverService,
|
|
508
561
|
ariaLabel,
|
|
509
562
|
currentLanguageModelName,
|
|
@@ -512,6 +565,7 @@ let ImageAttachmentWidget = class ImageAttachmentWidget extends AbstractChatAtta
|
|
|
512
565
|
attachment.omittedState,
|
|
513
566
|
this.chatEntitlementService.previewFeaturesDisabled
|
|
514
567
|
));
|
|
568
|
+
this.attachSaveButton(resource, imageData, attachment.name, options.supportsDeletion);
|
|
515
569
|
this.element.ariaLabel = this.appendDeletionHint(ariaLabel);
|
|
516
570
|
const canOpenCarousel = !!imageData && configurationService.getValue(ChatConfiguration.ImageCarouselEnabled);
|
|
517
571
|
if (canOpenCarousel || resource) {
|
|
@@ -535,14 +589,50 @@ let ImageAttachmentWidget = class ImageAttachmentWidget extends AbstractChatAtta
|
|
|
535
589
|
}));
|
|
536
590
|
await this.chatImageCarouselService.openCarouselAtResource(resource, data);
|
|
537
591
|
}
|
|
592
|
+
attachSaveButton(resource, imageData, name, supportsDeletion) {
|
|
593
|
+
if (supportsDeletion || (!resource && !imageData)) {
|
|
594
|
+
return;
|
|
595
|
+
}
|
|
596
|
+
const saveButton = ( new Button(this.element, {
|
|
597
|
+
supportIcons: true,
|
|
598
|
+
hoverDelegate: createInstantHoverDelegate(),
|
|
599
|
+
title: ( localize(5829, "Save Image As..."))
|
|
600
|
+
}));
|
|
601
|
+
saveButton.element.classList.add("chat-attached-context-download-button");
|
|
602
|
+
saveButton.element.tabIndex = -1;
|
|
603
|
+
saveButton.icon = Codicon.cloudDownload;
|
|
604
|
+
this._register(saveButton);
|
|
605
|
+
this._register(saveButton.onDidClick(async e => {
|
|
606
|
+
e.preventDefault();
|
|
607
|
+
e.stopPropagation();
|
|
608
|
+
const defaultUri = joinPath(await this.fileDialogService.defaultFilePath(), name);
|
|
609
|
+
const target = await this.fileDialogService.showSaveDialog({
|
|
610
|
+
defaultUri
|
|
611
|
+
});
|
|
612
|
+
if (!target) {
|
|
613
|
+
return;
|
|
614
|
+
}
|
|
615
|
+
try {
|
|
616
|
+
if (resource) {
|
|
617
|
+
await this.fileService.copy(resource, target, true);
|
|
618
|
+
} else if (imageData) {
|
|
619
|
+
await this.fileService.writeFile(target, VSBuffer.wrap(imageData));
|
|
620
|
+
}
|
|
621
|
+
} catch (error) {
|
|
622
|
+
this.notificationService.error(( localize(5830, "Failed to save image: {0}", error)));
|
|
623
|
+
}
|
|
624
|
+
}));
|
|
625
|
+
}
|
|
538
626
|
};
|
|
539
|
-
ImageAttachmentWidget = ( __decorate([( __param(6, ICommandService)), ( __param(7, IOpenerService)), ( __param(8, IConfigurationService)), ( __param(9, IHoverService)), ( __param(10, ILanguageModelsService)), ( __param(11, IInstantiationService)), ( __param(12, ILabelService)), ( __param(13, IChatEntitlementService)), ( __param(14, IChatImageCarouselService))], ImageAttachmentWidget));
|
|
627
|
+
ImageAttachmentWidget = ( __decorate([( __param(6, ICommandService)), ( __param(7, IOpenerService)), ( __param(8, IConfigurationService)), ( __param(9, IHoverService)), ( __param(10, ILanguageModelsService)), ( __param(11, IInstantiationService)), ( __param(12, ILabelService)), ( __param(13, IChatEntitlementService)), ( __param(14, IChatImageCarouselService)), ( __param(15, IFileDialogService)), ( __param(16, IFileService)), ( __param(17, INotificationService))], ImageAttachmentWidget));
|
|
628
|
+
const IMAGE_HOVER_THUMBNAIL_MAX_SIZE = 768;
|
|
540
629
|
function createImageElements(
|
|
541
630
|
resource,
|
|
542
631
|
name,
|
|
543
632
|
fullName,
|
|
544
633
|
element,
|
|
545
634
|
buffer,
|
|
635
|
+
cacheKey,
|
|
546
636
|
hoverService,
|
|
547
637
|
ariaLabel,
|
|
548
638
|
currentLanguageModelName,
|
|
@@ -567,11 +657,16 @@ function createImageElements(
|
|
|
567
657
|
const textLabel = $("span.chat-attached-context-custom-text", {}, name);
|
|
568
658
|
element.appendChild(pillIcon);
|
|
569
659
|
element.appendChild(textLabel);
|
|
660
|
+
let currentPill = pillIcon;
|
|
661
|
+
const replacePill = pill => {
|
|
662
|
+
currentPill.replaceWith(pill);
|
|
663
|
+
currentPill = pill;
|
|
664
|
+
};
|
|
570
665
|
const hoverElement = $("div.chat-attached-context-hover");
|
|
571
666
|
hoverElement.setAttribute("aria-label", ariaLabel);
|
|
572
667
|
if (previewFeaturesDisabled) {
|
|
573
668
|
element.classList.add("warning");
|
|
574
|
-
hoverElement.textContent = ( localize(
|
|
669
|
+
hoverElement.textContent = ( localize(5831, "Vision is disabled by your organization."));
|
|
575
670
|
disposable.add(hoverService.setupDelayedHover(element, {
|
|
576
671
|
content: hoverElement,
|
|
577
672
|
style: HoverStyle.Pointer
|
|
@@ -579,7 +674,7 @@ function createImageElements(
|
|
|
579
674
|
} else if ((!supportsVision && currentLanguageModel) || omittedState === OmittedState.Full) {
|
|
580
675
|
element.classList.add("warning");
|
|
581
676
|
hoverElement.textContent = ( localize(
|
|
582
|
-
|
|
677
|
+
5832,
|
|
583
678
|
"{0} does not support images.",
|
|
584
679
|
currentLanguageModelName ?? "This model"
|
|
585
680
|
));
|
|
@@ -591,11 +686,11 @@ function createImageElements(
|
|
|
591
686
|
element.classList.add("warning");
|
|
592
687
|
const maxImagesPerRequest = getImageAttachmentLimit(currentLanguageModel?.metadata);
|
|
593
688
|
hoverElement.textContent = maxImagesPerRequest !== undefined ? ( localize(
|
|
594
|
-
|
|
689
|
+
5833,
|
|
595
690
|
"This image was not sent because the maximum of {0} images per request was exceeded.",
|
|
596
691
|
maxImagesPerRequest
|
|
597
692
|
)) : ( localize(
|
|
598
|
-
|
|
693
|
+
5834,
|
|
599
694
|
"This image was not sent because this model's image limit was exceeded."
|
|
600
695
|
));
|
|
601
696
|
disposable.add(hoverService.setupDelayedHover(element, {
|
|
@@ -607,21 +702,7 @@ function createImageElements(
|
|
|
607
702
|
content: hoverElement,
|
|
608
703
|
style: HoverStyle.Pointer
|
|
609
704
|
}));
|
|
610
|
-
const blob = ( new Blob([buffer], {
|
|
611
|
-
type: "image/png"
|
|
612
|
-
}));
|
|
613
|
-
const url = URL.createObjectURL(blob);
|
|
614
|
-
const pillImg = $("img.chat-attached-context-pill-image", {
|
|
615
|
-
src: url,
|
|
616
|
-
alt: ""
|
|
617
|
-
});
|
|
618
|
-
const pill = $("div.chat-attached-context-pill", {}, pillImg);
|
|
619
|
-
const existingPill = element.querySelector(".chat-attached-context-pill");
|
|
620
|
-
if (existingPill) {
|
|
621
|
-
existingPill.replaceWith(pill);
|
|
622
|
-
}
|
|
623
705
|
const hoverImage = $("img.chat-attached-context-image", {
|
|
624
|
-
src: url,
|
|
625
706
|
alt: ""
|
|
626
707
|
});
|
|
627
708
|
const imageContainer = $("div.chat-attached-context-image-container", {}, hoverImage);
|
|
@@ -630,27 +711,42 @@ function createImageElements(
|
|
|
630
711
|
const urlContainer = $(
|
|
631
712
|
"a.chat-attached-context-url",
|
|
632
713
|
{},
|
|
633
|
-
omittedState === OmittedState.Partial ? ( localize(
|
|
714
|
+
omittedState === OmittedState.Partial ? ( localize(5835, "This GIF was partially omitted - current frame will be sent.")) : fullName
|
|
634
715
|
);
|
|
635
716
|
const separator = $("div.chat-attached-context-url-separator");
|
|
636
717
|
disposable.add(addDisposableListener(urlContainer, "click", () => clickHandler()));
|
|
637
718
|
hoverElement.append(separator, urlContainer);
|
|
638
719
|
}
|
|
639
|
-
|
|
640
|
-
URL.revokeObjectURL(url);
|
|
641
|
-
};
|
|
642
|
-
hoverImage.onerror = () => {
|
|
720
|
+
const onImageFailed = () => {
|
|
643
721
|
const pillIcon = $(
|
|
644
722
|
"div.chat-attached-context-pill",
|
|
645
723
|
{},
|
|
646
724
|
$("span.codicon.codicon-file-media")
|
|
647
725
|
);
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
726
|
+
replacePill(pillIcon);
|
|
727
|
+
};
|
|
728
|
+
const data = buffer instanceof Uint8Array ? buffer : ( new Uint8Array(buffer));
|
|
729
|
+
const previewImageUrl = disposable.add(( new MutableDisposable()));
|
|
730
|
+
const renderPreviewImage = async () => {
|
|
731
|
+
const thumbnail = await getOrCreateImageThumbnail(cacheKey, data, IMAGE_HOVER_THUMBNAIL_MAX_SIZE, getWindow(element));
|
|
732
|
+
if (disposable.isDisposed) {
|
|
733
|
+
return;
|
|
734
|
+
}
|
|
735
|
+
const source = thumbnail ?? ( new Blob([data]));
|
|
736
|
+
const url = URL.createObjectURL(source);
|
|
737
|
+
previewImageUrl.value = toDisposable(() => URL.revokeObjectURL(url));
|
|
738
|
+
if (thumbnail) {
|
|
739
|
+
const pillImg = $("img.chat-attached-context-pill-image", {
|
|
740
|
+
src: url,
|
|
741
|
+
alt: ""
|
|
742
|
+
});
|
|
743
|
+
const pill = $("div.chat-attached-context-pill", {}, pillImg);
|
|
744
|
+
replacePill(pill);
|
|
652
745
|
}
|
|
746
|
+
hoverImage.onerror = onImageFailed;
|
|
747
|
+
hoverImage.src = url;
|
|
653
748
|
};
|
|
749
|
+
void renderPreviewImage();
|
|
654
750
|
}
|
|
655
751
|
return disposable;
|
|
656
752
|
}
|
|
@@ -679,7 +775,7 @@ let PasteAttachmentWidget = class PasteAttachmentWidget extends AbstractChatAtta
|
|
|
679
775
|
);
|
|
680
776
|
this.hoverService = hoverService;
|
|
681
777
|
this.instantiationService = instantiationService;
|
|
682
|
-
const ariaLabel = ( localize(
|
|
778
|
+
const ariaLabel = ( localize(5836, "Attached context, {0}", attachment.name));
|
|
683
779
|
this.element.ariaLabel = this.appendDeletionHint(ariaLabel);
|
|
684
780
|
const classNames = ["file-icon", `${attachment.language}-lang-file-icon`];
|
|
685
781
|
let resource;
|
|
@@ -772,7 +868,7 @@ let DefaultChatAttachmentWidget = class DefaultChatAttachmentWidget extends Abst
|
|
|
772
868
|
const withIcon = attachment.icon?.id ? `$(${attachment.icon.id})\u00A0${attachmentLabel}` : attachmentLabel;
|
|
773
869
|
this.label.setLabel(withIcon, correspondingContentReference?.options?.status?.description);
|
|
774
870
|
}
|
|
775
|
-
this.element.ariaLabel = this.appendDeletionHint(( localize(
|
|
871
|
+
this.element.ariaLabel = this.appendDeletionHint(( localize(5836, "Attached context, {0}", attachment.name)));
|
|
776
872
|
if (attachment.kind === "diagnostic") {
|
|
777
873
|
if (attachment.filterUri) {
|
|
778
874
|
resource = attachment.filterUri ? URI.revive(attachment.filterUri) : undefined;
|
|
@@ -873,8 +969,8 @@ let PromptFileAttachmentWidget = class PromptFileAttachmentWidget extends Abstra
|
|
|
873
969
|
const fileDirname = dirname(resource.path);
|
|
874
970
|
const friendlyName = `${fileBasename} ${fileDirname}`;
|
|
875
971
|
const isPrompt = attachment.id.startsWith(PromptFileVariableKind.PromptFile);
|
|
876
|
-
const ariaLabel = isPrompt ? ( localize(
|
|
877
|
-
const typeLabel = isPrompt ? ( localize(
|
|
972
|
+
const ariaLabel = isPrompt ? ( localize(5837, "Prompt file, {0}", friendlyName)) : ( localize(5838, "Instructions attachment, {0}", friendlyName));
|
|
973
|
+
const typeLabel = isPrompt ? ( localize(5839, "Prompt")) : ( localize(5840, "Instructions"));
|
|
878
974
|
const title = this.labelService.getUriLabel(resource) + (attachment.originLabel ? `\n${attachment.originLabel}` : "");
|
|
879
975
|
this.element.classList.remove("warning", "error");
|
|
880
976
|
const fileWithoutExtension = getCleanPromptName(resource);
|
|
@@ -934,8 +1030,8 @@ let PromptTextAttachmentWidget = class PromptTextAttachmentWidget extends Abstra
|
|
|
934
1030
|
})
|
|
935
1031
|
);
|
|
936
1032
|
}
|
|
937
|
-
this.label.setLabel(( localize(
|
|
938
|
-
this.element.ariaLabel = this.appendDeletionHint(( localize(
|
|
1033
|
+
this.label.setLabel(( localize(5841, "Additional Instructions")), undefined, undefined);
|
|
1034
|
+
this.element.ariaLabel = this.appendDeletionHint(( localize(5836, "Attached context, {0}", attachment.name)));
|
|
939
1035
|
this._register(hoverService.setupDelayedHover(this.element, {
|
|
940
1036
|
...commonHoverOptions,
|
|
941
1037
|
content: attachment.value
|
|
@@ -982,18 +1078,18 @@ let ToolSetOrToolItemAttachmentWidget = class ToolSetOrToolItemAttachmentWidget
|
|
|
982
1078
|
}
|
|
983
1079
|
this.label.setLabel(`$(${icon.id})\u00A0${name}`, undefined);
|
|
984
1080
|
this.element.style.cursor = "pointer";
|
|
985
|
-
this.element.ariaLabel = this.appendDeletionHint(( localize(
|
|
1081
|
+
this.element.ariaLabel = this.appendDeletionHint(( localize(5836, "Attached context, {0}", name)));
|
|
986
1082
|
let hoverContent;
|
|
987
1083
|
if (isToolSet(toolOrToolSet)) {
|
|
988
1084
|
hoverContent = ( localize(
|
|
989
|
-
|
|
1085
|
+
5842,
|
|
990
1086
|
"{0} - {1}",
|
|
991
1087
|
toolOrToolSet.description ?? toolOrToolSet.referenceName,
|
|
992
1088
|
toolOrToolSet.source.label
|
|
993
1089
|
));
|
|
994
1090
|
} else if (toolOrToolSet) {
|
|
995
1091
|
hoverContent = ( localize(
|
|
996
|
-
|
|
1092
|
+
5843,
|
|
997
1093
|
"{0} - {1}",
|
|
998
1094
|
toolOrToolSet.userDescription ?? toolOrToolSet.modelDescription,
|
|
999
1095
|
toolOrToolSet.source.label
|
|
@@ -1066,7 +1162,7 @@ let NotebookCellOutputChatAttachmentWidget = class NotebookCellOutputChatAttachm
|
|
|
1066
1162
|
this.addResourceOpenHandlers(resource, undefined);
|
|
1067
1163
|
}
|
|
1068
1164
|
getAriaLabel(attachment) {
|
|
1069
|
-
return localize(
|
|
1165
|
+
return localize(5844, "Attached Notebook output, {0}", attachment.name);
|
|
1070
1166
|
}
|
|
1071
1167
|
renderErrorOutput(resource, attachment) {
|
|
1072
1168
|
const attachmentLabel = attachment.name;
|
|
@@ -1094,9 +1190,9 @@ let NotebookCellOutputChatAttachmentWidget = class NotebookCellOutputChatAttachm
|
|
|
1094
1190
|
renderImageOutput(resource, attachment) {
|
|
1095
1191
|
let ariaLabel;
|
|
1096
1192
|
if (attachment.omittedState === OmittedState.Full) {
|
|
1097
|
-
ariaLabel = ( localize(
|
|
1193
|
+
ariaLabel = ( localize(5845, "Omitted this Notebook ouput: {0}", attachment.name));
|
|
1098
1194
|
} else if (attachment.omittedState === OmittedState.Partial) {
|
|
1099
|
-
ariaLabel = ( localize(
|
|
1195
|
+
ariaLabel = ( localize(5846, "Partially omitted this Notebook output: {0}", attachment.name));
|
|
1100
1196
|
} else {
|
|
1101
1197
|
ariaLabel = this.getAriaLabel(attachment);
|
|
1102
1198
|
}
|
|
@@ -1113,6 +1209,7 @@ let NotebookCellOutputChatAttachmentWidget = class NotebookCellOutputChatAttachm
|
|
|
1113
1209
|
attachment.name,
|
|
1114
1210
|
this.element,
|
|
1115
1211
|
buffer,
|
|
1212
|
+
attachment.id,
|
|
1116
1213
|
this.hoverService,
|
|
1117
1214
|
ariaLabel,
|
|
1118
1215
|
currentLanguageModelName,
|
|
@@ -1166,14 +1263,14 @@ let ElementChatAttachmentWidget = class ElementChatAttachmentWidget extends Abst
|
|
|
1166
1263
|
);
|
|
1167
1264
|
this.editorService = editorService;
|
|
1168
1265
|
this.hoverService = hoverService;
|
|
1169
|
-
const ariaLabel = ( localize(
|
|
1266
|
+
const ariaLabel = ( localize(5847, "Attached element, {0}", attachment.name));
|
|
1170
1267
|
this.element.ariaLabel = this.appendDeletionHint(ariaLabel);
|
|
1171
1268
|
this.element.style.position = "relative";
|
|
1172
1269
|
this.element.style.cursor = "pointer";
|
|
1173
1270
|
const attachmentLabel = attachment.name;
|
|
1174
1271
|
const withIcon = attachment.icon?.id ? `$(${attachment.icon.id})\u00A0${attachmentLabel}` : attachmentLabel;
|
|
1175
1272
|
this.label.setLabel(withIcon, undefined, {
|
|
1176
|
-
title: ( localize(
|
|
1273
|
+
title: ( localize(5848, "Click to view the contents of: {0}", attachmentLabel))
|
|
1177
1274
|
});
|
|
1178
1275
|
this._register(this.hoverService.setupDelayedHover(
|
|
1179
1276
|
this.element,
|
|
@@ -1193,7 +1290,7 @@ let ElementChatAttachmentWidget = class ElementChatAttachmentWidget extends Abst
|
|
|
1193
1290
|
const innerScrollables = [];
|
|
1194
1291
|
{
|
|
1195
1292
|
const section = $("div.chat-element-hover-section");
|
|
1196
|
-
const header = $("div.chat-element-hover-header", {}, ( localize(
|
|
1293
|
+
const header = $("div.chat-element-hover-header", {}, ( localize(5849, "ELEMENT")));
|
|
1197
1294
|
section.appendChild(header);
|
|
1198
1295
|
const elementPre = $("pre.chat-element-hover-code");
|
|
1199
1296
|
const elementCode = $("code");
|
|
@@ -1211,7 +1308,7 @@ let ElementChatAttachmentWidget = class ElementChatAttachmentWidget extends Abst
|
|
|
1211
1308
|
const computedStyleEntries = this.getComputedStyleEntriesForHover(attachment.computedStyles);
|
|
1212
1309
|
if (computedStyleEntries.length > 0) {
|
|
1213
1310
|
const section = $("div.chat-element-hover-section");
|
|
1214
|
-
const header = $("div.chat-element-hover-header", {}, ( localize(
|
|
1311
|
+
const header = $("div.chat-element-hover-header", {}, ( localize(5850, "KEY COMPUTED STYLES")));
|
|
1215
1312
|
section.appendChild(header);
|
|
1216
1313
|
const table = $("div.chat-element-hover-table");
|
|
1217
1314
|
for (const [name, value] of computedStyleEntries) {
|
|
@@ -1230,7 +1327,7 @@ let ElementChatAttachmentWidget = class ElementChatAttachmentWidget extends Abst
|
|
|
1230
1327
|
section.appendChild(table);
|
|
1231
1328
|
const showMoreButton = $("button.chat-element-hover-show-more", {
|
|
1232
1329
|
type: "button"
|
|
1233
|
-
}, ( localize(
|
|
1330
|
+
}, ( localize(5851, "Show More...")));
|
|
1234
1331
|
this._register(
|
|
1235
1332
|
addDisposableListener(showMoreButton, EventType.CLICK, async e => {
|
|
1236
1333
|
EventHelper.stop(e, true);
|
|
@@ -1242,7 +1339,7 @@ let ElementChatAttachmentWidget = class ElementChatAttachmentWidget extends Abst
|
|
|
1242
1339
|
}
|
|
1243
1340
|
if (attachment.ancestors && attachment.ancestors.length > 1) {
|
|
1244
1341
|
const section = $("div.chat-element-hover-section");
|
|
1245
|
-
const header = $("div.chat-element-hover-header", {}, ( localize(
|
|
1342
|
+
const header = $("div.chat-element-hover-header", {}, ( localize(5852, "HTML PATH")));
|
|
1246
1343
|
section.appendChild(header);
|
|
1247
1344
|
const lines = [];
|
|
1248
1345
|
for (let i = 0; i < attachment.ancestors.length; i++) {
|
|
@@ -1265,7 +1362,7 @@ let ElementChatAttachmentWidget = class ElementChatAttachmentWidget extends Abst
|
|
|
1265
1362
|
}
|
|
1266
1363
|
if (attachment.attributes && ( Object.keys(attachment.attributes)).length > 0) {
|
|
1267
1364
|
const section = $("div.chat-element-hover-section");
|
|
1268
|
-
const header = $("div.chat-element-hover-header", {}, ( localize(
|
|
1365
|
+
const header = $("div.chat-element-hover-header", {}, ( localize(5853, "ATTRIBUTES")));
|
|
1269
1366
|
section.appendChild(header);
|
|
1270
1367
|
const table = $("div.chat-element-hover-table");
|
|
1271
1368
|
for (const [name, value] of Object.entries(attachment.attributes)) {
|
|
@@ -1279,7 +1376,7 @@ let ElementChatAttachmentWidget = class ElementChatAttachmentWidget extends Abst
|
|
|
1279
1376
|
}
|
|
1280
1377
|
if (attachment.dimensions) {
|
|
1281
1378
|
const section = $("div.chat-element-hover-section");
|
|
1282
|
-
const header = $("div.chat-element-hover-header", {}, ( localize(
|
|
1379
|
+
const header = $("div.chat-element-hover-header", {}, ( localize(5854, "POSITION & SIZE")));
|
|
1283
1380
|
section.appendChild(header);
|
|
1284
1381
|
const table = $("div.chat-element-hover-table");
|
|
1285
1382
|
const dims = [
|
|
@@ -1299,7 +1396,7 @@ let ElementChatAttachmentWidget = class ElementChatAttachmentWidget extends Abst
|
|
|
1299
1396
|
}
|
|
1300
1397
|
if (attachment.innerText) {
|
|
1301
1398
|
const section = $("div.chat-element-hover-section");
|
|
1302
|
-
const header = $("div.chat-element-hover-header", {}, ( localize(
|
|
1399
|
+
const header = $("div.chat-element-hover-header", {}, ( localize(5855, "INNER TEXT")));
|
|
1303
1400
|
section.appendChild(header);
|
|
1304
1401
|
section.appendChild($("div.chat-element-hover-text", {}, attachment.innerText));
|
|
1305
1402
|
scrollableContent.appendChild(section);
|
|
@@ -1445,7 +1542,7 @@ let SCMHistoryItemAttachmentWidget = class SCMHistoryItemAttachmentWidget extend
|
|
|
1445
1542
|
);
|
|
1446
1543
|
this.label.setLabel(attachment.name, undefined);
|
|
1447
1544
|
this.element.style.cursor = "pointer";
|
|
1448
|
-
this.element.ariaLabel = this.appendDeletionHint(( localize(
|
|
1545
|
+
this.element.ariaLabel = this.appendDeletionHint(( localize(5836, "Attached context, {0}", attachment.name)));
|
|
1449
1546
|
const {
|
|
1450
1547
|
content,
|
|
1451
1548
|
disposables
|
|
@@ -1507,7 +1604,7 @@ let SCMHistoryItemChangeAttachmentWidget = class SCMHistoryItemChangeAttachmentW
|
|
|
1507
1604
|
hidePath: true,
|
|
1508
1605
|
nameSuffix
|
|
1509
1606
|
});
|
|
1510
|
-
this.element.ariaLabel = this.appendDeletionHint(( localize(
|
|
1607
|
+
this.element.ariaLabel = this.appendDeletionHint(( localize(5836, "Attached context, {0}", attachment.name)));
|
|
1511
1608
|
const {
|
|
1512
1609
|
content,
|
|
1513
1610
|
disposables
|
|
@@ -1563,7 +1660,7 @@ let SCMHistoryItemChangeRangeAttachmentWidget = class SCMHistoryItemChangeRangeA
|
|
|
1563
1660
|
hidePath: true,
|
|
1564
1661
|
nameSuffix
|
|
1565
1662
|
});
|
|
1566
|
-
this.element.ariaLabel = this.appendDeletionHint(( localize(
|
|
1663
|
+
this.element.ariaLabel = this.appendDeletionHint(( localize(5836, "Attached context, {0}", attachment.name)));
|
|
1567
1664
|
this.addResourceOpenHandlers(attachment.value, undefined);
|
|
1568
1665
|
}
|
|
1569
1666
|
async openResource(resource, options, isDirectory, range) {
|
|
@@ -1630,9 +1727,9 @@ let BrowserViewAttachmentWidget = class BrowserViewAttachmentWidget extends Abst
|
|
|
1630
1727
|
...commonHoverOptions,
|
|
1631
1728
|
content: this._input ? {
|
|
1632
1729
|
[BrowserViewSharingState.Shared]: this._input.getTitle() ?? "",
|
|
1633
|
-
[BrowserViewSharingState.NotShared]: ( localize(
|
|
1634
|
-
[BrowserViewSharingState.Unavailable]: ( localize(
|
|
1635
|
-
}[this._input.model?.sharingState ?? BrowserViewSharingState.Shared] : ( localize(
|
|
1730
|
+
[BrowserViewSharingState.NotShared]: ( localize(5856, "This browser page is not shared with the agent.")),
|
|
1731
|
+
[BrowserViewSharingState.Unavailable]: ( localize(5857, "Browser tools are not enabled."))
|
|
1732
|
+
}[this._input.model?.sharingState ?? BrowserViewSharingState.Shared] : ( localize(5858, "This browser page is no longer open."))
|
|
1636
1733
|
}), commonHoverLifecycleOptions));
|
|
1637
1734
|
this._instantiationService.invokeFunction(accessor => {
|
|
1638
1735
|
this._register(
|
|
@@ -1678,10 +1775,10 @@ let BrowserViewAttachmentWidget = class BrowserViewAttachmentWidget extends Abst
|
|
|
1678
1775
|
strikethrough: !isAvailable
|
|
1679
1776
|
});
|
|
1680
1777
|
this.element.ariaLabel = this.appendDeletionHint(this._input ? {
|
|
1681
|
-
[BrowserViewSharingState.Shared]: ( localize(
|
|
1682
|
-
[BrowserViewSharingState.NotShared]: ( localize(
|
|
1683
|
-
[BrowserViewSharingState.Unavailable]: ( localize(
|
|
1684
|
-
}[sharingState] : ( localize(
|
|
1778
|
+
[BrowserViewSharingState.Shared]: ( localize(5859, "Attached browser page, {0}", name)),
|
|
1779
|
+
[BrowserViewSharingState.NotShared]: ( localize(5860, "Browser page not shared with agent, {0}", name)),
|
|
1780
|
+
[BrowserViewSharingState.Unavailable]: ( localize(5861, "Browser tools are not enabled, {0}", name))
|
|
1781
|
+
}[sharingState] : ( localize(5862, "Browser page unavailable, {0}", name)));
|
|
1685
1782
|
}
|
|
1686
1783
|
async openResource(_resource, options, _isDirectory, _range) {
|
|
1687
1784
|
if (this._input) {
|
|
@@ -1832,7 +1929,7 @@ function addBasicContextMenu(accessor, widget, scopedContextKeyService, menuId,
|
|
|
1832
1929
|
const chatAttachmentResourceContextKey = ( new RawContextKey("chatAttachmentResource", undefined, {
|
|
1833
1930
|
type: "URI",
|
|
1834
1931
|
description: ( localize(
|
|
1835
|
-
|
|
1932
|
+
5863,
|
|
1836
1933
|
"The full value of the chat attachment resource, including scheme and path"
|
|
1837
1934
|
))
|
|
1838
1935
|
}));
|