@codingame/monaco-vscode-chat-service-override 25.1.2 → 26.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +24 -3
- package/package.json +5 -5
- package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +23 -3
- package/vscode/src/vs/platform/browserElements/common/browserElements.js +13 -6
- package/vscode/src/vs/platform/domWidget/browser/domWidget.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +42 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +218 -74
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatTerminalOutputAccessibleView.js +6 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +14 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +165 -168
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +27 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +141 -140
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +189 -121
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +14 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.d.ts +60 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.js +435 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +28 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +10 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +37 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +54 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +73 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +71 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +151 -89
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +12 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +39 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +90 -125
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +263 -143
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTransfer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +188 -126
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +37 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +21 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +392 -226
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +31 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +25 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +83 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.d.ts +68 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +319 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +215 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +179 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +951 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agentsessionprojection.css +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +388 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/unifiedQuickAccess.css +195 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.d.ts +120 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +394 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +95 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.js +31 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +49 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +4 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/media/simpleBrowserOverlay.css +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +188 -151
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +1012 -639
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +256 -151
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +182 -101
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.d.ts +79 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +193 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.js +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.d.ts +68 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +253 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +4 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +69 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +3 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +52 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +5 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +274 -155
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +2 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +130 -104
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +12 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +385 -160
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +53 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +112 -75
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +19 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditorController.css +31 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +39 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNewNotebookContentEdits.js +10 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +25 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +265 -203
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.js +29 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/helpers.js +114 -60
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/notebookCellChanges.js +16 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.js +44 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +119 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +152 -136
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +12 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +51 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +323 -217
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +653 -401
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +52 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +22 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +43 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +182 -136
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +548 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +222 -138
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +151 -113
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +6 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +453 -217
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +162 -88
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/media/chatSetup.css +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.js +1 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +309 -233
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +55 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusItemService.js +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +109 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +35 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.d.ts +9 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.js +73 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +333 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +39 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionContribution.js +9 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +23 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileActions.js +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +20 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +65 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +48 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +20 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +155 -159
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +24 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +521 -246
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +107 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +28 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownAnchorService.js +10 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputStateCache.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputStateCache.js +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatLayoutService.js +4 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +56 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +37 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatEditorInputContentProvider.js +5 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +1284 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +179 -125
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +9 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/editorHoverWrapper.js +7 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +96 -78
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +58 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +25 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +484 -292
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.d.ts +1 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +65 -92
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +16 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewTitleControl.css +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +331 -189
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +81 -93
- package/vscode/src/vs/workbench/contrib/chat/common/ignoredFiles.js +1 -3
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.js +6 -7
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.d.ts +36 -8
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.js +169 -31
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +141 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +6 -4
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +218 -144
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatTransferService.js +20 -10
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.d.ts +109 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +349 -0
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +9 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +139 -36
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +3 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.js +64 -51
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +49 -34
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +21 -13
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +125 -97
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +91 -131
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkProvider.js +8 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +488 -222
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +32 -12
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +58 -13
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +717 -200
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +79 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +371 -130
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.js +3 -7
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +79 -61
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +27 -21
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +7 -10
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +26 -32
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +8 -60
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +115 -426
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +127 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +1 -37
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +21 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +51 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +334 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +424 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +58 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +195 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +368 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +7 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js +1 -1
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +23 -25
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/common/remoteCodingAgentsService.js +7 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +34 -38
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibleView.js +8 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +103 -95
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.js +28 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +4 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +12 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +65 -54
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +86 -60
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.js +13 -26
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/commandFileWriteParser.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.js +142 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +56 -46
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +63 -31
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +35 -30
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +44 -37
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +3 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +70 -50
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +26 -394
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +85 -49
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +68 -27
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +67 -45
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +106 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js +177 -97
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +136 -49
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +128 -112
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +51 -49
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +25 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/commandLinePresenter.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.js +37 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.js +37 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.js +44 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +21 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.js +5 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.js +2 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +29 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +30 -31
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +16 -17
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +19 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +58 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +31 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +325 -199
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +33 -38
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +45 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +746 -456
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +145 -98
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +88 -37
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +120 -51
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +25 -28
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +58 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/toolIds.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/toolIds.js +17 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +47 -28
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +171 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +0 -58
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +0 -213
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +0 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +0 -243
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +0 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +0 -166
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +0 -607
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +0 -255
- 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 -396
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +0 -379
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +0 -117
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +0 -141
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +0 -961
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +0 -36
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +0 -447
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.js +0 -251
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +0 -42
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
|
|
2
|
+
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
4
|
+
import * as agentsessionprojection from './media/agentsessionprojection.css';
|
|
5
|
+
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
6
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
8
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
9
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
10
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
11
|
+
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
12
|
+
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
13
|
+
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
14
|
+
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel';
|
|
15
|
+
import { ChatViewPaneTarget } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
16
|
+
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
17
|
+
import { AgentSessionProviders } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
|
|
18
|
+
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
19
|
+
import { Parts } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
20
|
+
import { IWorkbenchLayoutService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
21
|
+
import { ACTION_ID_NEW_CHAT } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
22
|
+
import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
|
|
23
|
+
import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService.service';
|
|
24
|
+
import { IAgentTitleBarStatusService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusService.service';
|
|
25
|
+
import { inAgentSessionProjection } from './agentSessionProjection.js';
|
|
26
|
+
import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
27
|
+
import { IAgentSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service';
|
|
28
|
+
import { isSessionInProgressStatus } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
|
|
29
|
+
|
|
30
|
+
registerCss(agentsessionprojection);
|
|
31
|
+
const AGENT_SESSION_PROJECTION_ENABLED_PROVIDERS = ( new Set(( Object.values(AgentSessionProviders))));
|
|
32
|
+
let AgentSessionProjectionService = class AgentSessionProjectionService extends Disposable {
|
|
33
|
+
get isActive() {
|
|
34
|
+
return this._isActive;
|
|
35
|
+
}
|
|
36
|
+
get activeSession() {
|
|
37
|
+
return this._activeSession;
|
|
38
|
+
}
|
|
39
|
+
constructor(
|
|
40
|
+
contextKeyService,
|
|
41
|
+
configurationService,
|
|
42
|
+
editorGroupsService,
|
|
43
|
+
editorService,
|
|
44
|
+
logService,
|
|
45
|
+
chatWidgetService,
|
|
46
|
+
chatSessionsService,
|
|
47
|
+
layoutService,
|
|
48
|
+
commandService,
|
|
49
|
+
chatEditingService,
|
|
50
|
+
agentTitleBarStatusService,
|
|
51
|
+
agentSessionsService
|
|
52
|
+
) {
|
|
53
|
+
super();
|
|
54
|
+
this.configurationService = configurationService;
|
|
55
|
+
this.editorGroupsService = editorGroupsService;
|
|
56
|
+
this.editorService = editorService;
|
|
57
|
+
this.logService = logService;
|
|
58
|
+
this.chatWidgetService = chatWidgetService;
|
|
59
|
+
this.chatSessionsService = chatSessionsService;
|
|
60
|
+
this.layoutService = layoutService;
|
|
61
|
+
this.commandService = commandService;
|
|
62
|
+
this.chatEditingService = chatEditingService;
|
|
63
|
+
this.agentTitleBarStatusService = agentTitleBarStatusService;
|
|
64
|
+
this.agentSessionsService = agentSessionsService;
|
|
65
|
+
this._isActive = false;
|
|
66
|
+
this._isExiting = false;
|
|
67
|
+
this._onDidChangeProjectionMode = this._register(( new Emitter()));
|
|
68
|
+
this.onDidChangeProjectionMode = this._onDidChangeProjectionMode.event;
|
|
69
|
+
this._onDidChangeActiveSession = this._register(( new Emitter()));
|
|
70
|
+
this.onDidChangeActiveSession = this._onDidChangeActiveSession.event;
|
|
71
|
+
this._sessionWorkingSets = ( new Map());
|
|
72
|
+
this._wasAuxiliaryBarMaximized = false;
|
|
73
|
+
this._inProjectionModeContextKey = inAgentSessionProjection.bindTo(contextKeyService);
|
|
74
|
+
this._register(this.editorService.onDidCloseEditor(() => this._checkForEmptyEditors()));
|
|
75
|
+
this._register(
|
|
76
|
+
this.agentSessionsService.model.onDidChangeSessions(() => this._checkForInProgressSession())
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
_isEnabled() {
|
|
80
|
+
return this.configurationService.getValue(ChatConfiguration.AgentSessionProjectionEnabled) === true;
|
|
81
|
+
}
|
|
82
|
+
_checkForEmptyEditors() {
|
|
83
|
+
if (!this._isActive || this._isExiting) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const hasVisibleEditors = this.editorService.visibleEditors.length > 0;
|
|
87
|
+
if (!hasVisibleEditors) {
|
|
88
|
+
this.logService.trace("[AgentSessionProjection] All editors closed, exiting projection mode");
|
|
89
|
+
this.exitProjection();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
_checkForInProgressSession() {
|
|
93
|
+
if (!this._isActive || !this._activeSession) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const updatedSession = this.agentSessionsService.getSession(this._activeSession.resource);
|
|
97
|
+
if (!updatedSession) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
if (isSessionInProgressStatus(updatedSession.status)) {
|
|
101
|
+
this.logService.trace(
|
|
102
|
+
"[AgentSessionProjection] Active session transitioned to in-progress, exiting projection mode"
|
|
103
|
+
);
|
|
104
|
+
this.exitProjection({
|
|
105
|
+
startNewChat: false
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
async _openSessionInChatPanel(session) {
|
|
110
|
+
session.setRead(true);
|
|
111
|
+
await this.chatSessionsService.activateChatSessionItemProvider(session.providerType);
|
|
112
|
+
await this.chatWidgetService.openSession(session.resource, ChatViewPaneTarget, {
|
|
113
|
+
title: {
|
|
114
|
+
preferred: session.label
|
|
115
|
+
},
|
|
116
|
+
revealIfOpened: true
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
async _openSessionFiles(session) {
|
|
120
|
+
this.logService.trace(`[AgentSessionProjection] Opening files for session '${session.label}'`, {
|
|
121
|
+
hasChanges: !!session.changes,
|
|
122
|
+
isArray: Array.isArray(session.changes),
|
|
123
|
+
changeCount: Array.isArray(session.changes) ? session.changes.length : 0
|
|
124
|
+
});
|
|
125
|
+
if (session.changes && Array.isArray(session.changes) && session.changes.length > 0) {
|
|
126
|
+
const diffResources = ( session.changes.filter(change => change.originalUri).map(change => ({
|
|
127
|
+
originalUri: change.originalUri,
|
|
128
|
+
modifiedUri: change.modifiedUri
|
|
129
|
+
})));
|
|
130
|
+
this.logService.trace(
|
|
131
|
+
`[AgentSessionProjection] Found ${diffResources.length} files with diffs to display`
|
|
132
|
+
);
|
|
133
|
+
if (diffResources.length > 0) {
|
|
134
|
+
await this.editorGroupsService.applyWorkingSet("empty", {
|
|
135
|
+
preserveFocus: true
|
|
136
|
+
});
|
|
137
|
+
await this.commandService.executeCommand("_workbench.openMultiDiffEditor", {
|
|
138
|
+
multiDiffSourceUri: session.resource.with({
|
|
139
|
+
scheme: session.resource.scheme + "-agent-session-projection"
|
|
140
|
+
}),
|
|
141
|
+
title: ( localize(5005, "{0} - All Changes", session.label)),
|
|
142
|
+
resources: diffResources
|
|
143
|
+
});
|
|
144
|
+
this.logService.trace(`[AgentSessionProjection] Multi-diff editor opened successfully`);
|
|
145
|
+
const sessionKey = ( session.resource.toString());
|
|
146
|
+
const newWorkingSet = this.editorGroupsService.saveWorkingSet(`agent-session-projection-${sessionKey}`);
|
|
147
|
+
this._sessionWorkingSets.set(sessionKey, newWorkingSet);
|
|
148
|
+
return true;
|
|
149
|
+
} else {
|
|
150
|
+
this.logService.trace(
|
|
151
|
+
`[AgentSessionProjection] No files with diffs to display (all changes missing originalUri)`
|
|
152
|
+
);
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
} else {
|
|
156
|
+
this.logService.trace(`[AgentSessionProjection] Session has no changes to display`);
|
|
157
|
+
return false;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
async enterProjection(session) {
|
|
161
|
+
if (!this._isEnabled()) {
|
|
162
|
+
this.logService.trace("[AgentSessionProjection] Agent Session Projection is disabled");
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
if (!( AGENT_SESSION_PROJECTION_ENABLED_PROVIDERS.has(session.providerType))) {
|
|
166
|
+
this.logService.trace(
|
|
167
|
+
`[AgentSessionProjection] Provider type '${session.providerType}' does not support agent session projection`
|
|
168
|
+
);
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
const isAuxBarMaximized = this.layoutService.isAuxiliaryBarMaximized();
|
|
172
|
+
this.logService.trace("[AgentSessionProjection] enterProjection auxiliary bar state", {
|
|
173
|
+
isAuxiliaryBarMaximized: isAuxBarMaximized
|
|
174
|
+
});
|
|
175
|
+
if (isSessionInProgressStatus(session.status)) {
|
|
176
|
+
this.logService.trace(
|
|
177
|
+
"[AgentSessionProjection] Session is in progress, opening chat without projection mode"
|
|
178
|
+
);
|
|
179
|
+
await this._openSessionInChatPanel(session);
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
let hasUndecidedChanges = true;
|
|
183
|
+
if (session.providerType === AgentSessionProviders.Local) {
|
|
184
|
+
const editingSession = this.chatEditingService.getEditingSession(session.resource);
|
|
185
|
+
hasUndecidedChanges = editingSession?.entries.get().some(e => e.state.get() === ModifiedFileEntryState.Modified) ?? false;
|
|
186
|
+
if (!hasUndecidedChanges) {
|
|
187
|
+
this.logService.trace(
|
|
188
|
+
"[AgentSessionProjection] Local session has no undecided changes, opening chat without projection mode"
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
if (hasUndecidedChanges) {
|
|
193
|
+
if (!this._isActive && !this._preProjectionWorkingSet) {
|
|
194
|
+
const visibleEditorsBefore = this.editorService.visibleEditors.length;
|
|
195
|
+
this._preProjectionWorkingSet = this.editorGroupsService.saveWorkingSet("agent-session-projection-backup");
|
|
196
|
+
this.logService.trace("[AgentSessionProjection] saved pre-projection working set", {
|
|
197
|
+
id: this._preProjectionWorkingSet.id,
|
|
198
|
+
visibleEditorsBefore
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
if (this._isActive && this._activeSession) {
|
|
202
|
+
const previousSessionKey = ( this._activeSession.resource.toString());
|
|
203
|
+
const previousWorkingSet = this.editorGroupsService.saveWorkingSet(`agent-session-projection-${previousSessionKey}`);
|
|
204
|
+
this._sessionWorkingSets.set(previousSessionKey, previousWorkingSet);
|
|
205
|
+
}
|
|
206
|
+
let filesOpened = false;
|
|
207
|
+
if (session.providerType === AgentSessionProviders.Local) {
|
|
208
|
+
await this.editorGroupsService.applyWorkingSet("empty", {
|
|
209
|
+
preserveFocus: true
|
|
210
|
+
});
|
|
211
|
+
filesOpened = true;
|
|
212
|
+
} else {
|
|
213
|
+
filesOpened = await this._openSessionFiles(session);
|
|
214
|
+
}
|
|
215
|
+
if (!filesOpened) {
|
|
216
|
+
this.logService.trace(
|
|
217
|
+
"[AgentSessionProjection] No files to display, opening chat without projection mode"
|
|
218
|
+
);
|
|
219
|
+
if (!this._isActive && this._preProjectionWorkingSet) {
|
|
220
|
+
await this.editorGroupsService.applyWorkingSet(this._preProjectionWorkingSet);
|
|
221
|
+
this.editorGroupsService.deleteWorkingSet(this._preProjectionWorkingSet);
|
|
222
|
+
this._preProjectionWorkingSet = undefined;
|
|
223
|
+
}
|
|
224
|
+
} else {
|
|
225
|
+
const wasActive = this._isActive;
|
|
226
|
+
this._isActive = true;
|
|
227
|
+
this._activeSession = session;
|
|
228
|
+
this._inProjectionModeContextKey.set(true);
|
|
229
|
+
this.layoutService.mainContainer.classList.add("agent-session-projection-active");
|
|
230
|
+
if (!wasActive) {
|
|
231
|
+
this._wasAuxiliaryBarMaximized = isAuxBarMaximized;
|
|
232
|
+
this.logService.trace("[AgentSessionProjection] captured auxiliary bar maximized state", {
|
|
233
|
+
wasAuxiliaryBarMaximized: this._wasAuxiliaryBarMaximized
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
this.agentTitleBarStatusService.enterSessionMode(session.resource, session.label);
|
|
237
|
+
if (!wasActive) {
|
|
238
|
+
this._onDidChangeProjectionMode.fire(true);
|
|
239
|
+
}
|
|
240
|
+
this._onDidChangeActiveSession.fire(session);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
await this._openSessionInChatPanel(session);
|
|
244
|
+
if (session.providerType === AgentSessionProviders.Local && hasUndecidedChanges) {
|
|
245
|
+
await this.commandService.executeCommand("chatEditing.viewChanges");
|
|
246
|
+
}
|
|
247
|
+
if (this._wasAuxiliaryBarMaximized) {
|
|
248
|
+
this.logService.trace(
|
|
249
|
+
"[AgentSessionProjection] hiding maximized auxiliary bar during projection"
|
|
250
|
+
);
|
|
251
|
+
this.layoutService.setPartHidden(true, Parts.AUXILIARYBAR_PART);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
async exitProjection(options) {
|
|
255
|
+
if (!this._isActive || this._isExiting) {
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
const startNewChat = options?.startNewChat ?? true;
|
|
259
|
+
this._isExiting = true;
|
|
260
|
+
this.logService.trace("[AgentSessionProjection] exitProjection start", {
|
|
261
|
+
hasPreProjectionWorkingSet: !!this._preProjectionWorkingSet,
|
|
262
|
+
activeSession: this._activeSession?.label,
|
|
263
|
+
startNewChat,
|
|
264
|
+
wasAuxiliaryBarMaximized: this._wasAuxiliaryBarMaximized
|
|
265
|
+
});
|
|
266
|
+
if (this._activeSession) {
|
|
267
|
+
const sessionKey = ( this._activeSession.resource.toString());
|
|
268
|
+
const workingSet = this.editorGroupsService.saveWorkingSet(`agent-session-projection-${sessionKey}`);
|
|
269
|
+
this._sessionWorkingSets.set(sessionKey, workingSet);
|
|
270
|
+
}
|
|
271
|
+
for (const group of this.editorGroupsService.groups) {
|
|
272
|
+
await group.closeAllEditors();
|
|
273
|
+
}
|
|
274
|
+
this.logService.trace("[AgentSessionProjection] exitProjection closed editors", {
|
|
275
|
+
visible: this.editorService.visibleEditors.length
|
|
276
|
+
});
|
|
277
|
+
if (this._preProjectionWorkingSet) {
|
|
278
|
+
await this.editorGroupsService.applyWorkingSet(this._preProjectionWorkingSet);
|
|
279
|
+
this.logService.trace(
|
|
280
|
+
"[AgentSessionProjection] exitProjection applied pre-projection working set",
|
|
281
|
+
{
|
|
282
|
+
visible: this.editorService.visibleEditors.length,
|
|
283
|
+
id: this._preProjectionWorkingSet.id
|
|
284
|
+
}
|
|
285
|
+
);
|
|
286
|
+
this.editorGroupsService.deleteWorkingSet(this._preProjectionWorkingSet);
|
|
287
|
+
this._preProjectionWorkingSet = undefined;
|
|
288
|
+
} else {
|
|
289
|
+
await this.editorGroupsService.applyWorkingSet("empty", {
|
|
290
|
+
preserveFocus: true
|
|
291
|
+
});
|
|
292
|
+
this.logService.trace(
|
|
293
|
+
"[AgentSessionProjection] exitProjection no pre-working set, applied empty"
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
this._isActive = false;
|
|
297
|
+
this._activeSession = undefined;
|
|
298
|
+
this._inProjectionModeContextKey.set(false);
|
|
299
|
+
const shouldRestoreMaximized = this._wasAuxiliaryBarMaximized;
|
|
300
|
+
this._wasAuxiliaryBarMaximized = false;
|
|
301
|
+
this.layoutService.mainContainer.classList.remove("agent-session-projection-active");
|
|
302
|
+
this.agentTitleBarStatusService.exitSessionMode();
|
|
303
|
+
this._onDidChangeProjectionMode.fire(false);
|
|
304
|
+
this._onDidChangeActiveSession.fire(undefined);
|
|
305
|
+
if (startNewChat) {
|
|
306
|
+
await this.commandService.executeCommand(ACTION_ID_NEW_CHAT);
|
|
307
|
+
}
|
|
308
|
+
if (shouldRestoreMaximized) {
|
|
309
|
+
this.logService.trace("[AgentSessionProjection] restoring auxiliary bar maximized state");
|
|
310
|
+
this.layoutService.setPartHidden(false, Parts.AUXILIARYBAR_PART);
|
|
311
|
+
await this.commandService.executeCommand("workbench.action.maximizeAuxiliaryBar");
|
|
312
|
+
}
|
|
313
|
+
this.logService.trace("[AgentSessionProjection] exitProjection complete");
|
|
314
|
+
this._isExiting = false;
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
AgentSessionProjectionService = ( __decorate([( __param(0, IContextKeyService)), ( __param(1, IConfigurationService)), ( __param(2, IEditorGroupsService)), ( __param(3, IEditorService)), ( __param(4, ILogService)), ( __param(5, IChatWidgetService)), ( __param(6, IChatSessionsService)), ( __param(7, IWorkbenchLayoutService)), ( __param(8, ICommandService)), ( __param(9, IChatEditingService)), ( __param(10, IAgentTitleBarStatusService)), ( __param(11, IAgentSessionsService))], AgentSessionProjectionService));
|
|
318
|
+
|
|
319
|
+
export { AGENT_SESSION_PROJECTION_ENABLED_PROVIDERS, AgentSessionProjectionService };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
4
|
+
import { registerAction2, MenuRegistry, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
5
|
+
import { AGENT_SESSION_PROJECTION_ENABLED_PROVIDERS } from './agentSessionProjectionService.js';
|
|
6
|
+
import { IAgentSessionProjectionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.service';
|
|
7
|
+
import { EnterAgentSessionProjectionAction, ExitAgentSessionProjectionAction, ToggleAgentStatusAction, ToggleUnifiedAgentsBarAction } from './agentSessionProjectionActions.js';
|
|
8
|
+
import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
9
|
+
import { AgentTitleBarStatusRendering } from './agentTitleBarStatusWidget.js';
|
|
10
|
+
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusService';
|
|
11
|
+
import { IAgentTitleBarStatusService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusService.service';
|
|
12
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
13
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
14
|
+
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
15
|
+
import { ProductQualityContext } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkeys';
|
|
16
|
+
import { ChatAgentLocation, ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
17
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
18
|
+
import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
19
|
+
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
20
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
21
|
+
import { IAgentSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service';
|
|
22
|
+
import { AgentSessionProviders } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
|
|
23
|
+
import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
|
|
24
|
+
import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService.service';
|
|
25
|
+
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel';
|
|
26
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
27
|
+
import './unifiedQuickAccessActions.js';
|
|
28
|
+
import { isSessionInProgressStatus } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
|
|
29
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
30
|
+
|
|
31
|
+
let AgentSessionReadyContribution = class AgentSessionReadyContribution extends Disposable {
|
|
32
|
+
static {
|
|
33
|
+
this.ID = "chat.agentSessionReady";
|
|
34
|
+
}
|
|
35
|
+
constructor(
|
|
36
|
+
chatWidgetService,
|
|
37
|
+
configurationService,
|
|
38
|
+
agentTitleBarStatusService,
|
|
39
|
+
agentSessionsService,
|
|
40
|
+
agentSessionProjectionService,
|
|
41
|
+
chatEditingService
|
|
42
|
+
) {
|
|
43
|
+
super();
|
|
44
|
+
this.chatWidgetService = chatWidgetService;
|
|
45
|
+
this.configurationService = configurationService;
|
|
46
|
+
this.agentTitleBarStatusService = agentTitleBarStatusService;
|
|
47
|
+
this.agentSessionsService = agentSessionsService;
|
|
48
|
+
this.agentSessionProjectionService = agentSessionProjectionService;
|
|
49
|
+
this.chatEditingService = chatEditingService;
|
|
50
|
+
this._widgetDisposables = this._register(( new DisposableStore()));
|
|
51
|
+
this._suppressSessionReady = false;
|
|
52
|
+
for (const widget of this.chatWidgetService.getAllWidgets()) {
|
|
53
|
+
if (widget.location === ChatAgentLocation.Chat) {
|
|
54
|
+
this._watchWidget(widget);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
this._register(this.chatWidgetService.onDidAddWidget(widget => {
|
|
58
|
+
if (widget.location === ChatAgentLocation.Chat) {
|
|
59
|
+
this._watchWidget(widget);
|
|
60
|
+
}
|
|
61
|
+
}));
|
|
62
|
+
this._register(this.agentSessionProjectionService.onDidChangeProjectionMode(isActive => {
|
|
63
|
+
if (!isActive) {
|
|
64
|
+
this._suppressSessionReady = true;
|
|
65
|
+
this._clearEntriesWatcher();
|
|
66
|
+
this.agentTitleBarStatusService.exitSessionReadyMode();
|
|
67
|
+
}
|
|
68
|
+
}));
|
|
69
|
+
this._register(autorun(reader => {
|
|
70
|
+
this.chatEditingService.editingSessionsObs.read(reader);
|
|
71
|
+
const currentWidget = this.chatWidgetService.getAllWidgets().find(w => w.location === ChatAgentLocation.Chat);
|
|
72
|
+
if (currentWidget) {
|
|
73
|
+
this._checkSession(currentWidget.viewModel?.sessionResource);
|
|
74
|
+
}
|
|
75
|
+
}));
|
|
76
|
+
}
|
|
77
|
+
_watchWidget(widget) {
|
|
78
|
+
this._widgetDisposables.clear();
|
|
79
|
+
this._checkSession(widget.viewModel?.sessionResource);
|
|
80
|
+
this._widgetDisposables.add(widget.onDidChangeViewModel(() => {
|
|
81
|
+
this._checkSession(widget.viewModel?.sessionResource);
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
_checkSession(sessionResource) {
|
|
85
|
+
if (sessionResource?.toString() !== this._watchedSessionResource?.toString()) {
|
|
86
|
+
this._suppressSessionReady = false;
|
|
87
|
+
}
|
|
88
|
+
this._updateSessionReadyState(sessionResource);
|
|
89
|
+
}
|
|
90
|
+
_clearEntriesWatcher() {
|
|
91
|
+
this._entriesWatcher?.dispose();
|
|
92
|
+
this._entriesWatcher = undefined;
|
|
93
|
+
this._watchedSessionResource = undefined;
|
|
94
|
+
}
|
|
95
|
+
_updateSessionReadyState(sessionResource) {
|
|
96
|
+
const isEnabled = this.configurationService.getValue(ChatConfiguration.AgentSessionProjectionEnabled);
|
|
97
|
+
if (!isEnabled) {
|
|
98
|
+
this._clearEntriesWatcher();
|
|
99
|
+
this.agentTitleBarStatusService.exitSessionReadyMode();
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (this.agentSessionProjectionService.isActive) {
|
|
103
|
+
this._clearEntriesWatcher();
|
|
104
|
+
this.agentTitleBarStatusService.exitSessionReadyMode();
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if (!sessionResource) {
|
|
108
|
+
this._clearEntriesWatcher();
|
|
109
|
+
this.agentTitleBarStatusService.exitSessionReadyMode();
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const session = this.agentSessionsService.getSession(sessionResource);
|
|
113
|
+
if (!session) {
|
|
114
|
+
this._clearEntriesWatcher();
|
|
115
|
+
this.agentTitleBarStatusService.exitSessionReadyMode();
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
if (!( AGENT_SESSION_PROJECTION_ENABLED_PROVIDERS.has(session.providerType))) {
|
|
119
|
+
this._clearEntriesWatcher();
|
|
120
|
+
this.agentTitleBarStatusService.exitSessionReadyMode();
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
if (isSessionInProgressStatus(session.status)) {
|
|
124
|
+
this._clearEntriesWatcher();
|
|
125
|
+
this.agentTitleBarStatusService.exitSessionReadyMode();
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
let hasPendingChanges = false;
|
|
129
|
+
if (session.providerType === AgentSessionProviders.Local) {
|
|
130
|
+
const editingSession = this.chatEditingService.getEditingSession(sessionResource);
|
|
131
|
+
if (!editingSession) {
|
|
132
|
+
this._clearEntriesWatcher();
|
|
133
|
+
this.agentTitleBarStatusService.exitSessionReadyMode();
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
const entries = editingSession.entries.get();
|
|
137
|
+
hasPendingChanges = ( entries.some(entry => entry.state.get() === ModifiedFileEntryState.Modified));
|
|
138
|
+
if (hasPendingChanges && !this._suppressSessionReady) {
|
|
139
|
+
this.agentTitleBarStatusService.enterSessionReadyMode(session.resource, session.label);
|
|
140
|
+
if (!this._watchedSessionResource || ( this._watchedSessionResource.toString()) !== ( sessionResource.toString())) {
|
|
141
|
+
this._clearEntriesWatcher();
|
|
142
|
+
this._watchedSessionResource = sessionResource;
|
|
143
|
+
this._entriesWatcher = autorun(reader => {
|
|
144
|
+
const currentEntries = editingSession.entries.read(reader);
|
|
145
|
+
const stillHasChanges = ( currentEntries.some(entry => entry.state.read(reader) === ModifiedFileEntryState.Modified));
|
|
146
|
+
if (!stillHasChanges) {
|
|
147
|
+
this.agentTitleBarStatusService.exitSessionReadyMode();
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
} else {
|
|
152
|
+
this._clearEntriesWatcher();
|
|
153
|
+
this.agentTitleBarStatusService.exitSessionReadyMode();
|
|
154
|
+
}
|
|
155
|
+
} else {
|
|
156
|
+
this._clearEntriesWatcher();
|
|
157
|
+
const changeCount = Array.isArray(session.changes) ? session.changes.filter(change => !!change.originalUri).length : 0;
|
|
158
|
+
hasPendingChanges = changeCount > 0;
|
|
159
|
+
if (hasPendingChanges && !this._suppressSessionReady) {
|
|
160
|
+
this.agentTitleBarStatusService.enterSessionReadyMode(session.resource, session.label);
|
|
161
|
+
} else {
|
|
162
|
+
this.agentTitleBarStatusService.exitSessionReadyMode();
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
AgentSessionReadyContribution = ( __decorate([( __param(0, IChatWidgetService)), ( __param(1, IConfigurationService)), ( __param(2, IAgentTitleBarStatusService)), ( __param(3, IAgentSessionsService)), ( __param(4, IAgentSessionProjectionService)), ( __param(5, IChatEditingService))], AgentSessionReadyContribution));
|
|
168
|
+
registerAction2(EnterAgentSessionProjectionAction);
|
|
169
|
+
registerAction2(ExitAgentSessionProjectionAction);
|
|
170
|
+
registerAction2(ToggleAgentStatusAction);
|
|
171
|
+
registerAction2(ToggleUnifiedAgentsBarAction);
|
|
172
|
+
registerWorkbenchContribution2(
|
|
173
|
+
AgentTitleBarStatusRendering.ID,
|
|
174
|
+
AgentTitleBarStatusRendering,
|
|
175
|
+
WorkbenchPhase.AfterRestored
|
|
176
|
+
);
|
|
177
|
+
registerWorkbenchContribution2(
|
|
178
|
+
AgentSessionReadyContribution.ID,
|
|
179
|
+
AgentSessionReadyContribution,
|
|
180
|
+
WorkbenchPhase.AfterRestored
|
|
181
|
+
);
|
|
182
|
+
MenuRegistry.appendMenuItem(MenuId.CommandCenter, {
|
|
183
|
+
submenu: MenuId.AgentsTitleBarControlMenu,
|
|
184
|
+
title: ( localize(5006, "Agents")),
|
|
185
|
+
icon: Codicon.chatSparkle,
|
|
186
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(( ContextKeyExpr.has(`config.${ChatConfiguration.AgentStatusEnabled}`)), ( ContextKeyExpr.has(`config.${ChatConfiguration.UnifiedAgentsBar}`)))))),
|
|
187
|
+
order: 10002
|
|
188
|
+
});
|
|
189
|
+
MenuRegistry.appendMenuItem(MenuId.TitleBar, {
|
|
190
|
+
submenu: MenuId.ChatTitleBarMenu,
|
|
191
|
+
title: ( localize(5007, "Chat")),
|
|
192
|
+
group: "navigation",
|
|
193
|
+
icon: Codicon.chatSparkle,
|
|
194
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.supported, ( ContextKeyExpr.and(( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabled.negate()))), ( ContextKeyExpr.has(`config.${ChatConfiguration.AgentStatusEnabled}`)), ( ( ContextKeyExpr.has("config.window.commandCenter")).negate()))),
|
|
195
|
+
order: 1
|
|
196
|
+
});
|
|
197
|
+
MenuRegistry.appendMenuItem(MenuId.AgentsTitleBarControlMenu, {
|
|
198
|
+
command: {
|
|
199
|
+
id: "workbench.action.chat.toggle",
|
|
200
|
+
title: ( localize(5008, "Open Chat"))
|
|
201
|
+
},
|
|
202
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(( ContextKeyExpr.has(`config.${ChatConfiguration.AgentStatusEnabled}`)), ( ContextKeyExpr.has(`config.${ChatConfiguration.UnifiedAgentsBar}`)))))),
|
|
203
|
+
group: "a_open",
|
|
204
|
+
order: 1
|
|
205
|
+
});
|
|
206
|
+
MenuRegistry.appendMenuItem(MenuId.AgentsTitleBarControlMenu, {
|
|
207
|
+
command: {
|
|
208
|
+
id: `toggle.${ChatConfiguration.UnifiedAgentsBar}`,
|
|
209
|
+
title: ( localize(5009, "Agent Quick Input (Experimental)")),
|
|
210
|
+
toggled: ( ContextKeyExpr.has(`config.${ChatConfiguration.UnifiedAgentsBar}`))
|
|
211
|
+
},
|
|
212
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ProductQualityContext.notEqualsTo("stable")))),
|
|
213
|
+
group: "z_experimental",
|
|
214
|
+
order: 10
|
|
215
|
+
});
|