@codingame/monaco-vscode-katex-common 25.1.2 → 26.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.d.ts +23 -2
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +64 -27
- package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.d.ts +3 -1
- package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.js +31 -28
- package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +2 -0
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +71 -50
- package/vscode/src/vs/platform/editor/browser/editor.js +17 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +112 -129
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +10 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +110 -85
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +21 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +308 -216
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +153 -148
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +247 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +347 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +287 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +89 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +188 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +677 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentSessionHoverWidget.css +98 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +263 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentModel.js +34 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +19 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +762 -359
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.d.ts +22 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +188 -99
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.d.ts +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +166 -113
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +12 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +279 -213
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +533 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +382 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.d.ts +101 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +509 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +130 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +276 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +24 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +128 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +153 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +1218 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/media/chatSessionPickerActionItem.css +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +193 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +93 -89
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcome.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +42 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +58 -56
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +18 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +17 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +132 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +68 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +14 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.js +36 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.js +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.d.ts +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.js +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +22 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +34 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.d.ts +1 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +198 -135
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.js +38 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.js +29 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.js +41 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.js +23 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorContentPart.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +20 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +291 -152
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +227 -162
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownDecorationsRenderer.js +68 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +76 -75
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.d.ts +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +96 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +74 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.js +11 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +107 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +814 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +34 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.d.ts +8 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +236 -197
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +123 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +492 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +75 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.js +31 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +42 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +55 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +714 -148
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.d.ts +2 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +143 -153
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +14 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +79 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.d.ts +10 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +209 -77
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.d.ts +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +71 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +83 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +248 -190
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +1 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatInlineAnchorWidget.css +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatPullRequestContent.css +5 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +493 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatSubagentContent.css +63 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +121 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTipContent.css +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +51 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +46 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +99 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.d.ts +112 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +634 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.d.ts +49 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +132 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatResultListSubPart.js +15 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +196 -149
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +577 -193
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +119 -86
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +10 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +165 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.js +5 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +75 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +30 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +1 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +102 -106
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +44 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.js +67 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.js +69 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +122 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +39 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +1110 -597
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +291 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +485 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatOptions.js +38 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +9 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +650 -689
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +21 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +102 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +1253 -790
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.js +51 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +102 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +16 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +192 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +11 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +99 -66
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +188 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +115 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +129 -167
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatViewWelcome.css +16 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +143 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +206 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +152 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageWidget.css +67 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +170 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +80 -19
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatWidgetHistoryService.js +20 -28
- package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.js +22 -19
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +122 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +19 -104
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +316 -1040
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +162 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +98 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +68 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +416 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +1 -6
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +194 -215
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +74 -104
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +45 -91
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatEditorAffordance.css +22 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +98 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +96 -68
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.js +11 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +150 -0
- package/vscode/src/vs/workbench/contrib/markdown/browser/markedKatexSupport.js +141 -147
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.d.ts +64 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.js +200 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.d.ts +548 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.js +23 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +338 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.js +58 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.d.ts +75 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +364 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/interactiveEditor.css +21 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/media/interactive.css +36 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.d.ts +110 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +692 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +158 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.d.ts +80 -21
- package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +440 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatInputRelatedFilesContrib.d.ts +0 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatInputRelatedFilesContrib.js +0 -139
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +0 -1081
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.d.ts +0 -199
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +0 -482
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +0 -28
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +0 -37
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +0 -94
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +0 -495
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.d.ts +0 -72
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +0 -454
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +0 -66
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +0 -372
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.d.ts +0 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +0 -58
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +0 -26
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +0 -594
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +0 -55
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +0 -273
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +0 -1746
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +0 -269
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +0 -258
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +0 -806
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +0 -116
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +0 -62
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +0 -40
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +0 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +0 -295
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +0 -51
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +0 -241
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +0 -146
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +0 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +0 -90
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +0 -41
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +0 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +0 -42
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +0 -77
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +0 -469
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +0 -149
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +0 -823
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +0 -180
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +0 -29
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +0 -102
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +0 -567
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +0 -189
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +0 -75
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +0 -439
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +0 -57
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +0 -263
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js +0 -48
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +0 -39
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +0 -89
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +0 -26
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +0 -92
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.d.ts +0 -33
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +0 -108
|
@@ -31,6 +31,26 @@ export declare class ChatImplicitContextContribution extends Disposable implemen
|
|
|
31
31
|
private findActiveNotebookEditor;
|
|
32
32
|
private updateImplicitContext;
|
|
33
33
|
}
|
|
34
|
+
interface ImplicitContextWithSelection {
|
|
35
|
+
value: Location | URI | StringChatContextValue | undefined;
|
|
36
|
+
isSelection: boolean;
|
|
37
|
+
}
|
|
38
|
+
export declare class ChatImplicitContexts extends Disposable {
|
|
39
|
+
private _onDidChangeValue;
|
|
40
|
+
readonly onDidChangeValue: Event<void>;
|
|
41
|
+
private _values;
|
|
42
|
+
private readonly _valuesDisposables;
|
|
43
|
+
setValues(values: ImplicitContextWithSelection[]): void;
|
|
44
|
+
get values(): ChatImplicitContext[];
|
|
45
|
+
get hasEnabled(): boolean;
|
|
46
|
+
setEnabled(enabled: boolean): void;
|
|
47
|
+
get hasValue(): boolean;
|
|
48
|
+
get hasNonUri(): boolean;
|
|
49
|
+
getLocations(): Location[];
|
|
50
|
+
getUris(): URI[];
|
|
51
|
+
get hasNonStringContext(): boolean;
|
|
52
|
+
enabledBaseEntries(includeAllLocations: boolean): IChatRequestVariableEntry[];
|
|
53
|
+
}
|
|
34
54
|
export declare class ChatImplicitContext extends Disposable implements IChatRequestImplicitVariableEntry {
|
|
35
55
|
get id(): "vscode.implicit.selection" | "vscode.implicit.file" | "vscode.implicit.string" | "vscode.implicit.viewport" | "vscode.implicit";
|
|
36
56
|
get name(): string;
|
|
@@ -49,6 +69,7 @@ export declare class ChatImplicitContext extends Disposable implements IChatRequ
|
|
|
49
69
|
private _uri;
|
|
50
70
|
get uri(): URI | undefined;
|
|
51
71
|
get icon(): ThemeIcon | undefined;
|
|
52
|
-
setValue(value: Location | URI | StringChatContextValue | undefined, isSelection: boolean
|
|
72
|
+
setValue(value: Location | URI | StringChatContextValue | undefined, isSelection: boolean): void;
|
|
53
73
|
toBaseEntries(): IChatRequestVariableEntry[];
|
|
54
74
|
}
|
|
75
|
+
export {};
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
4
4
|
import { Event, Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
5
|
-
import { Disposable, MutableDisposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import { Disposable, MutableDisposable, DisposableStore, DisposableMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
6
|
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
7
7
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
8
8
|
import { isEqual, basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
9
9
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
10
10
|
import { getCodeEditor } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser';
|
|
11
11
|
import { ICodeEditorService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService.service';
|
|
12
|
+
import { isLocation } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages';
|
|
12
13
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
13
14
|
import { EditorsOrder } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
14
15
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
@@ -25,8 +26,19 @@ import { IChatContextService } from '@codingame/monaco-vscode-api/vscode/vs/work
|
|
|
25
26
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
26
27
|
|
|
27
28
|
let ChatImplicitContextContribution = class ChatImplicitContextContribution extends Disposable {
|
|
28
|
-
static {
|
|
29
|
-
|
|
29
|
+
static {
|
|
30
|
+
this.ID = "chat.implicitContext";
|
|
31
|
+
}
|
|
32
|
+
constructor(
|
|
33
|
+
codeEditorService,
|
|
34
|
+
editorService,
|
|
35
|
+
chatWidgetService,
|
|
36
|
+
chatService,
|
|
37
|
+
chatEditingService,
|
|
38
|
+
configurationService,
|
|
39
|
+
ignoredFilesService,
|
|
40
|
+
chatContextService
|
|
41
|
+
) {
|
|
30
42
|
super();
|
|
31
43
|
this.codeEditorService = codeEditorService;
|
|
32
44
|
this.editorService = editorService;
|
|
@@ -37,13 +49,18 @@ let ChatImplicitContextContribution = class ChatImplicitContextContribution exte
|
|
|
37
49
|
this.ignoredFilesService = ignoredFilesService;
|
|
38
50
|
this.chatContextService = chatContextService;
|
|
39
51
|
this._currentCancelTokenSource = this._register(( new MutableDisposable()));
|
|
40
|
-
this._implicitContextEnablement = this.configurationService.getValue(
|
|
52
|
+
this._implicitContextEnablement = this.configurationService.getValue("chat.implicitContext.enabled");
|
|
41
53
|
const activeEditorDisposables = this._register(( new DisposableStore()));
|
|
42
54
|
this._register(Event.runAndSubscribe(editorService.onDidActiveEditorChange, (() => {
|
|
43
55
|
activeEditorDisposables.clear();
|
|
44
56
|
const codeEditor = this.findActiveCodeEditor();
|
|
45
57
|
if (codeEditor) {
|
|
46
|
-
activeEditorDisposables.add(Event.debounce(Event.any(
|
|
58
|
+
activeEditorDisposables.add(Event.debounce(Event.any(
|
|
59
|
+
codeEditor.onDidChangeModel,
|
|
60
|
+
codeEditor.onDidChangeModelLanguage,
|
|
61
|
+
codeEditor.onDidChangeCursorSelection,
|
|
62
|
+
codeEditor.onDidScrollChange
|
|
63
|
+
), () => undefined, 500)(() => this.updateImplicitContext()));
|
|
47
64
|
}
|
|
48
65
|
const notebookEditor = this.findActiveNotebookEditor();
|
|
49
66
|
if (notebookEditor) {
|
|
@@ -52,39 +69,53 @@ let ChatImplicitContextContribution = class ChatImplicitContextContribution exte
|
|
|
52
69
|
activeCellDisposables.clear();
|
|
53
70
|
const codeEditor = this.codeEditorService.getActiveCodeEditor();
|
|
54
71
|
if (codeEditor && codeEditor.getModel()?.uri.scheme === Schemas.vscodeNotebookCell) {
|
|
55
|
-
activeCellDisposables.add(Event.debounce(Event.any(
|
|
72
|
+
activeCellDisposables.add(Event.debounce(Event.any(
|
|
73
|
+
codeEditor.onDidChangeModel,
|
|
74
|
+
codeEditor.onDidChangeCursorSelection,
|
|
75
|
+
codeEditor.onDidScrollChange
|
|
76
|
+
), () => undefined, 500)(() => this.updateImplicitContext()));
|
|
56
77
|
}
|
|
57
78
|
}));
|
|
58
|
-
activeEditorDisposables.add(Event.debounce(
|
|
79
|
+
activeEditorDisposables.add(Event.debounce(
|
|
80
|
+
Event.any(notebookEditor.onDidChangeModel, notebookEditor.onDidChangeActiveCell),
|
|
81
|
+
() => undefined,
|
|
82
|
+
500
|
|
83
|
+
)(() => this.updateImplicitContext()));
|
|
59
84
|
}
|
|
60
85
|
const webviewEditor = this.findActiveWebviewEditor();
|
|
61
86
|
if (webviewEditor) {
|
|
62
|
-
activeEditorDisposables.add(
|
|
63
|
-
|
|
64
|
-
|
|
87
|
+
activeEditorDisposables.add(
|
|
88
|
+
Event.debounce(webviewEditor.input.webview.onMessage, () => undefined, 500)(() => {
|
|
89
|
+
this.updateImplicitContext();
|
|
90
|
+
})
|
|
91
|
+
);
|
|
65
92
|
}
|
|
66
93
|
this.updateImplicitContext();
|
|
67
94
|
})));
|
|
68
|
-
this._register(autorun(
|
|
95
|
+
this._register(autorun(reader => {
|
|
69
96
|
this.chatEditingService.editingSessionsObs.read(reader);
|
|
70
97
|
this.updateImplicitContext();
|
|
71
98
|
}));
|
|
72
99
|
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
|
73
|
-
if (e.affectsConfiguration(
|
|
74
|
-
this._implicitContextEnablement = this.configurationService.getValue(
|
|
100
|
+
if (e.affectsConfiguration("chat.implicitContext.enabled")) {
|
|
101
|
+
this._implicitContextEnablement = this.configurationService.getValue("chat.implicitContext.enabled");
|
|
75
102
|
this.updateImplicitContext();
|
|
76
103
|
}
|
|
77
104
|
}));
|
|
78
|
-
this._register(this.chatService.onDidSubmitRequest((
|
|
105
|
+
this._register(this.chatService.onDidSubmitRequest((
|
|
106
|
+
{
|
|
107
|
+
chatSessionResource
|
|
108
|
+
}
|
|
109
|
+
) => {
|
|
79
110
|
const widget = this.chatWidgetService.getWidgetBySessionResource(chatSessionResource);
|
|
80
111
|
if (!widget?.input.implicitContext) {
|
|
81
112
|
return;
|
|
82
113
|
}
|
|
83
|
-
if (this._implicitContextEnablement[widget.location] ===
|
|
84
|
-
widget.input.implicitContext.
|
|
114
|
+
if (this._implicitContextEnablement[widget.location] === "first" && widget.viewModel?.getItems().length !== 0) {
|
|
115
|
+
widget.input.implicitContext.setValues([]);
|
|
85
116
|
}
|
|
86
117
|
}));
|
|
87
|
-
this._register(this.chatWidgetService.onDidAddWidget(async
|
|
118
|
+
this._register(this.chatWidgetService.onDidAddWidget(async widget => {
|
|
88
119
|
await this.updateImplicitContext(widget);
|
|
89
120
|
}));
|
|
90
121
|
}
|
|
@@ -129,36 +160,40 @@ let ChatImplicitContextContribution = class ChatImplicitContextContribution exte
|
|
|
129
160
|
let newValue;
|
|
130
161
|
let isSelection = false;
|
|
131
162
|
let languageId;
|
|
163
|
+
let providerContext;
|
|
132
164
|
if (model) {
|
|
133
165
|
languageId = model.getLanguageId();
|
|
134
166
|
if (selection && !selection.isEmpty()) {
|
|
135
|
-
newValue = {
|
|
167
|
+
newValue = {
|
|
168
|
+
uri: model.uri,
|
|
169
|
+
range: selection
|
|
170
|
+
};
|
|
136
171
|
isSelection = true;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
if (this.configurationService.getValue('chat.implicitContext.suggestedContext')) {
|
|
172
|
+
} else {
|
|
173
|
+
if (this.configurationService.getValue("chat.implicitContext.suggestedContext")) {
|
|
140
174
|
newValue = model.uri;
|
|
141
|
-
}
|
|
142
|
-
else {
|
|
175
|
+
} else {
|
|
143
176
|
const visibleRanges = codeEditor?.getVisibleRanges();
|
|
144
177
|
if (visibleRanges && visibleRanges.length > 0) {
|
|
145
178
|
let range = visibleRanges[0];
|
|
146
179
|
visibleRanges.slice(1).forEach(r => {
|
|
147
180
|
range = range.plusRange(r);
|
|
148
181
|
});
|
|
149
|
-
newValue = {
|
|
150
|
-
|
|
151
|
-
|
|
182
|
+
newValue = {
|
|
183
|
+
uri: model.uri,
|
|
184
|
+
range
|
|
185
|
+
};
|
|
186
|
+
} else {
|
|
152
187
|
newValue = model.uri;
|
|
153
188
|
}
|
|
154
189
|
}
|
|
155
190
|
}
|
|
191
|
+
providerContext = await this.chatContextService.contextForResource(model.uri, languageId);
|
|
156
192
|
}
|
|
157
193
|
const notebookEditor = this.findActiveNotebookEditor();
|
|
158
194
|
if (notebookEditor?.isReplHistory) {
|
|
159
195
|
newValue = undefined;
|
|
160
|
-
}
|
|
161
|
-
else if (notebookEditor) {
|
|
196
|
+
} else if (notebookEditor) {
|
|
162
197
|
const activeCell = notebookEditor.getActiveCell();
|
|
163
198
|
if (activeCell) {
|
|
164
199
|
const codeEditor = this.codeEditorService.getActiveCodeEditor();
|
|
@@ -168,21 +203,25 @@ let ChatImplicitContextContribution = class ChatImplicitContextContribution exte
|
|
|
168
203
|
const cellModel = codeEditor?.getModel();
|
|
169
204
|
if (cellModel && isEqual(cellModel.uri, activeCell.uri)) {
|
|
170
205
|
if (selection && !selection.isEmpty()) {
|
|
171
|
-
newValue = {
|
|
206
|
+
newValue = {
|
|
207
|
+
uri: activeCell.uri,
|
|
208
|
+
range: selection
|
|
209
|
+
};
|
|
172
210
|
isSelection = true;
|
|
173
|
-
}
|
|
174
|
-
else if (visibleRanges.length > 0) {
|
|
211
|
+
} else if (visibleRanges.length > 0) {
|
|
175
212
|
if (!isEntireCellVisible(cellModel, visibleRanges)) {
|
|
176
213
|
let range = visibleRanges[0];
|
|
177
214
|
visibleRanges.slice(1).forEach(r => {
|
|
178
215
|
range = range.plusRange(r);
|
|
179
216
|
});
|
|
180
|
-
newValue = {
|
|
217
|
+
newValue = {
|
|
218
|
+
uri: activeCell.uri,
|
|
219
|
+
range
|
|
220
|
+
};
|
|
181
221
|
}
|
|
182
222
|
}
|
|
183
223
|
}
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
224
|
+
} else {
|
|
186
225
|
newValue = notebookEditor.textModel?.uri;
|
|
187
226
|
}
|
|
188
227
|
}
|
|
@@ -194,100 +233,151 @@ let ChatImplicitContextContribution = class ChatImplicitContextContribution exte
|
|
|
194
233
|
}
|
|
195
234
|
}
|
|
196
235
|
const uri = newValue instanceof URI ? newValue : (isStringImplicitContextValue(newValue) ? undefined : newValue?.uri);
|
|
197
|
-
if (uri && ((await this.ignoredFilesService.fileIsIgnored(uri, cancelTokenSource.token)) ||
|
|
198
|
-
uri.path.endsWith('.copilotmd'))) {
|
|
236
|
+
if (uri && ((await this.ignoredFilesService.fileIsIgnored(uri, cancelTokenSource.token)) || uri.path.endsWith(".copilotmd"))) {
|
|
199
237
|
newValue = undefined;
|
|
200
238
|
}
|
|
201
239
|
if (cancelTokenSource.token.isCancellationRequested) {
|
|
202
240
|
return;
|
|
203
241
|
}
|
|
204
242
|
const isPromptFile = languageId && getPromptsTypeForLanguageId(languageId) !== undefined;
|
|
205
|
-
const widgets = updateWidget ? [updateWidget] : [
|
|
243
|
+
const widgets = updateWidget ? [updateWidget] : [
|
|
244
|
+
...this.chatWidgetService.getWidgetsByLocations(ChatAgentLocation.Chat),
|
|
245
|
+
...this.chatWidgetService.getWidgetsByLocations(ChatAgentLocation.EditorInline)
|
|
246
|
+
];
|
|
206
247
|
for (const widget of widgets) {
|
|
207
248
|
if (!widget.input.implicitContext) {
|
|
208
249
|
continue;
|
|
209
250
|
}
|
|
210
251
|
const setting = this._implicitContextEnablement[widget.location];
|
|
211
252
|
const isFirstInteraction = widget.viewModel?.getItems().length === 0;
|
|
212
|
-
if ((setting ===
|
|
213
|
-
widget.input.implicitContext.
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
253
|
+
if ((setting === "always" || setting === "first" && isFirstInteraction) && !isPromptFile) {
|
|
254
|
+
widget.input.implicitContext.setValues([{
|
|
255
|
+
value: newValue,
|
|
256
|
+
isSelection
|
|
257
|
+
}, {
|
|
258
|
+
value: providerContext,
|
|
259
|
+
isSelection: false
|
|
260
|
+
}]);
|
|
261
|
+
} else {
|
|
262
|
+
widget.input.implicitContext.setValues([]);
|
|
217
263
|
}
|
|
218
264
|
}
|
|
219
265
|
}
|
|
220
266
|
};
|
|
221
|
-
ChatImplicitContextContribution = ( __decorate([
|
|
222
|
-
( __param(0, ICodeEditorService)),
|
|
223
|
-
( __param(1, IEditorService)),
|
|
224
|
-
( __param(2, IChatWidgetService)),
|
|
225
|
-
( __param(3, IChatService)),
|
|
226
|
-
( __param(4, IChatEditingService)),
|
|
227
|
-
( __param(5, IConfigurationService)),
|
|
228
|
-
( __param(6, ILanguageModelIgnoredFilesService)),
|
|
229
|
-
( __param(7, IChatContextService))
|
|
230
|
-
], ChatImplicitContextContribution));
|
|
267
|
+
ChatImplicitContextContribution = ( __decorate([( __param(0, ICodeEditorService)), ( __param(1, IEditorService)), ( __param(2, IChatWidgetService)), ( __param(3, IChatService)), ( __param(4, IChatEditingService)), ( __param(5, IConfigurationService)), ( __param(6, ILanguageModelIgnoredFilesService)), ( __param(7, IChatContextService))], ChatImplicitContextContribution));
|
|
231
268
|
function isEntireCellVisible(cellModel, visibleRanges) {
|
|
232
269
|
if (visibleRanges.length === 1 && visibleRanges[0].startLineNumber === 1 && visibleRanges[0].startColumn === 1 && visibleRanges[0].endLineNumber === cellModel.getLineCount() && visibleRanges[0].endColumn === cellModel.getLineMaxColumn(visibleRanges[0].endLineNumber)) {
|
|
233
270
|
return true;
|
|
234
271
|
}
|
|
235
272
|
return false;
|
|
236
273
|
}
|
|
274
|
+
class ChatImplicitContexts extends Disposable {
|
|
275
|
+
constructor() {
|
|
276
|
+
super(...arguments);
|
|
277
|
+
this._onDidChangeValue = this._register(( new Emitter()));
|
|
278
|
+
this.onDidChangeValue = this._onDidChangeValue.event;
|
|
279
|
+
this._values = this._register(( new DisposableMap()));
|
|
280
|
+
this._valuesDisposables = this._register(( new DisposableStore()));
|
|
281
|
+
}
|
|
282
|
+
setValues(values) {
|
|
283
|
+
this._valuesDisposables.clear();
|
|
284
|
+
this._values.clearAndDisposeAll();
|
|
285
|
+
if (!values || values.length === 0) {
|
|
286
|
+
this._onDidChangeValue.fire();
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
const definedValues = values.filter(value => value.value !== undefined);
|
|
290
|
+
for (const value of definedValues) {
|
|
291
|
+
const implicitContext = ( new ChatImplicitContext());
|
|
292
|
+
implicitContext.setValue(value.value, value.isSelection);
|
|
293
|
+
const disposableStore = ( new DisposableStore());
|
|
294
|
+
disposableStore.add(implicitContext.onDidChangeValue(() => {
|
|
295
|
+
this._onDidChangeValue.fire();
|
|
296
|
+
}));
|
|
297
|
+
disposableStore.add(implicitContext);
|
|
298
|
+
this._values.set(implicitContext, disposableStore);
|
|
299
|
+
}
|
|
300
|
+
this._onDidChangeValue.fire();
|
|
301
|
+
}
|
|
302
|
+
get values() {
|
|
303
|
+
return Array.from(( this._values.keys()));
|
|
304
|
+
}
|
|
305
|
+
get hasEnabled() {
|
|
306
|
+
return ( Array.from(( this._values.keys())).some(v => v.enabled));
|
|
307
|
+
}
|
|
308
|
+
setEnabled(enabled) {
|
|
309
|
+
this.values.forEach(v => v.enabled = enabled);
|
|
310
|
+
}
|
|
311
|
+
get hasValue() {
|
|
312
|
+
return ( this.values.some(v => v.value !== undefined));
|
|
313
|
+
}
|
|
314
|
+
get hasNonUri() {
|
|
315
|
+
return ( this.values.some(v => v.value !== undefined && !URI.isUri(v.value)));
|
|
316
|
+
}
|
|
317
|
+
getLocations() {
|
|
318
|
+
return ( this.values.filter(v => isLocation(v.value)).map(v => v.value));
|
|
319
|
+
}
|
|
320
|
+
getUris() {
|
|
321
|
+
return ( this.values.filter(v => URI.isUri(v.value)).map(v => v.value));
|
|
322
|
+
}
|
|
323
|
+
get hasNonStringContext() {
|
|
324
|
+
return ( this.values.some(v => v.value !== undefined && !isStringImplicitContextValue(v.value)));
|
|
325
|
+
}
|
|
326
|
+
enabledBaseEntries(includeAllLocations) {
|
|
327
|
+
return this.values.flatMap(v => {
|
|
328
|
+
if (v.enabled) {
|
|
329
|
+
return v.toBaseEntries();
|
|
330
|
+
} else if (includeAllLocations && isLocation(v.value)) {
|
|
331
|
+
return v.toBaseEntries();
|
|
332
|
+
}
|
|
333
|
+
return [];
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
}
|
|
237
337
|
class ChatImplicitContext extends Disposable {
|
|
238
338
|
constructor() {
|
|
239
339
|
super(...arguments);
|
|
240
|
-
this.kind =
|
|
340
|
+
this.kind = "implicit";
|
|
241
341
|
this.isFile = true;
|
|
242
342
|
this._isSelection = false;
|
|
243
343
|
this._onDidChangeValue = this._register(( new Emitter()));
|
|
244
344
|
this.onDidChangeValue = this._onDidChangeValue.event;
|
|
245
|
-
this._enabled =
|
|
345
|
+
this._enabled = false;
|
|
246
346
|
}
|
|
247
347
|
get id() {
|
|
248
348
|
if (URI.isUri(this.value)) {
|
|
249
|
-
return
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
}
|
|
254
|
-
else if (this.value) {
|
|
349
|
+
return "vscode.implicit.file";
|
|
350
|
+
} else if (isStringImplicitContextValue(this.value)) {
|
|
351
|
+
return "vscode.implicit.string";
|
|
352
|
+
} else if (this.value) {
|
|
255
353
|
if (this._isSelection) {
|
|
256
|
-
return
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
return 'vscode.implicit.viewport';
|
|
354
|
+
return "vscode.implicit.selection";
|
|
355
|
+
} else {
|
|
356
|
+
return "vscode.implicit.viewport";
|
|
260
357
|
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
return 'vscode.implicit';
|
|
358
|
+
} else {
|
|
359
|
+
return "vscode.implicit";
|
|
264
360
|
}
|
|
265
361
|
}
|
|
266
362
|
get name() {
|
|
267
363
|
if (URI.isUri(this.value)) {
|
|
268
364
|
return `file:${basename(this.value)}`;
|
|
269
|
-
}
|
|
270
|
-
else if (isStringImplicitContextValue(this.value)) {
|
|
365
|
+
} else if (isStringImplicitContextValue(this.value)) {
|
|
271
366
|
return this.value.name;
|
|
272
|
-
}
|
|
273
|
-
else if (this.value) {
|
|
367
|
+
} else if (this.value) {
|
|
274
368
|
return `file:${basename(this.value.uri)}`;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
return 'implicit';
|
|
369
|
+
} else {
|
|
370
|
+
return "implicit";
|
|
278
371
|
}
|
|
279
372
|
}
|
|
280
373
|
get modelDescription() {
|
|
281
374
|
if (URI.isUri(this.value)) {
|
|
282
375
|
return `User's active file`;
|
|
283
|
-
}
|
|
284
|
-
else if (isStringImplicitContextValue(this.value)) {
|
|
376
|
+
} else if (isStringImplicitContextValue(this.value)) {
|
|
285
377
|
return this.value.modelDescription ?? `User's active context from ${this.value.name}`;
|
|
286
|
-
}
|
|
287
|
-
else if (this._isSelection) {
|
|
378
|
+
} else if (this._isSelection) {
|
|
288
379
|
return `User's active selection`;
|
|
289
|
-
}
|
|
290
|
-
else {
|
|
380
|
+
} else {
|
|
291
381
|
return `User's current visible code`;
|
|
292
382
|
}
|
|
293
383
|
}
|
|
@@ -316,11 +406,10 @@ class ChatImplicitContext extends Disposable {
|
|
|
316
406
|
}
|
|
317
407
|
return undefined;
|
|
318
408
|
}
|
|
319
|
-
setValue(value, isSelection
|
|
409
|
+
setValue(value, isSelection) {
|
|
320
410
|
if (isStringImplicitContextValue(value)) {
|
|
321
411
|
this._value = value;
|
|
322
|
-
}
|
|
323
|
-
else {
|
|
412
|
+
} else {
|
|
324
413
|
this._value = value;
|
|
325
414
|
this._uri = URI.isUri(value) ? value : value?.uri;
|
|
326
415
|
}
|
|
@@ -332,26 +421,26 @@ class ChatImplicitContext extends Disposable {
|
|
|
332
421
|
return [];
|
|
333
422
|
}
|
|
334
423
|
if (isStringImplicitContextValue(this.value)) {
|
|
335
|
-
return [
|
|
336
|
-
|
|
337
|
-
kind: 'string',
|
|
338
|
-
id: this.id,
|
|
339
|
-
name: this.name,
|
|
340
|
-
value: this.value.value ?? this.name,
|
|
341
|
-
modelDescription: this.modelDescription,
|
|
342
|
-
icon: this.value.icon,
|
|
343
|
-
uri: this.value.uri
|
|
344
|
-
}
|
|
345
|
-
];
|
|
346
|
-
}
|
|
347
|
-
return [{
|
|
348
|
-
kind: 'file',
|
|
424
|
+
return [{
|
|
425
|
+
kind: "string",
|
|
349
426
|
id: this.id,
|
|
350
427
|
name: this.name,
|
|
351
|
-
value: this.value,
|
|
428
|
+
value: this.value.value ?? this.name,
|
|
352
429
|
modelDescription: this.modelDescription,
|
|
430
|
+
icon: this.value.icon,
|
|
431
|
+
uri: this.value.uri,
|
|
432
|
+
handle: this.value.handle,
|
|
433
|
+
commandId: this.value.commandId
|
|
353
434
|
}];
|
|
435
|
+
}
|
|
436
|
+
return [{
|
|
437
|
+
kind: "file",
|
|
438
|
+
id: this.id,
|
|
439
|
+
name: this.name,
|
|
440
|
+
value: this.value,
|
|
441
|
+
modelDescription: this.modelDescription
|
|
442
|
+
}];
|
|
354
443
|
}
|
|
355
444
|
}
|
|
356
445
|
|
|
357
|
-
export { ChatImplicitContext, ChatImplicitContextContribution };
|
|
446
|
+
export { ChatImplicitContext, ChatImplicitContextContribution, ChatImplicitContexts };
|
package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
3
|
import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service";
|
|
3
4
|
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
4
5
|
import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service";
|
|
@@ -9,15 +10,18 @@ import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/fi
|
|
|
9
10
|
import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
|
|
10
11
|
import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
|
|
11
12
|
import { ResourceLabels } from "@codingame/monaco-vscode-api/vscode/vs/workbench/browser/labels";
|
|
12
|
-
import { IChatRequestImplicitVariableEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries";
|
|
13
13
|
import { IChatWidget } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
14
14
|
import { ChatAttachmentModel } from "./chatAttachmentModel.js";
|
|
15
15
|
import { IChatContextService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.service";
|
|
16
|
+
import { ChatImplicitContexts } from "./chatImplicitContext.js";
|
|
17
|
+
import { IRange } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
|
|
16
18
|
export declare class ImplicitContextAttachmentWidget extends Disposable {
|
|
17
19
|
private readonly widgetRef;
|
|
20
|
+
private readonly isAttachmentAlreadyAttached;
|
|
18
21
|
private readonly attachment;
|
|
19
22
|
private readonly resourceLabels;
|
|
20
23
|
private readonly attachmentModel;
|
|
24
|
+
private readonly domNode;
|
|
21
25
|
private readonly contextKeyService;
|
|
22
26
|
private readonly contextMenuService;
|
|
23
27
|
private readonly labelService;
|
|
@@ -28,10 +32,12 @@ export declare class ImplicitContextAttachmentWidget extends Disposable {
|
|
|
28
32
|
private readonly hoverService;
|
|
29
33
|
private readonly configService;
|
|
30
34
|
private readonly chatContextService;
|
|
31
|
-
readonly domNode: HTMLElement;
|
|
32
35
|
private readonly renderDisposables;
|
|
33
|
-
|
|
36
|
+
private renderedCount;
|
|
37
|
+
constructor(widgetRef: () => IChatWidget | undefined, isAttachmentAlreadyAttached: (targetUri: URI | undefined, targetRange: IRange | undefined, targetHandle: number | undefined) => boolean, attachment: ChatImplicitContexts, resourceLabels: ResourceLabels, attachmentModel: ChatAttachmentModel, domNode: HTMLElement, contextKeyService: IContextKeyService, contextMenuService: IContextMenuService, labelService: ILabelService, menuService: IMenuService, fileService: IFileService, languageService: ILanguageService, modelService: IModelService, hoverService: IHoverService, configService: IConfigurationService, chatContextService: IChatContextService);
|
|
34
38
|
private render;
|
|
39
|
+
get hasRenderedContexts(): boolean;
|
|
40
|
+
private renderMainContext;
|
|
35
41
|
private renderString;
|
|
36
42
|
private renderResource;
|
|
37
43
|
private convertToRegularAttachment;
|