@codingame/monaco-vscode-katex-common 26.2.2 → 28.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 +10 -4
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +37 -11
- package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +3 -0
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +15 -4
- package/vscode/src/vs/platform/mcp/common/modelContextProtocolApps.d.ts +576 -0
- package/vscode/src/vs/{workbench/contrib → platform}/mcp/common/modelContextProtocolApps.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +176 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +127 -64
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +12 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.js +106 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +105 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +13 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +69 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +35 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +187 -78
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +138 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +23 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +394 -87
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +28 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +38 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +113 -116
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +16 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +30 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +250 -132
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.d.ts +1 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +4 -110
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.d.ts +1 -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.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +9 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +7 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.d.ts +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 +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.js +22 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.js +11 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.d.ts +1 -1
- 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.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts.d.ts +59 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts.js +29 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.js +0 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.js +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +7 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +26 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +53 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownTableScrolling.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownTableScrolling.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +24 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.js +11 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +62 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +414 -129
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +19 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +263 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +14 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +98 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.d.ts +1 -1
- 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 +11 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +252 -80
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.d.ts +29 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +246 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +39 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +6 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +36 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.d.ts +3 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +6 -260
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.d.ts +1 -1
- 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.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.d.ts +5 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +42 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatCodeBlockPill.css +12 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +65 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatHookContentPart.css +9 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatInlineAnchorWidget.css +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +356 -415
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +14 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +102 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTipContent.css +68 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/codeBlockPart.css +48 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +47 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +0 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +57 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +24 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatResultListSubPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.js +103 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +15 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +44 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +85 -89
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +3 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +15 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +41 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +13 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.js +2 -1
- 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 +21 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +341 -88
- 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 +13 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.js +440 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +24 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +437 -241
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +77 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +521 -284
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.js +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +664 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.d.ts +104 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.js +127 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +12 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +57 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +4 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +89 -49
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.js +87 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +213 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +15 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +7 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +563 -140
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatViewWelcome.css +35 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +26 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +26 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +145 -79
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +36 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageWidget.css +35 -15
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +127 -30
- 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 +20 -14
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +6 -6
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +96 -34
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +11 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +68 -27
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +125 -13
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.d.ts +8 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +54 -45
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +11 -10
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +172 -112
- 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/browser/media/inlineChat.css +2 -44
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatEditorAffordance.css +28 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +84 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +9 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +58 -41
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.d.ts +1 -548
- 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/replNotebook/browser/replEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +6 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +0 -187
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
3
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
4
4
|
import * as inlineChatEditorAffordance from './media/inlineChatEditorAffordance.css';
|
|
5
|
-
import { $ } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
5
|
+
import { reset, $ } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
6
6
|
import { MutableDisposable, DisposableStore, Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
|
+
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
7
8
|
import { ContentWidgetPositionPreference } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser';
|
|
8
9
|
import { EditorOption } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/config/editorOptions';
|
|
9
10
|
import { SelectionDirection } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/selection';
|
|
11
|
+
import { computeIndentLevel } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/model/utils';
|
|
10
12
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
11
|
-
import {
|
|
13
|
+
import { MenuItemAction, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
12
14
|
import { MenuWorkbenchToolBar, HiddenItemStrategy } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
|
|
13
15
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
14
16
|
import { quickFixCommandId } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/codeAction/browser/codeAction';
|
|
@@ -22,6 +24,8 @@ import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/t
|
|
|
22
24
|
import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
|
|
23
25
|
import { IAccessibilityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service';
|
|
24
26
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
27
|
+
import { ACTION_START, ACTION_ASK_IN_CHAT } from '../common/inlineChat.js';
|
|
28
|
+
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
25
29
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
26
30
|
|
|
27
31
|
var InlineChatEditorAffordance_1;
|
|
@@ -35,13 +39,44 @@ let QuickFixActionViewItem = class QuickFixActionViewItem extends MenuEntryActio
|
|
|
35
39
|
contextKeyService,
|
|
36
40
|
themeService,
|
|
37
41
|
contextMenuService,
|
|
38
|
-
accessibilityService
|
|
42
|
+
accessibilityService,
|
|
43
|
+
commandService
|
|
39
44
|
) {
|
|
40
|
-
|
|
45
|
+
const wrappedAction = new (class extends MenuItemAction {
|
|
46
|
+
constructor() {
|
|
47
|
+
super(
|
|
48
|
+
action.item,
|
|
49
|
+
action.alt?.item,
|
|
50
|
+
{},
|
|
51
|
+
action.hideActions,
|
|
52
|
+
action.menuKeybinding,
|
|
53
|
+
contextKeyService,
|
|
54
|
+
commandService
|
|
55
|
+
);
|
|
56
|
+
this.elementGetter = () => undefined;
|
|
57
|
+
}
|
|
58
|
+
async run(...args) {
|
|
59
|
+
const controller = CodeActionController.get(_editor);
|
|
60
|
+
const info = controller?.lightBulbState.get();
|
|
61
|
+
const element = this.elementGetter();
|
|
62
|
+
if (controller && info && element) {
|
|
63
|
+
const {
|
|
64
|
+
bottom,
|
|
65
|
+
left
|
|
66
|
+
} = element.getBoundingClientRect();
|
|
67
|
+
await controller.showCodeActions(info.trigger, info.actions, {
|
|
68
|
+
x: left,
|
|
69
|
+
y: bottom
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
})();
|
|
74
|
+
super(wrappedAction, {
|
|
41
75
|
draggable: false
|
|
42
76
|
}, keybindingService, notificationService, contextKeyService, themeService, contextMenuService, accessibilityService);
|
|
43
77
|
this._editor = _editor;
|
|
44
78
|
this._lightBulbStore = this._store.add(( new MutableDisposable()));
|
|
79
|
+
wrappedAction.elementGetter = () => this.element;
|
|
45
80
|
}
|
|
46
81
|
render(container) {
|
|
47
82
|
super.render(container);
|
|
@@ -63,14 +98,42 @@ let QuickFixActionViewItem = class QuickFixActionViewItem extends MenuEntryActio
|
|
|
63
98
|
const icon = info?.icon ?? Codicon.lightBulb;
|
|
64
99
|
const iconClasses = ThemeIcon.asClassNameArray(icon);
|
|
65
100
|
this.label.className = "";
|
|
66
|
-
this.label.classList.add("codicon", ...iconClasses);
|
|
101
|
+
this.label.classList.add("codicon", "action-label", ...iconClasses);
|
|
67
102
|
}
|
|
68
103
|
this._currentTitle = info?.title;
|
|
69
104
|
this.updateTooltip();
|
|
70
105
|
}));
|
|
71
106
|
}
|
|
72
107
|
};
|
|
73
|
-
QuickFixActionViewItem = ( __decorate([( __param(2, IKeybindingService)), ( __param(3, INotificationService)), ( __param(4, IContextKeyService)), ( __param(5, IThemeService)), ( __param(6, IContextMenuService)), ( __param(7, IAccessibilityService))], QuickFixActionViewItem));
|
|
108
|
+
QuickFixActionViewItem = ( __decorate([( __param(2, IKeybindingService)), ( __param(3, INotificationService)), ( __param(4, IContextKeyService)), ( __param(5, IThemeService)), ( __param(6, IContextMenuService)), ( __param(7, IAccessibilityService)), ( __param(8, ICommandService))], QuickFixActionViewItem));
|
|
109
|
+
let LabelWithKeybindingActionViewItem = class LabelWithKeybindingActionViewItem extends MenuEntryActionViewItem {
|
|
110
|
+
constructor(
|
|
111
|
+
action,
|
|
112
|
+
keybindingService,
|
|
113
|
+
notificationService,
|
|
114
|
+
contextKeyService,
|
|
115
|
+
themeService,
|
|
116
|
+
contextMenuService,
|
|
117
|
+
accessibilityService
|
|
118
|
+
) {
|
|
119
|
+
super(action, {
|
|
120
|
+
draggable: false
|
|
121
|
+
}, keybindingService, notificationService, contextKeyService, themeService, contextMenuService, accessibilityService);
|
|
122
|
+
this.options.label = true;
|
|
123
|
+
this.options.icon = false;
|
|
124
|
+
this._kbLabel = keybindingService.lookupKeybinding(action.id)?.getLabel() ?? undefined;
|
|
125
|
+
}
|
|
126
|
+
updateLabel() {
|
|
127
|
+
if (this.label) {
|
|
128
|
+
reset(
|
|
129
|
+
this.label,
|
|
130
|
+
this.action.label,
|
|
131
|
+
...(this._kbLabel ? [$("span.inline-chat-keybinding", undefined, this._kbLabel)] : [])
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
LabelWithKeybindingActionViewItem = ( __decorate([( __param(1, IKeybindingService)), ( __param(2, INotificationService)), ( __param(3, IContextKeyService)), ( __param(4, IThemeService)), ( __param(5, IContextMenuService)), ( __param(6, IAccessibilityService))], LabelWithKeybindingActionViewItem));
|
|
74
137
|
let InlineChatEditorAffordance = class InlineChatEditorAffordance extends Disposable {
|
|
75
138
|
static {
|
|
76
139
|
InlineChatEditorAffordance_1 = this;
|
|
@@ -84,10 +147,12 @@ let InlineChatEditorAffordance = class InlineChatEditorAffordance extends Dispos
|
|
|
84
147
|
this._id = `inline-chat-content-widget-${InlineChatEditorAffordance_1._idPool++}`;
|
|
85
148
|
this._position = null;
|
|
86
149
|
this._isVisible = false;
|
|
150
|
+
this._onDidRunAction = this._store.add(( new Emitter()));
|
|
151
|
+
this.onDidRunAction = this._onDidRunAction.event;
|
|
87
152
|
this.allowEditorOverflow = true;
|
|
88
153
|
this.suppressMouseDown = false;
|
|
89
154
|
this._domNode = $(".inline-chat-content-widget");
|
|
90
|
-
this._store.add(
|
|
155
|
+
const toolbar = this._store.add(
|
|
91
156
|
instantiationService.createInstance(MenuWorkbenchToolBar, this._domNode, MenuId.InlineChatEditorAffordance, {
|
|
92
157
|
telemetrySource: "inlineChatEditorAffordance",
|
|
93
158
|
hiddenItemStrategy: HiddenItemStrategy.Ignore,
|
|
@@ -95,16 +160,24 @@ let InlineChatEditorAffordance = class InlineChatEditorAffordance extends Dispos
|
|
|
95
160
|
renderShortTitle: true
|
|
96
161
|
},
|
|
97
162
|
toolbarOptions: {
|
|
98
|
-
primaryGroup: () => true
|
|
163
|
+
primaryGroup: () => true,
|
|
164
|
+
useSeparatorsInPrimaryActions: true
|
|
99
165
|
},
|
|
100
166
|
actionViewItemProvider: action => {
|
|
101
167
|
if (action instanceof MenuItemAction && action.id === quickFixCommandId) {
|
|
102
168
|
return instantiationService.createInstance(QuickFixActionViewItem, action, this._editor);
|
|
103
169
|
}
|
|
170
|
+
if (action instanceof MenuItemAction && (action.id === ACTION_START || action.id === ACTION_ASK_IN_CHAT || action.id === "inlineChat.fixDiagnostics")) {
|
|
171
|
+
return instantiationService.createInstance(LabelWithKeybindingActionViewItem, action);
|
|
172
|
+
}
|
|
104
173
|
return undefined;
|
|
105
174
|
}
|
|
106
175
|
})
|
|
107
176
|
);
|
|
177
|
+
this._store.add(toolbar.actionRunner.onDidRun(e => {
|
|
178
|
+
this._onDidRunAction.fire(e.action.id);
|
|
179
|
+
this._hide();
|
|
180
|
+
}));
|
|
108
181
|
this._store.add(autorun(r => {
|
|
109
182
|
const sel = selection.read(r);
|
|
110
183
|
if (sel) {
|
|
@@ -115,6 +188,19 @@ let InlineChatEditorAffordance = class InlineChatEditorAffordance extends Dispos
|
|
|
115
188
|
}));
|
|
116
189
|
}
|
|
117
190
|
_show(selection) {
|
|
191
|
+
if (selection.isEmpty()) {
|
|
192
|
+
this._showAtLineStart(selection.getPosition().lineNumber);
|
|
193
|
+
} else {
|
|
194
|
+
this._showAtSelection(selection);
|
|
195
|
+
}
|
|
196
|
+
if (this._isVisible) {
|
|
197
|
+
this._editor.layoutContentWidget(this);
|
|
198
|
+
} else {
|
|
199
|
+
this._editor.addContentWidget(this);
|
|
200
|
+
this._isVisible = true;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
_showAtSelection(selection) {
|
|
118
204
|
const cursorPosition = selection.getPosition();
|
|
119
205
|
const direction = selection.getDirection();
|
|
120
206
|
const preference = direction === SelectionDirection.RTL ? ContentWidgetPositionPreference.ABOVE : ContentWidgetPositionPreference.BELOW;
|
|
@@ -122,12 +208,38 @@ let InlineChatEditorAffordance = class InlineChatEditorAffordance extends Dispos
|
|
|
122
208
|
position: cursorPosition,
|
|
123
209
|
preference: [preference]
|
|
124
210
|
};
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
211
|
+
}
|
|
212
|
+
_showAtLineStart(lineNumber) {
|
|
213
|
+
const model = this._editor.getModel();
|
|
214
|
+
if (!model) {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
const tabSize = model.getOptions().tabSize;
|
|
218
|
+
const fontInfo = this._editor.getOptions().get(EditorOption.fontInfo);
|
|
219
|
+
const lineContent = model.getLineContent(lineNumber);
|
|
220
|
+
const indent = computeIndentLevel(lineContent, tabSize);
|
|
221
|
+
const lineHasSpace = indent < 0 ? true : fontInfo.spaceWidth * indent > 22;
|
|
222
|
+
let effectiveLineNumber = lineNumber;
|
|
223
|
+
if (!lineHasSpace) {
|
|
224
|
+
const isLineEmptyOrIndented = ln => {
|
|
225
|
+
const content = model.getLineContent(ln);
|
|
226
|
+
return /^\s*$|^\s+/.test(content);
|
|
227
|
+
};
|
|
228
|
+
const lineCount = model.getLineCount();
|
|
229
|
+
if (lineNumber > 1 && isLineEmptyOrIndented(lineNumber - 1)) {
|
|
230
|
+
effectiveLineNumber = lineNumber - 1;
|
|
231
|
+
} else if (lineNumber < lineCount && isLineEmptyOrIndented(lineNumber + 1)) {
|
|
232
|
+
effectiveLineNumber = lineNumber + 1;
|
|
233
|
+
}
|
|
130
234
|
}
|
|
235
|
+
const effectiveColumnNumber = /^\S\s*$/.test(model.getLineContent(effectiveLineNumber)) ? 2 : 1;
|
|
236
|
+
this._position = {
|
|
237
|
+
position: {
|
|
238
|
+
lineNumber: effectiveLineNumber,
|
|
239
|
+
column: effectiveColumnNumber
|
|
240
|
+
},
|
|
241
|
+
preference: [ContentWidgetPositionPreference.EXACT]
|
|
242
|
+
};
|
|
131
243
|
}
|
|
132
244
|
_hide() {
|
|
133
245
|
if (this._isVisible) {
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
2
|
+
import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
2
3
|
import { ObservableCodeEditor } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/observableCodeEditor";
|
|
3
4
|
import { Selection } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/selection";
|
|
4
5
|
import { InlineEditsGutterIndicator } from "@codingame/monaco-vscode-api/vscode/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView";
|
|
5
6
|
import { IAccessibilityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service";
|
|
7
|
+
import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service";
|
|
8
|
+
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
6
9
|
import { HoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hoverService";
|
|
7
10
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
8
11
|
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
9
12
|
import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
|
|
13
|
+
import { IUserInteractionService } from "@codingame/monaco-vscode-api/vscode/vs/platform/userInteraction/browser/userInteractionService.service";
|
|
10
14
|
export declare class InlineChatGutterAffordance extends InlineEditsGutterIndicator {
|
|
11
|
-
private readonly
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
constructor(_myEditorObs: ObservableCodeEditor, selection: IObservable<Selection | undefined>, _hover: ISettableObservable<{
|
|
15
|
-
rect: DOMRect;
|
|
16
|
-
above: boolean;
|
|
17
|
-
lineNumber: number;
|
|
18
|
-
} | undefined>, _keybindingService: IKeybindingService, hoverService: HoverService, instantiationService: IInstantiationService, accessibilityService: IAccessibilityService, themeService: IThemeService);
|
|
19
|
-
protected _showHover(): void;
|
|
20
|
-
private _doShowHover;
|
|
15
|
+
private readonly _onDidRunAction;
|
|
16
|
+
readonly onDidRunAction: Event<string>;
|
|
17
|
+
constructor(myEditorObs: ObservableCodeEditor, selection: IObservable<Selection | undefined>, _keybindingService: IKeybindingService, hoverService: HoverService, instantiationService: IInstantiationService, accessibilityService: IAccessibilityService, themeService: IThemeService, userInteractionService: IUserInteractionService, menuService: IMenuService, contextKeyService: IContextKeyService);
|
|
21
18
|
}
|
|
@@ -1,55 +1,88 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
4
|
+
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
5
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
6
|
+
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
5
7
|
import { LineRange } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/ranges/lineRange';
|
|
6
|
-
import {
|
|
8
|
+
import { CodeActionController } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/codeAction/browser/codeActionController';
|
|
7
9
|
import { InlineEditsGutterIndicator, InlineSuggestionGutterMenuData, InlineEditsGutterIndicatorData, SimpleInlineSuggestModel } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView';
|
|
8
10
|
import { InlineEditTabAction } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface';
|
|
9
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
10
11
|
import { IAccessibilityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service';
|
|
12
|
+
import { MenuId, MenuItemAction } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
13
|
+
import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service';
|
|
14
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
11
15
|
import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
|
|
12
16
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
13
17
|
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
14
18
|
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
15
|
-
import {
|
|
19
|
+
import { IUserInteractionService } from '@codingame/monaco-vscode-api/vscode/vs/platform/userInteraction/browser/userInteractionService.service';
|
|
20
|
+
import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
|
|
16
21
|
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
17
22
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
18
23
|
import { constObservable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/constObservable';
|
|
19
|
-
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
20
24
|
|
|
21
25
|
let InlineChatGutterAffordance = class InlineChatGutterAffordance extends InlineEditsGutterIndicator {
|
|
22
26
|
constructor(
|
|
23
|
-
|
|
27
|
+
myEditorObs,
|
|
24
28
|
selection,
|
|
25
|
-
_hover,
|
|
26
29
|
_keybindingService,
|
|
27
30
|
hoverService,
|
|
28
31
|
instantiationService,
|
|
29
32
|
accessibilityService,
|
|
30
|
-
themeService
|
|
33
|
+
themeService,
|
|
34
|
+
userInteractionService,
|
|
35
|
+
menuService,
|
|
36
|
+
contextKeyService
|
|
31
37
|
) {
|
|
38
|
+
const menu = menuService.createMenu(MenuId.InlineChatEditorAffordance, contextKeyService);
|
|
39
|
+
const menuObs = observableFromEvent(menu.onDidChange, () => menu.getActions({
|
|
40
|
+
renderShortTitle: false
|
|
41
|
+
}));
|
|
42
|
+
const codeActionController = CodeActionController.get(myEditorObs.editor);
|
|
43
|
+
const lightBulbObs = codeActionController?.lightBulbState;
|
|
32
44
|
const data = derived(r => {
|
|
33
45
|
const value = selection.read(r);
|
|
34
46
|
if (!value) {
|
|
35
47
|
return undefined;
|
|
36
48
|
}
|
|
49
|
+
const commandGroups = [];
|
|
50
|
+
for (const [, groupActions] of menuObs.read(r)) {
|
|
51
|
+
const group = [];
|
|
52
|
+
for (const action of groupActions) {
|
|
53
|
+
if (action instanceof MenuItemAction) {
|
|
54
|
+
group.push({
|
|
55
|
+
command: {
|
|
56
|
+
id: action.item.id,
|
|
57
|
+
title: action.label
|
|
58
|
+
},
|
|
59
|
+
icon: ThemeIcon.isThemeIcon(action.item.icon) ? action.item.icon : undefined
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (group.length > 0) {
|
|
64
|
+
commandGroups.push(group);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
37
67
|
const cursorPosition = value.getPosition();
|
|
38
68
|
const lineRange = ( new LineRange(cursorPosition.lineNumber, cursorPosition.lineNumber + 1));
|
|
39
69
|
const gutterMenuData = ( new InlineSuggestionGutterMenuData(
|
|
40
70
|
undefined,
|
|
41
71
|
"",
|
|
42
|
-
|
|
72
|
+
commandGroups,
|
|
43
73
|
undefined,
|
|
44
|
-
undefined,
|
|
45
|
-
|
|
74
|
+
undefined,
|
|
75
|
+
undefined, true));
|
|
76
|
+
const lightBulbInfo = lightBulbObs?.read(r);
|
|
77
|
+
const icon = lightBulbInfo ? lightBulbInfo.icon : Codicon.sparkle;
|
|
78
|
+
return ( new InlineEditsGutterIndicatorData(gutterMenuData, lineRange, ( new SimpleInlineSuggestModel(() => {}, () => {})),
|
|
46
79
|
undefined, {
|
|
47
|
-
icon
|
|
80
|
+
icon
|
|
48
81
|
}));
|
|
49
82
|
});
|
|
50
83
|
const focusIsInMenu = observableValue({}, false);
|
|
51
84
|
super(
|
|
52
|
-
|
|
85
|
+
myEditorObs,
|
|
53
86
|
data,
|
|
54
87
|
constObservable(InlineEditTabAction.Inactive),
|
|
55
88
|
constObservable(0),
|
|
@@ -58,41 +91,17 @@ let InlineChatGutterAffordance = class InlineChatGutterAffordance extends Inline
|
|
|
58
91
|
hoverService,
|
|
59
92
|
instantiationService,
|
|
60
93
|
accessibilityService,
|
|
61
|
-
themeService
|
|
94
|
+
themeService,
|
|
95
|
+
userInteractionService
|
|
96
|
+
);
|
|
97
|
+
this._onDidRunAction = this._store.add(( new Emitter()));
|
|
98
|
+
this.onDidRunAction = this._onDidRunAction.event;
|
|
99
|
+
this._store.add(menu);
|
|
100
|
+
this._store.add(
|
|
101
|
+
this.onDidCloseWithCommand(commandId => this._onDidRunAction.fire(commandId))
|
|
62
102
|
);
|
|
63
|
-
this._myEditorObs = _myEditorObs;
|
|
64
|
-
this._hover = _hover;
|
|
65
|
-
this._keybindingService = _keybindingService;
|
|
66
|
-
this._store.add(autorun(r => {
|
|
67
|
-
const element = _hover.read(r);
|
|
68
|
-
this._hoverVisible.set(!!element, undefined);
|
|
69
|
-
}));
|
|
70
|
-
}
|
|
71
|
-
_showHover() {
|
|
72
|
-
this._hoverService.showInstantHover({
|
|
73
|
-
target: this._iconRef.element,
|
|
74
|
-
content: this._keybindingService.appendKeybinding(( localize(8828, "Inline Chat")), ACTION_START)
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
_doShowHover() {
|
|
78
|
-
if (this._hoverVisible.get()) {
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
const iconElement = this._iconRef.element;
|
|
82
|
-
if (!iconElement) {
|
|
83
|
-
this._hover.set(undefined, undefined);
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
const selection = this._myEditorObs.cursorSelection.get();
|
|
87
|
-
const direction = selection?.getDirection() ?? SelectionDirection.LTR;
|
|
88
|
-
const lineNumber = selection?.getPosition().lineNumber ?? 1;
|
|
89
|
-
this._hover.set({
|
|
90
|
-
rect: iconElement.getBoundingClientRect(),
|
|
91
|
-
above: direction === SelectionDirection.RTL,
|
|
92
|
-
lineNumber
|
|
93
|
-
}, undefined);
|
|
94
103
|
}
|
|
95
104
|
};
|
|
96
|
-
InlineChatGutterAffordance = ( __decorate([( __param(
|
|
105
|
+
InlineChatGutterAffordance = ( __decorate([( __param(2, IKeybindingService)), ( __param(3, IHoverService)), ( __param(4, IInstantiationService)), ( __param(5, IAccessibilityService)), ( __param(6, IThemeService)), ( __param(7, IUserInteractionService)), ( __param(8, IMenuService)), ( __param(9, IContextKeyService))], InlineChatGutterAffordance));
|
|
97
106
|
|
|
98
107
|
export { InlineChatGutterAffordance };
|
|
@@ -7,6 +7,7 @@ import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/ac
|
|
|
7
7
|
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
8
8
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
9
9
|
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
10
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
10
11
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
11
12
|
import { IInlineChatSession2 } from "@codingame/monaco-vscode-chat-service-override/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService";
|
|
12
13
|
/**
|
|
@@ -14,36 +15,35 @@ import { IInlineChatSession2 } from "@codingame/monaco-vscode-chat-service-overr
|
|
|
14
15
|
*/
|
|
15
16
|
export declare class InlineChatInputWidget extends Disposable {
|
|
16
17
|
private readonly _editorObs;
|
|
17
|
-
private readonly _keybindingService;
|
|
18
|
-
private readonly _menuService;
|
|
19
18
|
private readonly _contextKeyService;
|
|
19
|
+
private readonly _menuService;
|
|
20
20
|
private readonly _domNode;
|
|
21
|
+
private readonly _container;
|
|
21
22
|
private readonly _inputContainer;
|
|
22
|
-
private readonly
|
|
23
|
+
private readonly _toolbarContainer;
|
|
23
24
|
private readonly _input;
|
|
24
25
|
private readonly _position;
|
|
25
26
|
readonly position: IObservable<IOverlayWidgetPosition | null>;
|
|
26
27
|
private readonly _showStore;
|
|
27
28
|
private readonly _stickyScrollHeight;
|
|
28
|
-
private
|
|
29
|
+
private readonly _layoutData;
|
|
29
30
|
private _anchorLineNumber;
|
|
30
31
|
private _anchorLeft;
|
|
31
32
|
private _anchorAbove;
|
|
32
|
-
constructor(_editorObs: ObservableCodeEditor,
|
|
33
|
+
constructor(_editorObs: ObservableCodeEditor, _contextKeyService: IContextKeyService, _menuService: IMenuService, instantiationService: IInstantiationService, modelService: IModelService, configurationService: IConfigurationService);
|
|
34
|
+
get value(): string;
|
|
33
35
|
/**
|
|
34
36
|
* Show the widget at the specified line.
|
|
35
37
|
* @param lineNumber The line number to anchor the widget to
|
|
36
38
|
* @param left Left offset relative to editor
|
|
37
39
|
* @param anchorAbove Whether to anchor above the position (widget grows upward)
|
|
38
40
|
*/
|
|
39
|
-
show(lineNumber: number, left: number, anchorAbove: boolean): void;
|
|
41
|
+
show(lineNumber: number, left: number, anchorAbove: boolean, placeholder: string): void;
|
|
40
42
|
private _updatePosition;
|
|
41
43
|
/**
|
|
42
44
|
* Hide the widget (removes from editor but does not dispose).
|
|
43
45
|
*/
|
|
44
|
-
|
|
45
|
-
private _refreshActions;
|
|
46
|
-
private _updateInputHeight;
|
|
46
|
+
hide(): void;
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Overlay widget that displays progress messages during inline chat requests.
|
|
@@ -52,6 +52,7 @@ export declare class InlineChatSessionOverlayWidget extends Disposable {
|
|
|
52
52
|
private readonly _editorObs;
|
|
53
53
|
private readonly _instaService;
|
|
54
54
|
private readonly _keybindingService;
|
|
55
|
+
private readonly _logService;
|
|
55
56
|
private readonly _domNode;
|
|
56
57
|
private readonly _container;
|
|
57
58
|
private readonly _statusNode;
|
|
@@ -62,7 +63,7 @@ export declare class InlineChatSessionOverlayWidget extends Disposable {
|
|
|
62
63
|
private readonly _position;
|
|
63
64
|
private readonly _minContentWidthInPx;
|
|
64
65
|
private readonly _stickyScrollHeight;
|
|
65
|
-
constructor(_editorObs: ObservableCodeEditor, _instaService: IInstantiationService, _keybindingService: IKeybindingService);
|
|
66
|
+
constructor(_editorObs: ObservableCodeEditor, _instaService: IInstantiationService, _keybindingService: IKeybindingService, _logService: ILogService);
|
|
66
67
|
show(session: IInlineChatSession2): void;
|
|
67
68
|
hide(): void;
|
|
68
69
|
}
|