@codingame/monaco-vscode-katex-common 25.1.1 → 26.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.d.ts +23 -2
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +64 -27
- package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.d.ts +3 -1
- package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.js +31 -28
- package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +2 -0
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +71 -50
- package/vscode/src/vs/platform/editor/browser/editor.js +17 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +112 -129
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +10 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +110 -85
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +21 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +308 -216
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +153 -148
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +247 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +347 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +287 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +89 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +188 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +677 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentSessionHoverWidget.css +98 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +263 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentModel.js +34 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +19 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +762 -359
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.d.ts +22 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +188 -99
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.d.ts +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +166 -113
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +12 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +279 -213
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +533 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +382 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.d.ts +101 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +509 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +130 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +276 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +24 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +128 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +153 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +1218 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/media/chatSessionPickerActionItem.css +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +193 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +93 -89
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcome.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +42 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +58 -56
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +18 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +17 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +132 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +68 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +14 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.js +36 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.js +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.d.ts +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.js +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +22 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +34 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.d.ts +1 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +198 -135
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.js +38 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.js +29 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.js +41 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.js +23 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorContentPart.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +20 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +291 -152
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +227 -162
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownDecorationsRenderer.js +68 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +76 -75
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.d.ts +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +96 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +74 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.js +11 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +107 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +814 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +34 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.d.ts +8 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +236 -197
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +123 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +492 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +75 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.js +31 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +42 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +55 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +714 -148
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.d.ts +2 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +143 -153
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +14 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +79 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.d.ts +10 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +209 -77
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.d.ts +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +71 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +83 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +248 -190
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +1 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatInlineAnchorWidget.css +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatPullRequestContent.css +5 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +493 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatSubagentContent.css +63 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +121 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTipContent.css +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +51 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +46 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +99 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.d.ts +112 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +634 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.d.ts +49 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +132 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatResultListSubPart.js +15 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +196 -149
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +577 -193
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +119 -86
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +10 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +165 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.js +5 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +75 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +30 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +1 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +102 -106
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +44 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.js +67 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.js +69 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +122 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +39 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +1110 -597
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +291 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +485 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatOptions.js +38 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +9 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +650 -689
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +21 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +102 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +1253 -790
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.js +51 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +102 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +16 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +192 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +11 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +99 -66
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +188 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +115 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +129 -167
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatViewWelcome.css +16 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +143 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +206 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +152 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageWidget.css +67 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +170 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +80 -19
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatWidgetHistoryService.js +20 -28
- package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.js +22 -19
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +122 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +19 -104
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +316 -1040
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +162 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +98 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +68 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +416 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +1 -6
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +194 -215
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +74 -104
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +45 -91
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatEditorAffordance.css +22 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +98 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +96 -68
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.js +11 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +150 -0
- package/vscode/src/vs/workbench/contrib/markdown/browser/markedKatexSupport.js +141 -147
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.d.ts +64 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.js +200 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.d.ts +548 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.js +23 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +338 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.js +58 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.d.ts +75 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +364 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/interactiveEditor.css +21 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/media/interactive.css +36 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.d.ts +110 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +692 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +158 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.d.ts +80 -21
- package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +440 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatInputRelatedFilesContrib.d.ts +0 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatInputRelatedFilesContrib.js +0 -139
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +0 -1081
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.d.ts +0 -199
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +0 -482
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +0 -28
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +0 -37
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +0 -94
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +0 -495
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.d.ts +0 -72
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +0 -454
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +0 -66
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +0 -372
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.d.ts +0 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +0 -58
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +0 -26
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +0 -594
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +0 -55
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +0 -273
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +0 -1746
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +0 -269
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +0 -258
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +0 -806
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +0 -116
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +0 -62
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +0 -40
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +0 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +0 -295
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +0 -51
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +0 -241
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +0 -146
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +0 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +0 -90
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +0 -41
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +0 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +0 -42
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +0 -77
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +0 -469
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +0 -149
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +0 -823
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +0 -180
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +0 -29
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +0 -102
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +0 -567
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +0 -189
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +0 -75
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +0 -439
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +0 -57
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +0 -263
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js +0 -48
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +0 -39
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +0 -89
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +0 -26
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +0 -92
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.d.ts +0 -33
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +0 -108
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
|
|
2
|
+
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
4
|
+
import * as inlineChatOverlayWidget from './media/inlineChatOverlayWidget.css';
|
|
5
|
+
import { $, append, addDisposableListener, trackFocus, isAncestorOfActiveElement, createElement, DisposableResizeObserver } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
6
|
+
import { renderAsPlaintext } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/markdownRenderer';
|
|
7
|
+
import { StandardKeyboardEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/keyboardEvent';
|
|
8
|
+
import { Separator } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
9
|
+
import { ActionBar, ActionsOrientation } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
10
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
11
|
+
import { KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
12
|
+
import { Disposable, DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
13
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
14
|
+
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
15
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
16
|
+
import { EditorOption } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/config/editorOptions';
|
|
17
|
+
import { EditorExtensionsRegistry } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorExtensions';
|
|
18
|
+
import { CodeEditorWidget } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/widget/codeEditor/codeEditorWidget';
|
|
19
|
+
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
|
|
20
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
21
|
+
import { MenuWorkbenchToolBar, HiddenItemStrategy } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
|
|
22
|
+
import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
23
|
+
import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service';
|
|
24
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
25
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
26
|
+
import { ChatEditingAcceptRejectActionViewItem } from '../../chat/browser/chatEditing/chatEditingEditorOverlay.js';
|
|
27
|
+
import { ACTION_START } from '../common/inlineChat.js';
|
|
28
|
+
import { StickyScrollController } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/stickyScroll/browser/stickyScrollController';
|
|
29
|
+
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
30
|
+
import { getFlatActionBarActions } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
31
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
32
|
+
import { getSimpleEditorOptions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions';
|
|
33
|
+
import { PlaceholderTextContribution } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/placeholderText/browser/placeholderTextContribution';
|
|
34
|
+
import { Position } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/position';
|
|
35
|
+
import { CancelChatActionId } from '../../chat/browser/actions/chatExecuteActions.js';
|
|
36
|
+
import { assertType } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
37
|
+
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
38
|
+
import { observableFromEvent, observableFromEventOpts } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
|
|
39
|
+
import { constObservable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/constObservable';
|
|
40
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
41
|
+
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
42
|
+
|
|
43
|
+
registerCss(inlineChatOverlayWidget);
|
|
44
|
+
let InlineChatInputWidget = class InlineChatInputWidget extends Disposable {
|
|
45
|
+
constructor(
|
|
46
|
+
_editorObs,
|
|
47
|
+
_keybindingService,
|
|
48
|
+
_menuService,
|
|
49
|
+
_contextKeyService,
|
|
50
|
+
instantiationService,
|
|
51
|
+
modelService,
|
|
52
|
+
configurationService
|
|
53
|
+
) {
|
|
54
|
+
super();
|
|
55
|
+
this._editorObs = _editorObs;
|
|
56
|
+
this._keybindingService = _keybindingService;
|
|
57
|
+
this._menuService = _menuService;
|
|
58
|
+
this._contextKeyService = _contextKeyService;
|
|
59
|
+
this._position = observableValue(this, null);
|
|
60
|
+
this.position = this._position;
|
|
61
|
+
this._showStore = this._store.add(( new DisposableStore()));
|
|
62
|
+
this._anchorLineNumber = 0;
|
|
63
|
+
this._anchorLeft = 0;
|
|
64
|
+
this._anchorAbove = false;
|
|
65
|
+
this._domNode = $(".inline-chat-gutter-menu");
|
|
66
|
+
this._inputContainer = append(this._domNode, $(".input"));
|
|
67
|
+
this._inputContainer.style.width = "200px";
|
|
68
|
+
this._inputContainer.style.height = "26px";
|
|
69
|
+
this._inputContainer.style.display = "flex";
|
|
70
|
+
this._inputContainer.style.alignItems = "center";
|
|
71
|
+
this._inputContainer.style.justifyContent = "center";
|
|
72
|
+
const options = getSimpleEditorOptions(configurationService);
|
|
73
|
+
options.wordWrap = "on";
|
|
74
|
+
options.lineNumbers = "off";
|
|
75
|
+
options.glyphMargin = false;
|
|
76
|
+
options.lineDecorationsWidth = 0;
|
|
77
|
+
options.lineNumbersMinChars = 0;
|
|
78
|
+
options.folding = false;
|
|
79
|
+
options.minimap = {
|
|
80
|
+
enabled: false
|
|
81
|
+
};
|
|
82
|
+
options.scrollbar = {
|
|
83
|
+
vertical: "auto",
|
|
84
|
+
horizontal: "hidden",
|
|
85
|
+
alwaysConsumeMouseWheel: true,
|
|
86
|
+
verticalSliderSize: 6
|
|
87
|
+
};
|
|
88
|
+
options.renderLineHighlight = "none";
|
|
89
|
+
const codeEditorWidgetOptions = {
|
|
90
|
+
isSimpleWidget: true,
|
|
91
|
+
contributions: EditorExtensionsRegistry.getSomeEditorContributions([PlaceholderTextContribution.ID])
|
|
92
|
+
};
|
|
93
|
+
this._input = this._store.add(
|
|
94
|
+
instantiationService.createInstance(CodeEditorWidget, this._inputContainer, options, codeEditorWidgetOptions)
|
|
95
|
+
);
|
|
96
|
+
const model = this._store.add(modelService.createModel("", null, ( URI.parse(`gutter-input:${Date.now()}`)), true));
|
|
97
|
+
this._input.setModel(model);
|
|
98
|
+
const stickyScrollController = StickyScrollController.get(this._editorObs.editor);
|
|
99
|
+
this._stickyScrollHeight = stickyScrollController ? observableFromEvent(
|
|
100
|
+
stickyScrollController.onDidChangeStickyScrollHeight,
|
|
101
|
+
() => stickyScrollController.stickyScrollWidgetHeight
|
|
102
|
+
) : constObservable(0);
|
|
103
|
+
this._store.add(autorun(r => {
|
|
104
|
+
const selection = this._editorObs.cursorSelection.read(r);
|
|
105
|
+
const hasSelection = selection && !selection.isEmpty();
|
|
106
|
+
const placeholderText = hasSelection ? ( localize(8640, "Modify selected code")) : ( localize(8641, "Generate code"));
|
|
107
|
+
this._input.updateOptions({
|
|
108
|
+
placeholder: this._keybindingService.appendKeybinding(placeholderText, ACTION_START)
|
|
109
|
+
});
|
|
110
|
+
}));
|
|
111
|
+
this._store.add(this._input.onDidContentSizeChange(e => {
|
|
112
|
+
if (e.contentHeightChanged) {
|
|
113
|
+
this._updateInputHeight(e.contentHeight);
|
|
114
|
+
}
|
|
115
|
+
}));
|
|
116
|
+
this._store.add(this._input.onKeyDown(e => {
|
|
117
|
+
if (e.keyCode === KeyCode.Enter && !e.shiftKey) {
|
|
118
|
+
const value = this._input.getModel().getValue() ?? "";
|
|
119
|
+
if (this._inlineStartAction && value) {
|
|
120
|
+
e.preventDefault();
|
|
121
|
+
e.stopPropagation();
|
|
122
|
+
this._actionBar.actionRunner.run(this._inlineStartAction, {
|
|
123
|
+
message: value,
|
|
124
|
+
autoSend: true
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
} else if (e.keyCode === KeyCode.Escape) {
|
|
128
|
+
const value = this._input.getModel().getValue() ?? "";
|
|
129
|
+
if (!value) {
|
|
130
|
+
e.preventDefault();
|
|
131
|
+
e.stopPropagation();
|
|
132
|
+
this._hide();
|
|
133
|
+
}
|
|
134
|
+
} else if (e.keyCode === KeyCode.DownArrow) {
|
|
135
|
+
const inputModel = this._input.getModel();
|
|
136
|
+
const position = this._input.getPosition();
|
|
137
|
+
const lastLineNumber = inputModel.getLineCount();
|
|
138
|
+
const lastLineMaxColumn = inputModel.getLineMaxColumn(lastLineNumber);
|
|
139
|
+
if (Position.equals(position, ( new Position(lastLineNumber, lastLineMaxColumn)))) {
|
|
140
|
+
e.preventDefault();
|
|
141
|
+
e.stopPropagation();
|
|
142
|
+
this._actionBar.focus();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}));
|
|
146
|
+
this._actionBar = this._store.add(( new ActionBar(this._domNode, {
|
|
147
|
+
orientation: ActionsOrientation.VERTICAL,
|
|
148
|
+
preventLoopNavigation: true
|
|
149
|
+
})));
|
|
150
|
+
this._store.add(addDisposableListener(this._actionBar.domNode, "keydown", e => {
|
|
151
|
+
const event = ( new StandardKeyboardEvent(e));
|
|
152
|
+
if (event.equals(KeyCode.UpArrow) && this._actionBar.isFocused(
|
|
153
|
+
this._actionBar.viewItems.findIndex(item => item.action.id !== Separator.ID)
|
|
154
|
+
)) {
|
|
155
|
+
event.preventDefault();
|
|
156
|
+
event.stopPropagation();
|
|
157
|
+
this._input.focus();
|
|
158
|
+
}
|
|
159
|
+
}, true));
|
|
160
|
+
const focusTracker = this._store.add(trackFocus(this._domNode));
|
|
161
|
+
this._store.add(focusTracker.onDidBlur(() => this._hide()));
|
|
162
|
+
this._store.add(this._actionBar.onDidCancel(() => this._hide()));
|
|
163
|
+
this._store.add(this._actionBar.onWillRun(() => this._hide()));
|
|
164
|
+
}
|
|
165
|
+
show(lineNumber, left, anchorAbove) {
|
|
166
|
+
this._showStore.clear();
|
|
167
|
+
this._input.getModel().setValue("");
|
|
168
|
+
this._updateInputHeight(this._input.getContentHeight());
|
|
169
|
+
this._refreshActions();
|
|
170
|
+
this._anchorLineNumber = lineNumber;
|
|
171
|
+
this._anchorLeft = left;
|
|
172
|
+
this._anchorAbove = anchorAbove;
|
|
173
|
+
this._updatePosition();
|
|
174
|
+
this._showStore.add(this._editorObs.createOverlayWidget({
|
|
175
|
+
domNode: this._domNode,
|
|
176
|
+
position: this._position,
|
|
177
|
+
minContentWidthInPx: constObservable(0),
|
|
178
|
+
allowEditorOverflow: true
|
|
179
|
+
}));
|
|
180
|
+
if (anchorAbove) {
|
|
181
|
+
this._updatePosition();
|
|
182
|
+
}
|
|
183
|
+
this._showStore.add(this._editorObs.editor.onDidScrollChange(() => {
|
|
184
|
+
const visibleRanges = this._editorObs.editor.getVisibleRanges();
|
|
185
|
+
const isLineVisible = ( visibleRanges.some(
|
|
186
|
+
range => this._anchorLineNumber >= range.startLineNumber && this._anchorLineNumber <= range.endLineNumber
|
|
187
|
+
));
|
|
188
|
+
const hasContent = !!this._input.getModel().getValue();
|
|
189
|
+
if (!isLineVisible && !hasContent) {
|
|
190
|
+
this._hide();
|
|
191
|
+
} else {
|
|
192
|
+
this._updatePosition();
|
|
193
|
+
}
|
|
194
|
+
}));
|
|
195
|
+
setTimeout(() => this._input.focus(), 0);
|
|
196
|
+
}
|
|
197
|
+
_updatePosition() {
|
|
198
|
+
const editor = this._editorObs.editor;
|
|
199
|
+
const lineHeight = editor.getOption(EditorOption.lineHeight);
|
|
200
|
+
const top = editor.getTopForLineNumber(this._anchorLineNumber) - editor.getScrollTop();
|
|
201
|
+
let adjustedTop = top;
|
|
202
|
+
if (this._anchorAbove) {
|
|
203
|
+
const widgetHeight = this._domNode.offsetHeight;
|
|
204
|
+
adjustedTop = top - widgetHeight;
|
|
205
|
+
} else {
|
|
206
|
+
adjustedTop = top + lineHeight;
|
|
207
|
+
}
|
|
208
|
+
const stickyScrollHeight = this._stickyScrollHeight.get();
|
|
209
|
+
const layoutInfo = editor.getLayoutInfo();
|
|
210
|
+
const widgetHeight = this._domNode.offsetHeight;
|
|
211
|
+
const minTop = stickyScrollHeight;
|
|
212
|
+
const maxTop = layoutInfo.height - widgetHeight;
|
|
213
|
+
const clampedTop = Math.max(minTop, Math.min(adjustedTop, maxTop));
|
|
214
|
+
const isClamped = clampedTop !== adjustedTop;
|
|
215
|
+
this._domNode.classList.toggle("clamped", isClamped);
|
|
216
|
+
this._position.set({
|
|
217
|
+
preference: {
|
|
218
|
+
top: clampedTop,
|
|
219
|
+
left: this._anchorLeft
|
|
220
|
+
},
|
|
221
|
+
stackOrdinal: 10000
|
|
222
|
+
}, undefined);
|
|
223
|
+
}
|
|
224
|
+
_hide() {
|
|
225
|
+
const editorDomNode = this._editorObs.editor.getDomNode();
|
|
226
|
+
if (editorDomNode && isAncestorOfActiveElement(editorDomNode)) {
|
|
227
|
+
this._editorObs.editor.focus();
|
|
228
|
+
}
|
|
229
|
+
this._position.set(null, undefined);
|
|
230
|
+
this._showStore.clear();
|
|
231
|
+
}
|
|
232
|
+
_refreshActions() {
|
|
233
|
+
this._actionBar.clear();
|
|
234
|
+
this._inlineStartAction = undefined;
|
|
235
|
+
const actions = getFlatActionBarActions(
|
|
236
|
+
this._menuService.getMenuActions(MenuId.ChatEditorInlineGutter, this._contextKeyService, {
|
|
237
|
+
shouldForwardArgs: true
|
|
238
|
+
})
|
|
239
|
+
);
|
|
240
|
+
for (const action of actions) {
|
|
241
|
+
if (action.id === ACTION_START) {
|
|
242
|
+
this._inlineStartAction = action;
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
245
|
+
const keybinding = this._keybindingService.lookupKeybinding(action.id)?.getLabel();
|
|
246
|
+
this._actionBar.push(action, {
|
|
247
|
+
icon: false,
|
|
248
|
+
label: true,
|
|
249
|
+
keybinding
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
_updateInputHeight(contentHeight) {
|
|
254
|
+
const lineHeight = this._input.getOption(EditorOption.lineHeight);
|
|
255
|
+
const maxHeight = 3 * lineHeight;
|
|
256
|
+
const clampedHeight = Math.min(contentHeight, maxHeight);
|
|
257
|
+
const containerPadding = 8;
|
|
258
|
+
this._inputContainer.style.height = `${clampedHeight + containerPadding}px`;
|
|
259
|
+
this._input.layout({
|
|
260
|
+
width: 200,
|
|
261
|
+
height: clampedHeight
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
InlineChatInputWidget = ( __decorate([( __param(1, IKeybindingService)), ( __param(2, IMenuService)), ( __param(3, IContextKeyService)), ( __param(4, IInstantiationService)), ( __param(5, IModelService)), ( __param(6, IConfigurationService))], InlineChatInputWidget));
|
|
266
|
+
let InlineChatSessionOverlayWidget = class InlineChatSessionOverlayWidget extends Disposable {
|
|
267
|
+
constructor(_editorObs, _instaService, _keybindingService) {
|
|
268
|
+
super();
|
|
269
|
+
this._editorObs = _editorObs;
|
|
270
|
+
this._instaService = _instaService;
|
|
271
|
+
this._keybindingService = _keybindingService;
|
|
272
|
+
this._domNode = createElement("div");
|
|
273
|
+
this._showStore = this._store.add(( new DisposableStore()));
|
|
274
|
+
this._position = observableValue(this, null);
|
|
275
|
+
this._minContentWidthInPx = constObservable(0);
|
|
276
|
+
this._domNode.classList.add("inline-chat-session-overlay-widget");
|
|
277
|
+
this._container = createElement("div");
|
|
278
|
+
this._domNode.appendChild(this._container);
|
|
279
|
+
this._container.classList.add("inline-chat-session-overlay-container");
|
|
280
|
+
this._statusNode = createElement("div");
|
|
281
|
+
this._statusNode.classList.add("status");
|
|
282
|
+
this._icon = append(this._statusNode, $("span"));
|
|
283
|
+
this._message = append(this._statusNode, $("span.message"));
|
|
284
|
+
this._container.appendChild(this._statusNode);
|
|
285
|
+
this._toolbarNode = createElement("div");
|
|
286
|
+
this._toolbarNode.classList.add("toolbar");
|
|
287
|
+
const stickyScrollController = StickyScrollController.get(this._editorObs.editor);
|
|
288
|
+
this._stickyScrollHeight = stickyScrollController ? observableFromEvent(
|
|
289
|
+
stickyScrollController.onDidChangeStickyScrollHeight,
|
|
290
|
+
() => stickyScrollController.stickyScrollWidgetHeight
|
|
291
|
+
) : constObservable(0);
|
|
292
|
+
}
|
|
293
|
+
show(session) {
|
|
294
|
+
assertType(this._editorObs.editor.hasModel());
|
|
295
|
+
this._showStore.clear();
|
|
296
|
+
const entry = derived(r => session.editingSession.readEntry(session.uri, r));
|
|
297
|
+
const requestMessage = derived(r => {
|
|
298
|
+
const chatModel = session?.chatModel;
|
|
299
|
+
if (!session || !chatModel) {
|
|
300
|
+
return undefined;
|
|
301
|
+
}
|
|
302
|
+
const response = chatModel.lastRequestObs.read(r)?.response;
|
|
303
|
+
if (!response) {
|
|
304
|
+
return {
|
|
305
|
+
message: ( localize(8642, "Working...")),
|
|
306
|
+
icon: ThemeIcon.modify(Codicon.loading, "spin")
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
if (response.isComplete) {
|
|
310
|
+
const result = response.result;
|
|
311
|
+
if (result?.errorDetails) {
|
|
312
|
+
return {
|
|
313
|
+
message: ( localize(8643, "Sorry, your request failed")),
|
|
314
|
+
icon: Codicon.error
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
const changes = entry.read(r)?.changesCount.read(r) ?? 0;
|
|
318
|
+
return {
|
|
319
|
+
message: changes === 0 ? ( localize(8644, "Done")) : changes === 1 ? ( localize(8645, "Done, 1 change")) : ( localize(8646, "Done, {0} changes", changes)),
|
|
320
|
+
icon: Codicon.check
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
const lastPart = observableFromEventOpts({
|
|
324
|
+
equalsFn: () => false
|
|
325
|
+
}, response.onDidChange, () => response.response.value).read(r).filter(part => part.kind === "progressMessage" || part.kind === "toolInvocation").at(-1);
|
|
326
|
+
if (lastPart?.kind === "toolInvocation") {
|
|
327
|
+
return {
|
|
328
|
+
message: lastPart.invocationMessage,
|
|
329
|
+
icon: ThemeIcon.modify(Codicon.loading, "spin")
|
|
330
|
+
};
|
|
331
|
+
} else if (lastPart?.kind === "progressMessage") {
|
|
332
|
+
return {
|
|
333
|
+
message: lastPart.content,
|
|
334
|
+
icon: ThemeIcon.modify(Codicon.loading, "spin")
|
|
335
|
+
};
|
|
336
|
+
} else {
|
|
337
|
+
return {
|
|
338
|
+
message: ( localize(8642, "Working...")),
|
|
339
|
+
icon: ThemeIcon.modify(Codicon.loading, "spin")
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
this._showStore.add(autorun(r => {
|
|
344
|
+
const value = requestMessage.read(r);
|
|
345
|
+
if (value) {
|
|
346
|
+
this._message.innerText = renderAsPlaintext(value.message);
|
|
347
|
+
this._icon.className = "";
|
|
348
|
+
this._icon.classList.add(...ThemeIcon.asClassNameArray(value.icon));
|
|
349
|
+
} else {
|
|
350
|
+
this._message.innerText = "";
|
|
351
|
+
this._icon.className = "";
|
|
352
|
+
}
|
|
353
|
+
}));
|
|
354
|
+
this._container.appendChild(this._toolbarNode);
|
|
355
|
+
this._showStore.add(toDisposable(() => this._toolbarNode.remove()));
|
|
356
|
+
const that = this;
|
|
357
|
+
this._showStore.add(
|
|
358
|
+
this._instaService.createInstance(MenuWorkbenchToolBar, this._toolbarNode, MenuId.ChatEditorInlineExecute, {
|
|
359
|
+
telemetrySource: "inlineChatProgress.overlayToolbar",
|
|
360
|
+
hiddenItemStrategy: HiddenItemStrategy.Ignore,
|
|
361
|
+
toolbarOptions: {
|
|
362
|
+
primaryGroup: () => true,
|
|
363
|
+
useSeparatorsInPrimaryActions: true
|
|
364
|
+
},
|
|
365
|
+
menuOptions: {
|
|
366
|
+
renderShortTitle: true
|
|
367
|
+
},
|
|
368
|
+
actionViewItemProvider: (action, options) => {
|
|
369
|
+
const primaryActions = [CancelChatActionId, "inlineChat2.keep"];
|
|
370
|
+
const labeledActions = primaryActions.concat(["inlineChat2.undo"]);
|
|
371
|
+
if (!labeledActions.includes(action.id)) {
|
|
372
|
+
return undefined;
|
|
373
|
+
}
|
|
374
|
+
return ( new ChatEditingAcceptRejectActionViewItem(action, options, entry, undefined, that._keybindingService, primaryActions));
|
|
375
|
+
}
|
|
376
|
+
})
|
|
377
|
+
);
|
|
378
|
+
const lineHeight = this._editorObs.getOption(EditorOption.lineHeight);
|
|
379
|
+
const widgetWidth = observableValue(this, 0);
|
|
380
|
+
const resizeObserver = new DisposableResizeObserver(() => {
|
|
381
|
+
widgetWidth.set(this._domNode.offsetWidth, undefined);
|
|
382
|
+
});
|
|
383
|
+
this._showStore.add(resizeObserver);
|
|
384
|
+
this._showStore.add(resizeObserver.observe(this._domNode));
|
|
385
|
+
this._showStore.add(autorun(r => {
|
|
386
|
+
const layoutInfo = this._editorObs.layoutInfo.read(r);
|
|
387
|
+
const stickyScrollHeight = this._stickyScrollHeight.read(r);
|
|
388
|
+
const width = widgetWidth.read(r);
|
|
389
|
+
const padding = Math.round(lineHeight.read(r) * 2 / 3);
|
|
390
|
+
const maxWidth = layoutInfo.contentWidth - 2 * padding;
|
|
391
|
+
this._domNode.style.maxWidth = `${maxWidth}px`;
|
|
392
|
+
const top = stickyScrollHeight + padding;
|
|
393
|
+
const left = layoutInfo.width - width - layoutInfo.verticalScrollbarWidth - layoutInfo.minimap.minimapWidth - padding;
|
|
394
|
+
this._position.set({
|
|
395
|
+
preference: {
|
|
396
|
+
top,
|
|
397
|
+
left
|
|
398
|
+
},
|
|
399
|
+
stackOrdinal: 10000
|
|
400
|
+
}, undefined);
|
|
401
|
+
}));
|
|
402
|
+
this._showStore.add(this._editorObs.createOverlayWidget({
|
|
403
|
+
domNode: this._domNode,
|
|
404
|
+
position: this._position,
|
|
405
|
+
minContentWidthInPx: this._minContentWidthInPx,
|
|
406
|
+
allowEditorOverflow: false
|
|
407
|
+
}));
|
|
408
|
+
}
|
|
409
|
+
hide() {
|
|
410
|
+
this._position.set(null, undefined);
|
|
411
|
+
this._showStore.clear();
|
|
412
|
+
}
|
|
413
|
+
};
|
|
414
|
+
InlineChatSessionOverlayWidget = ( __decorate([( __param(1, IInstantiationService)), ( __param(2, IKeybindingService))], InlineChatSessionOverlayWidget));
|
|
415
|
+
|
|
416
|
+
export { InlineChatInputWidget, InlineChatSessionOverlayWidget };
|
|
@@ -22,7 +22,6 @@ import { IChatWidgetViewOptions } from "@codingame/monaco-vscode-api/vscode/vs/w
|
|
|
22
22
|
import { ChatWidget, IChatWidgetLocationOptions } from "../../chat/browser/widget/chatWidget.js";
|
|
23
23
|
import { IChatModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
|
|
24
24
|
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
|
|
25
|
-
import { HunkInformation, Session } from "./inlineChatSession.js";
|
|
26
25
|
export interface InlineChatWidgetViewState {
|
|
27
26
|
editorViewState: ICodeEditorViewState;
|
|
28
27
|
input: string;
|
|
@@ -114,11 +113,7 @@ export declare class InlineChatWidget {
|
|
|
114
113
|
hasFocus(): boolean;
|
|
115
114
|
}
|
|
116
115
|
export declare class EditorBasedInlineChatWidget extends InlineChatWidget {
|
|
117
|
-
|
|
118
|
-
private readonly _accessibleViewer;
|
|
119
|
-
constructor(location: IChatWidgetLocationOptions, _parentEditor: ICodeEditor, options: IInlineChatWidgetConstructionOptions, contextKeyService: IContextKeyService, keybindingService: IKeybindingService, instantiationService: IInstantiationService, accessibilityService: IAccessibilityService, configurationService: IConfigurationService, accessibleViewService: IAccessibleViewService, textModelResolverService: ITextModelService, chatService: IChatService, hoverService: IHoverService, layoutService: ILayoutService, chatEntitlementService: IChatEntitlementService, markdownRendererService: IMarkdownRendererService);
|
|
120
|
-
get contentHeight(): number;
|
|
116
|
+
constructor(location: IChatWidgetLocationOptions, parentEditor: ICodeEditor, options: IInlineChatWidgetConstructionOptions, contextKeyService: IContextKeyService, keybindingService: IKeybindingService, instantiationService: IInstantiationService, accessibilityService: IAccessibilityService, configurationService: IConfigurationService, accessibleViewService: IAccessibleViewService, textModelResolverService: ITextModelService, chatService: IChatService, hoverService: IHoverService, layoutService: ILayoutService, chatEntitlementService: IChatEntitlementService, markdownRendererService: IMarkdownRendererService);
|
|
121
117
|
protected _doLayout(dimension: Dimension): void;
|
|
122
118
|
reset(): void;
|
|
123
|
-
showAccessibleHunk(session: Session, hunkData: HunkInformation): void;
|
|
124
119
|
}
|