@codingame/monaco-vscode-katex-common 33.0.9 → 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 +2 -2
- 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
|
@@ -33,9 +33,9 @@ export interface IChatResultEditorOptions {
|
|
|
33
33
|
readonly wordWrap: "off" | "on";
|
|
34
34
|
}
|
|
35
35
|
export declare class ChatEditorOptions extends Disposable {
|
|
36
|
-
private
|
|
37
|
-
private
|
|
38
|
-
private
|
|
36
|
+
private foreground;
|
|
37
|
+
private inputEditorBackgroundColor;
|
|
38
|
+
private resultEditorBackgroundColor;
|
|
39
39
|
private readonly configurationService;
|
|
40
40
|
private readonly themeService;
|
|
41
41
|
private readonly viewDescriptorService;
|
|
@@ -47,4 +47,5 @@ export declare class ChatEditorOptions extends Disposable {
|
|
|
47
47
|
private static readonly relevantSettingIds;
|
|
48
48
|
constructor(viewId: string | undefined, foreground: string, inputEditorBackgroundColor: string, resultEditorBackgroundColor: string, configurationService: IConfigurationService, themeService: IThemeService, viewDescriptorService: IViewDescriptorService);
|
|
49
49
|
private update;
|
|
50
|
+
setColors(foreground: string, inputEditorBackgroundColor: string, resultEditorBackgroundColor: string): void;
|
|
50
51
|
}
|
|
@@ -88,6 +88,12 @@ let ChatEditorOptions = class ChatEditorOptions extends Disposable {
|
|
|
88
88
|
};
|
|
89
89
|
this._onDidChange.fire();
|
|
90
90
|
}
|
|
91
|
+
setColors(foreground, inputEditorBackgroundColor, resultEditorBackgroundColor) {
|
|
92
|
+
this.foreground = foreground;
|
|
93
|
+
this.inputEditorBackgroundColor = inputEditorBackgroundColor;
|
|
94
|
+
this.resultEditorBackgroundColor = resultEditorBackgroundColor;
|
|
95
|
+
this.update();
|
|
96
|
+
}
|
|
91
97
|
};
|
|
92
98
|
ChatEditorOptions = ChatEditorOptions_1 = ( __decorate([( __param(4, IConfigurationService)), ( __param(5, IThemeService)), ( __param(6, IViewDescriptorService))], ChatEditorOptions));
|
|
93
99
|
|
|
@@ -27,6 +27,7 @@ import { IChatSlashCommandService } from "@codingame/monaco-vscode-api/vscode/vs
|
|
|
27
27
|
import { IChatTodoListService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/chatTodoListService.service";
|
|
28
28
|
import { ChatViewModel, IChatResponseViewModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel";
|
|
29
29
|
import { ChatAgentLocation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants";
|
|
30
|
+
import { IChatGoalSummaryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatGoalSummaryService.service";
|
|
30
31
|
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service";
|
|
31
32
|
import { IHandOff } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptFileParser";
|
|
32
33
|
import { IPromptsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service";
|
|
@@ -63,7 +64,7 @@ export interface IChatWidgetLocationOptions {
|
|
|
63
64
|
export declare function isQuickChat(widget: IChatWidget): boolean;
|
|
64
65
|
export declare class ChatWidget extends Disposable implements IChatWidget {
|
|
65
66
|
private readonly viewOptions;
|
|
66
|
-
private
|
|
67
|
+
private styles;
|
|
67
68
|
private readonly codeEditorService;
|
|
68
69
|
private readonly configurationService;
|
|
69
70
|
private readonly dialogService;
|
|
@@ -90,6 +91,7 @@ export declare class ChatWidget extends Disposable implements IChatWidget {
|
|
|
90
91
|
private readonly chatTipService;
|
|
91
92
|
private readonly chatDebugService;
|
|
92
93
|
private readonly accessibilityService;
|
|
94
|
+
private readonly chatGoalSummaryService;
|
|
93
95
|
static readonly CONTRIBS: {
|
|
94
96
|
new (...args: [
|
|
95
97
|
IChatWidget,
|
|
@@ -168,6 +170,9 @@ export declare class ChatWidget extends Disposable implements IChatWidget {
|
|
|
168
170
|
private readonly _hasPendingRequestsContextKey;
|
|
169
171
|
private readonly _sessionHasDebugDataContextKey;
|
|
170
172
|
private _attachmentCapabilities;
|
|
173
|
+
private _goalSummaryTokenSource;
|
|
174
|
+
private _goalBannerDismissedForCurrentRequest;
|
|
175
|
+
private readonly _goalBannerDismissListener;
|
|
171
176
|
private readonly viewModelDisposables;
|
|
172
177
|
private _viewModel;
|
|
173
178
|
private set viewModel(value);
|
|
@@ -182,7 +187,7 @@ export declare class ChatWidget extends Disposable implements IChatWidget {
|
|
|
182
187
|
readonly viewContext: IChatWidgetViewContext;
|
|
183
188
|
get supportsChangingModes(): boolean;
|
|
184
189
|
get locationData(): IChatLocationData | undefined;
|
|
185
|
-
constructor(location: ChatAgentLocation | IChatWidgetLocationOptions, viewContext: IChatWidgetViewContext | undefined, viewOptions: IChatWidgetViewOptions, styles: IChatWidgetStyles, codeEditorService: ICodeEditorService, configurationService: IConfigurationService, dialogService: IDialogService, contextKeyService: IContextKeyService, instantiationService: IInstantiationService, chatService: IChatService, chatAgentService: IChatAgentService, chatWidgetService: IChatWidgetService, chatAccessibilityService: IChatAccessibilityService, logService: ILogService, themeService: IThemeService, chatSlashCommandService: IChatSlashCommandService, chatEditingService: IChatEditingService, telemetryService: ITelemetryService, promptsService: IPromptsService, customizationHarnessService: ICustomizationHarnessService, toolsService: ILanguageModelToolsService, chatLayoutService: IChatLayoutService, chatEntitlementService: IChatEntitlementService, chatSessionsService: IChatSessionsService, agentSessionsService: IAgentSessionsService, chatTodoListService: IChatTodoListService, lifecycleService: ILifecycleService, chatAttachmentResolveService: IChatAttachmentResolveService, chatTipService: IChatTipService, chatDebugService: IChatDebugService, accessibilityService: IAccessibilityService);
|
|
190
|
+
constructor(location: ChatAgentLocation | IChatWidgetLocationOptions, viewContext: IChatWidgetViewContext | undefined, viewOptions: IChatWidgetViewOptions, styles: IChatWidgetStyles, codeEditorService: ICodeEditorService, configurationService: IConfigurationService, dialogService: IDialogService, contextKeyService: IContextKeyService, instantiationService: IInstantiationService, chatService: IChatService, chatAgentService: IChatAgentService, chatWidgetService: IChatWidgetService, chatAccessibilityService: IChatAccessibilityService, logService: ILogService, themeService: IThemeService, chatSlashCommandService: IChatSlashCommandService, chatEditingService: IChatEditingService, telemetryService: ITelemetryService, promptsService: IPromptsService, customizationHarnessService: ICustomizationHarnessService, toolsService: ILanguageModelToolsService, chatLayoutService: IChatLayoutService, chatEntitlementService: IChatEntitlementService, chatSessionsService: IChatSessionsService, agentSessionsService: IAgentSessionsService, chatTodoListService: IChatTodoListService, lifecycleService: ILifecycleService, chatAttachmentResolveService: IChatAttachmentResolveService, chatTipService: IChatTipService, chatDebugService: IChatDebugService, accessibilityService: IAccessibilityService, chatGoalSummaryService: IChatGoalSummaryService);
|
|
186
191
|
private _lastSelectedAgent;
|
|
187
192
|
set lastSelectedAgent(agent: IChatAgentData | undefined);
|
|
188
193
|
get lastSelectedAgent(): IChatAgentData | undefined;
|
|
@@ -260,6 +265,14 @@ export declare class ChatWidget extends Disposable implements IChatWidget {
|
|
|
260
265
|
private getWidgetViewKindTag;
|
|
261
266
|
private createInput;
|
|
262
267
|
private onDidStyleChange;
|
|
268
|
+
/**
|
|
269
|
+
* Updates the widget's color styles after construction. Propagates the new
|
|
270
|
+
* `listForeground`/`listBackground` to the list widget, pushes the new color
|
|
271
|
+
* tokens into `editorOptions` so subscribers (code blocks, result/input editor
|
|
272
|
+
* backgrounds, container CSS variables) pick them up via `onDidChange`, and
|
|
273
|
+
* refreshes the CSS variables the chat container exposes for stylesheet rules.
|
|
274
|
+
*/
|
|
275
|
+
setStyles(styles: IChatWidgetStyles): void;
|
|
263
276
|
setModel(model: IChatModel | undefined): void;
|
|
264
277
|
getFocus(): ChatTreeItem | undefined;
|
|
265
278
|
reveal(item: ChatTreeItem, relativeTop?: number): void;
|
|
@@ -278,6 +291,8 @@ export declare class ChatWidget extends Disposable implements IChatWidget {
|
|
|
278
291
|
rerunLastRequest(): Promise<void>;
|
|
279
292
|
private getConfiguredThinkingStyle;
|
|
280
293
|
private logThinkingStyleUsage;
|
|
294
|
+
private _cancelGoalSummary;
|
|
295
|
+
private _maybeStartGoalSummary;
|
|
281
296
|
/**
|
|
282
297
|
* @returns `false` when the prompt metadata requested an agent switch that the
|
|
283
298
|
* user cancelled, signalling that input submission should be aborted.
|
|
@@ -7,7 +7,7 @@ import * as chatViewWelcome from './media/chatViewWelcome.css';
|
|
|
7
7
|
import { $ as $$1, clearNode, setVisibility, findParentWithClass, getTopLeftOffset, append, addStandardDisposableListener, EventType, addDisposableListener, isAncestor, scheduleAtNextAnimationFrame, getWindow, createElement, Dimension } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
8
8
|
import { status } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/aria/aria';
|
|
9
9
|
import { timeout, disposableTimeout } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
10
|
-
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
10
|
+
import { CancellationToken, CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
11
11
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
12
12
|
import { toErrorMessage } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errorMessage';
|
|
13
13
|
import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
@@ -50,6 +50,7 @@ import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbenc
|
|
|
50
50
|
import { decidedChatEditingResourceContextKey, ModifiedFileEntryState, hasUndecidedChatEditingResourceContextKey, hasAppliedChatEditsContextKey, inChatEditingSessionContextKey, applyingChatEditsFailedContextKey } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
|
|
51
51
|
import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService.service';
|
|
52
52
|
import { IChatLayoutService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/widget/chatLayoutService.service';
|
|
53
|
+
import { logChangesToStateModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel';
|
|
53
54
|
import { getModeNameForTelemetry, ChatMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes';
|
|
54
55
|
import { ChatRequestToolPart, ChatRequestToolSetPart, ChatRequestDynamicVariablePart, IParsedChatRequest, chatAgentLeader, chatSubcommandLeader, ChatRequestSlashPromptPart, formatChatQuestion, ChatRequestAgentPart } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes';
|
|
55
56
|
import { ChatRequestParser } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatRequestParser';
|
|
@@ -63,6 +64,7 @@ import { IChatTodoListService } from '@codingame/monaco-vscode-api/vscode/vs/wor
|
|
|
63
64
|
import { isWorkspaceVariableEntry, isPromptFileVariableEntry, isPromptTextVariableEntry, toPromptFileVariableEntry, PromptFileVariableKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries';
|
|
64
65
|
import { isResponseVM, isRequestVM, ChatViewModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel';
|
|
65
66
|
import { ChatConfiguration, ChatModeKind, ChatPermissionLevel, ThinkingDisplayMode, ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
67
|
+
import { IChatGoalSummaryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatGoalSummaryService.service';
|
|
66
68
|
import { isToolSet } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
67
69
|
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
|
|
68
70
|
import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service';
|
|
@@ -114,7 +116,7 @@ const supportsAllAttachments = {
|
|
|
114
116
|
supportsHandOffs: true,
|
|
115
117
|
supportsCheckpoints: true
|
|
116
118
|
};
|
|
117
|
-
const DISCLAIMER = ( localize(
|
|
119
|
+
const DISCLAIMER = ( localize(7657, "AI responses may be inaccurate"));
|
|
118
120
|
let ChatWidget = class ChatWidget extends Disposable {
|
|
119
121
|
static {
|
|
120
122
|
ChatWidget_1 = this;
|
|
@@ -220,7 +222,8 @@ let ChatWidget = class ChatWidget extends Disposable {
|
|
|
220
222
|
chatAttachmentResolveService,
|
|
221
223
|
chatTipService,
|
|
222
224
|
chatDebugService,
|
|
223
|
-
accessibilityService
|
|
225
|
+
accessibilityService,
|
|
226
|
+
chatGoalSummaryService
|
|
224
227
|
) {
|
|
225
228
|
super();
|
|
226
229
|
this.viewOptions = viewOptions;
|
|
@@ -251,6 +254,7 @@ let ChatWidget = class ChatWidget extends Disposable {
|
|
|
251
254
|
this.chatTipService = chatTipService;
|
|
252
255
|
this.chatDebugService = chatDebugService;
|
|
253
256
|
this.accessibilityService = accessibilityService;
|
|
257
|
+
this.chatGoalSummaryService = chatGoalSummaryService;
|
|
254
258
|
this._onDidSubmitAgent = this._register(( new Emitter()));
|
|
255
259
|
this.onDidSubmitAgent = this._onDidSubmitAgent.event;
|
|
256
260
|
this._onDidChangeAgent = this._register(( new Emitter()));
|
|
@@ -291,6 +295,8 @@ let ChatWidget = class ChatWidget extends Disposable {
|
|
|
291
295
|
this._visible = false;
|
|
292
296
|
this._isRenderingWelcome = false;
|
|
293
297
|
this._attachmentCapabilities = supportsAllAttachments;
|
|
298
|
+
this._goalBannerDismissedForCurrentRequest = false;
|
|
299
|
+
this._goalBannerDismissListener = this._register(( new MutableDisposable()));
|
|
294
300
|
this.viewModelDisposables = this._register(( new DisposableStore()));
|
|
295
301
|
this._editingSession = observableValue(this, undefined);
|
|
296
302
|
this._viewModelObs = observableFromEvent(this, this.onDidChangeViewModel, () => this.viewModel);
|
|
@@ -409,6 +415,14 @@ let ChatWidget = class ChatWidget extends Disposable {
|
|
|
409
415
|
})
|
|
410
416
|
);
|
|
411
417
|
this.chatSuggestNextWidget = this._register(this.instantiationService.createInstance(ChatSuggestNextWidget));
|
|
418
|
+
this._register(autorun(r => {
|
|
419
|
+
const viewModel = viewModelObs.read(r);
|
|
420
|
+
const inProgress = viewModel?.model.requestInProgress.read(r) ?? false;
|
|
421
|
+
if (!inProgress) {
|
|
422
|
+
this._cancelGoalSummary();
|
|
423
|
+
this.inputPartDisposable.value?.clearGoalBanner();
|
|
424
|
+
}
|
|
425
|
+
}));
|
|
412
426
|
this._register(autorun(r => {
|
|
413
427
|
const viewModel = viewModelObs.read(r);
|
|
414
428
|
const sessions = chatEditingService.editingSessionsObs.read(r);
|
|
@@ -866,7 +880,7 @@ let ChatWidget = class ChatWidget extends Disposable {
|
|
|
866
880
|
if (this.chatEntitlementService.anonymous && !this.chatEntitlementService.sentiment.completed) {
|
|
867
881
|
const providers = product.defaultChatAgent.provider;
|
|
868
882
|
additionalMessage = ( new MarkdownString(( localize(
|
|
869
|
-
|
|
883
|
+
7658,
|
|
870
884
|
"By continuing with {0} Copilot, you agree to {1}'s [Terms]({2}) and [Privacy Statement]({3}).",
|
|
871
885
|
providers.default.name,
|
|
872
886
|
providers.default.name,
|
|
@@ -948,7 +962,7 @@ let ChatWidget = class ChatWidget extends Disposable {
|
|
|
948
962
|
return ( new MarkdownString(""));
|
|
949
963
|
} else if (this._instructionFilesExist === false) {
|
|
950
964
|
return (new MarkdownString(localize(
|
|
951
|
-
|
|
965
|
+
7659,
|
|
952
966
|
"[Generate Agent Instructions]({0}) to onboard AI onto your codebase.",
|
|
953
967
|
`command:${GENERATE_AGENT_INSTRUCTIONS_COMMAND_ID}`
|
|
954
968
|
), {
|
|
@@ -974,19 +988,19 @@ let ChatWidget = class ChatWidget extends Disposable {
|
|
|
974
988
|
const providerTitle = contribution?.welcomeTitle;
|
|
975
989
|
const providerMessage = contribution?.welcomeMessage;
|
|
976
990
|
const message = providerMessage ? ( new MarkdownString(providerMessage)) : (this._lockedAgent?.prefix === "@copilot " ? ( new MarkdownString(( localize(
|
|
977
|
-
|
|
991
|
+
7660,
|
|
978
992
|
"This chat session will be forwarded to the {0} [coding agent]({1}) where work is completed in the background. ",
|
|
979
993
|
this._lockedAgent.prefix,
|
|
980
994
|
"https://aka.ms/coding-agent-docs"
|
|
981
995
|
)) + DISCLAIMER, {
|
|
982
996
|
isTrusted: true
|
|
983
997
|
})) : ( new MarkdownString(( localize(
|
|
984
|
-
|
|
998
|
+
7661,
|
|
985
999
|
"This chat session will be forwarded to the {0} coding agent where work is completed in the background. ",
|
|
986
1000
|
this._lockedAgent?.prefix
|
|
987
1001
|
)) + DISCLAIMER)));
|
|
988
1002
|
return {
|
|
989
|
-
title: providerTitle ?? ( localize(
|
|
1003
|
+
title: providerTitle ?? ( localize(7662, "Delegate to {0}", this._lockedAgent?.prefix)),
|
|
990
1004
|
message,
|
|
991
1005
|
icon: providerIcon ?? Codicon.sendToRemoteAgent,
|
|
992
1006
|
additionalMessage,
|
|
@@ -995,11 +1009,11 @@ let ChatWidget = class ChatWidget extends Disposable {
|
|
|
995
1009
|
}
|
|
996
1010
|
let title;
|
|
997
1011
|
if (this.input.currentModeKind === ChatModeKind.Ask) {
|
|
998
|
-
title = ( localize(
|
|
1012
|
+
title = ( localize(7663, "Ask about your code"));
|
|
999
1013
|
} else if (this.input.currentModeKind === ChatModeKind.Edit) {
|
|
1000
|
-
title = ( localize(
|
|
1014
|
+
title = ( localize(7664, "Edit in context"));
|
|
1001
1015
|
} else {
|
|
1002
|
-
title = ( localize(
|
|
1016
|
+
title = ( localize(7665, "Build with Agent"));
|
|
1003
1017
|
}
|
|
1004
1018
|
return {
|
|
1005
1019
|
title,
|
|
@@ -1374,6 +1388,9 @@ let ChatWidget = class ChatWidget extends Disposable {
|
|
|
1374
1388
|
this.input.setPermissionLevel(
|
|
1375
1389
|
this.inputPart.currentModeInfo.permissionLevel ?? ChatPermissionLevel.Default
|
|
1376
1390
|
);
|
|
1391
|
+
if (currentElement.modelId) {
|
|
1392
|
+
this.input.switchModelByIdentifier(currentElement.modelId);
|
|
1393
|
+
}
|
|
1377
1394
|
this.input.setEditing(true, isEditingSentRequest);
|
|
1378
1395
|
this._onDidChangeActiveInputEditor.fire();
|
|
1379
1396
|
} else {
|
|
@@ -1450,9 +1467,9 @@ let ChatWidget = class ChatWidget extends Disposable {
|
|
|
1450
1467
|
if (!isInput) {
|
|
1451
1468
|
this.inputPart.setChatMode(this.input.currentModeObs.get().id);
|
|
1452
1469
|
this.inputPart.setPermissionLevel(this.input.currentModeInfo.permissionLevel ?? ChatPermissionLevel.Default);
|
|
1453
|
-
const
|
|
1454
|
-
if (
|
|
1455
|
-
this.inputPart.
|
|
1470
|
+
const editModelId = this.input.currentLanguageModel;
|
|
1471
|
+
if (editModelId) {
|
|
1472
|
+
this.inputPart.switchModelByIdentifier(editModelId);
|
|
1456
1473
|
}
|
|
1457
1474
|
this.inputPart?.toggleChatInputOverlay(false);
|
|
1458
1475
|
try {
|
|
@@ -1647,12 +1664,39 @@ let ChatWidget = class ChatWidget extends Disposable {
|
|
|
1647
1664
|
this.themeService.getColorTheme().getColor(this.styles.listBackground)?.toString() ?? ""
|
|
1648
1665
|
);
|
|
1649
1666
|
}
|
|
1667
|
+
setStyles(styles) {
|
|
1668
|
+
const oldStyles = this.styles;
|
|
1669
|
+
this.styles = styles;
|
|
1670
|
+
const listColorsChanged = oldStyles.listBackground !== styles.listBackground || oldStyles.listForeground !== styles.listForeground;
|
|
1671
|
+
if (listColorsChanged) {
|
|
1672
|
+
this.listWidget?.setStyles({
|
|
1673
|
+
listForeground: styles.listForeground,
|
|
1674
|
+
listBackground: styles.listBackground
|
|
1675
|
+
});
|
|
1676
|
+
}
|
|
1677
|
+
const editorColorsChanged = oldStyles.listForeground !== styles.listForeground || oldStyles.inputEditorBackground !== styles.inputEditorBackground || oldStyles.resultEditorBackground !== styles.resultEditorBackground;
|
|
1678
|
+
if (editorColorsChanged && this.container) {
|
|
1679
|
+
this.editorOptions.setColors(
|
|
1680
|
+
styles.listForeground,
|
|
1681
|
+
styles.inputEditorBackground,
|
|
1682
|
+
styles.resultEditorBackground
|
|
1683
|
+
);
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1650
1686
|
setModel(model) {
|
|
1651
1687
|
if (!this.container || !this.inputPart) {
|
|
1652
1688
|
this.logService.warn("ChatWidget#setModel called before render() completed");
|
|
1653
1689
|
return;
|
|
1654
1690
|
}
|
|
1691
|
+
const currentInputModel = this.viewModel?.model?.inputModel?.state?.get();
|
|
1655
1692
|
if (!model) {
|
|
1693
|
+
logChangesToStateModel(
|
|
1694
|
+
this.viewModel?.model?.inputModel,
|
|
1695
|
+
`ChatWidget.setModel to empty, old ${this.viewModel?.sessionResource.toString()}`,
|
|
1696
|
+
undefined,
|
|
1697
|
+
currentInputModel,
|
|
1698
|
+
this.logService
|
|
1699
|
+
);
|
|
1656
1700
|
this.inputPart.flushInputStateToModel();
|
|
1657
1701
|
if (this.viewModel?.editing) {
|
|
1658
1702
|
this.finishedEditing();
|
|
@@ -1666,6 +1710,7 @@ let ChatWidget = class ChatWidget extends Disposable {
|
|
|
1666
1710
|
if (isEqual(model.sessionResource, this.viewModel?.sessionResource)) {
|
|
1667
1711
|
return;
|
|
1668
1712
|
}
|
|
1713
|
+
logChangesToStateModel(model.inputModel, `ChatWidget.setModel new ${( model.sessionResource.toString())}, old ${this.viewModel?.sessionResource.toString()}`, model.inputModel.state.get(), currentInputModel, this.logService);
|
|
1669
1714
|
if (this.viewModel?.editing) {
|
|
1670
1715
|
this.finishedEditing();
|
|
1671
1716
|
}
|
|
@@ -1685,7 +1730,7 @@ let ChatWidget = class ChatWidget extends Disposable {
|
|
|
1685
1730
|
let placeholder = this.chatSessionsService.getChatSessionContribution(this._lockedAgent.id)?.inputPlaceholder;
|
|
1686
1731
|
if (!placeholder) {
|
|
1687
1732
|
placeholder = ( localize(
|
|
1688
|
-
|
|
1733
|
+
7666,
|
|
1689
1734
|
"Chat with {0}",
|
|
1690
1735
|
this._lockedAgent.displayName || this._lockedAgent.name
|
|
1691
1736
|
));
|
|
@@ -1748,7 +1793,7 @@ let ChatWidget = class ChatWidget extends Disposable {
|
|
|
1748
1793
|
this._hasPendingRequestsContextKey.set(pendingCount > 0);
|
|
1749
1794
|
const steeringCount = pendingRequests.filter(pending => pending.kind === ChatRequestQueueKind.Steering).length;
|
|
1750
1795
|
if (announceSteering && steeringCount > 0 && lastSteeringCount === 0) {
|
|
1751
|
-
status(( localize(
|
|
1796
|
+
status(( localize(7667, "Steering")));
|
|
1752
1797
|
}
|
|
1753
1798
|
lastSteeringCount = steeringCount;
|
|
1754
1799
|
};
|
|
@@ -1927,14 +1972,58 @@ let ChatWidget = class ChatWidget extends Disposable {
|
|
|
1927
1972
|
requestKind
|
|
1928
1973
|
});
|
|
1929
1974
|
}
|
|
1975
|
+
_cancelGoalSummary() {
|
|
1976
|
+
this._goalSummaryTokenSource?.dispose(true);
|
|
1977
|
+
this._goalSummaryTokenSource = undefined;
|
|
1978
|
+
}
|
|
1979
|
+
_maybeStartGoalSummary(prompt) {
|
|
1980
|
+
const inputPart = this.inputPartDisposable.value;
|
|
1981
|
+
if (!inputPart) {
|
|
1982
|
+
return;
|
|
1983
|
+
}
|
|
1984
|
+
const permissionLevel = inputPart.currentModeInfo?.permissionLevel;
|
|
1985
|
+
const goalModeOn = this.configurationService.getValue(ChatConfiguration.AutopilotAdvancedEnabled) === true;
|
|
1986
|
+
if (permissionLevel !== ChatPermissionLevel.Autopilot || !goalModeOn) {
|
|
1987
|
+
this._cancelGoalSummary();
|
|
1988
|
+
inputPart.clearGoalBanner();
|
|
1989
|
+
return;
|
|
1990
|
+
}
|
|
1991
|
+
this._goalBannerDismissedForCurrentRequest = false;
|
|
1992
|
+
this._goalBannerDismissListener.value = inputPart.onDidDismissGoalBanner(() => {
|
|
1993
|
+
this._goalBannerDismissedForCurrentRequest = true;
|
|
1994
|
+
this._cancelGoalSummary();
|
|
1995
|
+
});
|
|
1996
|
+
this._cancelGoalSummary();
|
|
1997
|
+
const cts = ( new CancellationTokenSource());
|
|
1998
|
+
this._goalSummaryTokenSource = cts;
|
|
1999
|
+
inputPart.showGoalBannerLoading();
|
|
2000
|
+
this.chatGoalSummaryService.summarize(prompt, cts.token).then(summary => {
|
|
2001
|
+
if (cts.token.isCancellationRequested || this._goalBannerDismissedForCurrentRequest) {
|
|
2002
|
+
return;
|
|
2003
|
+
}
|
|
2004
|
+
const current = this.inputPartDisposable.value;
|
|
2005
|
+
if (!current) {
|
|
2006
|
+
return;
|
|
2007
|
+
}
|
|
2008
|
+
if (summary) {
|
|
2009
|
+
current.setGoalBanner(summary);
|
|
2010
|
+
} else {
|
|
2011
|
+
current.clearGoalBanner();
|
|
2012
|
+
}
|
|
2013
|
+
}, () => {
|
|
2014
|
+
if (cts.token.isCancellationRequested) {
|
|
2015
|
+
return;
|
|
2016
|
+
}
|
|
2017
|
+
this.inputPartDisposable.value?.clearGoalBanner();
|
|
2018
|
+
});
|
|
2019
|
+
}
|
|
1930
2020
|
async _applyPromptFileIfSet(requestInput, sessionResource) {
|
|
1931
2021
|
const agentSlashPromptPart = this.parsedInput.parts.find(r => r instanceof ChatRequestSlashPromptPart);
|
|
1932
2022
|
if (!agentSlashPromptPart) {
|
|
1933
2023
|
return true;
|
|
1934
2024
|
}
|
|
1935
2025
|
this.chatTipService.recordSlashCommandUsage(agentSlashPromptPart.name);
|
|
1936
|
-
const
|
|
1937
|
-
const slashCommand = await this.customizationHarnessService.resolvePromptSlashCommand(agentSlashPromptPart.name, sessionType, CancellationToken.None);
|
|
2026
|
+
const slashCommand = await this.customizationHarnessService.resolvePromptSlashCommand(agentSlashPromptPart.name, sessionResource, CancellationToken.None);
|
|
1938
2027
|
if (!slashCommand) {
|
|
1939
2028
|
return true;
|
|
1940
2029
|
}
|
|
@@ -2110,6 +2199,7 @@ let ChatWidget = class ChatWidget extends Disposable {
|
|
|
2110
2199
|
this.logThinkingStyleUsage("submit");
|
|
2111
2200
|
this.updateChatViewVisibility();
|
|
2112
2201
|
this.input.acceptInput(options?.storeToHistory ?? isUserQuery);
|
|
2202
|
+
this._maybeStartGoalSummary(requestInputs.input);
|
|
2113
2203
|
const sent = ChatSendResult.isQueued(result) ? await result.deferred : result;
|
|
2114
2204
|
if (!ChatSendResult.isSent(sent)) {
|
|
2115
2205
|
return;
|
|
@@ -2175,16 +2265,16 @@ let ChatWidget = class ChatWidget extends Disposable {
|
|
|
2175
2265
|
}
|
|
2176
2266
|
const promptResult = await this.dialogService.prompt({
|
|
2177
2267
|
type: "question",
|
|
2178
|
-
message: ( localize(
|
|
2268
|
+
message: ( localize(7668, "You already have pending requests.")),
|
|
2179
2269
|
detail: ( localize(
|
|
2180
|
-
|
|
2270
|
+
7669,
|
|
2181
2271
|
"Do you want to keep them in the queue or remove them before sending this message?"
|
|
2182
2272
|
)),
|
|
2183
2273
|
buttons: [{
|
|
2184
|
-
label: ( localize(
|
|
2274
|
+
label: ( localize(7670, "Keep Pending Requests")),
|
|
2185
2275
|
run: () => "keep"
|
|
2186
2276
|
}, {
|
|
2187
|
-
label: ( localize(
|
|
2277
|
+
label: ( localize(7671, "Remove Pending Requests")),
|
|
2188
2278
|
run: () => "remove"
|
|
2189
2279
|
}],
|
|
2190
2280
|
cancelButton: true
|
|
@@ -2432,7 +2522,7 @@ let ChatWidget = class ChatWidget extends Disposable {
|
|
|
2432
2522
|
this.listWidget.delegateScrollFromMouseWheelEvent(browserEvent);
|
|
2433
2523
|
}
|
|
2434
2524
|
};
|
|
2435
|
-
ChatWidget = ChatWidget_1 = ( __decorate([( __param(4, ICodeEditorService)), ( __param(5, IConfigurationService)), ( __param(6, IDialogService)), ( __param(7, IContextKeyService)), ( __param(8, IInstantiationService)), ( __param(9, IChatService)), ( __param(10, IChatAgentService)), ( __param(11, IChatWidgetService)), ( __param(12, IChatAccessibilityService)), ( __param(13, ILogService)), ( __param(14, IThemeService)), ( __param(15, IChatSlashCommandService)), ( __param(16, IChatEditingService)), ( __param(17, ITelemetryService)), ( __param(18, IPromptsService)), ( __param(19, ICustomizationHarnessService)), ( __param(20, ILanguageModelToolsService)), ( __param(21, IChatLayoutService)), ( __param(22, IChatEntitlementService)), ( __param(23, IChatSessionsService)), ( __param(24, IAgentSessionsService)), ( __param(25, IChatTodoListService)), ( __param(26, ILifecycleService)), ( __param(27, IChatAttachmentResolveService)), ( __param(28, IChatTipService)), ( __param(29, IChatDebugService)), ( __param(30, IAccessibilityService))], ChatWidget));
|
|
2525
|
+
ChatWidget = ChatWidget_1 = ( __decorate([( __param(4, ICodeEditorService)), ( __param(5, IConfigurationService)), ( __param(6, IDialogService)), ( __param(7, IContextKeyService)), ( __param(8, IInstantiationService)), ( __param(9, IChatService)), ( __param(10, IChatAgentService)), ( __param(11, IChatWidgetService)), ( __param(12, IChatAccessibilityService)), ( __param(13, ILogService)), ( __param(14, IThemeService)), ( __param(15, IChatSlashCommandService)), ( __param(16, IChatEditingService)), ( __param(17, ITelemetryService)), ( __param(18, IPromptsService)), ( __param(19, ICustomizationHarnessService)), ( __param(20, ILanguageModelToolsService)), ( __param(21, IChatLayoutService)), ( __param(22, IChatEntitlementService)), ( __param(23, IChatSessionsService)), ( __param(24, IAgentSessionsService)), ( __param(25, IChatTodoListService)), ( __param(26, ILifecycleService)), ( __param(27, IChatAttachmentResolveService)), ( __param(28, IChatTipService)), ( __param(29, IChatDebugService)), ( __param(30, IAccessibilityService)), ( __param(31, IChatGoalSummaryService))], ChatWidget));
|
|
2436
2526
|
const MIN_LIST_HEIGHT = 50;
|
|
2437
2527
|
|
|
2438
2528
|
export { ChatWidget, isQuickChat };
|
|
@@ -45,7 +45,7 @@ let ChatFollowups = class ChatFollowups extends Disposable {
|
|
|
45
45
|
} else if (followup.kind === "command") {
|
|
46
46
|
button.element.classList.add("interactive-followup-command");
|
|
47
47
|
}
|
|
48
|
-
button.element.ariaLabel = ( localize(
|
|
48
|
+
button.element.ariaLabel = ( localize(7672, "Follow up question: {0}", baseTitle));
|
|
49
49
|
button.label = ( new MarkdownString(baseTitle));
|
|
50
50
|
this._register(button.onDidClick(() => this.clickHandler(followup)));
|
|
51
51
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
/**
|
|
3
|
+
* Slim banner that surfaces the current autopilot goal above the chat input.
|
|
4
|
+
* Shows a target icon, a short "Goal: <text>" summary, and a dismiss button.
|
|
5
|
+
*
|
|
6
|
+
* The widget is purely presentational — owners drive its content with
|
|
7
|
+
* {@link setLoading}, {@link setGoal}, and {@link clear}, and observe dismissals via
|
|
8
|
+
* {@link onDismiss}.
|
|
9
|
+
*/
|
|
10
|
+
export declare class ChatGoalBannerWidget extends Disposable {
|
|
11
|
+
readonly domNode: HTMLElement;
|
|
12
|
+
private readonly _bannerEl;
|
|
13
|
+
private readonly _textEl;
|
|
14
|
+
private readonly _onDismissEmitter;
|
|
15
|
+
readonly onDismiss: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
16
|
+
constructor();
|
|
17
|
+
setLoading(): void;
|
|
18
|
+
setGoal(summary: string): void;
|
|
19
|
+
clear(): void;
|
|
20
|
+
private _show;
|
|
21
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
|
|
2
|
+
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
|
+
import { $ as $$1, append, addDisposableListener, EventType } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
5
|
+
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
6
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
|
+
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
8
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
9
|
+
import * as chatGoalBannerWidget from './media/chatGoalBannerWidget.css';
|
|
10
|
+
|
|
11
|
+
registerCss(chatGoalBannerWidget);
|
|
12
|
+
const $ = $$1;
|
|
13
|
+
class ChatGoalBannerWidget extends Disposable {
|
|
14
|
+
constructor() {
|
|
15
|
+
super();
|
|
16
|
+
this._onDismissEmitter = this._register(( new Emitter()));
|
|
17
|
+
this.onDismiss = this._onDismissEmitter.event;
|
|
18
|
+
this.domNode = $(".chat-goal-banner-widget");
|
|
19
|
+
this._bannerEl = append(this.domNode, $(".chat-goal-banner"));
|
|
20
|
+
const iconEl = append(this._bannerEl, $(".chat-goal-banner-icon"));
|
|
21
|
+
iconEl.appendChild($(ThemeIcon.asCSSSelector(Codicon.target)));
|
|
22
|
+
const labelEl = append(this._bannerEl, $(".chat-goal-banner-label"));
|
|
23
|
+
labelEl.textContent = ( localize(7673, "Goal"));
|
|
24
|
+
this._textEl = append(this._bannerEl, $(".chat-goal-banner-text"));
|
|
25
|
+
const dismissBtn = append(this._bannerEl, $("button.chat-goal-banner-dismiss"));
|
|
26
|
+
dismissBtn.title = ( localize(7674, "Dismiss"));
|
|
27
|
+
dismissBtn.setAttribute("aria-label", ( localize(7674, "Dismiss")));
|
|
28
|
+
dismissBtn.appendChild($(ThemeIcon.asCSSSelector(Codicon.close)));
|
|
29
|
+
this._register(addDisposableListener(dismissBtn, EventType.CLICK, () => {
|
|
30
|
+
this.clear();
|
|
31
|
+
this._onDismissEmitter.fire();
|
|
32
|
+
}));
|
|
33
|
+
this.clear();
|
|
34
|
+
}
|
|
35
|
+
setLoading() {
|
|
36
|
+
this._textEl.textContent = ( localize(7675, "Determining goal…"));
|
|
37
|
+
this._textEl.classList.add("loading");
|
|
38
|
+
this._show();
|
|
39
|
+
}
|
|
40
|
+
setGoal(summary) {
|
|
41
|
+
const trimmed = summary.trim();
|
|
42
|
+
if (!trimmed) {
|
|
43
|
+
this.clear();
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
this._textEl.textContent = trimmed;
|
|
47
|
+
this._textEl.classList.remove("loading");
|
|
48
|
+
this._bannerEl.title = trimmed;
|
|
49
|
+
this._show();
|
|
50
|
+
}
|
|
51
|
+
clear() {
|
|
52
|
+
this._textEl.textContent = "";
|
|
53
|
+
this._textEl.classList.remove("loading");
|
|
54
|
+
this._bannerEl.removeAttribute("title");
|
|
55
|
+
this.domNode.parentElement?.classList.remove("has-goal");
|
|
56
|
+
this.domNode.style.display = "none";
|
|
57
|
+
}
|
|
58
|
+
_show() {
|
|
59
|
+
this.domNode.style.display = "";
|
|
60
|
+
this.domNode.parentElement?.classList.add("has-goal");
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { ChatGoalBannerWidget };
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.d.ts
CHANGED
|
@@ -19,6 +19,13 @@ export interface IChatInputNotification {
|
|
|
19
19
|
readonly actions: readonly IChatInputNotificationAction[];
|
|
20
20
|
readonly dismissible: boolean;
|
|
21
21
|
readonly autoDismissOnMessage: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Optional allow-list of chat session types that should display this
|
|
24
|
+
* notification. When undefined, the notification renders in every chat
|
|
25
|
+
* input. When set, only chat inputs whose current session type is in the
|
|
26
|
+
* list will render it.
|
|
27
|
+
*/
|
|
28
|
+
readonly sessionTypes?: readonly string[];
|
|
22
29
|
}
|
|
23
30
|
export declare class ChatInputNotificationService extends Disposable implements IChatInputNotificationService {
|
|
24
31
|
readonly _serviceBrand: undefined;
|
|
@@ -29,6 +36,8 @@ export declare class ChatInputNotificationService extends Disposable implements
|
|
|
29
36
|
private _insertionCounter;
|
|
30
37
|
private readonly _onDidChange;
|
|
31
38
|
readonly onDidChange: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
39
|
+
private readonly _onDidDismiss;
|
|
40
|
+
readonly onDidDismiss: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<string>;
|
|
32
41
|
/**
|
|
33
42
|
* Signature of the last active notification we announced via ARIA, so we
|
|
34
43
|
* don't re-announce the same content when the model fires `onDidChange`
|
|
@@ -38,7 +47,7 @@ export declare class ChatInputNotificationService extends Disposable implements
|
|
|
38
47
|
setNotification(notification: IChatInputNotification): void;
|
|
39
48
|
deleteNotification(id: string): void;
|
|
40
49
|
dismissNotification(id: string): void;
|
|
41
|
-
getActiveNotification(): IChatInputNotification | undefined;
|
|
50
|
+
getActiveNotification(filter?: (notification: IChatInputNotification) => boolean): IChatInputNotification | undefined;
|
|
42
51
|
handleMessageSent(): void;
|
|
43
52
|
private _fireDidChange;
|
|
44
53
|
/**
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.js
CHANGED
|
@@ -21,6 +21,8 @@ class ChatInputNotificationService extends Disposable {
|
|
|
21
21
|
this._insertionCounter = 0;
|
|
22
22
|
this._onDidChange = this._register(( new Emitter()));
|
|
23
23
|
this.onDidChange = this._onDidChange.event;
|
|
24
|
+
this._onDidDismiss = this._register(( new Emitter()));
|
|
25
|
+
this.onDidDismiss = this._onDidDismiss.event;
|
|
24
26
|
}
|
|
25
27
|
setNotification(notification) {
|
|
26
28
|
this._notifications.set(notification.id, notification);
|
|
@@ -38,16 +40,20 @@ class ChatInputNotificationService extends Disposable {
|
|
|
38
40
|
dismissNotification(id) {
|
|
39
41
|
if (( this._notifications.has(id)) && !( this._dismissed.has(id))) {
|
|
40
42
|
this._dismissed.add(id);
|
|
43
|
+
this._onDidDismiss.fire(id);
|
|
41
44
|
this._fireDidChange();
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
|
-
getActiveNotification() {
|
|
47
|
+
getActiveNotification(filter) {
|
|
45
48
|
let best;
|
|
46
49
|
let bestOrder = -1;
|
|
47
50
|
for (const notification of ( this._notifications.values())) {
|
|
48
51
|
if (( this._dismissed.has(notification.id))) {
|
|
49
52
|
continue;
|
|
50
53
|
}
|
|
54
|
+
if (filter && !filter(notification)) {
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
51
57
|
const order = this._insertionOrder.get(notification.id) ?? 0;
|
|
52
58
|
if (!best || notification.severity > best.severity || (notification.severity === best.severity && order > bestOrder)) {
|
|
53
59
|
best = notification;
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationWidget.d.ts
CHANGED
|
@@ -15,7 +15,17 @@ export declare class ChatInputNotificationWidget extends Disposable {
|
|
|
15
15
|
private readonly _markdownRendererService;
|
|
16
16
|
readonly domNode: HTMLElement;
|
|
17
17
|
private readonly _contentDisposables;
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Optional provider that returns the current session type of the owning
|
|
20
|
+
* chat input part. When set and a notification specifies a `sessionTypes`
|
|
21
|
+
* allow-list, the widget will only render the notification if the current
|
|
22
|
+
* session type matches.
|
|
23
|
+
*/
|
|
24
|
+
private readonly _sessionTypeProvider;
|
|
25
|
+
constructor(sessionTypeProvider: (() => string | undefined) | undefined, _notificationService: IChatInputNotificationService, _commandService: ICommandService, _telemetryService: ITelemetryService, _markdownRendererService: IMarkdownRendererService);
|
|
26
|
+
/** Re-evaluates which notification (if any) to display. Safe to call externally when the owner's session type changes. */
|
|
27
|
+
rerender(): void;
|
|
19
28
|
private _render;
|
|
29
|
+
private _matchesSession;
|
|
20
30
|
private _renderNotification;
|
|
21
31
|
}
|