@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
|
@@ -5,7 +5,7 @@ import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/in
|
|
|
5
5
|
import { observableCodeEditor } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/observableCodeEditor';
|
|
6
6
|
import { ScrollType } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/editorCommon';
|
|
7
7
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
8
|
-
import { InlineChatConfigKeys } from '../common/inlineChat.js';
|
|
8
|
+
import { InlineChatConfigKeys, CTX_INLINE_CHAT_AFFORDANCE_VISIBLE } from '../common/inlineChat.js';
|
|
9
9
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
10
10
|
import { observableConfigValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/observable/common/platformObservableUtils';
|
|
11
11
|
import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
|
|
@@ -15,6 +15,11 @@ import { SelectionDirection } from '@codingame/monaco-vscode-api/vscode/vs/edito
|
|
|
15
15
|
import { assertType } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
16
16
|
import { CursorChangeReason } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/cursorEvents';
|
|
17
17
|
import { IInlineChatSessionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service';
|
|
18
|
+
import { CodeActionController } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/codeAction/browser/codeActionController';
|
|
19
|
+
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
20
|
+
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
21
|
+
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
22
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
18
23
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
19
24
|
import { debouncedObservable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils/utils';
|
|
20
25
|
import { runOnChange } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils/runOnChange';
|
|
@@ -24,24 +29,35 @@ import { observableSignalFromEvent } from '@codingame/monaco-vscode-api/vscode/v
|
|
|
24
29
|
import { waitForState } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils/utilsCancellation';
|
|
25
30
|
|
|
26
31
|
let InlineChatAffordance = class InlineChatAffordance extends Disposable {
|
|
32
|
+
#editor;
|
|
33
|
+
#inputWidget;
|
|
34
|
+
#instantiationService;
|
|
35
|
+
#menuData = observableValue(this, undefined);
|
|
36
|
+
#selectionData = observableValue(this, undefined);
|
|
27
37
|
constructor(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
38
|
+
editor,
|
|
39
|
+
inputWidget,
|
|
40
|
+
instantiationService,
|
|
31
41
|
configurationService,
|
|
32
42
|
chatEntiteldService,
|
|
33
|
-
inlineChatSessionService
|
|
43
|
+
inlineChatSessionService,
|
|
44
|
+
telemetryService,
|
|
45
|
+
contextKeyService
|
|
34
46
|
) {
|
|
35
47
|
super();
|
|
36
|
-
this
|
|
37
|
-
this
|
|
38
|
-
this
|
|
39
|
-
|
|
40
|
-
const editorObs = observableCodeEditor(this._editor);
|
|
48
|
+
this.#editor = editor;
|
|
49
|
+
this.#inputWidget = inputWidget;
|
|
50
|
+
this.#instantiationService = instantiationService;
|
|
51
|
+
const editorObs = observableCodeEditor(this.#editor);
|
|
41
52
|
const affordance = observableConfigValue(InlineChatConfigKeys.Affordance, "off", configurationService);
|
|
42
53
|
const debouncedSelection = debouncedObservable(editorObs.cursorSelection, 500);
|
|
43
|
-
const selectionData =
|
|
54
|
+
const selectionData = this.#selectionData;
|
|
55
|
+
const ctxAffordanceVisible = CTX_INLINE_CHAT_AFFORDANCE_VISIBLE.bindTo(contextKeyService);
|
|
56
|
+
this._store.add({
|
|
57
|
+
dispose: () => ctxAffordanceVisible.reset()
|
|
58
|
+
});
|
|
44
59
|
let explicitSelection = false;
|
|
60
|
+
let affordanceId;
|
|
45
61
|
this._store.add(runOnChange(editorObs.selections, (value, _prev, events) => {
|
|
46
62
|
explicitSelection = events.every(e => e.reason === CursorChangeReason.Explicit);
|
|
47
63
|
if (!value || value.length !== 1 || value[0].isEmpty() || !explicitSelection) {
|
|
@@ -50,10 +66,20 @@ let InlineChatAffordance = class InlineChatAffordance extends Disposable {
|
|
|
50
66
|
}));
|
|
51
67
|
this._store.add(autorun(r => {
|
|
52
68
|
const value = debouncedSelection.read(r);
|
|
53
|
-
if (!value || value.isEmpty() || !explicitSelection ||
|
|
69
|
+
if (!value || value.isEmpty() || !explicitSelection || this.#editor.getModel()?.getValueInRange(value).match(/^\s+$/)) {
|
|
54
70
|
selectionData.set(undefined, undefined);
|
|
71
|
+
affordanceId = undefined;
|
|
55
72
|
return;
|
|
56
73
|
}
|
|
74
|
+
affordanceId = generateUuid();
|
|
75
|
+
const mode = affordance.read(undefined);
|
|
76
|
+
if (mode === "gutter" || mode === "editor") {
|
|
77
|
+
telemetryService.publicLog2("inlineChatAffordance/shown", {
|
|
78
|
+
mode,
|
|
79
|
+
id: affordanceId,
|
|
80
|
+
commandId: ""
|
|
81
|
+
});
|
|
82
|
+
}
|
|
57
83
|
selectionData.set(value, undefined);
|
|
58
84
|
}));
|
|
59
85
|
this._store.add(autorun(r => {
|
|
@@ -71,52 +97,88 @@ let InlineChatAffordance = class InlineChatAffordance extends Disposable {
|
|
|
71
97
|
selectionData.set(undefined, undefined);
|
|
72
98
|
}
|
|
73
99
|
}));
|
|
74
|
-
this._store.add(this.
|
|
100
|
+
this._store.add(this.#editor.onContextMenu(() => {
|
|
101
|
+
selectionData.set(undefined, undefined);
|
|
102
|
+
}));
|
|
103
|
+
this._store.add(autorun(r => {
|
|
104
|
+
if (!editorObs.isFocused.read(r)) {
|
|
105
|
+
selectionData.set(undefined, undefined);
|
|
106
|
+
}
|
|
107
|
+
}));
|
|
108
|
+
this._store.add(autorun(r => {
|
|
109
|
+
const sel = selectionData.read(r);
|
|
110
|
+
const mode = affordance.read(r);
|
|
111
|
+
ctxAffordanceVisible.set(sel !== undefined && (mode === "editor" || mode === "gutter"));
|
|
112
|
+
}));
|
|
113
|
+
const gutterAffordance = this._store.add(this.#instantiationService.createInstance(
|
|
75
114
|
InlineChatGutterAffordance,
|
|
76
115
|
editorObs,
|
|
77
|
-
derived(r => affordance.read(r) === "gutter" ? selectionData.read(r) : undefined)
|
|
78
|
-
this._menuData
|
|
116
|
+
derived(r => affordance.read(r) === "gutter" ? selectionData.read(r) : undefined)
|
|
79
117
|
));
|
|
80
|
-
this.
|
|
118
|
+
const editorAffordance = this.#instantiationService.createInstance(
|
|
81
119
|
InlineChatEditorAffordance,
|
|
82
|
-
this
|
|
120
|
+
this.#editor,
|
|
83
121
|
derived(r => affordance.read(r) === "editor" ? selectionData.read(r) : undefined)
|
|
84
|
-
)
|
|
122
|
+
);
|
|
123
|
+
this._store.add(editorAffordance);
|
|
124
|
+
this._store.add(
|
|
125
|
+
Event.any(editorAffordance.onDidRunAction, gutterAffordance.onDidRunAction)(commandId => {
|
|
126
|
+
if (affordanceId) {
|
|
127
|
+
telemetryService.publicLog2("inlineChatAffordance/selected", {
|
|
128
|
+
mode: affordance.get(),
|
|
129
|
+
id: affordanceId,
|
|
130
|
+
commandId
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
})
|
|
134
|
+
);
|
|
85
135
|
this._store.add(autorun(r => {
|
|
86
|
-
const
|
|
136
|
+
const mode = affordance.read(r);
|
|
137
|
+
const hideWithSelection = mode === "editor" || mode === "gutter";
|
|
138
|
+
const controller = CodeActionController.get(this.#editor);
|
|
139
|
+
if (controller) {
|
|
140
|
+
controller.onlyLightBulbWithEmptySelection = hideWithSelection;
|
|
141
|
+
}
|
|
142
|
+
}));
|
|
143
|
+
this._store.add(autorun(r => {
|
|
144
|
+
const data = this.#menuData.read(r);
|
|
87
145
|
if (!data) {
|
|
88
146
|
return;
|
|
89
147
|
}
|
|
90
|
-
this.
|
|
91
|
-
const editorDomNode = this.
|
|
148
|
+
this.#editor.revealLineInCenterIfOutsideViewport(data.lineNumber, ScrollType.Immediate);
|
|
149
|
+
const editorDomNode = this.#editor.getDomNode();
|
|
92
150
|
const editorRect = editorDomNode.getBoundingClientRect();
|
|
93
151
|
const left = data.rect.left - editorRect.left;
|
|
94
|
-
this.
|
|
152
|
+
this.#inputWidget.show(data.lineNumber, left, data.above, data.placeholder);
|
|
95
153
|
}));
|
|
96
154
|
this._store.add(autorun(r => {
|
|
97
|
-
const pos = this.
|
|
155
|
+
const pos = this.#inputWidget.position.read(r);
|
|
98
156
|
if (pos === null) {
|
|
99
|
-
this.
|
|
157
|
+
this.#menuData.set(undefined, undefined);
|
|
100
158
|
}
|
|
101
159
|
}));
|
|
102
160
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
const
|
|
161
|
+
dismiss() {
|
|
162
|
+
this.#selectionData.set(undefined, undefined);
|
|
163
|
+
}
|
|
164
|
+
async showMenuAtSelection(placeholder) {
|
|
165
|
+
assertType(this.#editor.hasModel());
|
|
166
|
+
const direction = this.#editor.getSelection().getDirection();
|
|
167
|
+
const position = this.#editor.getPosition();
|
|
168
|
+
const editorDomNode = this.#editor.getDomNode();
|
|
169
|
+
const scrolledPosition = this.#editor.getScrolledVisiblePosition(position);
|
|
109
170
|
const editorRect = editorDomNode.getBoundingClientRect();
|
|
110
171
|
const x = editorRect.left + scrolledPosition.left;
|
|
111
172
|
const y = editorRect.top + scrolledPosition.top;
|
|
112
|
-
this.
|
|
173
|
+
this.#menuData.set({
|
|
113
174
|
rect: ( new DOMRect(x, y, 0, scrolledPosition.height)),
|
|
114
175
|
above: direction === SelectionDirection.RTL,
|
|
115
|
-
lineNumber: position.lineNumber
|
|
176
|
+
lineNumber: position.lineNumber,
|
|
177
|
+
placeholder
|
|
116
178
|
}, undefined);
|
|
117
|
-
await waitForState(this.
|
|
179
|
+
await waitForState(this.#inputWidget.position, pos => pos === null);
|
|
118
180
|
}
|
|
119
181
|
};
|
|
120
|
-
InlineChatAffordance = ( __decorate([( __param(2, IInstantiationService)), ( __param(3, IConfigurationService)), ( __param(4, IChatEntitlementService)), ( __param(5, IInlineChatSessionService))], InlineChatAffordance));
|
|
182
|
+
InlineChatAffordance = ( __decorate([( __param(2, IInstantiationService)), ( __param(3, IConfigurationService)), ( __param(4, IChatEntitlementService)), ( __param(5, IInlineChatSessionService)), ( __param(6, ITelemetryService)), ( __param(7, IContextKeyService))], InlineChatAffordance));
|
|
121
183
|
|
|
122
184
|
export { InlineChatAffordance };
|
|
@@ -17,11 +17,15 @@ import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log
|
|
|
17
17
|
import { ISharedWebContentExtractorService } from "@codingame/monaco-vscode-api/vscode/vs/platform/webContentExtractor/common/webContentExtractor.service";
|
|
18
18
|
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
19
19
|
import { IChatAttachmentResolveService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.service";
|
|
20
|
+
import { IChatEditingService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService.service";
|
|
21
|
+
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
|
|
20
22
|
import { IChatRequestVariableEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries";
|
|
21
23
|
import { ILanguageModelChatSelector } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels";
|
|
22
24
|
import { ILanguageModelsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service";
|
|
23
25
|
import { INotebookEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service";
|
|
24
26
|
import { ICellEditOperation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
|
|
27
|
+
import { InlineChatAffordance } from "./inlineChatAffordance.js";
|
|
28
|
+
import { InlineChatInputWidget } from "./inlineChatOverlayWidget.js";
|
|
25
29
|
import { IInlineChatSessionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service";
|
|
26
30
|
import { EditorBasedInlineChatWidget } from "./inlineChatWidget.js";
|
|
27
31
|
export declare abstract class InlineChatRunOptions {
|
|
@@ -33,6 +37,7 @@ export declare abstract class InlineChatRunOptions {
|
|
|
33
37
|
position?: IPosition;
|
|
34
38
|
modelSelector?: ILanguageModelChatSelector;
|
|
35
39
|
resolveOnResponse?: boolean;
|
|
40
|
+
attachDiagnostics?: boolean;
|
|
36
41
|
static isInlineChatRunOptions(options: unknown): options is InlineChatRunOptions;
|
|
37
42
|
}
|
|
38
43
|
export declare class InlineChatController implements IEditorContribution {
|
|
@@ -48,6 +53,8 @@ export declare class InlineChatController implements IEditorContribution {
|
|
|
48
53
|
private readonly _markerDecorationsService;
|
|
49
54
|
private readonly _languageModelService;
|
|
50
55
|
private readonly _logService;
|
|
56
|
+
private readonly _chatEditingService;
|
|
57
|
+
private readonly _chatService;
|
|
51
58
|
static readonly ID = "editor.contrib.inlineChatController";
|
|
52
59
|
static get(editor: ICodeEditor): InlineChatController | undefined;
|
|
53
60
|
/**
|
|
@@ -59,11 +66,13 @@ export declare class InlineChatController implements IEditorContribution {
|
|
|
59
66
|
private readonly _isActiveController;
|
|
60
67
|
private readonly _renderMode;
|
|
61
68
|
private readonly _zone;
|
|
62
|
-
|
|
69
|
+
readonly inputOverlayWidget: InlineChatAffordance;
|
|
70
|
+
private readonly _inputWidget;
|
|
63
71
|
private readonly _currentSession;
|
|
64
72
|
get widget(): EditorBasedInlineChatWidget;
|
|
65
73
|
get isActive(): boolean;
|
|
66
|
-
|
|
74
|
+
get inputWidget(): InlineChatInputWidget;
|
|
75
|
+
constructor(_editor: ICodeEditor, _instaService: IInstantiationService, _notebookEditorService: INotebookEditorService, _inlineChatSessionService: IInlineChatSessionService, codeEditorService: ICodeEditorService, contextKeyService: IContextKeyService, _configurationService: IConfigurationService, _webContentExtractorService: ISharedWebContentExtractorService, _fileService: IFileService, _chatAttachmentResolveService: IChatAttachmentResolveService, _editorService: IEditorService, _markerDecorationsService: IMarkerDecorationsService, _languageModelService: ILanguageModelsService, _logService: ILogService, _chatEditingService: IChatEditingService, _chatService: IChatService);
|
|
67
76
|
dispose(): void;
|
|
68
77
|
getWidgetPosition(): Position | undefined;
|
|
69
78
|
focus(): void;
|
|
@@ -32,6 +32,7 @@ import { SIDE_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/ser
|
|
|
32
32
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
33
33
|
import { IChatAttachmentResolveService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.service';
|
|
34
34
|
import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
|
|
35
|
+
import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService.service';
|
|
35
36
|
import { ChatMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes';
|
|
36
37
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
37
38
|
import { IDiagnosticVariableEntryFilterData } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries';
|
|
@@ -43,15 +44,15 @@ import { isNotebookContainingCellEditor } from '@codingame/monaco-vscode-api/vsc
|
|
|
43
44
|
import { INotebookEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service';
|
|
44
45
|
import { CellUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
45
46
|
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
46
|
-
import { CTX_INLINE_CHAT_VISIBLE, InlineChatConfigKeys } from '../common/inlineChat.js';
|
|
47
|
+
import { CTX_INLINE_CHAT_VISIBLE, CTX_INLINE_CHAT_FILE_BELONGS_TO_CHAT, CTX_INLINE_CHAT_PENDING_CONFIRMATION, InlineChatConfigKeys } from '../common/inlineChat.js';
|
|
47
48
|
import { InlineChatAffordance } from './inlineChatAffordance.js';
|
|
48
49
|
import { InlineChatInputWidget, InlineChatSessionOverlayWidget } from './inlineChatOverlayWidget.js';
|
|
49
50
|
import { IInlineChatSessionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service';
|
|
50
51
|
import { InlineChatZoneWidget } from './inlineChatZoneWidget.js';
|
|
51
52
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
53
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
52
54
|
import { observableSignalFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableSignalFromEvent';
|
|
53
55
|
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
54
|
-
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
55
56
|
import { waitForState } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils/utilsCancellation';
|
|
56
57
|
import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
|
|
57
58
|
|
|
@@ -69,9 +70,10 @@ class InlineChatRunOptions {
|
|
|
69
70
|
position,
|
|
70
71
|
attachments,
|
|
71
72
|
modelSelector,
|
|
72
|
-
resolveOnResponse
|
|
73
|
+
resolveOnResponse,
|
|
74
|
+
attachDiagnostics
|
|
73
75
|
} = options;
|
|
74
|
-
if (typeof message !== "undefined" && typeof message !== "string" || typeof autoSend !== "undefined" && typeof autoSend !== "boolean" || typeof initialRange !== "undefined" && !Range.isIRange(initialRange) || typeof initialSelection !== "undefined" && !Selection.isISelection(initialSelection) || typeof position !== "undefined" && !Position.isIPosition(position) || typeof attachments !== "undefined" && (!Array.isArray(attachments) || !attachments.every(item => item instanceof URI)) || typeof modelSelector !== "undefined" && !isILanguageModelChatSelector(modelSelector) || typeof resolveOnResponse !== "undefined" && typeof resolveOnResponse !== "boolean") {
|
|
76
|
+
if (typeof message !== "undefined" && typeof message !== "string" || typeof autoSend !== "undefined" && typeof autoSend !== "boolean" || typeof initialRange !== "undefined" && !Range.isIRange(initialRange) || typeof initialSelection !== "undefined" && !Selection.isISelection(initialSelection) || typeof position !== "undefined" && !Position.isIPosition(position) || typeof attachments !== "undefined" && (!Array.isArray(attachments) || !attachments.every(item => item instanceof URI)) || typeof modelSelector !== "undefined" && !isILanguageModelChatSelector(modelSelector) || typeof resolveOnResponse !== "undefined" && typeof resolveOnResponse !== "boolean" || typeof attachDiagnostics !== "undefined" && typeof attachDiagnostics !== "boolean") {
|
|
75
77
|
return false;
|
|
76
78
|
}
|
|
77
79
|
return true;
|
|
@@ -96,6 +98,9 @@ let InlineChatController = class InlineChatController {
|
|
|
96
98
|
get isActive() {
|
|
97
99
|
return Boolean(this._currentSession.get());
|
|
98
100
|
}
|
|
101
|
+
get inputWidget() {
|
|
102
|
+
return this._inputWidget;
|
|
103
|
+
}
|
|
99
104
|
constructor(
|
|
100
105
|
_editor,
|
|
101
106
|
_instaService,
|
|
@@ -110,7 +115,9 @@ let InlineChatController = class InlineChatController {
|
|
|
110
115
|
_editorService,
|
|
111
116
|
_markerDecorationsService,
|
|
112
117
|
_languageModelService,
|
|
113
|
-
_logService
|
|
118
|
+
_logService,
|
|
119
|
+
_chatEditingService,
|
|
120
|
+
_chatService
|
|
114
121
|
) {
|
|
115
122
|
this._editor = _editor;
|
|
116
123
|
this._instaService = _instaService;
|
|
@@ -124,17 +131,43 @@ let InlineChatController = class InlineChatController {
|
|
|
124
131
|
this._markerDecorationsService = _markerDecorationsService;
|
|
125
132
|
this._languageModelService = _languageModelService;
|
|
126
133
|
this._logService = _logService;
|
|
134
|
+
this._chatEditingService = _chatEditingService;
|
|
135
|
+
this._chatService = _chatService;
|
|
127
136
|
this._store = ( new DisposableStore());
|
|
128
137
|
this._isActiveController = observableValue(this, false);
|
|
129
138
|
const editorObs = observableCodeEditor(_editor);
|
|
130
139
|
const ctxInlineChatVisible = CTX_INLINE_CHAT_VISIBLE.bindTo(contextKeyService);
|
|
140
|
+
const ctxFileBelongsToChat = CTX_INLINE_CHAT_FILE_BELONGS_TO_CHAT.bindTo(contextKeyService);
|
|
141
|
+
const ctxPendingConfirmation = CTX_INLINE_CHAT_PENDING_CONFIRMATION.bindTo(contextKeyService);
|
|
131
142
|
const notebookAgentConfig = observableConfigValue(InlineChatConfigKeys.notebookAgent, false, this._configurationService);
|
|
132
143
|
this._renderMode = observableConfigValue(InlineChatConfigKeys.RenderMode, "zone", this._configurationService);
|
|
133
|
-
|
|
144
|
+
this._store.add(autorun(r => {
|
|
145
|
+
const model = editorObs.model.read(r);
|
|
146
|
+
if (!model) {
|
|
147
|
+
ctxFileBelongsToChat.set(false);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
const sessions = this._chatEditingService.editingSessionsObs.read(r);
|
|
151
|
+
let hasEdits = false;
|
|
152
|
+
for (const session of sessions) {
|
|
153
|
+
const entries = session.entries.read(r);
|
|
154
|
+
for (const entry of entries) {
|
|
155
|
+
if (isEqual(entry.modifiedURI, model.uri)) {
|
|
156
|
+
hasEdits = true;
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if (hasEdits) {
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
ctxFileBelongsToChat.set(hasEdits);
|
|
165
|
+
}));
|
|
166
|
+
const overlayWidget = this._inputWidget = this._store.add(this._instaService.createInstance(InlineChatInputWidget, editorObs));
|
|
134
167
|
const sessionOverlayWidget = this._store.add(
|
|
135
168
|
this._instaService.createInstance(InlineChatSessionOverlayWidget, editorObs)
|
|
136
169
|
);
|
|
137
|
-
this.
|
|
170
|
+
this.inputOverlayWidget = this._store.add(
|
|
138
171
|
this._instaService.createInstance(InlineChatAffordance, this._editor, overlayWidget)
|
|
139
172
|
);
|
|
140
173
|
this._zone = ( new Lazy(() => {
|
|
@@ -240,7 +273,7 @@ let InlineChatController = class InlineChatController {
|
|
|
240
273
|
}
|
|
241
274
|
}));
|
|
242
275
|
const defaultPlaceholderObs = ( visibleSessionObs.map((session, r) => {
|
|
243
|
-
return session?.initialSelection.isEmpty() ? ( localize(
|
|
276
|
+
return session?.initialSelection.isEmpty() ? ( localize(9658, "Generate code")) : ( localize(9659, "Modify selected code"));
|
|
244
277
|
}));
|
|
245
278
|
this._store.add(autorun(r => {
|
|
246
279
|
const session = visibleSessionObs.read(r);
|
|
@@ -270,14 +303,18 @@ let InlineChatController = class InlineChatController {
|
|
|
270
303
|
const session = visibleSessionObs.read(r);
|
|
271
304
|
const renderMode = this._renderMode.read(r);
|
|
272
305
|
if (!session || renderMode !== "hover") {
|
|
306
|
+
ctxPendingConfirmation.set(false);
|
|
273
307
|
sessionOverlayWidget.hide();
|
|
274
308
|
return;
|
|
275
309
|
}
|
|
276
310
|
const lastRequest = session.chatModel.lastRequestObs.read(r);
|
|
277
311
|
const isInProgress = lastRequest?.response?.isInProgress.read(r);
|
|
312
|
+
const isPendingConfirmation = !!lastRequest?.response?.isPendingConfirmation.read(r);
|
|
313
|
+
const isError = !!lastRequest?.response?.result?.errorDetails;
|
|
314
|
+
ctxPendingConfirmation.set(isPendingConfirmation);
|
|
278
315
|
const entry = session.editingSession.readEntry(session.uri, r);
|
|
279
316
|
const isNotSettled = entry ? entry.state.read(r) === ModifiedFileEntryState.Modified : false;
|
|
280
|
-
if (isInProgress || isNotSettled) {
|
|
317
|
+
if (isInProgress || isNotSettled || isPendingConfirmation || isError) {
|
|
281
318
|
sessionOverlayWidget.show(session);
|
|
282
319
|
} else {
|
|
283
320
|
sessionOverlayWidget.hide();
|
|
@@ -342,7 +379,7 @@ let InlineChatController = class InlineChatController {
|
|
|
342
379
|
if (lastProgress) {
|
|
343
380
|
placeholder = renderAsPlaintext(lastProgress.content);
|
|
344
381
|
}
|
|
345
|
-
this._zone.rawValue?.widget.chatWidget.setInputPlaceholder(placeholder || ( localize(
|
|
382
|
+
this._zone.rawValue?.widget.chatWidget.setInputPlaceholder(placeholder || ( localize(9660, "Working...")));
|
|
346
383
|
}
|
|
347
384
|
}));
|
|
348
385
|
this._store.add(autorun(r => {
|
|
@@ -395,26 +432,29 @@ let InlineChatController = class InlineChatController {
|
|
|
395
432
|
await existingSession.editingSession.accept();
|
|
396
433
|
existingSession.dispose();
|
|
397
434
|
}
|
|
398
|
-
if (!arg?.message && this._configurationService.getValue(InlineChatConfigKeys.RenderMode) === "hover") {
|
|
399
|
-
await this._gutterIndicator.showMenuAtSelection();
|
|
400
|
-
return true;
|
|
401
|
-
}
|
|
402
435
|
this._isActiveController.set(true, undefined);
|
|
403
436
|
const session = this._inlineChatSessionService.createSession(this._editor);
|
|
404
437
|
const sessionStore = ( new DisposableStore());
|
|
405
438
|
try {
|
|
406
439
|
await this._applyModelDefaults(session, sessionStore);
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
if (range.intersectRanges(this._editor.getSelection())) {
|
|
410
|
-
const filter = IDiagnosticVariableEntryFilterData.fromMarker(marker);
|
|
411
|
-
entries.push(IDiagnosticVariableEntryFilterData.toEntry(filter));
|
|
412
|
-
}
|
|
440
|
+
if (arg) {
|
|
441
|
+
arg.attachDiagnostics ??= this._configurationService.getValue(InlineChatConfigKeys.RenderMode) === "zone";
|
|
413
442
|
}
|
|
414
|
-
if (
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
443
|
+
if (arg?.attachDiagnostics) {
|
|
444
|
+
const entries = [];
|
|
445
|
+
for (const [range, marker] of this._markerDecorationsService.getLiveMarkers(uri)) {
|
|
446
|
+
if (range.intersectRanges(this._editor.getSelection())) {
|
|
447
|
+
const filter = IDiagnosticVariableEntryFilterData.fromMarker(marker);
|
|
448
|
+
entries.push(IDiagnosticVariableEntryFilterData.toEntry(filter));
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
if (entries.length > 0) {
|
|
452
|
+
this._zone.value.widget.chatWidget.attachmentModel.addContext(...entries);
|
|
453
|
+
const msg = entries.length > 1 ? ( localize(9661, "Fix the attached problems")) : ( localize(9662, "Fix the attached problem"));
|
|
454
|
+
this._zone.value.widget.chatWidget.input.setValue(msg, true);
|
|
455
|
+
arg.message = msg;
|
|
456
|
+
this._zone.value.widget.chatWidget.inputEditor.setSelection(( new Selection(1, 1, Number.MAX_SAFE_INTEGER, 1)));
|
|
457
|
+
}
|
|
418
458
|
}
|
|
419
459
|
if (arg && InlineChatRunOptions.isInlineChatRunOptions(arg)) {
|
|
420
460
|
if (arg.initialRange) {
|
|
@@ -481,6 +521,7 @@ let InlineChatController = class InlineChatController {
|
|
|
481
521
|
if (!session) {
|
|
482
522
|
return;
|
|
483
523
|
}
|
|
524
|
+
this._chatService.cancelCurrentRequestForSession(session.chatModel.sessionResource, "inlineChatReject");
|
|
484
525
|
await session.editingSession.reject();
|
|
485
526
|
session.dispose();
|
|
486
527
|
}
|
|
@@ -557,14 +598,14 @@ let InlineChatController = class InlineChatController {
|
|
|
557
598
|
return undefined;
|
|
558
599
|
}
|
|
559
600
|
};
|
|
560
|
-
InlineChatController = InlineChatController_1 = ( __decorate([( __param(1, IInstantiationService)), ( __param(2, INotebookEditorService)), ( __param(3, IInlineChatSessionService)), ( __param(4, ICodeEditorService)), ( __param(5, IContextKeyService)), ( __param(6, IConfigurationService)), ( __param(7, ISharedWebContentExtractorService)), ( __param(8, IFileService)), ( __param(9, IChatAttachmentResolveService)), ( __param(10, IEditorService)), ( __param(11, IMarkerDecorationsService)), ( __param(12, ILanguageModelsService)), ( __param(13, ILogService))], InlineChatController));
|
|
601
|
+
InlineChatController = InlineChatController_1 = ( __decorate([( __param(1, IInstantiationService)), ( __param(2, INotebookEditorService)), ( __param(3, IInlineChatSessionService)), ( __param(4, ICodeEditorService)), ( __param(5, IContextKeyService)), ( __param(6, IConfigurationService)), ( __param(7, ISharedWebContentExtractorService)), ( __param(8, IFileService)), ( __param(9, IChatAttachmentResolveService)), ( __param(10, IEditorService)), ( __param(11, IMarkerDecorationsService)), ( __param(12, ILanguageModelsService)), ( __param(13, ILogService)), ( __param(14, IChatEditingService)), ( __param(15, IChatService))], InlineChatController));
|
|
561
602
|
async function reviewEdits(accessor, editor, stream, token, applyCodeBlockSuggestionId) {
|
|
562
603
|
if (!editor.hasModel()) {
|
|
563
604
|
return false;
|
|
564
605
|
}
|
|
565
606
|
const chatService = accessor.get(IChatService);
|
|
566
607
|
const uri = editor.getModel().uri;
|
|
567
|
-
const chatModelRef = chatService.
|
|
608
|
+
const chatModelRef = chatService.startNewLocalSession(ChatAgentLocation.EditorInline);
|
|
568
609
|
const chatModel = chatModelRef.object;
|
|
569
610
|
chatModel.startEditingSession(true);
|
|
570
611
|
const store = ( new DisposableStore());
|
|
@@ -626,7 +667,7 @@ async function reviewNotebookEdits(accessor, uri, stream, token) {
|
|
|
626
667
|
const chatService = accessor.get(IChatService);
|
|
627
668
|
const notebookService = accessor.get(INotebookService);
|
|
628
669
|
const isNotebook = notebookService.hasSupportedNotebooks(uri);
|
|
629
|
-
const chatModelRef = chatService.
|
|
670
|
+
const chatModelRef = chatService.startNewLocalSession(ChatAgentLocation.EditorInline);
|
|
630
671
|
const chatModel = chatModelRef.object;
|
|
631
672
|
chatModel.startEditingSession(true);
|
|
632
673
|
const store = ( new DisposableStore());
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IDimension } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/dom";
|
|
2
2
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
3
4
|
import { ICodeEditor, IContentWidget, IContentWidgetPosition } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser";
|
|
4
5
|
import { Selection } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/selection";
|
|
5
6
|
import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
@@ -15,10 +16,14 @@ export declare class InlineChatEditorAffordance extends Disposable implements IC
|
|
|
15
16
|
private readonly _domNode;
|
|
16
17
|
private _position;
|
|
17
18
|
private _isVisible;
|
|
19
|
+
private readonly _onDidRunAction;
|
|
20
|
+
readonly onDidRunAction: Event<string>;
|
|
18
21
|
readonly allowEditorOverflow = true;
|
|
19
22
|
readonly suppressMouseDown = false;
|
|
20
23
|
constructor(_editor: ICodeEditor, selection: IObservable<Selection | undefined>, instantiationService: IInstantiationService);
|
|
21
24
|
private _show;
|
|
25
|
+
private _showAtSelection;
|
|
26
|
+
private _showAtLineStart;
|
|
22
27
|
private _hide;
|
|
23
28
|
getId(): string;
|
|
24
29
|
getDomNode(): HTMLElement;
|