@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
|
@@ -4,14 +4,17 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
4
4
|
import * as chatViewPane from './media/chatViewPane.css';
|
|
5
5
|
import { $, append, addDisposableListener, EventType, setVisibility, getWindow, EventHelper } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
6
6
|
import { StandardMouseEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/mouseEvent';
|
|
7
|
+
import { Button } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
|
|
8
|
+
import { Sash, Orientation } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/sash/sash';
|
|
7
9
|
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
8
10
|
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
9
|
-
import { MutableDisposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
11
|
+
import { MutableDisposable, toDisposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
10
12
|
import { MarshalledId } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
|
|
11
13
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
12
14
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
13
15
|
import { MenuWorkbenchToolBar } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
|
|
14
16
|
import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
17
|
+
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
15
18
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
16
19
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
17
20
|
import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
|
|
@@ -24,6 +27,7 @@ import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
|
24
27
|
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
25
28
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
26
29
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
30
|
+
import { defaultButtonStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
|
|
27
31
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colorUtils';
|
|
28
32
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/baseColors';
|
|
29
33
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/chartsColors';
|
|
@@ -52,28 +56,67 @@ import { localChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/wor
|
|
|
52
56
|
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
53
57
|
import { LocalChatSessionUri, getChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
|
|
54
58
|
import { ChatConfiguration, ChatAgentLocation, ChatModeKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
55
|
-
import { AgentSessionsControl } from '
|
|
56
|
-
import {
|
|
59
|
+
import { AgentSessionsControl } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl';
|
|
60
|
+
import { ACTION_ID_NEW_CHAT } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
57
61
|
import { ChatWidget } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/widget/chatWidget';
|
|
58
62
|
import { ChatViewWelcomeController } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController';
|
|
59
63
|
import { Position, LayoutSettings } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
60
64
|
import { IWorkbenchLayoutService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
61
65
|
import { AgentSessionsViewerOrientation, AgentSessionsViewerPosition } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
|
|
62
|
-
import { Link } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/browser/link';
|
|
63
66
|
import { IProgressService } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service';
|
|
64
67
|
import { ChatViewId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
68
|
+
import { ProgressBadge } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/activity/common/activity';
|
|
69
|
+
import { IActivityService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/activity/common/activity.service';
|
|
65
70
|
import { disposableTimeout } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
66
|
-
import { AgentSessionsFilter } from '
|
|
71
|
+
import { AgentSessionsFilter, AgentSessionsGrouping } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter';
|
|
67
72
|
import { IAgentSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service';
|
|
68
73
|
import { HoverPosition } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverWidget';
|
|
74
|
+
import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
|
|
69
75
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
70
76
|
|
|
71
77
|
var ChatViewPane_1;
|
|
72
78
|
registerCss(chatViewPane);
|
|
73
79
|
let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
74
|
-
static {
|
|
75
|
-
|
|
76
|
-
|
|
80
|
+
static {
|
|
81
|
+
ChatViewPane_1 = this;
|
|
82
|
+
}
|
|
83
|
+
constructor(
|
|
84
|
+
options,
|
|
85
|
+
keybindingService,
|
|
86
|
+
contextMenuService,
|
|
87
|
+
configurationService,
|
|
88
|
+
contextKeyService,
|
|
89
|
+
viewDescriptorService,
|
|
90
|
+
instantiationService,
|
|
91
|
+
openerService,
|
|
92
|
+
themeService,
|
|
93
|
+
hoverService,
|
|
94
|
+
storageService,
|
|
95
|
+
chatService,
|
|
96
|
+
chatAgentService,
|
|
97
|
+
logService,
|
|
98
|
+
layoutService,
|
|
99
|
+
chatSessionsService,
|
|
100
|
+
telemetryService,
|
|
101
|
+
lifecycleService,
|
|
102
|
+
progressService,
|
|
103
|
+
agentSessionsService,
|
|
104
|
+
chatEntitlementService,
|
|
105
|
+
commandService,
|
|
106
|
+
activityService
|
|
107
|
+
) {
|
|
108
|
+
super(
|
|
109
|
+
options,
|
|
110
|
+
keybindingService,
|
|
111
|
+
contextMenuService,
|
|
112
|
+
configurationService,
|
|
113
|
+
contextKeyService,
|
|
114
|
+
viewDescriptorService,
|
|
115
|
+
instantiationService,
|
|
116
|
+
openerService,
|
|
117
|
+
themeService,
|
|
118
|
+
hoverService
|
|
119
|
+
);
|
|
77
120
|
this.storageService = storageService;
|
|
78
121
|
this.chatService = chatService;
|
|
79
122
|
this.chatAgentService = chatAgentService;
|
|
@@ -83,36 +126,43 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
83
126
|
this.telemetryService = telemetryService;
|
|
84
127
|
this.progressService = progressService;
|
|
85
128
|
this.agentSessionsService = agentSessionsService;
|
|
129
|
+
this.chatEntitlementService = chatEntitlementService;
|
|
130
|
+
this.commandService = commandService;
|
|
131
|
+
this.activityService = activityService;
|
|
86
132
|
this.lastDimensionsPerOrientation = ( new Map());
|
|
87
133
|
this.modelRef = this._register(( new MutableDisposable()));
|
|
88
|
-
this.
|
|
89
|
-
this.sessionsViewerLimited = true;
|
|
134
|
+
this.activityBadge = this._register(( new MutableDisposable()));
|
|
90
135
|
this.sessionsViewerOrientation = AgentSessionsViewerOrientation.Stacked;
|
|
91
|
-
this.sessionsViewerOrientationConfiguration =
|
|
136
|
+
this.sessionsViewerOrientationConfiguration = "sideBySide";
|
|
137
|
+
this.sessionsViewerSashDisposables = this._register(( new MutableDisposable()));
|
|
138
|
+
this.layoutingBody = false;
|
|
92
139
|
this.memento = ( new Memento(`interactive-session-view-${CHAT_PROVIDER_ID}`, this.storageService));
|
|
93
140
|
this.viewState = this.memento.getMemento(StorageScope.WORKSPACE, StorageTarget.MACHINE);
|
|
94
|
-
if (lifecycleService.startupKind !== StartupKind.ReloadedWindow &&
|
|
95
|
-
this.configurationService.getValue(ChatConfiguration.RestoreLastPanelSession) === false) {
|
|
141
|
+
if (lifecycleService.startupKind !== StartupKind.ReloadedWindow && this.configurationService.getValue(ChatConfiguration.RestoreLastPanelSession) === false) {
|
|
96
142
|
this.viewState.sessionId = undefined;
|
|
97
143
|
}
|
|
98
|
-
this.
|
|
144
|
+
this.sessionsViewerVisible = false;
|
|
145
|
+
this.sessionsViewerSidebarWidth = Math.max(
|
|
146
|
+
ChatViewPane_1.SESSIONS_SIDEBAR_MIN_WIDTH,
|
|
147
|
+
this.viewState.sessionsSidebarWidth ?? ChatViewPane_1.SESSIONS_SIDEBAR_DEFAULT_WIDTH
|
|
148
|
+
);
|
|
99
149
|
this.chatViewLocationContext = ChatContextKeys.panelLocation.bindTo(contextKeyService);
|
|
100
|
-
this.sessionsViewerLimitedContext = ChatContextKeys.agentSessionsViewerLimited.bindTo(contextKeyService);
|
|
101
150
|
this.sessionsViewerOrientationContext = ChatContextKeys.agentSessionsViewerOrientation.bindTo(contextKeyService);
|
|
102
151
|
this.sessionsViewerPositionContext = ChatContextKeys.agentSessionsViewerPosition.bindTo(contextKeyService);
|
|
103
152
|
this.sessionsViewerVisibilityContext = ChatContextKeys.agentSessionsViewerVisible.bindTo(contextKeyService);
|
|
104
|
-
this.updateContextKeys(
|
|
153
|
+
this.updateContextKeys();
|
|
105
154
|
this.registerListeners();
|
|
106
155
|
}
|
|
107
|
-
updateContextKeys(
|
|
108
|
-
const {
|
|
109
|
-
|
|
156
|
+
updateContextKeys() {
|
|
157
|
+
const {
|
|
158
|
+
position,
|
|
159
|
+
location
|
|
160
|
+
} = this.getViewPositionAndLocation();
|
|
110
161
|
this.chatViewLocationContext.set(location ?? ViewContainerLocation.AuxiliaryBar);
|
|
111
162
|
this.sessionsViewerOrientationContext.set(this.sessionsViewerOrientation);
|
|
112
|
-
this.sessionsViewerPositionContext.set(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
163
|
+
this.sessionsViewerPositionContext.set(
|
|
164
|
+
position === Position.RIGHT ? AgentSessionsViewerPosition.Right : AgentSessionsViewerPosition.Left
|
|
165
|
+
);
|
|
116
166
|
}
|
|
117
167
|
getViewPositionAndLocation() {
|
|
118
168
|
const viewLocation = this.viewDescriptorService.getViewLocationById(this.id);
|
|
@@ -120,65 +170,91 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
120
170
|
const panelPosition = this.layoutService.getPanelPosition();
|
|
121
171
|
let sideSessionsOnRightPosition;
|
|
122
172
|
switch (viewLocation) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
173
|
+
case ViewContainerLocation.Sidebar:
|
|
174
|
+
sideSessionsOnRightPosition = sideBarPosition === Position.RIGHT;
|
|
175
|
+
break;
|
|
176
|
+
case ViewContainerLocation.Panel:
|
|
177
|
+
sideSessionsOnRightPosition = panelPosition !== Position.LEFT;
|
|
178
|
+
break;
|
|
179
|
+
default:
|
|
180
|
+
sideSessionsOnRightPosition = sideBarPosition === Position.LEFT;
|
|
181
|
+
break;
|
|
132
182
|
}
|
|
133
183
|
return {
|
|
134
184
|
position: sideSessionsOnRightPosition ? Position.RIGHT : Position.LEFT,
|
|
135
185
|
location: viewLocation ?? ViewContainerLocation.AuxiliaryBar
|
|
136
186
|
};
|
|
137
187
|
}
|
|
188
|
+
getSessionHoverPosition() {
|
|
189
|
+
const viewLocation = this.viewDescriptorService.getViewLocationById(this.id);
|
|
190
|
+
const sideBarPosition = this.layoutService.getSideBarPosition();
|
|
191
|
+
if (this.sessionsViewerOrientation === AgentSessionsViewerOrientation.SideBySide) {
|
|
192
|
+
return viewLocation === ViewContainerLocation.Sidebar && sideBarPosition === Position.RIGHT ? HoverPosition.LEFT : HoverPosition.RIGHT;
|
|
193
|
+
}
|
|
194
|
+
return {
|
|
195
|
+
[Position.LEFT]: HoverPosition.RIGHT,
|
|
196
|
+
[Position.RIGHT]: HoverPosition.LEFT,
|
|
197
|
+
[Position.TOP]: HoverPosition.BELOW,
|
|
198
|
+
[Position.BOTTOM]: HoverPosition.ABOVE
|
|
199
|
+
}[viewLocation === ViewContainerLocation.Panel ? this.layoutService.getPanelPosition() : sideBarPosition];
|
|
200
|
+
}
|
|
138
201
|
updateViewPaneClasses(fromEvent) {
|
|
139
|
-
const welcomeEnabled = this.
|
|
140
|
-
this.viewPaneContainer?.classList.toggle(
|
|
141
|
-
const activityBarLocationDefault = this.configurationService.getValue(LayoutSettings.ACTIVITY_BAR_LOCATION) ===
|
|
142
|
-
this.viewPaneContainer?.classList.toggle(
|
|
143
|
-
this.viewPaneContainer?.classList.toggle(
|
|
144
|
-
const {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
this.
|
|
148
|
-
this.viewPaneContainer?.classList.toggle(
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
202
|
+
const welcomeEnabled = !this.chatEntitlementService.sentiment.installed;
|
|
203
|
+
this.viewPaneContainer?.classList.toggle("chat-view-welcome-enabled", welcomeEnabled);
|
|
204
|
+
const activityBarLocationDefault = this.configurationService.getValue(LayoutSettings.ACTIVITY_BAR_LOCATION) === "default";
|
|
205
|
+
this.viewPaneContainer?.classList.toggle("activity-bar-location-default", activityBarLocationDefault);
|
|
206
|
+
this.viewPaneContainer?.classList.toggle("activity-bar-location-other", !activityBarLocationDefault);
|
|
207
|
+
const {
|
|
208
|
+
position,
|
|
209
|
+
location
|
|
210
|
+
} = this.getViewPositionAndLocation();
|
|
211
|
+
this.viewPaneContainer?.classList.toggle(
|
|
212
|
+
"chat-view-location-auxiliarybar",
|
|
213
|
+
location === ViewContainerLocation.AuxiliaryBar
|
|
214
|
+
);
|
|
215
|
+
this.viewPaneContainer?.classList.toggle("chat-view-location-sidebar", location === ViewContainerLocation.Sidebar);
|
|
216
|
+
this.viewPaneContainer?.classList.toggle("chat-view-location-panel", location === ViewContainerLocation.Panel);
|
|
217
|
+
this.viewPaneContainer?.classList.toggle("chat-view-position-left", position === Position.LEFT);
|
|
218
|
+
this.viewPaneContainer?.classList.toggle("chat-view-position-right", position === Position.RIGHT);
|
|
219
|
+
if (fromEvent) {
|
|
220
|
+
this.relayout();
|
|
152
221
|
}
|
|
153
222
|
}
|
|
154
223
|
registerListeners() {
|
|
155
224
|
this._register(this.chatAgentService.onDidChangeAgents(() => this.onDidChangeAgents()));
|
|
156
|
-
this._register(Event.any(Event.filter(
|
|
157
|
-
this.
|
|
225
|
+
this._register(Event.any(Event.filter(
|
|
226
|
+
this.configurationService.onDidChangeConfiguration,
|
|
227
|
+
e => e.affectsConfiguration("workbench.sideBar.location")
|
|
228
|
+
), this.layoutService.onDidChangePanelPosition, Event.filter(
|
|
229
|
+
this.viewDescriptorService.onDidChangeContainerLocation,
|
|
230
|
+
e => e.viewContainer === this.viewDescriptorService.getViewContainerByViewId(this.id)
|
|
231
|
+
))(() => {
|
|
232
|
+
this.updateContextKeys();
|
|
158
233
|
this.updateViewPaneClasses(true );
|
|
159
234
|
}));
|
|
160
235
|
this._register(Event.filter(this.configurationService.onDidChangeConfiguration, e => {
|
|
161
|
-
return e.affectsConfiguration(
|
|
236
|
+
return e.affectsConfiguration(LayoutSettings.ACTIVITY_BAR_LOCATION);
|
|
162
237
|
})(() => this.updateViewPaneClasses(true)));
|
|
238
|
+
this._register(this.chatEntitlementService.onDidChangeSentiment(() => {
|
|
239
|
+
this.updateViewPaneClasses(true);
|
|
240
|
+
}));
|
|
163
241
|
}
|
|
164
242
|
onDidChangeAgents() {
|
|
165
243
|
if (this.chatAgentService.getDefaultAgent(ChatAgentLocation.Chat)) {
|
|
166
244
|
if (!this._widget?.viewModel && !this.restoringSession) {
|
|
167
245
|
const sessionResource = this.getTransferredOrPersistedSessionInfo();
|
|
168
|
-
this.restoringSession =
|
|
169
|
-
(
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}
|
|
181
|
-
});
|
|
246
|
+
this.restoringSession = (sessionResource ? this.chatService.getOrRestoreSession(sessionResource) : Promise.resolve(undefined)).then(async modelRef => {
|
|
247
|
+
if (!this._widget) {
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
const wasVisible = this._widget.visible;
|
|
251
|
+
try {
|
|
252
|
+
this._widget.setVisible(false);
|
|
253
|
+
await this.showModel(modelRef);
|
|
254
|
+
} finally {
|
|
255
|
+
this._widget.setVisible(wasVisible);
|
|
256
|
+
}
|
|
257
|
+
});
|
|
182
258
|
this.restoringSession.finally(() => this.restoringSession = undefined);
|
|
183
259
|
}
|
|
184
260
|
}
|
|
@@ -192,9 +268,9 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
192
268
|
}
|
|
193
269
|
renderBody(parent) {
|
|
194
270
|
super.renderBody(parent);
|
|
195
|
-
this.telemetryService.publicLog2(
|
|
271
|
+
this.telemetryService.publicLog2("chatViewPaneOpened");
|
|
196
272
|
this.viewPaneContainer = parent;
|
|
197
|
-
this.viewPaneContainer.classList.add(
|
|
273
|
+
this.viewPaneContainer.classList.add("chat-viewpane");
|
|
198
274
|
this.updateViewPaneClasses(false);
|
|
199
275
|
this.createControls(parent);
|
|
200
276
|
this.setupContextMenu(parent);
|
|
@@ -202,94 +278,101 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
202
278
|
}
|
|
203
279
|
createControls(parent) {
|
|
204
280
|
const sessionsControl = this.createSessionsControl(parent);
|
|
205
|
-
const welcomeController = this.welcomeController = this._register(
|
|
281
|
+
const welcomeController = this.welcomeController = this._register(
|
|
282
|
+
this.instantiationService.createInstance(ChatViewWelcomeController, parent, this, ChatAgentLocation.Chat)
|
|
283
|
+
);
|
|
206
284
|
const chatWidget = this.createChatControl(parent);
|
|
207
285
|
this.registerControlsListeners(sessionsControl, chatWidget, welcomeController);
|
|
208
286
|
this.updateSessionsControlVisibility();
|
|
209
287
|
}
|
|
210
|
-
static {
|
|
211
|
-
|
|
212
|
-
|
|
288
|
+
static {
|
|
289
|
+
this.SESSIONS_SIDEBAR_MIN_WIDTH = 200;
|
|
290
|
+
}
|
|
291
|
+
static {
|
|
292
|
+
this.SESSIONS_SIDEBAR_SNAP_THRESHOLD = this.SESSIONS_SIDEBAR_MIN_WIDTH / 2;
|
|
293
|
+
}
|
|
294
|
+
static {
|
|
295
|
+
this.SESSIONS_SIDEBAR_DEFAULT_WIDTH = 300;
|
|
296
|
+
}
|
|
297
|
+
static {
|
|
298
|
+
this.CHAT_WIDGET_DEFAULT_WIDTH = 300;
|
|
299
|
+
}
|
|
300
|
+
static {
|
|
301
|
+
this.SESSIONS_SIDEBAR_VIEW_MIN_WIDTH = this.CHAT_WIDGET_DEFAULT_WIDTH + this.SESSIONS_SIDEBAR_DEFAULT_WIDTH;
|
|
302
|
+
}
|
|
213
303
|
createSessionsControl(parent) {
|
|
214
|
-
const
|
|
215
|
-
const
|
|
216
|
-
const
|
|
217
|
-
|
|
218
|
-
this.updateSessionsControlTitle();
|
|
304
|
+
const sessionsContainer = this.sessionsContainer = parent.appendChild($(".agent-sessions-container"));
|
|
305
|
+
const sessionsTitleContainer = this.sessionsTitleContainer = append(sessionsContainer, $(".agent-sessions-title-container"));
|
|
306
|
+
const sessionsTitle = this.sessionsTitle = append(sessionsTitleContainer, $("span.agent-sessions-title"));
|
|
307
|
+
sessionsTitle.textContent = ( localize(6147, "Sessions"));
|
|
219
308
|
this._register(addDisposableListener(sessionsTitle, EventType.CLICK, () => {
|
|
220
309
|
this.sessionsControl?.scrollToTop();
|
|
221
310
|
this.sessionsControl?.focus();
|
|
222
311
|
}));
|
|
223
|
-
const sessionsToolbarContainer = append(sessionsTitleContainer, $(
|
|
224
|
-
const sessionsToolbar = this._register(this.instantiationService.createInstance(
|
|
225
|
-
|
|
226
|
-
|
|
312
|
+
const sessionsToolbarContainer = append(sessionsTitleContainer, $(".agent-sessions-toolbar"));
|
|
313
|
+
const sessionsToolbar = this._register(this.instantiationService.createInstance(
|
|
314
|
+
MenuWorkbenchToolBar,
|
|
315
|
+
sessionsToolbarContainer,
|
|
316
|
+
MenuId.AgentSessionsToolbar,
|
|
317
|
+
{
|
|
318
|
+
menuOptions: {
|
|
319
|
+
shouldForwardArgs: true
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
));
|
|
227
323
|
const sessionsFilter = this._register(this.instantiationService.createInstance(AgentSessionsFilter, {
|
|
228
324
|
filterMenuId: MenuId.AgentSessionsViewerFilterSubMenu,
|
|
229
|
-
|
|
230
|
-
return that.sessionsViewerLimited ? ChatViewPane_1.SESSIONS_LIMIT : undefined;
|
|
231
|
-
},
|
|
232
|
-
groupResults: () => {
|
|
233
|
-
return !that.sessionsViewerLimited;
|
|
234
|
-
},
|
|
235
|
-
overrideExclude(session) {
|
|
236
|
-
if (that.sessionsViewerLimited) {
|
|
237
|
-
if (session.isArchived()) {
|
|
238
|
-
return true;
|
|
239
|
-
}
|
|
240
|
-
return false;
|
|
241
|
-
}
|
|
242
|
-
return undefined;
|
|
243
|
-
},
|
|
244
|
-
notifyResults(count) {
|
|
245
|
-
that.notifySessionsControlCountChanged(count);
|
|
246
|
-
},
|
|
325
|
+
groupResults: () => this.sessionsViewerOrientation === AgentSessionsViewerOrientation.Stacked ? AgentSessionsGrouping.Capped : AgentSessionsGrouping.Date
|
|
247
326
|
}));
|
|
248
327
|
this._register(Event.runAndSubscribe(sessionsFilter.onDidChange, () => {
|
|
249
|
-
sessionsToolbarContainer.classList.toggle(
|
|
328
|
+
sessionsToolbarContainer.classList.toggle("filtered", !sessionsFilter.isDefault());
|
|
250
329
|
}));
|
|
251
|
-
this.
|
|
252
|
-
const
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
330
|
+
const newSessionButtonContainer = this.sessionsNewButtonContainer = append(sessionsContainer, $(".agent-sessions-new-button-container"));
|
|
331
|
+
const newSessionButton = this._register(( new Button(newSessionButtonContainer, {
|
|
332
|
+
...defaultButtonStyles,
|
|
333
|
+
secondary: true
|
|
334
|
+
})));
|
|
335
|
+
newSessionButton.label = ( localize(6148, "New Session"));
|
|
336
|
+
this._register(
|
|
337
|
+
newSessionButton.onDidClick(() => this.commandService.executeCommand(ACTION_ID_NEW_CHAT))
|
|
338
|
+
);
|
|
339
|
+
this.sessionsControlContainer = append(sessionsContainer, $(".agent-sessions-control-container"));
|
|
340
|
+
const sessionsControl = this.sessionsControl = this._register(
|
|
341
|
+
this.instantiationService.createInstance(AgentSessionsControl, this.sessionsControlContainer, {
|
|
342
|
+
source: "chatViewPane",
|
|
343
|
+
filter: sessionsFilter,
|
|
344
|
+
overrideStyles: this.getLocationBasedColors().listOverrideStyles,
|
|
345
|
+
getHoverPosition: () => this.getSessionHoverPosition(),
|
|
346
|
+
trackActiveEditorSession: () => {
|
|
347
|
+
return !this._widget || this._widget.isEmpty();
|
|
348
|
+
},
|
|
349
|
+
overrideSessionOpenOptions: openEvent => {
|
|
350
|
+
if (this.sessionsViewerOrientation === AgentSessionsViewerOrientation.Stacked && !openEvent.sideBySide) {
|
|
351
|
+
return {
|
|
352
|
+
...openEvent,
|
|
353
|
+
editorOptions: {
|
|
354
|
+
...openEvent.editorOptions,
|
|
355
|
+
preserveFocus: false
|
|
356
|
+
}
|
|
357
|
+
};
|
|
271
358
|
}
|
|
359
|
+
return openEvent;
|
|
272
360
|
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
361
|
+
})
|
|
362
|
+
);
|
|
363
|
+
this._register(
|
|
364
|
+
this.onDidChangeBodyVisibility(visible => sessionsControl.setVisible(visible))
|
|
365
|
+
);
|
|
277
366
|
sessionsToolbar.context = sessionsControl;
|
|
278
|
-
this.
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
}, {
|
|
283
|
-
opener: () => {
|
|
284
|
-
this.sessionsViewerLimited = !this.sessionsViewerLimited;
|
|
285
|
-
this.viewState.sessionsViewerLimited = this.sessionsViewerLimited;
|
|
286
|
-
this.notifySessionsControlLimitedChanged(true , true );
|
|
287
|
-
sessionsControl.focus();
|
|
288
|
-
}
|
|
289
|
-
}));
|
|
290
|
-
this._register(Event.runAndSubscribe(Event.filter(this.configurationService.onDidChangeConfiguration, e => e.affectsConfiguration(ChatConfiguration.ChatViewSessionsOrientation)), e => {
|
|
367
|
+
this._register(Event.runAndSubscribe(Event.filter(
|
|
368
|
+
this.configurationService.onDidChangeConfiguration,
|
|
369
|
+
e => e.affectsConfiguration(ChatConfiguration.ChatViewSessionsOrientation)
|
|
370
|
+
), e => {
|
|
291
371
|
const newSessionsViewerOrientationConfiguration = this.configurationService.getValue(ChatConfiguration.ChatViewSessionsOrientation);
|
|
292
|
-
this.doUpdateConfiguredSessionsViewerOrientation(newSessionsViewerOrientationConfiguration, {
|
|
372
|
+
this.doUpdateConfiguredSessionsViewerOrientation(newSessionsViewerOrientationConfiguration, {
|
|
373
|
+
updateConfiguration: false,
|
|
374
|
+
layout: !!e
|
|
375
|
+
});
|
|
293
376
|
}));
|
|
294
377
|
return sessionsControl;
|
|
295
378
|
}
|
|
@@ -297,16 +380,18 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
297
380
|
return this.sessionsViewerOrientation;
|
|
298
381
|
}
|
|
299
382
|
updateConfiguredSessionsViewerOrientation(orientation) {
|
|
300
|
-
return this.doUpdateConfiguredSessionsViewerOrientation(orientation, {
|
|
383
|
+
return this.doUpdateConfiguredSessionsViewerOrientation(orientation, {
|
|
384
|
+
updateConfiguration: true,
|
|
385
|
+
layout: true
|
|
386
|
+
});
|
|
301
387
|
}
|
|
302
388
|
doUpdateConfiguredSessionsViewerOrientation(orientation, options) {
|
|
303
389
|
const oldSessionsViewerOrientationConfiguration = this.sessionsViewerOrientationConfiguration;
|
|
304
390
|
let validatedOrientation;
|
|
305
|
-
if (orientation ===
|
|
391
|
+
if (orientation === "stacked" || orientation === "sideBySide") {
|
|
306
392
|
validatedOrientation = orientation;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
validatedOrientation = 'sideBySide';
|
|
393
|
+
} else {
|
|
394
|
+
validatedOrientation = "sideBySide";
|
|
310
395
|
}
|
|
311
396
|
this.sessionsViewerOrientationConfiguration = validatedOrientation;
|
|
312
397
|
if (oldSessionsViewerOrientationConfiguration === this.sessionsViewerOrientationConfiguration) {
|
|
@@ -315,65 +400,34 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
315
400
|
if (options.updateConfiguration) {
|
|
316
401
|
this.configurationService.updateValue(ChatConfiguration.ChatViewSessionsOrientation, validatedOrientation);
|
|
317
402
|
}
|
|
318
|
-
if (options.layout
|
|
319
|
-
this.
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
notifySessionsControlLimitedChanged(triggerLayout, triggerUpdate) {
|
|
323
|
-
this.sessionsViewerLimitedContext.set(this.sessionsViewerLimited);
|
|
324
|
-
this.updateSessionsControlTitle();
|
|
325
|
-
if (this.sessionsLink) {
|
|
326
|
-
this.sessionsLink.link = {
|
|
327
|
-
label: this.sessionsViewerLimited ? ( localize(5874, "Show More")) : ( localize(5875, "Show Less")),
|
|
328
|
-
href: ''
|
|
329
|
-
};
|
|
330
|
-
}
|
|
331
|
-
const updatePromise = triggerUpdate ? this.sessionsControl?.update() : undefined;
|
|
332
|
-
if (triggerLayout && this.lastDimensions) {
|
|
333
|
-
this.layoutBody(this.lastDimensions.height, this.lastDimensions.width);
|
|
334
|
-
}
|
|
335
|
-
return updatePromise ?? Promise.resolve();
|
|
336
|
-
}
|
|
337
|
-
notifySessionsControlCountChanged(newSessionsCount) {
|
|
338
|
-
const countChanged = typeof newSessionsCount === 'number' && newSessionsCount !== this.sessionsCount;
|
|
339
|
-
this.sessionsCount = newSessionsCount ?? this.sessionsCount;
|
|
340
|
-
const { changed: visibilityChanged, visible } = this.updateSessionsControlVisibility();
|
|
341
|
-
if (visibilityChanged || (countChanged && visible)) {
|
|
342
|
-
if (this.lastDimensions) {
|
|
343
|
-
this.layoutBody(this.lastDimensions.height, this.lastDimensions.width);
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
updateSessionsControlTitle() {
|
|
348
|
-
if (!this.sessionsTitle) {
|
|
349
|
-
return;
|
|
403
|
+
if (options.layout) {
|
|
404
|
+
this.relayout();
|
|
350
405
|
}
|
|
351
|
-
this.sessionsTitle.textContent = this.sessionsViewerLimited ? ( localize(5876, "Recent Sessions")) : ( localize(5877, "Sessions"));
|
|
352
406
|
}
|
|
353
407
|
updateSessionsControlVisibility() {
|
|
354
408
|
if (!this.sessionsContainer || !this.viewPaneContainer) {
|
|
355
|
-
return {
|
|
409
|
+
return {
|
|
410
|
+
changed: false,
|
|
411
|
+
visible: false
|
|
412
|
+
};
|
|
356
413
|
}
|
|
357
414
|
let newSessionsContainerVisible;
|
|
358
415
|
if (!this.configurationService.getValue(ChatConfiguration.ChatViewSessionsEnabled)) {
|
|
359
416
|
newSessionsContainerVisible = false;
|
|
360
|
-
}
|
|
361
|
-
else {
|
|
417
|
+
} else {
|
|
362
418
|
if (this.sessionsViewerOrientation === AgentSessionsViewerOrientation.Stacked) {
|
|
363
419
|
newSessionsContainerVisible =
|
|
364
|
-
|
|
365
|
-
!this.welcomeController?.isShowingWelcome.get() &&
|
|
366
|
-
(this.sessionsCount > 0 || !this.sessionsViewerLimited);
|
|
420
|
+
!!this.chatEntitlementService.sentiment.installed && (!this._widget || (this._widget.isEmpty() && !!this._widget.viewModel)) && !this.welcomeController?.isShowingWelcome.get();
|
|
367
421
|
}
|
|
368
422
|
else {
|
|
369
423
|
newSessionsContainerVisible =
|
|
370
|
-
|
|
371
|
-
!!this.lastDimensions && this.lastDimensions.width >= ChatViewPane_1.SESSIONS_SIDEBAR_VIEW_MIN_WIDTH;
|
|
424
|
+
!this.welcomeController?.isShowingWelcome.get() && !!this.lastDimensions && this.lastDimensions.width >= ChatViewPane_1.SESSIONS_SIDEBAR_VIEW_MIN_WIDTH;
|
|
372
425
|
}
|
|
373
426
|
}
|
|
374
|
-
this.viewPaneContainer.classList.toggle(
|
|
375
|
-
const sessionsContainerVisible = this.sessionsContainer.style.display !==
|
|
427
|
+
this.viewPaneContainer.classList.toggle("has-sessions-control", newSessionsContainerVisible);
|
|
428
|
+
const sessionsContainerVisible = this.sessionsContainer.style.display !== "none";
|
|
376
429
|
setVisibility(newSessionsContainerVisible, this.sessionsContainer);
|
|
430
|
+
this.sessionsViewerVisible = newSessionsContainerVisible;
|
|
377
431
|
this.sessionsViewerVisibilityContext.set(newSessionsContainerVisible);
|
|
378
432
|
return {
|
|
379
433
|
changed: sessionsContainerVisible !== newSessionsContainerVisible,
|
|
@@ -383,40 +437,51 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
383
437
|
getFocusedSessions() {
|
|
384
438
|
return this.sessionsControl?.getFocus() ?? [];
|
|
385
439
|
}
|
|
386
|
-
static {
|
|
387
|
-
|
|
440
|
+
static {
|
|
441
|
+
this.MIN_CHAT_WIDGET_HEIGHT = 116;
|
|
442
|
+
}
|
|
443
|
+
get widget() {
|
|
444
|
+
return this._widget;
|
|
445
|
+
}
|
|
388
446
|
createChatControl(parent) {
|
|
389
|
-
const chatControlsContainer = append(parent, $(
|
|
447
|
+
const chatControlsContainer = append(parent, $(".chat-controls-container"));
|
|
390
448
|
const locationBasedColors = this.getLocationBasedColors();
|
|
391
|
-
const editorOverflowWidgetsDomNode = this.layoutService.getContainer(getWindow(chatControlsContainer)).appendChild($(
|
|
449
|
+
const editorOverflowWidgetsDomNode = this.layoutService.getContainer(getWindow(chatControlsContainer)).appendChild($(".chat-editor-overflow.monaco-editor"));
|
|
392
450
|
this._register(toDisposable(() => editorOverflowWidgetsDomNode.remove()));
|
|
393
451
|
this.createChatTitleControl(chatControlsContainer);
|
|
394
452
|
const scopedInstantiationService = this._register(this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, this.scopedContextKeyService]))));
|
|
395
|
-
this._widget = this._register(
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
453
|
+
this._widget = this._register(
|
|
454
|
+
scopedInstantiationService.createInstance(ChatWidget, ChatAgentLocation.Chat, {
|
|
455
|
+
viewId: this.id
|
|
456
|
+
}, {
|
|
457
|
+
autoScroll: mode => mode !== ChatModeKind.Ask,
|
|
458
|
+
renderFollowups: true,
|
|
459
|
+
supportsFileReferences: true,
|
|
460
|
+
clear: () => this.clear(),
|
|
461
|
+
rendererOptions: {
|
|
462
|
+
renderTextEditsAsSummary: uri => {
|
|
463
|
+
return true;
|
|
464
|
+
},
|
|
465
|
+
referencesExpandedWhenEmptyResponse: false,
|
|
466
|
+
progressMessageAtBottomOfResponse: mode => mode !== ChatModeKind.Ask
|
|
403
467
|
},
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
}));
|
|
468
|
+
editorOverflowWidgetsDomNode,
|
|
469
|
+
enableImplicitContext: true,
|
|
470
|
+
enableWorkingSet: "explicit",
|
|
471
|
+
supportsChangingModes: true,
|
|
472
|
+
dndContainer: parent
|
|
473
|
+
}, {
|
|
474
|
+
listForeground: SIDE_BAR_FOREGROUND,
|
|
475
|
+
listBackground: locationBasedColors.background,
|
|
476
|
+
overlayBackground: locationBasedColors.overlayBackground,
|
|
477
|
+
inputEditorBackground: locationBasedColors.background,
|
|
478
|
+
resultEditorBackground: editorBackground
|
|
479
|
+
})
|
|
480
|
+
);
|
|
418
481
|
this._widget.render(chatControlsContainer);
|
|
419
|
-
const updateWidgetVisibility =
|
|
482
|
+
const updateWidgetVisibility = reader => this._widget.setVisible(
|
|
483
|
+
this.isBodyVisible() && !this.welcomeController?.isShowingWelcome.read(reader)
|
|
484
|
+
);
|
|
420
485
|
this._register(this.onDidChangeBodyVisibility(() => updateWidgetVisibility()));
|
|
421
486
|
this._register(autorun(reader => updateWidgetVisibility(reader)));
|
|
422
487
|
return this._widget;
|
|
@@ -426,27 +491,86 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
426
491
|
focusChat: () => this._widget.focusInput()
|
|
427
492
|
}));
|
|
428
493
|
this._register(this.titleControl.onDidChangeHeight(() => {
|
|
429
|
-
|
|
430
|
-
this.layoutBody(this.lastDimensions.height, this.lastDimensions.width);
|
|
431
|
-
}
|
|
494
|
+
this.relayout();
|
|
432
495
|
}));
|
|
433
496
|
}
|
|
434
497
|
registerControlsListeners(sessionsControl, chatWidget, welcomeController) {
|
|
435
|
-
this._register(Event.any(
|
|
498
|
+
this._register(Event.any(
|
|
499
|
+
chatWidget.onDidChangeEmptyState,
|
|
500
|
+
Event.fromObservable(welcomeController.isShowingWelcome),
|
|
501
|
+
Event.filter(
|
|
502
|
+
this.configurationService.onDidChangeConfiguration,
|
|
503
|
+
e => e.affectsConfiguration(ChatConfiguration.ChatViewSessionsEnabled)
|
|
504
|
+
)
|
|
505
|
+
)(() => {
|
|
436
506
|
if (this.sessionsViewerOrientation === AgentSessionsViewerOrientation.Stacked) {
|
|
437
507
|
sessionsControl.clearFocus();
|
|
438
508
|
}
|
|
439
|
-
|
|
509
|
+
const {
|
|
510
|
+
changed: visibilityChanged
|
|
511
|
+
} = this.updateSessionsControlVisibility();
|
|
512
|
+
if (visibilityChanged) {
|
|
513
|
+
this.relayout();
|
|
514
|
+
}
|
|
440
515
|
}));
|
|
441
516
|
this._register(chatWidget.onDidChangeViewModel(() => {
|
|
442
517
|
if (this.sessionsViewerOrientation === AgentSessionsViewerOrientation.Stacked) {
|
|
443
518
|
return;
|
|
444
519
|
}
|
|
445
520
|
const sessionResource = chatWidget.viewModel?.sessionResource;
|
|
521
|
+
if (sessionResource) {
|
|
522
|
+
const revealed = sessionsControl.reveal(sessionResource);
|
|
523
|
+
if (!revealed) {
|
|
524
|
+
sessionsControl.clearFocus();
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}));
|
|
528
|
+
this._register(this.agentSessionsService.model.onDidChangeSessions(() => {
|
|
529
|
+
if (this.sessionsViewerOrientation === AgentSessionsViewerOrientation.Stacked) {
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
if (sessionsControl.hasFocusOrSelection()) {
|
|
533
|
+
return;
|
|
534
|
+
}
|
|
535
|
+
const sessionResource = chatWidget.viewModel?.sessionResource;
|
|
446
536
|
if (sessionResource) {
|
|
447
537
|
sessionsControl.reveal(sessionResource);
|
|
448
538
|
}
|
|
449
539
|
}));
|
|
540
|
+
this._register(autorun(reader => {
|
|
541
|
+
chatWidget.inputPart.height.read(reader);
|
|
542
|
+
if (this.sessionsViewerVisible && this.sessionsViewerOrientation === AgentSessionsViewerOrientation.Stacked) {
|
|
543
|
+
this.relayout();
|
|
544
|
+
}
|
|
545
|
+
}));
|
|
546
|
+
const progressBadgeDisposables = this._register(( new MutableDisposable()));
|
|
547
|
+
const updateProgressBadge = () => {
|
|
548
|
+
progressBadgeDisposables.value = ( new DisposableStore());
|
|
549
|
+
if (!this.configurationService.getValue(ChatConfiguration.ChatViewProgressBadgeEnabled)) {
|
|
550
|
+
this.activityBadge.clear();
|
|
551
|
+
return;
|
|
552
|
+
}
|
|
553
|
+
const model = chatWidget.viewModel?.model;
|
|
554
|
+
if (model) {
|
|
555
|
+
progressBadgeDisposables.value.add(autorun(reader => {
|
|
556
|
+
if (model.requestInProgress.read(reader)) {
|
|
557
|
+
this.activityBadge.value = this.activityService.showViewActivity(this.id, {
|
|
558
|
+
badge: ( new ProgressBadge(() => ( localize(6149, "Agent Session in Progress"))))
|
|
559
|
+
});
|
|
560
|
+
} else {
|
|
561
|
+
this.activityBadge.clear();
|
|
562
|
+
}
|
|
563
|
+
}));
|
|
564
|
+
} else {
|
|
565
|
+
this.activityBadge.clear();
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
this._register(chatWidget.onDidChangeViewModel(() => updateProgressBadge()));
|
|
569
|
+
this._register(Event.filter(
|
|
570
|
+
this.configurationService.onDidChangeConfiguration,
|
|
571
|
+
e => e.affectsConfiguration(ChatConfiguration.ChatViewProgressBadgeEnabled)
|
|
572
|
+
)(() => updateProgressBadge()));
|
|
573
|
+
updateProgressBadge();
|
|
450
574
|
}
|
|
451
575
|
setupContextMenu(parent) {
|
|
452
576
|
this._register(addDisposableListener(parent, EventType.CONTEXT_MENU, e => {
|
|
@@ -468,11 +592,9 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
468
592
|
this.modelRef.value = undefined;
|
|
469
593
|
let ref;
|
|
470
594
|
if (startNewSession) {
|
|
471
|
-
ref = modelRef ?? (this.chatService.transferredSessionResource
|
|
472
|
-
? await this.chatService.getOrRestoreSession(this.chatService.transferredSessionResource)
|
|
473
|
-
: this.chatService.startSession(ChatAgentLocation.Chat));
|
|
595
|
+
ref = modelRef ?? (this.chatService.transferredSessionResource ? await this.chatService.getOrRestoreSession(this.chatService.transferredSessionResource) : this.chatService.startSession(ChatAgentLocation.Chat));
|
|
474
596
|
if (!ref) {
|
|
475
|
-
throw ( new Error(
|
|
597
|
+
throw ( new Error("Could not start chat session"));
|
|
476
598
|
}
|
|
477
599
|
}
|
|
478
600
|
this.modelRef.value = ref;
|
|
@@ -498,8 +620,7 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
498
620
|
let canResolve = false;
|
|
499
621
|
try {
|
|
500
622
|
canResolve = await this.chatSessionsService.canResolveChatSession(sessionResource);
|
|
501
|
-
}
|
|
502
|
-
catch (error) {
|
|
623
|
+
} catch (error) {
|
|
503
624
|
this.logService.warn(`Failed to resolve chat session '${( sessionResource.toString())}' for locking`, error);
|
|
504
625
|
}
|
|
505
626
|
if (!canResolve) {
|
|
@@ -509,8 +630,7 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
509
630
|
const contribution = this.chatSessionsService.getChatSessionContribution(sessionType);
|
|
510
631
|
if (contribution) {
|
|
511
632
|
this._widget.lockToCodingAgent(contribution.name, contribution.displayName, contribution.type);
|
|
512
|
-
}
|
|
513
|
-
else {
|
|
633
|
+
} else {
|
|
514
634
|
this._widget.unlockFromCodingAgent();
|
|
515
635
|
}
|
|
516
636
|
}
|
|
@@ -520,10 +640,13 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
520
640
|
this.updateActions();
|
|
521
641
|
}
|
|
522
642
|
async loadSession(sessionResource) {
|
|
523
|
-
return this.progressService.withProgress({
|
|
643
|
+
return this.progressService.withProgress({
|
|
644
|
+
location: ChatViewId,
|
|
645
|
+
delay: 200
|
|
646
|
+
}, async () => {
|
|
524
647
|
let queue = Promise.resolve();
|
|
525
648
|
const clearWidget = disposableTimeout(() => {
|
|
526
|
-
queue = this.showModel(undefined, false).then(() => {
|
|
649
|
+
queue = this.showModel(undefined, false).then(() => {});
|
|
527
650
|
}, 100);
|
|
528
651
|
const sessionType = getChatSessionType(sessionResource);
|
|
529
652
|
if (sessionType !== localChatSessionType) {
|
|
@@ -543,65 +666,82 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
543
666
|
this._widget.focusInput();
|
|
544
667
|
}
|
|
545
668
|
focusSessions() {
|
|
546
|
-
if (this.sessionsContainer?.style.display ===
|
|
669
|
+
if (this.sessionsContainer?.style.display === "none") {
|
|
547
670
|
return false;
|
|
548
671
|
}
|
|
549
672
|
this.sessionsControl?.focus();
|
|
550
673
|
return true;
|
|
551
674
|
}
|
|
675
|
+
relayout() {
|
|
676
|
+
if (this.lastDimensions) {
|
|
677
|
+
this.layoutBody(this.lastDimensions.height, this.lastDimensions.width);
|
|
678
|
+
}
|
|
679
|
+
}
|
|
552
680
|
layoutBody(height, width) {
|
|
681
|
+
if (this.layoutingBody) {
|
|
682
|
+
return;
|
|
683
|
+
}
|
|
684
|
+
this.layoutingBody = true;
|
|
685
|
+
try {
|
|
686
|
+
this.doLayoutBody(height, width);
|
|
687
|
+
} finally {
|
|
688
|
+
this.layoutingBody = false;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
doLayoutBody(height, width) {
|
|
553
692
|
super.layoutBody(height, width);
|
|
554
|
-
this.lastDimensions = {
|
|
693
|
+
this.lastDimensions = {
|
|
694
|
+
height,
|
|
695
|
+
width
|
|
696
|
+
};
|
|
555
697
|
let remainingHeight = height;
|
|
556
698
|
let remainingWidth = width;
|
|
557
|
-
const {
|
|
699
|
+
const {
|
|
700
|
+
heightReduction,
|
|
701
|
+
widthReduction
|
|
702
|
+
} = this.layoutSessionsControl(remainingHeight, remainingWidth);
|
|
558
703
|
remainingHeight -= heightReduction;
|
|
559
704
|
remainingWidth -= widthReduction;
|
|
560
705
|
remainingHeight -= this.titleControl?.getHeight() ?? 0;
|
|
561
706
|
this._widget.layout(remainingHeight, remainingWidth);
|
|
562
|
-
this.lastDimensionsPerOrientation.set(this.sessionsViewerOrientation, {
|
|
707
|
+
this.lastDimensionsPerOrientation.set(this.sessionsViewerOrientation, {
|
|
708
|
+
height,
|
|
709
|
+
width
|
|
710
|
+
});
|
|
563
711
|
}
|
|
564
712
|
layoutSessionsControl(height, width) {
|
|
565
713
|
let heightReduction = 0;
|
|
566
714
|
let widthReduction = 0;
|
|
567
|
-
if (!this.sessionsContainer || !this.sessionsControlContainer || !this.sessionsControl || !this.viewPaneContainer || !this.sessionsTitleContainer || !this.
|
|
568
|
-
return {
|
|
715
|
+
if (!this.sessionsContainer || !this.sessionsControlContainer || !this.sessionsControl || !this.viewPaneContainer || !this.sessionsTitleContainer || !this.sessionsTitle) {
|
|
716
|
+
return {
|
|
717
|
+
heightReduction,
|
|
718
|
+
widthReduction
|
|
719
|
+
};
|
|
569
720
|
}
|
|
570
721
|
const oldSessionsViewerOrientation = this.sessionsViewerOrientation;
|
|
571
722
|
let newSessionsViewerOrientation;
|
|
572
723
|
switch (this.sessionsViewerOrientationConfiguration) {
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
724
|
+
case "stacked":
|
|
725
|
+
newSessionsViewerOrientation = AgentSessionsViewerOrientation.Stacked;
|
|
726
|
+
break;
|
|
727
|
+
default:
|
|
728
|
+
newSessionsViewerOrientation = width >= ChatViewPane_1.SESSIONS_SIDEBAR_VIEW_MIN_WIDTH ? AgentSessionsViewerOrientation.SideBySide : AgentSessionsViewerOrientation.Stacked;
|
|
729
|
+
}
|
|
730
|
+
if (newSessionsViewerOrientation === AgentSessionsViewerOrientation.Stacked && width >= ChatViewPane_1.SESSIONS_SIDEBAR_VIEW_MIN_WIDTH && this.getViewPositionAndLocation().location === ViewContainerLocation.AuxiliaryBar && this.layoutService.isAuxiliaryBarMaximized()) {
|
|
731
|
+
newSessionsViewerOrientation = AgentSessionsViewerOrientation.SideBySide;
|
|
578
732
|
}
|
|
579
733
|
this.sessionsViewerOrientation = newSessionsViewerOrientation;
|
|
580
734
|
if (newSessionsViewerOrientation === AgentSessionsViewerOrientation.SideBySide) {
|
|
581
|
-
this.viewPaneContainer.classList.toggle(
|
|
582
|
-
this.viewPaneContainer.classList.toggle(
|
|
735
|
+
this.viewPaneContainer.classList.toggle("sessions-control-orientation-sidebyside", true);
|
|
736
|
+
this.viewPaneContainer.classList.toggle("sessions-control-orientation-stacked", false);
|
|
583
737
|
this.sessionsViewerOrientationContext.set(AgentSessionsViewerOrientation.SideBySide);
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
this.viewPaneContainer.classList.toggle(
|
|
587
|
-
this.viewPaneContainer.classList.toggle('sessions-control-orientation-stacked', true);
|
|
738
|
+
} else {
|
|
739
|
+
this.viewPaneContainer.classList.toggle("sessions-control-orientation-sidebyside", false);
|
|
740
|
+
this.viewPaneContainer.classList.toggle("sessions-control-orientation-stacked", true);
|
|
588
741
|
this.sessionsViewerOrientationContext.set(AgentSessionsViewerOrientation.Stacked);
|
|
589
742
|
}
|
|
590
743
|
if (oldSessionsViewerOrientation !== this.sessionsViewerOrientation) {
|
|
591
|
-
const
|
|
592
|
-
if (this.sessionsViewerOrientation === AgentSessionsViewerOrientation.SideBySide) {
|
|
593
|
-
this.sessionsViewerLimited = false;
|
|
594
|
-
}
|
|
595
|
-
else {
|
|
596
|
-
this.sessionsViewerLimited = this.viewState.sessionsViewerLimited ?? true;
|
|
597
|
-
}
|
|
598
|
-
let updatePromise;
|
|
599
|
-
if (oldSessionsViewerLimited !== this.sessionsViewerLimited) {
|
|
600
|
-
updatePromise = this.notifySessionsControlLimitedChanged(false , true );
|
|
601
|
-
}
|
|
602
|
-
else {
|
|
603
|
-
updatePromise = this.sessionsControl?.update();
|
|
604
|
-
}
|
|
744
|
+
const updatePromise = this.sessionsControl.update();
|
|
605
745
|
if (this.sessionsViewerOrientation === AgentSessionsViewerOrientation.SideBySide) {
|
|
606
746
|
updatePromise.then(() => {
|
|
607
747
|
const sessionResource = this._widget?.viewModel?.sessionResource;
|
|
@@ -611,41 +751,108 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
611
751
|
});
|
|
612
752
|
}
|
|
613
753
|
}
|
|
614
|
-
const {
|
|
754
|
+
const {
|
|
755
|
+
visible: sessionsContainerVisible
|
|
756
|
+
} = this.updateSessionsControlVisibility();
|
|
757
|
+
if (!sessionsContainerVisible || this.sessionsViewerOrientation === AgentSessionsViewerOrientation.Stacked) {
|
|
758
|
+
this.sessionsViewerSashDisposables.clear();
|
|
759
|
+
this.sessionsViewerSash = undefined;
|
|
760
|
+
} else if (this.sessionsViewerOrientation === AgentSessionsViewerOrientation.SideBySide) {
|
|
761
|
+
if (!this.sessionsViewerSashDisposables.value && this.viewPaneContainer) {
|
|
762
|
+
this.createSessionsViewerSash(this.viewPaneContainer, height, width);
|
|
763
|
+
}
|
|
764
|
+
}
|
|
615
765
|
if (!sessionsContainerVisible) {
|
|
616
|
-
return {
|
|
766
|
+
return {
|
|
767
|
+
heightReduction: 0,
|
|
768
|
+
widthReduction: 0
|
|
769
|
+
};
|
|
617
770
|
}
|
|
618
|
-
let availableSessionsHeight = height - this.sessionsTitleContainer.offsetHeight
|
|
771
|
+
let availableSessionsHeight = height - this.sessionsTitleContainer.offsetHeight;
|
|
619
772
|
if (this.sessionsViewerOrientation === AgentSessionsViewerOrientation.Stacked) {
|
|
620
|
-
availableSessionsHeight -=
|
|
773
|
+
availableSessionsHeight -= Math.max(
|
|
774
|
+
ChatViewPane_1.MIN_CHAT_WIDGET_HEIGHT,
|
|
775
|
+
this._widget?.input?.height.get() ?? 0
|
|
776
|
+
);
|
|
777
|
+
} else {
|
|
778
|
+
availableSessionsHeight -= this.sessionsNewButtonContainer?.offsetHeight ?? 0;
|
|
621
779
|
}
|
|
622
780
|
if (this.sessionsViewerOrientation === AgentSessionsViewerOrientation.SideBySide) {
|
|
781
|
+
const sessionsViewerSidebarWidth = this.computeEffectiveSideBySideSessionsSidebarWidth(width);
|
|
623
782
|
this.sessionsControlContainer.style.height = `${availableSessionsHeight}px`;
|
|
624
|
-
this.sessionsControlContainer.style.width = `${
|
|
625
|
-
this.sessionsControl.layout(availableSessionsHeight,
|
|
783
|
+
this.sessionsControlContainer.style.width = `${sessionsViewerSidebarWidth}px`;
|
|
784
|
+
this.sessionsControl.layout(availableSessionsHeight, sessionsViewerSidebarWidth);
|
|
785
|
+
this.sessionsViewerSash?.layout();
|
|
626
786
|
heightReduction = 0;
|
|
627
787
|
widthReduction = this.sessionsContainer.offsetWidth;
|
|
628
788
|
}
|
|
629
789
|
else {
|
|
630
|
-
|
|
631
|
-
if (this.sessionsViewerLimited) {
|
|
632
|
-
sessionsHeight = this.sessionsCount * AgentSessionsListDelegate.ITEM_HEIGHT;
|
|
633
|
-
}
|
|
634
|
-
else {
|
|
635
|
-
sessionsHeight = ((ChatViewPane_1.SESSIONS_LIMIT * 2) ) * AgentSessionsListDelegate.ITEM_HEIGHT;
|
|
636
|
-
}
|
|
637
|
-
sessionsHeight = Math.min(availableSessionsHeight, sessionsHeight);
|
|
790
|
+
const sessionsHeight = availableSessionsHeight - 1 ;
|
|
638
791
|
this.sessionsControlContainer.style.height = `${sessionsHeight}px`;
|
|
639
792
|
this.sessionsControlContainer.style.width = ``;
|
|
640
793
|
this.sessionsControl.layout(sessionsHeight, width);
|
|
641
794
|
heightReduction = this.sessionsContainer.offsetHeight;
|
|
642
795
|
widthReduction = 0;
|
|
643
796
|
}
|
|
644
|
-
return {
|
|
797
|
+
return {
|
|
798
|
+
heightReduction,
|
|
799
|
+
widthReduction
|
|
800
|
+
};
|
|
801
|
+
}
|
|
802
|
+
computeEffectiveSideBySideSessionsSidebarWidth(width, sessionsViewerSidebarWidth = this.sessionsViewerSidebarWidth) {
|
|
803
|
+
return Math.max(
|
|
804
|
+
ChatViewPane_1.SESSIONS_SIDEBAR_MIN_WIDTH,
|
|
805
|
+
Math.min(
|
|
806
|
+
sessionsViewerSidebarWidth,
|
|
807
|
+
width - ChatViewPane_1.CHAT_WIDGET_DEFAULT_WIDTH
|
|
808
|
+
)
|
|
809
|
+
);
|
|
645
810
|
}
|
|
646
811
|
getLastDimensions(orientation) {
|
|
647
812
|
return this.lastDimensionsPerOrientation.get(orientation);
|
|
648
813
|
}
|
|
814
|
+
createSessionsViewerSash(container, height, width) {
|
|
815
|
+
const disposables = this.sessionsViewerSashDisposables.value = ( new DisposableStore());
|
|
816
|
+
const sash = this.sessionsViewerSash = disposables.add(( new Sash(container, {
|
|
817
|
+
getVerticalSashLeft: () => {
|
|
818
|
+
const sessionsViewerSidebarWidth = this.computeEffectiveSideBySideSessionsSidebarWidth(this.lastDimensions?.width ?? width);
|
|
819
|
+
const {
|
|
820
|
+
position
|
|
821
|
+
} = this.getViewPositionAndLocation();
|
|
822
|
+
if (position === Position.RIGHT) {
|
|
823
|
+
return (this.lastDimensions?.width ?? width) - sessionsViewerSidebarWidth;
|
|
824
|
+
}
|
|
825
|
+
return sessionsViewerSidebarWidth;
|
|
826
|
+
}
|
|
827
|
+
}, {
|
|
828
|
+
orientation: Orientation.VERTICAL
|
|
829
|
+
})));
|
|
830
|
+
let sashStartWidth;
|
|
831
|
+
disposables.add(sash.onDidStart(() => sashStartWidth = this.sessionsViewerSidebarWidth));
|
|
832
|
+
disposables.add(sash.onDidEnd(() => sashStartWidth = undefined));
|
|
833
|
+
disposables.add(sash.onDidChange(e => {
|
|
834
|
+
if (sashStartWidth === undefined || !this.lastDimensions) {
|
|
835
|
+
return;
|
|
836
|
+
}
|
|
837
|
+
const {
|
|
838
|
+
position
|
|
839
|
+
} = this.getViewPositionAndLocation();
|
|
840
|
+
const delta = e.currentX - e.startX;
|
|
841
|
+
const newWidth = position === Position.RIGHT ? sashStartWidth - delta : sashStartWidth + delta;
|
|
842
|
+
if (newWidth < ChatViewPane_1.SESSIONS_SIDEBAR_SNAP_THRESHOLD) {
|
|
843
|
+
this.updateConfiguredSessionsViewerOrientation("stacked");
|
|
844
|
+
return;
|
|
845
|
+
}
|
|
846
|
+
this.sessionsViewerSidebarWidth = this.computeEffectiveSideBySideSessionsSidebarWidth(this.lastDimensions.width, newWidth);
|
|
847
|
+
this.viewState.sessionsSidebarWidth = this.sessionsViewerSidebarWidth;
|
|
848
|
+
this.layoutBody(this.lastDimensions.height, this.lastDimensions.width);
|
|
849
|
+
}));
|
|
850
|
+
disposables.add(sash.onDidReset(() => {
|
|
851
|
+
this.sessionsViewerSidebarWidth = ChatViewPane_1.SESSIONS_SIDEBAR_DEFAULT_WIDTH;
|
|
852
|
+
this.viewState.sessionsSidebarWidth = this.sessionsViewerSidebarWidth;
|
|
853
|
+
this.relayout();
|
|
854
|
+
}));
|
|
855
|
+
}
|
|
649
856
|
saveState() {
|
|
650
857
|
if (this._widget?.viewModel) {
|
|
651
858
|
this._widget.saveState();
|
|
@@ -667,9 +874,14 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
667
874
|
const hasCoreAgent = ( this.chatAgentService.getAgents().some(agent => agent.isCore && agent.locations.includes(ChatAgentLocation.Chat)));
|
|
668
875
|
const hasDefaultAgent = this.chatAgentService.getDefaultAgent(ChatAgentLocation.Chat) !== undefined;
|
|
669
876
|
const shouldShow = !hasCoreAgent && (!hasDefaultAgent || !this._widget?.viewModel && noPersistedSessions);
|
|
670
|
-
this.logService.trace(
|
|
877
|
+
this.logService.trace(
|
|
878
|
+
`ChatViewPane#shouldShowWelcome() = ${shouldShow}: hasCoreAgent=${hasCoreAgent} hasDefaultAgent=${hasDefaultAgent} || noViewModel=${!this._widget?.viewModel} && noPersistedSessions=${noPersistedSessions}`
|
|
879
|
+
);
|
|
671
880
|
return !!shouldShow;
|
|
672
881
|
}
|
|
882
|
+
getMatchingWelcomeView() {
|
|
883
|
+
return this.welcomeController?.getMatchingWelcomeView();
|
|
884
|
+
}
|
|
673
885
|
getActionsContext() {
|
|
674
886
|
return this._widget?.viewModel ? {
|
|
675
887
|
sessionResource: this._widget.viewModel.sessionResource,
|
|
@@ -677,26 +889,6 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
677
889
|
} : undefined;
|
|
678
890
|
}
|
|
679
891
|
};
|
|
680
|
-
ChatViewPane = ChatViewPane_1 = ( __decorate([
|
|
681
|
-
( __param(1, IKeybindingService)),
|
|
682
|
-
( __param(2, IContextMenuService)),
|
|
683
|
-
( __param(3, IConfigurationService)),
|
|
684
|
-
( __param(4, IContextKeyService)),
|
|
685
|
-
( __param(5, IViewDescriptorService)),
|
|
686
|
-
( __param(6, IInstantiationService)),
|
|
687
|
-
( __param(7, IOpenerService)),
|
|
688
|
-
( __param(8, IThemeService)),
|
|
689
|
-
( __param(9, IHoverService)),
|
|
690
|
-
( __param(10, IStorageService)),
|
|
691
|
-
( __param(11, IChatService)),
|
|
692
|
-
( __param(12, IChatAgentService)),
|
|
693
|
-
( __param(13, ILogService)),
|
|
694
|
-
( __param(14, IWorkbenchLayoutService)),
|
|
695
|
-
( __param(15, IChatSessionsService)),
|
|
696
|
-
( __param(16, ITelemetryService)),
|
|
697
|
-
( __param(17, ILifecycleService)),
|
|
698
|
-
( __param(18, IProgressService)),
|
|
699
|
-
( __param(19, IAgentSessionsService))
|
|
700
|
-
], ChatViewPane));
|
|
892
|
+
ChatViewPane = ChatViewPane_1 = ( __decorate([( __param(1, IKeybindingService)), ( __param(2, IContextMenuService)), ( __param(3, IConfigurationService)), ( __param(4, IContextKeyService)), ( __param(5, IViewDescriptorService)), ( __param(6, IInstantiationService)), ( __param(7, IOpenerService)), ( __param(8, IThemeService)), ( __param(9, IHoverService)), ( __param(10, IStorageService)), ( __param(11, IChatService)), ( __param(12, IChatAgentService)), ( __param(13, ILogService)), ( __param(14, IWorkbenchLayoutService)), ( __param(15, IChatSessionsService)), ( __param(16, ITelemetryService)), ( __param(17, ILifecycleService)), ( __param(18, IProgressService)), ( __param(19, IAgentSessionsService)), ( __param(20, IChatEntitlementService)), ( __param(21, ICommandService)), ( __param(22, IActivityService))], ChatViewPane));
|
|
701
893
|
|
|
702
894
|
export { ChatViewPane };
|