@codingame/monaco-vscode-chat-service-override 24.3.0 → 25.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 +35 -35
- package/package.json +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAccessibilityService.d.ts → accessibility/chatAccessibilityService.d.ts} +10 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAccessibilityService.js → accessibility/chatAccessibilityService.js} +23 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatResponseAccessibleView.d.ts → accessibility/chatResponseAccessibleView.d.ts} +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatResponseAccessibleView.js → accessibility/chatResponseAccessibleView.js} +38 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatTerminalOutputAccessibleView.js → accessibility/chatTerminalOutputAccessibleView.js} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +69 -60
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +2 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClear.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClear.js +25 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +24 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +48 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +16 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +35 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +22 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTransfer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTransfer.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +21 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +31 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +61 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +482 -125
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +16 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +84 -93
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +10 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +41 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +137 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +92 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +81 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +335 -102
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.js +47 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +80 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAttachmentResolveService.d.ts → attachments/chatAttachmentResolveService.d.ts} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAttachmentResolveService.js → attachments/chatAttachmentResolveService.js} +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatVariables.d.ts → attachments/chatVariables.d.ts} +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatVariables.js → attachments/chatVariables.js} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatEditing → attachments}/simpleBrowserEditorOverlay.js +21 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +171 -206
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditing.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimeline.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.d.ts +1 -1
- 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 +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +10 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +1 -1
- 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 +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +41 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +35 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatSessions.contribution.d.ts → chatSessions/chatSessions.contribution.d.ts} +7 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatSessions.contribution.js → chatSessions/chatSessions.contribution.js} +53 -106
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +18 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +29 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +64 -64
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +90 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContextService.d.ts → contextContrib/chatContextService.d.ts} +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContextService.js → contextContrib/chatContextService.js} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{languageModelToolsConfirmationService.d.ts → tools/languageModelToolsConfirmationService.d.ts} +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{languageModelToolsConfirmationService.js → tools/languageModelToolsConfirmationService.js} +47 -58
- package/vscode/src/vs/workbench/contrib/chat/browser/{languageModelToolsService.d.ts → tools/languageModelToolsService.d.ts} +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{languageModelToolsService.js → tools/languageModelToolsService.js} +21 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatMarkdownAnchorService.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatLayoutService.d.ts → widget/chatLayoutService.d.ts} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatWidgetService.d.ts → widget/chatWidgetService.d.ts} +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatWidgetService.js → widget/chatWidgetService.js} +27 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatusWidget.d.ts → widget/input/chatStatusWidget.d.ts} +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatusWidget.js → widget/input/chatStatusWidget.js} +17 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/chatInputEditorContrib.js +12 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/chatInputEditorHover.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/chatInputEditorHover.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatQuick.d.ts → widgetHosts/chatQuick.d.ts} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatQuick.js → widgetHosts/chatQuick.js} +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatEditor.d.ts → widgetHosts/editor/chatEditor.d.ts} +4 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatEditor.js → widgetHosts/editor/chatEditor.js} +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatViewPane.d.ts → widgetHosts/viewPane/chatViewPane.d.ts} +46 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatViewPane.js → widgetHosts/viewPane/chatViewPane.js} +258 -154
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatViewTitleControl.d.ts → widgetHosts/viewPane/chatViewTitleControl.d.ts} +5 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatViewTitleControl.js → widgetHosts/viewPane/chatViewTitleControl.js} +97 -85
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +176 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewTitleControl.css +89 -0
- package/vscode/src/vs/workbench/contrib/chat/common/{chatServiceImpl.d.ts → chatService/chatServiceImpl.d.ts} +16 -20
- package/vscode/src/vs/workbench/contrib/chat/common/{chatServiceImpl.js → chatService/chatServiceImpl.js} +97 -151
- package/vscode/src/vs/workbench/contrib/chat/common/{chatServiceTelemetry.d.ts → chatService/chatServiceTelemetry.d.ts} +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/{chatServiceTelemetry.js → chatService/chatServiceTelemetry.js} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/{chatCodeMapperService.d.ts → editing/chatCodeMapperService.d.ts} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/{chatModelStore.d.ts → model/chatModelStore.d.ts} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/{chatProgressTypes → model/chatProgressTypes}/chatToolInvocation.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/{chatProgressTypes → model/chatProgressTypes}/chatToolInvocation.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/{chatSessionStore.d.ts → model/chatSessionStore.d.ts} +14 -7
- package/vscode/src/vs/workbench/contrib/chat/common/{chatSessionStore.js → model/chatSessionStore.js} +164 -39
- package/vscode/src/vs/workbench/contrib/chat/common/{chatTransferService.d.ts → model/chatTransferService.d.ts} +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/{chatTransferService.js → model/chatTransferService.js} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/{chatSlashCommands.d.ts → participants/chatSlashCommands.d.ts} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +25 -49
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +6 -6
- 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 +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +29 -29
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +54 -54
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +11 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +83 -18
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +11 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +27 -10
- package/vscode/src/vs/workbench/contrib/chat/common/{chatTodoListService.d.ts → tools/chatTodoListService.d.ts} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/{chatTodoListService.js → tools/chatTodoListService.js} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +29 -29
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/{chatResponseResourceFileSystemProvider.d.ts → widget/chatResponseResourceFileSystemProvider.d.ts} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/{chatResponseResourceFileSystemProvider.js → widget/chatResponseResourceFileSystemProvider.js} +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +23 -23
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/common/remoteCodingAgentsService.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/media/terminalChatWidget.css +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +47 -30
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +15 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +33 -11
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +6 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +12 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +17 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +12 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +10 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +22 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +100 -23
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +6 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +19 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{commandLineAutoApprover.d.ts → tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.d.ts} +11 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/{commandLineAutoApprover.js → tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js} +83 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +156 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +17 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.js +10 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +64 -26
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +16 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.js +31 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +55 -23
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +85 -46
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +9 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +9 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.d.ts +0 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.js +0 -248
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.d.ts +0 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.js +0 -184
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsview.css +0 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.js +0 -229
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.d.ts +0 -102
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.js +0 -495
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.d.ts +0 -64
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.js +0 -386
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSessions.css +0 -299
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewPane.css +0 -142
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewTitleControl.css +0 -39
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatTerminalOutputAccessibleView.d.ts → accessibility/chatTerminalOutputAccessibleView.d.ts} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → attachments/media}/simpleBrowserOverlay.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatEditing → attachments}/simpleBrowserEditorOverlay.d.ts +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatEditing/media}/chatEditingEditorOverlay.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatEditing/media}/chatEditorController.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatMarkdownAnchorService.js +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatLayoutService.js → widget/chatLayoutService.js} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatEdinputInputContentProvider.d.ts → widget/input/editor/chatEditorInputContentProvider.d.ts} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatEdinputInputContentProvider.js → widget/input/editor/chatEditorInputContentProvider.js} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/chatInputEditorContrib.d.ts +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/editorHoverWrapper.d.ts +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/editorHoverWrapper.js +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/media/editorHoverWrapper.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → widget/input/media}/chatStatusWidget.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/common/{chatCodeMapperService.js → editing/chatCodeMapperService.js} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/common/{chatModelStore.js → model/chatModelStore.js} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/common/{chatSlashCommands.js → participants/chatSlashCommands.js} +0 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { $ } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
|
+
import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
4
5
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
5
6
|
import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
|
|
6
7
|
import { KeyMod, KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
7
8
|
import { markAsSingleton } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
9
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
8
10
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
9
11
|
import { localize2, localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
10
12
|
import { IActionViewItemService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/actionViewItemService.service';
|
|
@@ -15,15 +17,16 @@ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
15
17
|
import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
16
18
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
17
19
|
import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
18
|
-
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
19
|
-
import { IChatToolInvocation, ToolConfirmKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
20
|
-
import { isResponseVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatViewModel';
|
|
20
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
21
|
+
import { IChatToolInvocation, ToolConfirmKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
22
|
+
import { isResponseVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel';
|
|
21
23
|
import { ChatModeKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
22
24
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
23
|
-
import { ToolsScope } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/chatSelectedTools';
|
|
25
|
+
import { ToolsScope } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools';
|
|
24
26
|
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
25
27
|
import { AcceptToolConfirmationActionId, SkipToolConfirmationActionId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatConstants';
|
|
26
28
|
import { showToolsPicker } from './chatToolPicker.js';
|
|
29
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
27
30
|
|
|
28
31
|
class ToolConfirmationAction extends Action2 {
|
|
29
32
|
run(accessor, ...args) {
|
|
@@ -47,7 +50,7 @@ class AcceptToolConfirmation extends ToolConfirmationAction {
|
|
|
47
50
|
constructor() {
|
|
48
51
|
super({
|
|
49
52
|
id: AcceptToolConfirmationActionId,
|
|
50
|
-
title: ( localize2(
|
|
53
|
+
title: ( localize2(4807, "Accept")),
|
|
51
54
|
f1: false,
|
|
52
55
|
category: CHAT_CATEGORY,
|
|
53
56
|
keybinding: {
|
|
@@ -65,7 +68,7 @@ class SkipToolConfirmation extends ToolConfirmationAction {
|
|
|
65
68
|
constructor() {
|
|
66
69
|
super({
|
|
67
70
|
id: SkipToolConfirmationActionId,
|
|
68
|
-
title: ( localize2(
|
|
71
|
+
title: ( localize2(4808, "Skip")),
|
|
69
72
|
f1: false,
|
|
70
73
|
category: CHAT_CATEGORY,
|
|
71
74
|
keybinding: {
|
|
@@ -84,7 +87,7 @@ class ConfigureToolsAction extends Action2 {
|
|
|
84
87
|
constructor() {
|
|
85
88
|
super({
|
|
86
89
|
id: ConfigureToolsAction.ID,
|
|
87
|
-
title: ( localize(
|
|
90
|
+
title: ( localize(4809, "Configure Tools...")),
|
|
88
91
|
icon: Codicon.tools,
|
|
89
92
|
f1: false,
|
|
90
93
|
category: CHAT_CATEGORY,
|
|
@@ -119,36 +122,49 @@ class ConfigureToolsAction extends Action2 {
|
|
|
119
122
|
const { entriesScope, entriesMap } = widget.input.selectedToolsModel;
|
|
120
123
|
switch (entriesScope) {
|
|
121
124
|
case ToolsScope.Session:
|
|
122
|
-
placeholder = ( localize(
|
|
123
|
-
description = ( localize(
|
|
125
|
+
placeholder = ( localize(4810, "Select tools for this chat session"));
|
|
126
|
+
description = ( localize(4811, "The selected tools were configured only for this chat session."));
|
|
124
127
|
break;
|
|
125
128
|
case ToolsScope.Agent:
|
|
126
|
-
placeholder = ( localize(
|
|
129
|
+
placeholder = ( localize(4812, "Select tools for this custom agent"));
|
|
127
130
|
description = ( localize(
|
|
128
|
-
|
|
131
|
+
4813,
|
|
129
132
|
"The selected tools are configured by the '{0}' custom agent. Changes to the tools will be applied to the custom agent file as well.",
|
|
130
133
|
widget.input.currentModeObs.get().label.get()
|
|
131
134
|
));
|
|
132
135
|
break;
|
|
133
136
|
case ToolsScope.Agent_ReadOnly:
|
|
134
|
-
placeholder = ( localize(
|
|
137
|
+
placeholder = ( localize(4814, "Select tools for this custom agent"));
|
|
135
138
|
description = ( localize(
|
|
136
|
-
|
|
139
|
+
4815,
|
|
137
140
|
"The selected tools are configured by the '{0}' custom agent. Changes to the tools will only be used for this session and will not change the '{0}' custom agent.",
|
|
138
141
|
widget.input.currentModeObs.get().label.get()
|
|
139
142
|
));
|
|
140
143
|
break;
|
|
141
144
|
case ToolsScope.Global:
|
|
142
|
-
placeholder = ( localize(
|
|
145
|
+
placeholder = ( localize(4816, "Select tools that are available to chat."));
|
|
143
146
|
description = ( localize(
|
|
144
|
-
|
|
147
|
+
4817,
|
|
145
148
|
"The selected tools will be applied globally for all chat sessions that use the default agent."
|
|
146
149
|
));
|
|
147
150
|
break;
|
|
148
151
|
}
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
-
|
|
152
|
+
const cts = ( new CancellationTokenSource());
|
|
153
|
+
const initialMode = widget.input.currentModeObs.get();
|
|
154
|
+
const modeListener = autorun(reader => {
|
|
155
|
+
if (initialMode.id !== widget.input.currentModeObs.read(reader).id) {
|
|
156
|
+
cts.cancel();
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
try {
|
|
160
|
+
const result = await instaService.invokeFunction(showToolsPicker, placeholder, description, () => entriesMap.get(), cts.token);
|
|
161
|
+
if (result) {
|
|
162
|
+
widget.input.selectedToolsModel.set(result, false);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
finally {
|
|
166
|
+
modeListener.dispose();
|
|
167
|
+
cts.dispose();
|
|
152
168
|
}
|
|
153
169
|
const tools = widget.input.selectedToolsModel.entriesMap.get();
|
|
154
170
|
telemetryService.publicLog2('chat/selectedTools', {
|
|
@@ -191,7 +207,7 @@ let ConfigureToolsActionRendering = class ConfigureToolsActionRendering {
|
|
|
191
207
|
getTooltip() {
|
|
192
208
|
if (this.isAboveToolLimit()) {
|
|
193
209
|
const warningMessage = ( localize(
|
|
194
|
-
|
|
210
|
+
4818,
|
|
195
211
|
'More than {0} tools are enabled, you may experience degraded tool calling.',
|
|
196
212
|
this._contextKeyService.getContextKeyValue(ChatContextKeys.chatToolGroupingThreshold.key)
|
|
197
213
|
));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
1
2
|
import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
2
|
-
import { IToolData, ToolSet } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService";
|
|
3
|
+
import { IToolData, ToolSet } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService";
|
|
3
4
|
/**
|
|
4
5
|
* New QuickTree implementation of the tools picker.
|
|
5
6
|
* Uses IQuickTree to provide a true hierarchical tree structure with:
|
|
@@ -12,7 +13,7 @@ import { IToolData, ToolSet } from "@codingame/monaco-vscode-api/vscode/vs/workb
|
|
|
12
13
|
* @param placeHolder - Placeholder text shown in the picker
|
|
13
14
|
* @param description - Optional description text shown in the picker
|
|
14
15
|
* @param toolsEntries - Optional initial selection state for tools and toolsets
|
|
15
|
-
* @param
|
|
16
|
+
* @param token - Optional cancellation token to close the picker when cancelled
|
|
16
17
|
* @returns Promise resolving to the final selection map, or undefined if cancelled
|
|
17
18
|
*/
|
|
18
|
-
export declare function showToolsPicker(accessor: ServicesAccessor, placeHolder: string, description?: string, getToolsEntries?: () => ReadonlyMap<ToolSet | IToolData, boolean
|
|
19
|
+
export declare function showToolsPicker(accessor: ServicesAccessor, placeHolder: string, description?: string, getToolsEntries?: () => ReadonlyMap<ToolSet | IToolData, boolean>, token?: CancellationToken): Promise<ReadonlyMap<ToolSet | IToolData, boolean> | undefined>;
|
|
@@ -20,9 +20,9 @@ import { IMcpRegistry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/c
|
|
|
20
20
|
import { McpServerEditorTab, McpConnectionState, McpServerCacheState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes';
|
|
21
21
|
import { IMcpService, IMcpWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service';
|
|
22
22
|
import { startServerAndWaitForLiveTools } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypesUtils';
|
|
23
|
-
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
24
|
-
import { ToolDataSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService';
|
|
25
|
-
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service';
|
|
23
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
24
|
+
import { ToolDataSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
25
|
+
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
|
|
26
26
|
import { ConfigureToolSets } from '../tools/toolSetsContribution.js';
|
|
27
27
|
|
|
28
28
|
var BucketOrdinal;
|
|
@@ -77,7 +77,7 @@ function createToolSetTreeItem(toolset, checked, editorService) {
|
|
|
77
77
|
const resource = toolset.source.file;
|
|
78
78
|
buttons.push({
|
|
79
79
|
iconClass: ThemeIcon.asClassName(Codicon.edit),
|
|
80
|
-
tooltip: ( localize(
|
|
80
|
+
tooltip: ( localize(4819, "Edit Tool Set")),
|
|
81
81
|
action: () => editorService.openEditor({ resource })
|
|
82
82
|
});
|
|
83
83
|
}
|
|
@@ -94,7 +94,7 @@ function createToolSetTreeItem(toolset, checked, editorService) {
|
|
|
94
94
|
...iconProps
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
-
async function showToolsPicker(accessor, placeHolder, description, getToolsEntries) {
|
|
97
|
+
async function showToolsPicker(accessor, placeHolder, description, getToolsEntries, token) {
|
|
98
98
|
const quickPickService = accessor.get(IQuickInputService);
|
|
99
99
|
const mcpService = accessor.get(IMcpService);
|
|
100
100
|
const mcpRegistry = accessor.get(IMcpRegistry);
|
|
@@ -158,14 +158,14 @@ async function showToolsPicker(accessor, placeHolder, description, getToolsEntri
|
|
|
158
158
|
if (collection?.source) {
|
|
159
159
|
buttons.push({
|
|
160
160
|
iconClass: ThemeIcon.asClassName(Codicon.settingsGear),
|
|
161
|
-
tooltip: ( localize(
|
|
161
|
+
tooltip: ( localize(4820, "Configure {0}", collection.label)),
|
|
162
162
|
action: () => collection.source ? collection.source instanceof ExtensionIdentifier ? extensionsWorkbenchService.open(collection.source.value, { tab: ExtensionEditorTab.Features, feature: 'mcp' }) : mcpWorkbenchService.open(collection.source, { tab: McpServerEditorTab.Configuration }) : undefined
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
else if (collection?.presentation?.origin) {
|
|
166
166
|
buttons.push({
|
|
167
167
|
iconClass: ThemeIcon.asClassName(Codicon.settingsGear),
|
|
168
|
-
tooltip: ( localize(
|
|
168
|
+
tooltip: ( localize(4820, "Configure {0}", collection.label)),
|
|
169
169
|
action: () => editorService.openEditor({
|
|
170
170
|
resource: collection.presentation.origin,
|
|
171
171
|
})
|
|
@@ -174,7 +174,7 @@ async function showToolsPicker(accessor, placeHolder, description, getToolsEntri
|
|
|
174
174
|
if (mcpServer.connectionState.get().state === McpConnectionState.Kind.Error) {
|
|
175
175
|
buttons.push({
|
|
176
176
|
iconClass: ThemeIcon.asClassName(Codicon.warning),
|
|
177
|
-
tooltip: ( localize(
|
|
177
|
+
tooltip: ( localize(4821, "Show Output")),
|
|
178
178
|
action: () => mcpServer.showOutput(),
|
|
179
179
|
});
|
|
180
180
|
}
|
|
@@ -186,7 +186,7 @@ async function showToolsPicker(accessor, placeHolder, description, getToolsEntri
|
|
|
186
186
|
children.push({
|
|
187
187
|
itemType: 'callback',
|
|
188
188
|
iconClass: ThemeIcon.asClassName(Codicon.sync),
|
|
189
|
-
label: ( localize(
|
|
189
|
+
label: ( localize(4822, "Update Tools")),
|
|
190
190
|
pickable: false,
|
|
191
191
|
run: () => {
|
|
192
192
|
treePicker.busy = true;
|
|
@@ -243,7 +243,7 @@ async function showToolsPicker(accessor, placeHolder, description, getToolsEntri
|
|
|
243
243
|
itemType: 'bucket',
|
|
244
244
|
ordinal: BucketOrdinal.BuiltIn,
|
|
245
245
|
id: key,
|
|
246
|
-
label: ( localize(
|
|
246
|
+
label: ( localize(4823, "Built-In")),
|
|
247
247
|
checked: undefined,
|
|
248
248
|
children: [],
|
|
249
249
|
buttons: [],
|
|
@@ -256,7 +256,7 @@ async function showToolsPicker(accessor, placeHolder, description, getToolsEntri
|
|
|
256
256
|
itemType: 'bucket',
|
|
257
257
|
ordinal: BucketOrdinal.User,
|
|
258
258
|
id: key,
|
|
259
|
-
label: ( localize(
|
|
259
|
+
label: ( localize(4824, "User Defined Tool Sets")),
|
|
260
260
|
checked: undefined,
|
|
261
261
|
children: [],
|
|
262
262
|
buttons: [],
|
|
@@ -339,7 +339,7 @@ async function showToolsPicker(accessor, placeHolder, description, getToolsEntri
|
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
if (treeItems.length === 0) {
|
|
342
|
-
treePicker.placeholder = ( localize(
|
|
342
|
+
treePicker.placeholder = ( localize(4825, "Add tools to chat"));
|
|
343
343
|
}
|
|
344
344
|
else {
|
|
345
345
|
treePicker.placeholder = placeHolder;
|
|
@@ -380,7 +380,7 @@ async function showToolsPicker(accessor, placeHolder, description, getToolsEntri
|
|
|
380
380
|
if (count > toolLimit) {
|
|
381
381
|
treePicker.severity = Severity.Warning;
|
|
382
382
|
treePicker.validationMessage = ( localize(
|
|
383
|
-
|
|
383
|
+
4826,
|
|
384
384
|
"{0} tools are enabled. You may experience degraded tool calling above {1} tools.",
|
|
385
385
|
count,
|
|
386
386
|
createMarkdownCommandLink({ title: String(toolLimit), id: '_chat.toolPicker.closeAndOpenVirtualThreshold' })
|
|
@@ -443,17 +443,17 @@ async function showToolsPicker(accessor, placeHolder, description, getToolsEntri
|
|
|
443
443
|
}));
|
|
444
444
|
const addMcpServerButton = {
|
|
445
445
|
iconClass: ThemeIcon.asClassName(Codicon.mcp),
|
|
446
|
-
tooltip: ( localize(
|
|
446
|
+
tooltip: ( localize(4827, 'Add MCP Server...'))
|
|
447
447
|
};
|
|
448
448
|
const installExtension = {
|
|
449
449
|
iconClass: ThemeIcon.asClassName(Codicon.extensions),
|
|
450
|
-
tooltip: ( localize(
|
|
450
|
+
tooltip: ( localize(4828, 'Install Extension...'))
|
|
451
451
|
};
|
|
452
452
|
const configureToolSets = {
|
|
453
453
|
iconClass: ThemeIcon.asClassName(Codicon.gear),
|
|
454
|
-
tooltip: ( localize(
|
|
454
|
+
tooltip: ( localize(4829, 'Configure Tool Sets...'))
|
|
455
455
|
};
|
|
456
|
-
treePicker.title = ( localize(
|
|
456
|
+
treePicker.title = ( localize(4830, "Configure Tools"));
|
|
457
457
|
treePicker.buttons = [addMcpServerButton, installExtension, configureToolSets];
|
|
458
458
|
store.add(treePicker.onDidTriggerButton(button => {
|
|
459
459
|
if (button === addMcpServerButton) {
|
|
@@ -467,6 +467,11 @@ async function showToolsPicker(accessor, placeHolder, description, getToolsEntri
|
|
|
467
467
|
}
|
|
468
468
|
treePicker.hide();
|
|
469
469
|
}));
|
|
470
|
+
if (token) {
|
|
471
|
+
store.add(token.onCancellationRequested(() => {
|
|
472
|
+
treePicker.hide();
|
|
473
|
+
}));
|
|
474
|
+
}
|
|
470
475
|
treePicker.show();
|
|
471
476
|
await Promise.race([Event.toPromise(Event.any(treePicker.onDidHide, didAcceptFinalItem.event), store)]);
|
|
472
477
|
store.dispose();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
2
2
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
-
import { IChatTransferService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatTransferService.service";
|
|
3
|
+
import { IChatTransferService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatTransferService.service";
|
|
4
4
|
export declare class ChatTransferContribution extends Disposable implements IWorkbenchContribution {
|
|
5
5
|
static readonly ID = "workbench.contrib.chatTransfer";
|
|
6
6
|
constructor(chatTransferService: IChatTransferService);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
-
import { IChatTransferService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatTransferService.service';
|
|
4
|
+
import { IChatTransferService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatTransferService.service';
|
|
5
5
|
|
|
6
6
|
let ChatTransferContribution = class ChatTransferContribution extends Disposable {
|
|
7
7
|
static { this.ID = 'workbench.contrib.chatTransfer'; }
|
|
@@ -12,9 +12,9 @@ import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench
|
|
|
12
12
|
import { ITextFileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service";
|
|
13
13
|
import { IAiEditTelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryService.service";
|
|
14
14
|
import { INotebookService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service";
|
|
15
|
-
import { ICodeMapperService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatCodeMapperService.service";
|
|
16
|
-
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service";
|
|
17
|
-
import { ICodeBlockActionContext } from "@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/codeBlockPart";
|
|
15
|
+
import { ICodeMapperService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatCodeMapperService.service";
|
|
16
|
+
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
|
|
17
|
+
import { ICodeBlockActionContext } from "@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart";
|
|
18
18
|
export declare class InsertCodeBlockOperation {
|
|
19
19
|
private readonly editorService;
|
|
20
20
|
private readonly textFileService;
|
|
@@ -31,9 +31,9 @@ import { reviewEdits, reviewNotebookEdits } from '@codingame/monaco-vscode-katex
|
|
|
31
31
|
import { insertCell } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/notebook/browser/controller/cellOperations';
|
|
32
32
|
import { CellKind, NOTEBOOK_EDITOR_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
33
33
|
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
34
|
-
import { ICodeMapperService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatCodeMapperService.service';
|
|
35
|
-
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
36
|
-
import { isResponseVM, isRequestVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatViewModel';
|
|
34
|
+
import { ICodeMapperService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatCodeMapperService.service';
|
|
35
|
+
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
36
|
+
import { isResponseVM, isRequestVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel';
|
|
37
37
|
|
|
38
38
|
let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
39
39
|
constructor(editorService, textFileService, bulkEditService, codeEditorService, chatService, languageService, dialogService, aiEditTelemetryService) {
|
|
@@ -58,7 +58,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
|
58
58
|
}
|
|
59
59
|
else {
|
|
60
60
|
this.notify(( localize(
|
|
61
|
-
|
|
61
|
+
4831,
|
|
62
62
|
"To insert the code block, open a code editor or notebook editor and set the cursor at the location where to insert the code block."
|
|
63
63
|
)));
|
|
64
64
|
}
|
|
@@ -91,7 +91,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
|
91
91
|
}
|
|
92
92
|
async handleNotebookEditor(notebookEditor, codeBlockContext) {
|
|
93
93
|
if (notebookEditor.isReadOnly) {
|
|
94
|
-
this.notify(( localize(
|
|
94
|
+
this.notify(( localize(4832, "Cannot insert the code block to read-only notebook editor.")));
|
|
95
95
|
return false;
|
|
96
96
|
}
|
|
97
97
|
const focusRange = notebookEditor.getFocus();
|
|
@@ -102,7 +102,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
|
102
102
|
async handleTextEditor(codeEditor, codeBlockContext) {
|
|
103
103
|
const activeModel = codeEditor.getModel();
|
|
104
104
|
if (isReadOnly(activeModel, this.textFileService)) {
|
|
105
|
-
this.notify(( localize(
|
|
105
|
+
this.notify(( localize(4833, "Cannot insert the code block to read-only code editor.")));
|
|
106
106
|
return false;
|
|
107
107
|
}
|
|
108
108
|
const range = codeEditor.getSelection() ?? ( new Range(activeModel.getLineCount(), 1, activeModel.getLineCount(), 1));
|
|
@@ -156,7 +156,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
156
156
|
activeEditorControl = codeEditor;
|
|
157
157
|
}
|
|
158
158
|
else {
|
|
159
|
-
this.notify(( localize(
|
|
159
|
+
this.notify(( localize(4834, "Failed to open {0} in a code editor.", (codemapperUri.toString()))));
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
@@ -182,7 +182,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
182
182
|
result = await this.handleNotebookEditor(activeNotebookEditor, context.chatSessionResource, context.code);
|
|
183
183
|
}
|
|
184
184
|
else {
|
|
185
|
-
this.notify(( localize(
|
|
185
|
+
this.notify(( localize(4835, "To apply this code block, open a code or notebook editor.")));
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
if (isResponseVM(context.element)) {
|
|
@@ -205,15 +205,15 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
205
205
|
return resource;
|
|
206
206
|
}
|
|
207
207
|
const activeEditorOption = activeEditorControl?.getModel().uri ? { label: ( localize(
|
|
208
|
-
|
|
208
|
+
4836,
|
|
209
209
|
"Active editor '{0}'",
|
|
210
210
|
this.labelService.getUriLabel(activeEditorControl.getModel().uri, { relative: true })
|
|
211
211
|
)), id: 'activeEditor' } : undefined;
|
|
212
|
-
const untitledEditorOption = { label: ( localize(
|
|
212
|
+
const untitledEditorOption = { label: ( localize(4837, "New untitled editor")), id: 'newUntitledFile' };
|
|
213
213
|
const options = [];
|
|
214
214
|
if (resource) {
|
|
215
215
|
options.push({ label: ( localize(
|
|
216
|
-
|
|
216
|
+
4838,
|
|
217
217
|
"New file '{0}'",
|
|
218
218
|
this.labelService.getUriLabel(resource, { relative: true })
|
|
219
219
|
)), id: 'createFile' });
|
|
@@ -228,7 +228,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
228
228
|
}
|
|
229
229
|
options.push(untitledEditorOption);
|
|
230
230
|
}
|
|
231
|
-
const selected = options.length > 1 ? await this.quickInputService.pick(options, { placeHolder: ( localize(
|
|
231
|
+
const selected = options.length > 1 ? await this.quickInputService.pick(options, { placeHolder: ( localize(4839, "Select where to apply the code block")) }) : options[0];
|
|
232
232
|
if (selected) {
|
|
233
233
|
switch (selected.id) {
|
|
234
234
|
case 'createFile':
|
|
@@ -237,7 +237,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
237
237
|
await this.fileService.writeFile(resource, VSBuffer.fromString(''));
|
|
238
238
|
}
|
|
239
239
|
catch (error) {
|
|
240
|
-
this.notify(( localize(
|
|
240
|
+
this.notify(( localize(4840, "Failed to create file: {0}", error.message)));
|
|
241
241
|
return ( URI.from({ scheme: 'untitled', path: resource.path }));
|
|
242
242
|
}
|
|
243
243
|
}
|
|
@@ -252,21 +252,21 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
252
252
|
}
|
|
253
253
|
async handleNotebookEditor(notebookEditor, chatSessionResource, code) {
|
|
254
254
|
if (notebookEditor.isReadOnly) {
|
|
255
|
-
this.notify(( localize(
|
|
255
|
+
this.notify(( localize(4841, "Cannot apply code block to read-only notebook editor.")));
|
|
256
256
|
return undefined;
|
|
257
257
|
}
|
|
258
258
|
const uri = notebookEditor.textModel.uri;
|
|
259
259
|
const codeBlock = { code, resource: uri, markdownBeforeBlock: undefined };
|
|
260
260
|
const codeMapper = this.codeMapperService.providers[0]?.displayName;
|
|
261
261
|
if (!codeMapper) {
|
|
262
|
-
this.notify(( localize(
|
|
262
|
+
this.notify(( localize(4842, "No code mapper available.")));
|
|
263
263
|
return undefined;
|
|
264
264
|
}
|
|
265
265
|
let editsProposed = false;
|
|
266
266
|
const cancellationTokenSource = ( new CancellationTokenSource());
|
|
267
267
|
try {
|
|
268
268
|
const iterable = await this.progressService.withProgress({ location: ProgressLocation.Notification, delay: 500, sticky: true, cancellable: true }, async (progress) => {
|
|
269
|
-
progress.report({ message: ( localize(
|
|
269
|
+
progress.report({ message: ( localize(4843, "Applying code block using {0}...", codeMapper)) });
|
|
270
270
|
const editsIterable = this.getNotebookEdits(codeBlock, chatSessionResource, cancellationTokenSource.token);
|
|
271
271
|
return await this.waitForFirstElement(editsIterable);
|
|
272
272
|
}, () => cancellationTokenSource.cancel());
|
|
@@ -274,7 +274,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
274
274
|
}
|
|
275
275
|
catch (e) {
|
|
276
276
|
if (!isCancellationError(e)) {
|
|
277
|
-
this.notify(( localize(
|
|
277
|
+
this.notify(( localize(4844, "Failed to apply code block: {0}", e.message)));
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
finally {
|
|
@@ -288,20 +288,20 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
288
288
|
async handleTextEditor(codeEditor, chatSessionResource, code, applyCodeBlockSuggestionId) {
|
|
289
289
|
const activeModel = codeEditor.getModel();
|
|
290
290
|
if (isReadOnly(activeModel, this.textFileService)) {
|
|
291
|
-
this.notify(( localize(
|
|
291
|
+
this.notify(( localize(4845, "Cannot apply code block to read-only file.")));
|
|
292
292
|
return undefined;
|
|
293
293
|
}
|
|
294
294
|
const codeBlock = { code, resource: activeModel.uri, chatSessionResource, markdownBeforeBlock: undefined };
|
|
295
295
|
const codeMapper = this.codeMapperService.providers[0]?.displayName;
|
|
296
296
|
if (!codeMapper) {
|
|
297
|
-
this.notify(( localize(
|
|
297
|
+
this.notify(( localize(4842, "No code mapper available.")));
|
|
298
298
|
return undefined;
|
|
299
299
|
}
|
|
300
300
|
let editsProposed = false;
|
|
301
301
|
const cancellationTokenSource = ( new CancellationTokenSource());
|
|
302
302
|
try {
|
|
303
303
|
const iterable = await this.progressService.withProgress({ location: ProgressLocation.Notification, delay: 500, sticky: true, cancellable: true }, async (progress) => {
|
|
304
|
-
progress.report({ message: ( localize(
|
|
304
|
+
progress.report({ message: ( localize(4843, "Applying code block using {0}...", codeMapper)) });
|
|
305
305
|
const editsIterable = this.getTextEdits(codeBlock, chatSessionResource, cancellationTokenSource.token);
|
|
306
306
|
return await this.waitForFirstElement(editsIterable);
|
|
307
307
|
}, () => cancellationTokenSource.cancel());
|
|
@@ -309,7 +309,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
309
309
|
}
|
|
310
310
|
catch (e) {
|
|
311
311
|
if (!isCancellationError(e)) {
|
|
312
|
-
this.notify(( localize(
|
|
312
|
+
this.notify(( localize(4844, "Failed to apply code block: {0}", e.message)));
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
finally {
|
package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js
CHANGED
|
@@ -1,77 +1,45 @@
|
|
|
1
1
|
|
|
2
2
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
3
|
-
import { localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
3
|
+
import { localize2, localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
4
4
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
5
|
-
import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors';
|
|
6
5
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
12
|
-
import { AGENT_SESSIONS_VIEW_CONTAINER_ID, AGENT_SESSIONS_VIEW_ID, AgentSessionsViewerOrientation, AgentSessionsViewerPosition } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
|
|
6
|
+
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
7
|
+
import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickAccess';
|
|
8
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
|
|
9
|
+
import { AgentSessionsViewerOrientation, AgentSessionsViewerPosition } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
|
|
13
10
|
import './agentSessionsService.js';
|
|
14
11
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
15
|
-
import { AgentSessionsView } from './agentSessionsView.js';
|
|
16
|
-
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
17
12
|
import { LocalAgentsSessionsProvider } from './localAgentSessionsProvider.js';
|
|
18
13
|
import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
19
14
|
import { registerAction2, MenuRegistry, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
20
|
-
import { ArchiveAgentSessionAction, UnarchiveAgentSessionAction, MarkAgentSessionUnreadAction, MarkAgentSessionReadAction, OpenAgentSessionInNewWindowAction, OpenAgentSessionInEditorGroupAction, OpenAgentSessionInNewEditorGroupAction,
|
|
15
|
+
import { FocusAgentSessionsAction, PickAgentSessionAction, ArchiveAllAgentSessionsAction, ArchiveAgentSessionSectionAction, ArchiveAgentSessionAction, UnarchiveAgentSessionAction, RenameAgentSessionAction, DeleteAgentSessionAction, DeleteAllLocalSessionsAction, MarkAgentSessionUnreadAction, MarkAgentSessionReadAction, OpenAgentSessionInNewWindowAction, OpenAgentSessionInEditorGroupAction, OpenAgentSessionInNewEditorGroupAction, RefreshAgentSessionsViewerAction, FindAgentSessionInViewerAction, ShowAgentSessionsSidebar, HideAgentSessionsSidebar, ToggleAgentSessionsSidebar, ToggleChatViewSessionsAction, SetAgentSessionsOrientationStackedAction, SetAgentSessionsOrientationSideBySideAction } from './agentSessionsActions.js';
|
|
16
|
+
import { AGENT_SESSIONS_QUICK_ACCESS_PREFIX, AgentSessionsQuickAccessProvider } from './agentSessionsQuickAccess.js';
|
|
21
17
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
title: AGENT_SESSIONS_VIEW_TITLE,
|
|
27
|
-
icon: chatAgentsIcon,
|
|
28
|
-
ctorDescriptor: ( new SyncDescriptor(
|
|
29
|
-
ViewPaneContainer,
|
|
30
|
-
[AGENT_SESSIONS_VIEW_CONTAINER_ID, { mergeViewWithContainerWhenSingleView: true }]
|
|
31
|
-
)),
|
|
32
|
-
storageId: AGENT_SESSIONS_VIEW_CONTAINER_ID,
|
|
33
|
-
hideIfEmpty: true,
|
|
34
|
-
order: 6,
|
|
35
|
-
}, ViewContainerLocation.AuxiliaryBar);
|
|
36
|
-
const agentSessionsViewDescriptor = {
|
|
37
|
-
id: AGENT_SESSIONS_VIEW_ID,
|
|
38
|
-
containerIcon: chatAgentsIcon,
|
|
39
|
-
containerTitle: AGENT_SESSIONS_VIEW_TITLE.value,
|
|
40
|
-
singleViewPaneContainerTitle: AGENT_SESSIONS_VIEW_TITLE.value,
|
|
41
|
-
name: AGENT_SESSIONS_VIEW_TITLE,
|
|
42
|
-
canToggleVisibility: false,
|
|
43
|
-
canMoveView: true,
|
|
44
|
-
openCommandActionDescriptor: {
|
|
45
|
-
id: AGENT_SESSIONS_VIEW_ID,
|
|
46
|
-
title: AGENT_SESSIONS_VIEW_TITLE
|
|
47
|
-
},
|
|
48
|
-
ctorDescriptor: ( new SyncDescriptor(AgentSessionsView)),
|
|
49
|
-
when: ( ContextKeyExpr.and(( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabled.negate()), ( ContextKeyExpr.equals(`config.${ChatConfiguration.AgentSessionsViewLocation}`, 'single-view'))))
|
|
50
|
-
};
|
|
51
|
-
( Registry.as(Extensions.ViewsRegistry)).registerViews([agentSessionsViewDescriptor], agentSessionsViewContainer);
|
|
18
|
+
registerAction2(FocusAgentSessionsAction);
|
|
19
|
+
registerAction2(PickAgentSessionAction);
|
|
20
|
+
registerAction2(ArchiveAllAgentSessionsAction);
|
|
21
|
+
registerAction2(ArchiveAgentSessionSectionAction);
|
|
52
22
|
registerAction2(ArchiveAgentSessionAction);
|
|
53
23
|
registerAction2(UnarchiveAgentSessionAction);
|
|
24
|
+
registerAction2(RenameAgentSessionAction);
|
|
25
|
+
registerAction2(DeleteAgentSessionAction);
|
|
26
|
+
registerAction2(DeleteAllLocalSessionsAction);
|
|
54
27
|
registerAction2(MarkAgentSessionUnreadAction);
|
|
55
28
|
registerAction2(MarkAgentSessionReadAction);
|
|
56
29
|
registerAction2(OpenAgentSessionInNewWindowAction);
|
|
57
30
|
registerAction2(OpenAgentSessionInEditorGroupAction);
|
|
58
31
|
registerAction2(OpenAgentSessionInNewEditorGroupAction);
|
|
59
|
-
registerAction2(RefreshAgentSessionsViewAction);
|
|
60
|
-
registerAction2(FindAgentSessionAction);
|
|
61
32
|
registerAction2(RefreshAgentSessionsViewerAction);
|
|
62
33
|
registerAction2(FindAgentSessionInViewerAction);
|
|
63
34
|
registerAction2(ShowAgentSessionsSidebar);
|
|
64
35
|
registerAction2(HideAgentSessionsSidebar);
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
order: 100,
|
|
70
|
-
icon: Codicon.filter
|
|
71
|
-
});
|
|
36
|
+
registerAction2(ToggleAgentSessionsSidebar);
|
|
37
|
+
registerAction2(ToggleChatViewSessionsAction);
|
|
38
|
+
registerAction2(SetAgentSessionsOrientationStackedAction);
|
|
39
|
+
registerAction2(SetAgentSessionsOrientationSideBySideAction);
|
|
72
40
|
MenuRegistry.appendMenuItem(MenuId.AgentSessionsToolbar, {
|
|
73
41
|
submenu: MenuId.AgentSessionsViewerFilterSubMenu,
|
|
74
|
-
title: ( localize2(
|
|
42
|
+
title: ( localize2(4846, "Filter Agent Sessions")),
|
|
75
43
|
group: 'navigation',
|
|
76
44
|
order: 3,
|
|
77
45
|
icon: Codicon.filter,
|
|
@@ -125,7 +93,7 @@ MenuRegistry.appendMenuItem(MenuId.ChatViewSessionTitleToolbar, {
|
|
|
125
93
|
},
|
|
126
94
|
group: 'navigation',
|
|
127
95
|
order: 1,
|
|
128
|
-
when: ( ContextKeyExpr.and(( ChatContextKeys.agentSessionsViewerOrientation.isEqualTo(AgentSessionsViewerOrientation.Stacked)), ( ChatContextKeys.agentSessionsViewerPosition.isEqualTo(AgentSessionsViewerPosition.Left))))
|
|
96
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.or(( ChatContextKeys.agentSessionsViewerVisible.negate()), ( ChatContextKeys.agentSessionsViewerOrientation.isEqualTo(AgentSessionsViewerOrientation.Stacked)))), ( ChatContextKeys.agentSessionsViewerPosition.isEqualTo(AgentSessionsViewerPosition.Left))))
|
|
129
97
|
});
|
|
130
98
|
MenuRegistry.appendMenuItem(MenuId.ChatViewSessionTitleToolbar, {
|
|
131
99
|
command: {
|
|
@@ -135,6 +103,16 @@ MenuRegistry.appendMenuItem(MenuId.ChatViewSessionTitleToolbar, {
|
|
|
135
103
|
},
|
|
136
104
|
group: 'navigation',
|
|
137
105
|
order: 1,
|
|
138
|
-
when: ( ContextKeyExpr.and(( ChatContextKeys.agentSessionsViewerOrientation.isEqualTo(AgentSessionsViewerOrientation.Stacked)), ( ChatContextKeys.agentSessionsViewerPosition.isEqualTo(AgentSessionsViewerPosition.Right))))
|
|
106
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.or(( ChatContextKeys.agentSessionsViewerVisible.negate()), ( ChatContextKeys.agentSessionsViewerOrientation.isEqualTo(AgentSessionsViewerOrientation.Stacked)))), ( ChatContextKeys.agentSessionsViewerPosition.isEqualTo(AgentSessionsViewerPosition.Right))))
|
|
107
|
+
});
|
|
108
|
+
( Registry.as(Extensions.Quickaccess)).registerQuickAccessProvider({
|
|
109
|
+
ctor: AgentSessionsQuickAccessProvider,
|
|
110
|
+
prefix: AGENT_SESSIONS_QUICK_ACCESS_PREFIX,
|
|
111
|
+
contextKey: 'inAgentSessionsPicker',
|
|
112
|
+
placeholder: ( localize(4847, "Search agent sessions by name")),
|
|
113
|
+
helpEntries: [{
|
|
114
|
+
description: ( localize(4848, "Show All Agent Sessions")),
|
|
115
|
+
commandId: 'workbench.action.chat.history',
|
|
116
|
+
}]
|
|
139
117
|
});
|
|
140
118
|
registerWorkbenchContribution2(LocalAgentsSessionsProvider.ID, LocalAgentsSessionsProvider, WorkbenchPhase.AfterRestored);
|