@codingame/monaco-vscode-katex-common 31.0.1 → 32.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 +15 -3
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +6 -5
- package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +5 -1
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +45 -14
- package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +15 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +15 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +51 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +45 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +13 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +46 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentModel.js +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +23 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +155 -46
- 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 +20 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +37 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +34 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/media/chatSessionPickerActionItem.css +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/chatToolRiskAssessmentService.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/chatToolRiskAssessmentService.js +250 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +14 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +7 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.d.ts +12 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +51 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.js +56 -3
- 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.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/paragraphBuffer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/paragraphBuffer.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/chatIncrementalRendering.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/chatIncrementalRendering.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +68 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.d.ts +58 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.js +653 -75
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +28 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +91 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +7 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +53 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +6 -6
- 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 +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +42 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +93 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatPlanReview.css +169 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +13 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatToolConfirmationCarousel.css +29 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +60 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +13 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMissingSandboxDepsConfirmationSubPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.js +15 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +125 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +29 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationCarouselPart.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationCarouselPart.js +119 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +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 +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/media/toolRiskBadge.css +77 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/toolRiskBadgeWidget.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/toolRiskBadgeWidget.js +125 -0
- 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 +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +132 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +16 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +156 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.js +93 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationWidget.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationWidget.js +133 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +53 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +288 -125
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +23 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +699 -145
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.d.ts +12 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.js +12 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatPhoneInputPresenter.d.ts +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatPhoneInputPresenter.js +120 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatInputNotificationWidget.css +191 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatPhoneInputPresenter.css +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +9 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.d.ts +20 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +89 -108
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +521 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +19 -19
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionStorageKeys.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionStorageKeys.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionWarnings.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionWarnings.js +82 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +44 -17
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +3 -46
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/{inlineChatEditorAffordance.d.ts → inlineChatAffordanceWidget.d.ts} +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/{inlineChatEditorAffordance.js → inlineChatAffordanceWidget.js} +6 -6
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +2 -18
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +19 -400
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +4 -9
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +5 -19
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +47 -133
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +103 -25
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +29 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +3 -32
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +39 -92
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +24 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +1 -1
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +99 -32
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +13 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +76 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +4 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +89 -28
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +11 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +7 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +12 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +11 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.js +59 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +24 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +111 -30
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +60 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +455 -171
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +82 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxCommandRules.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxCommandRules.js +49 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxReadAllowList.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxReadAllowList.js +302 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxRuntimeConfigurationPerOperation.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxRuntimeConfigurationPerOperation.js +118 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +34 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +233 -48
- package/vscode/src/vs/platform/actions/browser/actionbar.d.ts +0 -16
- package/vscode/src/vs/platform/actions/browser/actionbar.js +0 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +0 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +0 -539
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +0 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +0 -386
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.d.ts +0 -101
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +0 -509
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +0 -130
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +0 -276
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.d.ts +0 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.js +0 -93
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +0 -39
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +0 -617
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +0 -231
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
1
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
2
|
import { ICodeEditor } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser";
|
|
4
3
|
import { ICodeEditorService } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService.service";
|
|
@@ -6,26 +5,18 @@ import { IPosition, Position } from "@codingame/monaco-vscode-api/vscode/vs/edit
|
|
|
6
5
|
import { IRange } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
|
|
7
6
|
import { ISelection } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/selection";
|
|
8
7
|
import { IEditorContribution } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/editorCommon";
|
|
9
|
-
import { TextEdit } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages";
|
|
10
8
|
import { IMarkerDecorationsService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/markerDecorations.service";
|
|
11
|
-
import { EditSuggestionId } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/textModelEditSource";
|
|
12
9
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
13
10
|
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
14
|
-
import {
|
|
15
|
-
import { IInstantiationService, ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
11
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
16
12
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
17
|
-
import { ISharedWebContentExtractorService } from "@codingame/monaco-vscode-api/vscode/vs/platform/webContentExtractor/common/webContentExtractor.service";
|
|
18
13
|
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
19
|
-
import { IChatAttachmentResolveService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.service";
|
|
20
14
|
import { IChatEditingService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService.service";
|
|
21
15
|
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
|
|
22
|
-
import { IChatRequestVariableEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries";
|
|
23
16
|
import { ILanguageModelChatSelector } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels";
|
|
24
17
|
import { ILanguageModelsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service";
|
|
25
18
|
import { INotebookEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service";
|
|
26
|
-
import { ICellEditOperation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
|
|
27
19
|
import { InlineChatAffordance } from "./inlineChatAffordance.js";
|
|
28
|
-
import { InlineChatInputWidget } from "./inlineChatOverlayWidget.js";
|
|
29
20
|
import { IInlineChatSessionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service";
|
|
30
21
|
import { EditorBasedInlineChatWidget } from "./inlineChatWidget.js";
|
|
31
22
|
export declare abstract class InlineChatRunOptions {
|
|
@@ -47,8 +38,7 @@ export declare class InlineChatController implements IEditorContribution {
|
|
|
47
38
|
readonly inputOverlayWidget: InlineChatAffordance;
|
|
48
39
|
get widget(): EditorBasedInlineChatWidget;
|
|
49
40
|
get isActive(): boolean;
|
|
50
|
-
|
|
51
|
-
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);
|
|
41
|
+
constructor(editor: ICodeEditor, instaService: IInstantiationService, notebookEditorService: INotebookEditorService, inlineChatSessionService: IInlineChatSessionService, codeEditorService: ICodeEditorService, contextKeyService: IContextKeyService, configurationService: IConfigurationService, editorService: IEditorService, markerDecorationsService: IMarkerDecorationsService, languageModelService: ILanguageModelsService, logService: ILogService, chatEditingService: IChatEditingService, chatService: IChatService);
|
|
52
42
|
dispose(): void;
|
|
53
43
|
getWidgetPosition(): Position | undefined;
|
|
54
44
|
focus(): void;
|
|
@@ -57,10 +47,4 @@ export declare class InlineChatController implements IEditorContribution {
|
|
|
57
47
|
rejectSession(): Promise<void>;
|
|
58
48
|
continueSessionInChat(): Promise<void>;
|
|
59
49
|
rephraseSession(): Promise<void>;
|
|
60
|
-
createImageAttachment(attachment: URI): Promise<IChatRequestVariableEntry | undefined>;
|
|
61
50
|
}
|
|
62
|
-
export declare function reviewEdits(accessor: ServicesAccessor, editor: ICodeEditor, stream: AsyncIterable<TextEdit[]>, token: CancellationToken, applyCodeBlockSuggestionId: EditSuggestionId | undefined): Promise<boolean>;
|
|
63
|
-
export declare function reviewNotebookEdits(accessor: ServicesAccessor, uri: URI, stream: AsyncIterable<[
|
|
64
|
-
URI,
|
|
65
|
-
TextEdit[]
|
|
66
|
-
] | ICellEditOperation[]>, token: CancellationToken): Promise<boolean>;
|
|
@@ -2,13 +2,10 @@
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { renderAsPlaintext } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/markdownRenderer';
|
|
4
4
|
import { alert } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/aria/aria';
|
|
5
|
-
import { raceCancellation } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
6
|
-
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
7
5
|
import { onUnexpectedError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
8
6
|
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
9
7
|
import { Lazy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lazy';
|
|
10
8
|
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
11
|
-
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
12
9
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
13
10
|
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
14
11
|
import { assertType } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
@@ -23,14 +20,11 @@ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
|
23
20
|
import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
24
21
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
25
22
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
26
|
-
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
27
23
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
28
24
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
29
25
|
import { observableConfigValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/observable/common/platformObservableUtils';
|
|
30
|
-
import { ISharedWebContentExtractorService } from '@codingame/monaco-vscode-api/vscode/vs/platform/webContentExtractor/common/webContentExtractor.service';
|
|
31
26
|
import { SIDE_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService';
|
|
32
27
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
33
|
-
import { IChatAttachmentResolveService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.service';
|
|
34
28
|
import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
|
|
35
29
|
import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService.service';
|
|
36
30
|
import { ChatMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes';
|
|
@@ -38,16 +32,14 @@ import { IChatToolInvocation, ToolConfirmKind } from '@codingame/monaco-vscode-a
|
|
|
38
32
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
39
33
|
import { IDiagnosticVariableEntryFilterData } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries';
|
|
40
34
|
import { isResponseVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel';
|
|
41
|
-
import { ChatAgentLocation
|
|
35
|
+
import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
42
36
|
import { isILanguageModelChatSelector, ILanguageModelChatMetadata } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels';
|
|
43
37
|
import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
|
|
44
38
|
import { isNotebookContainingCellEditor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookEditor';
|
|
45
39
|
import { INotebookEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service';
|
|
46
40
|
import { CellUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
47
|
-
import {
|
|
48
|
-
import { CTX_INLINE_CHAT_VISIBLE, CTX_INLINE_CHAT_FILE_BELONGS_TO_CHAT, CTX_INLINE_CHAT_PENDING_CONFIRMATION, CTX_INLINE_CHAT_TERMINATED, InlineChatConfigKeys } from '../common/inlineChat.js';
|
|
41
|
+
import { INLINE_CHAT_ID, CTX_INLINE_CHAT_VISIBLE, CTX_INLINE_CHAT_FILE_BELONGS_TO_CHAT, CTX_INLINE_CHAT_TERMINATED, InlineChatConfigKeys } from '../common/inlineChat.js';
|
|
49
42
|
import { InlineChatAffordance } from './inlineChatAffordance.js';
|
|
50
|
-
import { InlineChatInputWidget, InlineChatSessionOverlayWidget } from './inlineChatOverlayWidget.js';
|
|
51
43
|
import { continueInPanelChat, rephraseInlineChat } from './inlineChatSessionService.js';
|
|
52
44
|
import { IInlineChatSessionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service';
|
|
53
45
|
import { InlineChatZoneWidget } from './inlineChatZoneWidget.js';
|
|
@@ -89,7 +81,7 @@ let InlineChatController = class InlineChatController {
|
|
|
89
81
|
InlineChatController_1 = this;
|
|
90
82
|
}
|
|
91
83
|
static {
|
|
92
|
-
this.ID =
|
|
84
|
+
this.ID = INLINE_CHAT_ID;
|
|
93
85
|
}
|
|
94
86
|
static get(editor) {
|
|
95
87
|
return editor.getContribution(InlineChatController_1.ID) ?? undefined;
|
|
@@ -97,18 +89,13 @@ let InlineChatController = class InlineChatController {
|
|
|
97
89
|
static #userSelectedModel;
|
|
98
90
|
#store = ( new DisposableStore());
|
|
99
91
|
#isActiveController = observableValue(this, false);
|
|
100
|
-
#renderMode;
|
|
101
92
|
#zone;
|
|
102
|
-
#inputWidget;
|
|
103
93
|
#currentSession;
|
|
104
94
|
#editor;
|
|
105
95
|
#instaService;
|
|
106
96
|
#notebookEditorService;
|
|
107
97
|
#inlineChatSessionService;
|
|
108
98
|
#configurationService;
|
|
109
|
-
#webContentExtractorService;
|
|
110
|
-
#fileService;
|
|
111
|
-
#chatAttachmentResolveService;
|
|
112
99
|
#editorService;
|
|
113
100
|
#markerDecorationsService;
|
|
114
101
|
#languageModelService;
|
|
@@ -121,9 +108,6 @@ let InlineChatController = class InlineChatController {
|
|
|
121
108
|
get isActive() {
|
|
122
109
|
return Boolean(this.#currentSession.get());
|
|
123
110
|
}
|
|
124
|
-
get inputWidget() {
|
|
125
|
-
return this.#inputWidget;
|
|
126
|
-
}
|
|
127
111
|
constructor(
|
|
128
112
|
editor,
|
|
129
113
|
instaService,
|
|
@@ -132,9 +116,6 @@ let InlineChatController = class InlineChatController {
|
|
|
132
116
|
codeEditorService,
|
|
133
117
|
contextKeyService,
|
|
134
118
|
configurationService,
|
|
135
|
-
webContentExtractorService,
|
|
136
|
-
fileService,
|
|
137
|
-
chatAttachmentResolveService,
|
|
138
119
|
editorService,
|
|
139
120
|
markerDecorationsService,
|
|
140
121
|
languageModelService,
|
|
@@ -147,9 +128,6 @@ let InlineChatController = class InlineChatController {
|
|
|
147
128
|
this.#notebookEditorService = notebookEditorService;
|
|
148
129
|
this.#inlineChatSessionService = inlineChatSessionService;
|
|
149
130
|
this.#configurationService = configurationService;
|
|
150
|
-
this.#webContentExtractorService = webContentExtractorService;
|
|
151
|
-
this.#fileService = fileService;
|
|
152
|
-
this.#chatAttachmentResolveService = chatAttachmentResolveService;
|
|
153
131
|
this.#editorService = editorService;
|
|
154
132
|
this.#markerDecorationsService = markerDecorationsService;
|
|
155
133
|
this.#languageModelService = languageModelService;
|
|
@@ -159,10 +137,8 @@ let InlineChatController = class InlineChatController {
|
|
|
159
137
|
const editorObs = observableCodeEditor(editor);
|
|
160
138
|
const ctxInlineChatVisible = CTX_INLINE_CHAT_VISIBLE.bindTo(contextKeyService);
|
|
161
139
|
const ctxFileBelongsToChat = CTX_INLINE_CHAT_FILE_BELONGS_TO_CHAT.bindTo(contextKeyService);
|
|
162
|
-
const ctxPendingConfirmation = CTX_INLINE_CHAT_PENDING_CONFIRMATION.bindTo(contextKeyService);
|
|
163
140
|
const ctxTerminated = CTX_INLINE_CHAT_TERMINATED.bindTo(contextKeyService);
|
|
164
|
-
const notebookAgentConfig = observableConfigValue(InlineChatConfigKeys.
|
|
165
|
-
this.#renderMode = observableConfigValue(InlineChatConfigKeys.RenderMode, "zone", this.#configurationService);
|
|
141
|
+
const notebookAgentConfig = observableConfigValue(InlineChatConfigKeys.NotebookAgent, false, this.#configurationService);
|
|
166
142
|
this.#store.add(autorun(r => {
|
|
167
143
|
const model = editorObs.model.read(r);
|
|
168
144
|
if (!model) {
|
|
@@ -185,13 +161,7 @@ let InlineChatController = class InlineChatController {
|
|
|
185
161
|
}
|
|
186
162
|
ctxFileBelongsToChat.set(hasEdits);
|
|
187
163
|
}));
|
|
188
|
-
|
|
189
|
-
const sessionOverlayWidget = this.#store.add(
|
|
190
|
-
this.#instaService.createInstance(InlineChatSessionOverlayWidget, editorObs)
|
|
191
|
-
);
|
|
192
|
-
this.inputOverlayWidget = this.#store.add(
|
|
193
|
-
this.#instaService.createInstance(InlineChatAffordance, this.#editor, overlayWidget)
|
|
194
|
-
);
|
|
164
|
+
this.inputOverlayWidget = this.#store.add(this.#instaService.createInstance(InlineChatAffordance, this.#editor));
|
|
195
165
|
this.#zone = ( new Lazy(() => {
|
|
196
166
|
assertType(
|
|
197
167
|
this.#editor.hasModel(),
|
|
@@ -296,7 +266,7 @@ let InlineChatController = class InlineChatController {
|
|
|
296
266
|
}
|
|
297
267
|
}));
|
|
298
268
|
const defaultPlaceholderObs = ( visibleSessionObs.map((session, r) => {
|
|
299
|
-
return session?.initialSelection.isEmpty() ? ( localize(
|
|
269
|
+
return session?.initialSelection.isEmpty() ? ( localize(10429, "Generate code")) : ( localize(10430, "Modify selected code"));
|
|
300
270
|
}));
|
|
301
271
|
this.#store.add(autorun(r => {
|
|
302
272
|
const session = visibleSessionObs.read(r);
|
|
@@ -304,14 +274,11 @@ let InlineChatController = class InlineChatController {
|
|
|
304
274
|
}));
|
|
305
275
|
this.#store.add(autorun(r => {
|
|
306
276
|
const session = visibleSessionObs.read(r);
|
|
307
|
-
const renderMode = this.#renderMode.read(r);
|
|
308
277
|
if (!session) {
|
|
309
278
|
this.#zone.rawValue?.hide();
|
|
310
279
|
this.#zone.rawValue?.widget.chatWidget.setModel(undefined);
|
|
311
280
|
editor.focus();
|
|
312
281
|
ctxInlineChatVisible.reset();
|
|
313
|
-
} else if (renderMode === "hover") {
|
|
314
|
-
ctxInlineChatVisible.set(true);
|
|
315
282
|
} else {
|
|
316
283
|
ctxInlineChatVisible.set(true);
|
|
317
284
|
this.#zone.value.widget.chatWidget.setModel(session.chatModel);
|
|
@@ -324,28 +291,6 @@ let InlineChatController = class InlineChatController {
|
|
|
324
291
|
this.#zone.value.widget.focus();
|
|
325
292
|
}
|
|
326
293
|
}));
|
|
327
|
-
this.#store.add(autorun(r => {
|
|
328
|
-
const session = visibleSessionObs.read(r);
|
|
329
|
-
const renderMode = this.#renderMode.read(r);
|
|
330
|
-
if (!session || renderMode !== "hover") {
|
|
331
|
-
ctxPendingConfirmation.set(false);
|
|
332
|
-
sessionOverlayWidget.hide();
|
|
333
|
-
return;
|
|
334
|
-
}
|
|
335
|
-
const lastRequest = session.chatModel.lastRequestObs.read(r);
|
|
336
|
-
const isInProgress = lastRequest?.response?.isInProgress.read(r);
|
|
337
|
-
const isPendingConfirmation = !!lastRequest?.response?.isPendingConfirmation.read(r);
|
|
338
|
-
const isError = !!lastRequest?.response?.result?.errorDetails;
|
|
339
|
-
const isTerminated = !!session.terminationState.read(r);
|
|
340
|
-
ctxPendingConfirmation.set(isPendingConfirmation);
|
|
341
|
-
const entry = session.editingSession.readEntry(session.uri, r);
|
|
342
|
-
const isNotSettled = entry ? entry.state.read(r) === ModifiedFileEntryState.Modified : false;
|
|
343
|
-
if (isInProgress || isNotSettled || isPendingConfirmation || isError || isTerminated) {
|
|
344
|
-
sessionOverlayWidget.show(session);
|
|
345
|
-
} else {
|
|
346
|
-
sessionOverlayWidget.hide();
|
|
347
|
-
}
|
|
348
|
-
}));
|
|
349
294
|
this.#store.add(autorun(r => {
|
|
350
295
|
const session = this.#currentSession.read(r);
|
|
351
296
|
if (!session) {
|
|
@@ -412,30 +357,29 @@ let InlineChatController = class InlineChatController {
|
|
|
412
357
|
const session = visibleSessionObs.read(r);
|
|
413
358
|
const response = lastResponseObs.read(r);
|
|
414
359
|
const terminationState = session?.terminationState.read(r);
|
|
415
|
-
const renderMode = this.#renderMode.read(r);
|
|
416
360
|
this.#zone.rawValue?.widget.updateInfo("");
|
|
417
361
|
if (!response?.isInProgress.read(r)) {
|
|
362
|
+
this.#zone.rawValue?.status.set(response?.result?.details ?? "", undefined);
|
|
418
363
|
if (response?.result?.errorDetails) {
|
|
419
364
|
this.#zone.rawValue?.widget.updateInfo(`$(error) ${response.result.errorDetails.message}`);
|
|
420
365
|
alert(response.result.errorDetails.message);
|
|
421
|
-
} else if (terminationState && renderMode === "zone") {
|
|
422
|
-
this.#zone.rawValue?.showTerminationCard(terminationState, this.#instaService);
|
|
423
366
|
} else if (terminationState) {
|
|
424
|
-
this.#zone.rawValue?.
|
|
367
|
+
this.#zone.rawValue?.showTerminationCard(terminationState, this.#instaService);
|
|
425
368
|
}
|
|
426
|
-
if (!terminationState
|
|
369
|
+
if (!terminationState) {
|
|
427
370
|
this.#zone.rawValue?.hideTerminationCard();
|
|
428
371
|
}
|
|
429
372
|
this.#zone.rawValue?.widget.domNode.classList.toggle("request-in-progress", false);
|
|
430
373
|
this.#zone.rawValue?.widget.chatWidget.setInputPlaceholder(defaultPlaceholderObs.read(r));
|
|
431
374
|
} else {
|
|
432
375
|
this.#zone.rawValue?.widget.domNode.classList.toggle("request-in-progress", true);
|
|
376
|
+
this.#zone.rawValue?.status.set("", undefined);
|
|
433
377
|
let placeholder = response.request?.message.text;
|
|
434
378
|
const lastProgress = lastResponseProgressObs.read(r);
|
|
435
379
|
if (lastProgress) {
|
|
436
380
|
placeholder = renderAsPlaintext(lastProgress.content);
|
|
437
381
|
}
|
|
438
|
-
this.#zone.rawValue?.widget.chatWidget.setInputPlaceholder(placeholder || ( localize(
|
|
382
|
+
this.#zone.rawValue?.widget.chatWidget.setInputPlaceholder(placeholder || ( localize(10431, "Working...")));
|
|
439
383
|
}
|
|
440
384
|
}));
|
|
441
385
|
this.#store.add(autorun(r => {
|
|
@@ -490,85 +434,7 @@ let InlineChatController = class InlineChatController {
|
|
|
490
434
|
}
|
|
491
435
|
this.#isActiveController.set(true, undefined);
|
|
492
436
|
const session = this.#inlineChatSessionService.createSession(this.#editor);
|
|
493
|
-
|
|
494
|
-
return this.#runHover(session, arg);
|
|
495
|
-
} else {
|
|
496
|
-
return this.#runZone(session, arg);
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
async #runHover(session, arg) {
|
|
500
|
-
assertType(this.#editor.hasModel());
|
|
501
|
-
const uri = this.#editor.getModel().uri;
|
|
502
|
-
if (arg && InlineChatRunOptions.isInlineChatRunOptions(arg)) {
|
|
503
|
-
if (arg.initialRange) {
|
|
504
|
-
this.#editor.revealRange(arg.initialRange);
|
|
505
|
-
}
|
|
506
|
-
if (arg.initialSelection) {
|
|
507
|
-
this.#editor.setSelection(arg.initialSelection);
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
const {
|
|
511
|
-
location,
|
|
512
|
-
locationData
|
|
513
|
-
} = this.#buildLocationData();
|
|
514
|
-
let userSelectedModelId;
|
|
515
|
-
if (arg?.modelSelector) {
|
|
516
|
-
userSelectedModelId = (await this.#languageModelService.selectLanguageModels(arg.modelSelector)).sort().at(0);
|
|
517
|
-
if (!userSelectedModelId) {
|
|
518
|
-
throw ( new Error(
|
|
519
|
-
`No language models found matching selector: ${JSON.stringify(arg.modelSelector)}.`
|
|
520
|
-
));
|
|
521
|
-
}
|
|
522
|
-
} else {
|
|
523
|
-
userSelectedModelId = await this.#resolveModelId(location);
|
|
524
|
-
}
|
|
525
|
-
const attachedContext = [];
|
|
526
|
-
if (arg?.attachments) {
|
|
527
|
-
for (const attachment of arg.attachments) {
|
|
528
|
-
const resolved = await this.#chatAttachmentResolveService.resolveImageEditorAttachContext(attachment);
|
|
529
|
-
if (resolved) {
|
|
530
|
-
attachedContext.push(resolved);
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
if (arg?.attachDiagnostics) {
|
|
535
|
-
for (const [range, marker] of this.#markerDecorationsService.getLiveMarkers(uri)) {
|
|
536
|
-
if (range.intersectRanges(this.#editor.getSelection())) {
|
|
537
|
-
const filter = IDiagnosticVariableEntryFilterData.fromMarker(marker);
|
|
538
|
-
attachedContext.push(IDiagnosticVariableEntryFilterData.toEntry(filter));
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
if (attachedContext.length > 0 && !arg.message) {
|
|
542
|
-
arg.message = attachedContext.length > 1 ? ( localize(10092, "Fix the attached problems")) : ( localize(10093, "Fix the attached problem"));
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
if (arg?.message && arg.autoSend) {
|
|
546
|
-
await this.#chatService.sendRequest(session.chatModel.sessionResource, arg.message, {
|
|
547
|
-
userSelectedModelId,
|
|
548
|
-
location,
|
|
549
|
-
locationData,
|
|
550
|
-
attachedContext: attachedContext.length > 0 ? attachedContext : undefined,
|
|
551
|
-
modeInfo: {
|
|
552
|
-
kind: ChatModeKind.Ask,
|
|
553
|
-
isBuiltin: true,
|
|
554
|
-
modeInstructions: undefined,
|
|
555
|
-
modeId: "ask",
|
|
556
|
-
applyCodeBlockSuggestionId: undefined
|
|
557
|
-
}
|
|
558
|
-
});
|
|
559
|
-
}
|
|
560
|
-
if (!arg?.resolveOnResponse) {
|
|
561
|
-
await Event.toPromise(session.editingSession.onDidDispose);
|
|
562
|
-
const rejected = session.editingSession.getEntry(uri)?.state.get() === ModifiedFileEntryState.Rejected;
|
|
563
|
-
return !rejected;
|
|
564
|
-
} else {
|
|
565
|
-
const modifiedObs = derived(r => {
|
|
566
|
-
const entry = session.editingSession.readEntry(uri, r);
|
|
567
|
-
return entry?.state.read(r) === ModifiedFileEntryState.Modified && !entry?.isCurrentlyBeingModifiedBy.read(r);
|
|
568
|
-
});
|
|
569
|
-
await waitForState(modifiedObs, state => state === true);
|
|
570
|
-
return true;
|
|
571
|
-
}
|
|
437
|
+
return this.#runZone(session, arg);
|
|
572
438
|
}
|
|
573
439
|
async #runZone(session, arg) {
|
|
574
440
|
assertType(this.#editor.hasModel());
|
|
@@ -589,7 +455,7 @@ let InlineChatController = class InlineChatController {
|
|
|
589
455
|
}
|
|
590
456
|
if (entries.length > 0) {
|
|
591
457
|
this.#zone.value.widget.chatWidget.attachmentModel.addContext(...entries);
|
|
592
|
-
const msg = entries.length > 1 ? ( localize(
|
|
458
|
+
const msg = entries.length > 1 ? ( localize(10432, "Fix the attached problems")) : ( localize(10433, "Fix the attached problem"));
|
|
593
459
|
this.#zone.value.widget.chatWidget.input.setValue(msg, true);
|
|
594
460
|
arg.message = msg;
|
|
595
461
|
this.#zone.value.widget.chatWidget.inputEditor.setSelection(( new Selection(1, 1, Number.MAX_SAFE_INTEGER, 1)));
|
|
@@ -676,22 +542,11 @@ let InlineChatController = class InlineChatController {
|
|
|
676
542
|
if (!session) {
|
|
677
543
|
return;
|
|
678
544
|
}
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
this.#zone.rawValue?.widget.chatWidget.setInput(requestText);
|
|
683
|
-
}
|
|
684
|
-
this.#zone.rawValue?.widget.focus();
|
|
685
|
-
return;
|
|
686
|
-
}
|
|
687
|
-
const requestText = session.chatModel.getRequests().at(-1)?.message.text;
|
|
688
|
-
session.dispose();
|
|
689
|
-
if (!requestText) {
|
|
690
|
-
return;
|
|
545
|
+
const requestText = this.#instaService.invokeFunction(rephraseInlineChat, session);
|
|
546
|
+
if (requestText) {
|
|
547
|
+
this.#zone.rawValue?.widget.chatWidget.setInput(requestText);
|
|
691
548
|
}
|
|
692
|
-
|
|
693
|
-
const placeholder = selection && !selection.isEmpty() ? ( localize(10094, "Describe how to change this")) : ( localize(10095, "Describe what to generate"));
|
|
694
|
-
await this.inputOverlayWidget.showMenuAtSelection(placeholder, requestText);
|
|
549
|
+
this.#zone.rawValue?.widget.focus();
|
|
695
550
|
}
|
|
696
551
|
async #selectVendorDefaultModel(session) {
|
|
697
552
|
const model = this.#zone.value.widget.chatWidget.input.selectedLanguageModel.get();
|
|
@@ -711,69 +566,6 @@ let InlineChatController = class InlineChatController {
|
|
|
711
566
|
}
|
|
712
567
|
}
|
|
713
568
|
}
|
|
714
|
-
async #resolveModelId(location) {
|
|
715
|
-
const userSelectedModel = InlineChatController_1.#userSelectedModel;
|
|
716
|
-
const defaultModelSetting = this.#configurationService.getValue(InlineChatConfigKeys.DefaultModel);
|
|
717
|
-
if (userSelectedModel) {
|
|
718
|
-
const match = this.#languageModelService.lookupLanguageModelByQualifiedName(userSelectedModel);
|
|
719
|
-
if (match) {
|
|
720
|
-
return match.identifier;
|
|
721
|
-
}
|
|
722
|
-
InlineChatController_1.#userSelectedModel = undefined;
|
|
723
|
-
}
|
|
724
|
-
if (defaultModelSetting) {
|
|
725
|
-
const match = this.#languageModelService.lookupLanguageModelByQualifiedName(defaultModelSetting);
|
|
726
|
-
if (match) {
|
|
727
|
-
return match.identifier;
|
|
728
|
-
}
|
|
729
|
-
this.#logService.warn(
|
|
730
|
-
`inlineChat.defaultModel setting value '${defaultModelSetting}' did not match any available model. Falling back to vendor default.`
|
|
731
|
-
);
|
|
732
|
-
}
|
|
733
|
-
for (const id of this.#languageModelService.getLanguageModelIds()) {
|
|
734
|
-
const metadata = this.#languageModelService.lookupLanguageModel(id);
|
|
735
|
-
if (metadata?.isDefaultForLocation[location]) {
|
|
736
|
-
return id;
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
return undefined;
|
|
740
|
-
}
|
|
741
|
-
#buildLocationData() {
|
|
742
|
-
assertType(this.#editor.hasModel());
|
|
743
|
-
const notebookEditor = this.#notebookEditorService.getNotebookForPossibleCell(this.#editor);
|
|
744
|
-
if (notebookEditor) {
|
|
745
|
-
const useNotebookAgent = this.#configurationService.getValue(InlineChatConfigKeys.notebookAgent);
|
|
746
|
-
if (useNotebookAgent) {
|
|
747
|
-
return {
|
|
748
|
-
location: ChatAgentLocation.Notebook,
|
|
749
|
-
locationData: {
|
|
750
|
-
type: ChatAgentLocation.Notebook,
|
|
751
|
-
sessionInputUri: this.#editor.getModel().uri
|
|
752
|
-
}
|
|
753
|
-
};
|
|
754
|
-
}
|
|
755
|
-
return {
|
|
756
|
-
location: ChatAgentLocation.Notebook,
|
|
757
|
-
locationData: {
|
|
758
|
-
type: ChatAgentLocation.EditorInline,
|
|
759
|
-
id: getEditorId(this.#editor, this.#editor.getModel()),
|
|
760
|
-
selection: this.#editor.getSelection(),
|
|
761
|
-
document: this.#editor.getModel().uri,
|
|
762
|
-
wholeRange: this.#editor.getSelection()
|
|
763
|
-
}
|
|
764
|
-
};
|
|
765
|
-
}
|
|
766
|
-
return {
|
|
767
|
-
location: ChatAgentLocation.EditorInline,
|
|
768
|
-
locationData: {
|
|
769
|
-
type: ChatAgentLocation.EditorInline,
|
|
770
|
-
id: getEditorId(this.#editor, this.#editor.getModel()),
|
|
771
|
-
selection: this.#editor.getSelection(),
|
|
772
|
-
document: this.#editor.getModel().uri,
|
|
773
|
-
wholeRange: this.#editor.getSelection()
|
|
774
|
-
}
|
|
775
|
-
};
|
|
776
|
-
}
|
|
777
569
|
async #applyModelDefaults(session, sessionStore) {
|
|
778
570
|
const userSelectedModel = InlineChatController_1.#userSelectedModel;
|
|
779
571
|
const defaultModelSetting = this.#configurationService.getValue(InlineChatConfigKeys.DefaultModel);
|
|
@@ -811,180 +603,7 @@ let InlineChatController = class InlineChatController {
|
|
|
811
603
|
}
|
|
812
604
|
}));
|
|
813
605
|
}
|
|
814
|
-
async createImageAttachment(attachment) {
|
|
815
|
-
const value = this.#currentSession.get();
|
|
816
|
-
if (!value) {
|
|
817
|
-
return undefined;
|
|
818
|
-
}
|
|
819
|
-
if (attachment.scheme === Schemas.file) {
|
|
820
|
-
if (await this.#fileService.canHandleResource(attachment)) {
|
|
821
|
-
return await this.#chatAttachmentResolveService.resolveImageEditorAttachContext(attachment);
|
|
822
|
-
}
|
|
823
|
-
} else if (attachment.scheme === Schemas.http || attachment.scheme === Schemas.https) {
|
|
824
|
-
const extractedImages = await this.#webContentExtractorService.readImage(attachment, CancellationToken.None);
|
|
825
|
-
if (extractedImages) {
|
|
826
|
-
return await this.#chatAttachmentResolveService.resolveImageEditorAttachContext(attachment, extractedImages);
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
return undefined;
|
|
830
|
-
}
|
|
831
606
|
};
|
|
832
|
-
InlineChatController = InlineChatController_1 = ( __decorate([( __param(1, IInstantiationService)), ( __param(2, INotebookEditorService)), ( __param(3, IInlineChatSessionService)), ( __param(4, ICodeEditorService)), ( __param(5, IContextKeyService)), ( __param(6, IConfigurationService)), ( __param(7,
|
|
833
|
-
async function reviewEdits(accessor, editor, stream, token, applyCodeBlockSuggestionId) {
|
|
834
|
-
if (!editor.hasModel()) {
|
|
835
|
-
return false;
|
|
836
|
-
}
|
|
837
|
-
const chatService = accessor.get(IChatService);
|
|
838
|
-
const uri = editor.getModel().uri;
|
|
839
|
-
const chatModelRef = chatService.startNewLocalSession(ChatAgentLocation.EditorInline);
|
|
840
|
-
const chatModel = chatModelRef.object;
|
|
841
|
-
chatModel.startEditingSession(true);
|
|
842
|
-
const store = ( new DisposableStore());
|
|
843
|
-
store.add(chatModelRef);
|
|
844
|
-
const chatRequest = chatModel?.addRequest({
|
|
845
|
-
text: "",
|
|
846
|
-
parts: []
|
|
847
|
-
}, {
|
|
848
|
-
variables: []
|
|
849
|
-
}, 0, {
|
|
850
|
-
kind: undefined,
|
|
851
|
-
modeId: "applyCodeBlock",
|
|
852
|
-
modeInstructions: undefined,
|
|
853
|
-
isBuiltin: true,
|
|
854
|
-
applyCodeBlockSuggestionId
|
|
855
|
-
});
|
|
856
|
-
assertType(chatRequest.response);
|
|
857
|
-
chatRequest.response.updateContent({
|
|
858
|
-
kind: "textEdit",
|
|
859
|
-
uri,
|
|
860
|
-
edits: [],
|
|
861
|
-
done: false
|
|
862
|
-
});
|
|
863
|
-
for await (const chunk of stream) {
|
|
864
|
-
if (token.isCancellationRequested) {
|
|
865
|
-
chatRequest.response.cancel();
|
|
866
|
-
break;
|
|
867
|
-
}
|
|
868
|
-
chatRequest.response.updateContent({
|
|
869
|
-
kind: "textEdit",
|
|
870
|
-
uri,
|
|
871
|
-
edits: chunk,
|
|
872
|
-
done: false
|
|
873
|
-
});
|
|
874
|
-
}
|
|
875
|
-
chatRequest.response.updateContent({
|
|
876
|
-
kind: "textEdit",
|
|
877
|
-
uri,
|
|
878
|
-
edits: [],
|
|
879
|
-
done: true
|
|
880
|
-
});
|
|
881
|
-
if (!token.isCancellationRequested) {
|
|
882
|
-
chatRequest.response.complete();
|
|
883
|
-
}
|
|
884
|
-
const isSettled = derived(r => {
|
|
885
|
-
const entry = chatModel.editingSession?.readEntry(uri, r);
|
|
886
|
-
if (!entry) {
|
|
887
|
-
return false;
|
|
888
|
-
}
|
|
889
|
-
const state = entry.state.read(r);
|
|
890
|
-
return state === ModifiedFileEntryState.Accepted || state === ModifiedFileEntryState.Rejected;
|
|
891
|
-
});
|
|
892
|
-
const whenDecided = waitForState(isSettled, Boolean);
|
|
893
|
-
await raceCancellation(whenDecided, token);
|
|
894
|
-
store.dispose();
|
|
895
|
-
return true;
|
|
896
|
-
}
|
|
897
|
-
async function reviewNotebookEdits(accessor, uri, stream, token) {
|
|
898
|
-
const chatService = accessor.get(IChatService);
|
|
899
|
-
const notebookService = accessor.get(INotebookService);
|
|
900
|
-
const isNotebook = notebookService.hasSupportedNotebooks(uri);
|
|
901
|
-
const chatModelRef = chatService.startNewLocalSession(ChatAgentLocation.EditorInline);
|
|
902
|
-
const chatModel = chatModelRef.object;
|
|
903
|
-
chatModel.startEditingSession(true);
|
|
904
|
-
const store = ( new DisposableStore());
|
|
905
|
-
store.add(chatModelRef);
|
|
906
|
-
const chatRequest = chatModel?.addRequest({
|
|
907
|
-
text: "",
|
|
908
|
-
parts: []
|
|
909
|
-
}, {
|
|
910
|
-
variables: []
|
|
911
|
-
}, 0);
|
|
912
|
-
assertType(chatRequest.response);
|
|
913
|
-
if (isNotebook) {
|
|
914
|
-
chatRequest.response.updateContent({
|
|
915
|
-
kind: "notebookEdit",
|
|
916
|
-
uri,
|
|
917
|
-
edits: [],
|
|
918
|
-
done: false
|
|
919
|
-
});
|
|
920
|
-
} else {
|
|
921
|
-
chatRequest.response.updateContent({
|
|
922
|
-
kind: "textEdit",
|
|
923
|
-
uri,
|
|
924
|
-
edits: [],
|
|
925
|
-
done: false
|
|
926
|
-
});
|
|
927
|
-
}
|
|
928
|
-
for await (const chunk of stream) {
|
|
929
|
-
if (token.isCancellationRequested) {
|
|
930
|
-
chatRequest.response.cancel();
|
|
931
|
-
break;
|
|
932
|
-
}
|
|
933
|
-
if (chunk.every(isCellEditOperation)) {
|
|
934
|
-
chatRequest.response.updateContent({
|
|
935
|
-
kind: "notebookEdit",
|
|
936
|
-
uri,
|
|
937
|
-
edits: chunk,
|
|
938
|
-
done: false
|
|
939
|
-
});
|
|
940
|
-
} else {
|
|
941
|
-
chatRequest.response.updateContent({
|
|
942
|
-
kind: "textEdit",
|
|
943
|
-
uri: chunk[0],
|
|
944
|
-
edits: chunk[1],
|
|
945
|
-
done: false
|
|
946
|
-
});
|
|
947
|
-
}
|
|
948
|
-
}
|
|
949
|
-
if (isNotebook) {
|
|
950
|
-
chatRequest.response.updateContent({
|
|
951
|
-
kind: "notebookEdit",
|
|
952
|
-
uri,
|
|
953
|
-
edits: [],
|
|
954
|
-
done: true
|
|
955
|
-
});
|
|
956
|
-
} else {
|
|
957
|
-
chatRequest.response.updateContent({
|
|
958
|
-
kind: "textEdit",
|
|
959
|
-
uri,
|
|
960
|
-
edits: [],
|
|
961
|
-
done: true
|
|
962
|
-
});
|
|
963
|
-
}
|
|
964
|
-
if (!token.isCancellationRequested) {
|
|
965
|
-
chatRequest.response.complete();
|
|
966
|
-
}
|
|
967
|
-
const isSettled = derived(r => {
|
|
968
|
-
const entry = chatModel.editingSession?.readEntry(uri, r);
|
|
969
|
-
if (!entry) {
|
|
970
|
-
return false;
|
|
971
|
-
}
|
|
972
|
-
const state = entry.state.read(r);
|
|
973
|
-
return state === ModifiedFileEntryState.Accepted || state === ModifiedFileEntryState.Rejected;
|
|
974
|
-
});
|
|
975
|
-
const whenDecided = waitForState(isSettled, Boolean);
|
|
976
|
-
await raceCancellation(whenDecided, token);
|
|
977
|
-
store.dispose();
|
|
978
|
-
return true;
|
|
979
|
-
}
|
|
980
|
-
function isCellEditOperation(edit) {
|
|
981
|
-
if (URI.isUri(edit)) {
|
|
982
|
-
return false;
|
|
983
|
-
}
|
|
984
|
-
if (Array.isArray(edit)) {
|
|
985
|
-
return false;
|
|
986
|
-
}
|
|
987
|
-
return true;
|
|
988
|
-
}
|
|
607
|
+
InlineChatController = InlineChatController_1 = ( __decorate([( __param(1, IInstantiationService)), ( __param(2, INotebookEditorService)), ( __param(3, IInlineChatSessionService)), ( __param(4, ICodeEditorService)), ( __param(5, IContextKeyService)), ( __param(6, IConfigurationService)), ( __param(7, IEditorService)), ( __param(8, IMarkerDecorationsService)), ( __param(9, ILanguageModelsService)), ( __param(10, ILogService)), ( __param(11, IChatEditingService)), ( __param(12, IChatService))], InlineChatController));
|
|
989
608
|
|
|
990
|
-
export { InlineChatController, InlineChatRunOptions
|
|
609
|
+
export { InlineChatController, InlineChatRunOptions };
|