@codingame/monaco-vscode-chat-service-override 24.2.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
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { encodeBase64 } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
3
3
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
4
4
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
5
|
-
import { ToolConfirmKind, IChatToolInvocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
6
|
-
import { isToolResultOutputDetails } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService';
|
|
5
|
+
import { ToolConfirmKind, IChatToolInvocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
6
|
+
import { isToolResultOutputDetails } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
7
7
|
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
8
8
|
|
|
9
9
|
class ChatToolInvocation {
|
|
@@ -14,7 +14,7 @@ class ChatToolInvocation {
|
|
|
14
14
|
this.toolCallId = toolCallId;
|
|
15
15
|
this.kind = 'toolInvocation';
|
|
16
16
|
this._progress = observableValue(this, { progress: 0 });
|
|
17
|
-
const defaultMessage = ( localize(
|
|
17
|
+
const defaultMessage = ( localize(5965, "Using {0}", `"${toolData.displayName}"`));
|
|
18
18
|
const invocationMessage = preparedInvocation?.invocationMessage ?? defaultMessage;
|
|
19
19
|
this.invocationMessage = invocationMessage;
|
|
20
20
|
this.pastTenseMessage = preparedInvocation?.pastTenseMessage;
|
|
@@ -27,7 +27,7 @@ class ChatToolInvocation {
|
|
|
27
27
|
this.fromSubAgent = fromSubAgent;
|
|
28
28
|
this.parameters = parameters;
|
|
29
29
|
if (!this.confirmationMessages?.title) {
|
|
30
|
-
this._state = observableValue(this, { type: IChatToolInvocation.StateKind.Executing, confirmed: { type: ToolConfirmKind.ConfirmationNotNeeded }, progress: this._progress });
|
|
30
|
+
this._state = observableValue(this, { type: IChatToolInvocation.StateKind.Executing, confirmed: { type: ToolConfirmKind.ConfirmationNotNeeded, reason: this.confirmationMessages?.confirmationNotNeededReason }, progress: this._progress });
|
|
31
31
|
}
|
|
32
32
|
else {
|
|
33
33
|
this._state = observableValue(this, {
|
|
@@ -8,8 +8,8 @@ import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platfo
|
|
|
8
8
|
import { IUserDataProfilesService } from "@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service";
|
|
9
9
|
import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
|
|
10
10
|
import { ILifecycleService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service";
|
|
11
|
-
import { ChatModel,
|
|
12
|
-
import { IChatSessionStats,
|
|
11
|
+
import { ChatModel, ISerializableChatData, ISerializableChatsData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
|
|
12
|
+
import { IChatSessionStats, IChatSessionTiming, ResponseModelState } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
13
13
|
import { ChatAgentLocation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants";
|
|
14
14
|
export declare class ChatSessionStore extends Disposable {
|
|
15
15
|
private readonly fileService;
|
|
@@ -22,12 +22,19 @@ export declare class ChatSessionStore extends Disposable {
|
|
|
22
22
|
private readonly userDataProfilesService;
|
|
23
23
|
private readonly storageRoot;
|
|
24
24
|
private readonly previousEmptyWindowStorageRoot;
|
|
25
|
+
private readonly transferredSessionStorageRoot;
|
|
25
26
|
private readonly storeQueue;
|
|
26
27
|
private storeTask;
|
|
27
28
|
private shuttingDown;
|
|
28
29
|
constructor(fileService: IFileService, environmentService: IEnvironmentService, logService: ILogService, workspaceContextService: IWorkspaceContextService, telemetryService: ITelemetryService, storageService: IStorageService, lifecycleService: ILifecycleService, userDataProfilesService: IUserDataProfilesService);
|
|
29
30
|
storeSessions(sessions: ChatModel[]): Promise<void>;
|
|
30
31
|
storeSessionsMetadataOnly(sessions: ChatModel[]): Promise<void>;
|
|
32
|
+
storeTransferSession(transferData: IChatTransfer, session: ChatModel): Promise<void>;
|
|
33
|
+
private getTransferredSessionIndex;
|
|
34
|
+
private static readonly TRANSFER_EXPIRATION_MS;
|
|
35
|
+
getTransferredSessionData(): URI | undefined;
|
|
36
|
+
readTransferredSession(sessionResource: URI): Promise<ISerializableChatData | undefined>;
|
|
37
|
+
private cleanupTransferredSession;
|
|
31
38
|
private writeSession;
|
|
32
39
|
private writeSessionMetadataOnly;
|
|
33
40
|
private flushIndex;
|
|
@@ -43,12 +50,16 @@ export declare class ChatSessionStore extends Disposable {
|
|
|
43
50
|
private indexCache;
|
|
44
51
|
private internalGetIndex;
|
|
45
52
|
getIndex(): Promise<IChatSessionIndex>;
|
|
53
|
+
getMetadataForSessionSync(sessionResource: URI): IChatSessionEntryMetadata | undefined;
|
|
54
|
+
private getIndexKey;
|
|
46
55
|
logIndex(): void;
|
|
47
56
|
migrateDataIfNeeded(getInitialData: () => ISerializableChatsData | undefined): Promise<void>;
|
|
48
57
|
private migrate;
|
|
49
58
|
readSession(sessionId: string): Promise<ISerializableChatData | undefined>;
|
|
59
|
+
private readSessionFromLocation;
|
|
50
60
|
private readSessionFromPreviousLocation;
|
|
51
61
|
private getStorageLocation;
|
|
62
|
+
private getTransferredSessionStorageLocation;
|
|
52
63
|
getChatStorageFolder(): URI;
|
|
53
64
|
}
|
|
54
65
|
export interface IChatSessionEntryMetadata {
|
|
@@ -74,13 +85,9 @@ export interface IChatSessionEntryMetadata {
|
|
|
74
85
|
export type IChatSessionIndex = Record<string, IChatSessionEntryMetadata>;
|
|
75
86
|
export interface IChatTransfer {
|
|
76
87
|
toWorkspace: URI;
|
|
88
|
+
sessionResource: URI;
|
|
77
89
|
timestampInMilliseconds: number;
|
|
78
|
-
inputState: IChatModelInputState | undefined;
|
|
79
|
-
location: ChatAgentLocation;
|
|
80
90
|
}
|
|
81
91
|
export interface IChatTransfer2 extends IChatTransfer {
|
|
82
92
|
chat: ISerializableChatData;
|
|
83
93
|
}
|
|
84
|
-
/**
|
|
85
|
-
* Map of destination workspace URI to chat transfer data
|
|
86
|
-
*/
|
|
@@ -7,26 +7,30 @@ import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/comm
|
|
|
7
7
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
8
8
|
import { revive } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshalling';
|
|
9
9
|
import { joinPath } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
10
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
10
11
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
11
12
|
import { IEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service';
|
|
12
13
|
import { toFileOperationResult, FileOperationResult } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
|
|
13
14
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
14
15
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
15
|
-
import {
|
|
16
|
+
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
16
17
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
17
18
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
18
19
|
import { IUserDataProfilesService } from '@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
19
20
|
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
20
21
|
import { ILifecycleService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
21
22
|
import { awaitStatsForSession } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chat';
|
|
22
|
-
import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService';
|
|
23
|
-
import { normalizeSerializableChatData, ChatModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel';
|
|
24
|
-
import { ResponseModelState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
25
|
-
import { LocalChatSessionUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatUri';
|
|
23
|
+
import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
|
|
24
|
+
import { normalizeSerializableChatData, ChatModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel';
|
|
25
|
+
import { ResponseModelState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
26
|
+
import { LocalChatSessionUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
|
|
26
27
|
|
|
28
|
+
var ChatSessionStore_1;
|
|
27
29
|
const maxPersistedSessions = 25;
|
|
28
30
|
const ChatIndexStorageKey = 'chat.ChatSessionStore.index';
|
|
31
|
+
const ChatTransferIndexStorageKey = 'ChatSessionStore.transferIndex';
|
|
29
32
|
let ChatSessionStore = class ChatSessionStore extends Disposable {
|
|
33
|
+
static { ChatSessionStore_1 = this; }
|
|
30
34
|
constructor(fileService, environmentService, logService, workspaceContextService, telemetryService, storageService, lifecycleService, userDataProfilesService) {
|
|
31
35
|
super();
|
|
32
36
|
this.fileService = fileService;
|
|
@@ -48,6 +52,7 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
|
|
|
48
52
|
this.previousEmptyWindowStorageRoot = isEmptyWindow ?
|
|
49
53
|
joinPath(this.environmentService.workspaceStorageHome, 'no-workspace', 'chatSessions') :
|
|
50
54
|
undefined;
|
|
55
|
+
this.transferredSessionStorageRoot = joinPath(this.userDataProfilesService.defaultProfile.globalStorageHome, 'transferredChatSessions');
|
|
51
56
|
this._register(this.lifecycleService.onWillShutdown(e => {
|
|
52
57
|
this.shuttingDown = true;
|
|
53
58
|
if (!this.storeTask) {
|
|
@@ -55,7 +60,7 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
|
|
|
55
60
|
}
|
|
56
61
|
e.join(this.storeTask, {
|
|
57
62
|
id: 'join.chatSessionStore',
|
|
58
|
-
label: ( localize(
|
|
63
|
+
label: ( localize(5966, "Saving chat history"))
|
|
59
64
|
});
|
|
60
65
|
}));
|
|
61
66
|
}
|
|
@@ -100,6 +105,111 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
|
|
|
100
105
|
this.storeTask = undefined;
|
|
101
106
|
}
|
|
102
107
|
}
|
|
108
|
+
async storeTransferSession(transferData, session) {
|
|
109
|
+
const index = this.getTransferredSessionIndex();
|
|
110
|
+
const workspaceKey = ( transferData.toWorkspace.toString());
|
|
111
|
+
const existingTransfer = index[workspaceKey];
|
|
112
|
+
if (existingTransfer) {
|
|
113
|
+
try {
|
|
114
|
+
const existingSessionResource = URI.revive(existingTransfer.sessionResource);
|
|
115
|
+
if (existingSessionResource && LocalChatSessionUri.parseLocalSessionId(existingSessionResource)) {
|
|
116
|
+
const existingStorageLocation = this.getTransferredSessionStorageLocation(existingSessionResource);
|
|
117
|
+
await this.fileService.del(existingStorageLocation);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
catch (e) {
|
|
121
|
+
if (toFileOperationResult(e) !== FileOperationResult.FILE_NOT_FOUND) {
|
|
122
|
+
this.reportError('storeTransferSession', 'Error deleting old transferred session file', e);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
try {
|
|
127
|
+
const content = JSON.stringify(session, undefined, 2);
|
|
128
|
+
const storageLocation = this.getTransferredSessionStorageLocation(session.sessionResource);
|
|
129
|
+
await this.fileService.writeFile(storageLocation, VSBuffer.fromString(content));
|
|
130
|
+
}
|
|
131
|
+
catch (e) {
|
|
132
|
+
this.reportError('sessionWrite', 'Error writing chat session', e);
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
index[workspaceKey] = transferData;
|
|
136
|
+
try {
|
|
137
|
+
this.storageService.store(ChatTransferIndexStorageKey, index, StorageScope.PROFILE, StorageTarget.MACHINE);
|
|
138
|
+
}
|
|
139
|
+
catch (e) {
|
|
140
|
+
this.reportError('storeTransferSession', 'Error storing chat transfer session', e);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
getTransferredSessionIndex() {
|
|
144
|
+
try {
|
|
145
|
+
const data = this.storageService.getObject(ChatTransferIndexStorageKey, StorageScope.PROFILE, {});
|
|
146
|
+
return data;
|
|
147
|
+
}
|
|
148
|
+
catch (e) {
|
|
149
|
+
this.reportError('getTransferredSessionIndex', 'Error reading chat transfer index', e);
|
|
150
|
+
return {};
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
static { this.TRANSFER_EXPIRATION_MS = 60 * 1000 * 5; }
|
|
154
|
+
getTransferredSessionData() {
|
|
155
|
+
try {
|
|
156
|
+
const index = this.getTransferredSessionIndex();
|
|
157
|
+
const workspaceFolders = this.workspaceContextService.getWorkspace().folders;
|
|
158
|
+
if (workspaceFolders.length !== 1) {
|
|
159
|
+
return undefined;
|
|
160
|
+
}
|
|
161
|
+
const workspaceKey = ( workspaceFolders[0].uri.toString());
|
|
162
|
+
const transferredSessionForWorkspace = index[workspaceKey];
|
|
163
|
+
if (!transferredSessionForWorkspace) {
|
|
164
|
+
return undefined;
|
|
165
|
+
}
|
|
166
|
+
const revivedTransferData = revive(transferredSessionForWorkspace);
|
|
167
|
+
if (Date.now() - transferredSessionForWorkspace.timestampInMilliseconds > ChatSessionStore_1.TRANSFER_EXPIRATION_MS) {
|
|
168
|
+
this.logService.info('ChatSessionStore: Transferred session has expired');
|
|
169
|
+
this.cleanupTransferredSession(revivedTransferData.sessionResource);
|
|
170
|
+
return undefined;
|
|
171
|
+
}
|
|
172
|
+
return !!LocalChatSessionUri.parseLocalSessionId(revivedTransferData.sessionResource) && revivedTransferData.sessionResource;
|
|
173
|
+
}
|
|
174
|
+
catch (e) {
|
|
175
|
+
this.reportError('getTransferredSession', 'Error getting transferred chat session URI', e);
|
|
176
|
+
return undefined;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
async readTransferredSession(sessionResource) {
|
|
180
|
+
try {
|
|
181
|
+
const storageLocation = this.getTransferredSessionStorageLocation(sessionResource);
|
|
182
|
+
const sessionId = LocalChatSessionUri.parseLocalSessionId(sessionResource);
|
|
183
|
+
if (!sessionId) {
|
|
184
|
+
return undefined;
|
|
185
|
+
}
|
|
186
|
+
const sessionData = await this.readSessionFromLocation(storageLocation, sessionId);
|
|
187
|
+
await this.cleanupTransferredSession(sessionResource);
|
|
188
|
+
return sessionData;
|
|
189
|
+
}
|
|
190
|
+
catch (e) {
|
|
191
|
+
this.reportError('getTransferredSession', 'Error getting transferred chat session', e);
|
|
192
|
+
return undefined;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
async cleanupTransferredSession(sessionResource) {
|
|
196
|
+
try {
|
|
197
|
+
const index = this.getTransferredSessionIndex();
|
|
198
|
+
const workspaceFolders = this.workspaceContextService.getWorkspace().folders;
|
|
199
|
+
if (workspaceFolders.length === 1) {
|
|
200
|
+
const workspaceKey = ( workspaceFolders[0].uri.toString());
|
|
201
|
+
delete index[workspaceKey];
|
|
202
|
+
this.storageService.store(ChatTransferIndexStorageKey, index, StorageScope.PROFILE, StorageTarget.MACHINE);
|
|
203
|
+
}
|
|
204
|
+
const storageLocation = this.getTransferredSessionStorageLocation(sessionResource);
|
|
205
|
+
await this.fileService.del(storageLocation);
|
|
206
|
+
}
|
|
207
|
+
catch (e) {
|
|
208
|
+
if (toFileOperationResult(e) !== FileOperationResult.FILE_NOT_FOUND) {
|
|
209
|
+
this.reportError('cleanupTransferredSession', 'Error cleaning up transferred session', e);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
103
213
|
async writeSession(session) {
|
|
104
214
|
try {
|
|
105
215
|
const index = this.internalGetIndex();
|
|
@@ -240,6 +350,14 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
|
|
|
240
350
|
return this.internalGetIndex().entries;
|
|
241
351
|
});
|
|
242
352
|
}
|
|
353
|
+
getMetadataForSessionSync(sessionResource) {
|
|
354
|
+
const index = this.internalGetIndex();
|
|
355
|
+
return index.entries[this.getIndexKey(sessionResource)];
|
|
356
|
+
}
|
|
357
|
+
getIndexKey(sessionResource) {
|
|
358
|
+
const sessionId = LocalChatSessionUri.parseLocalSessionId(sessionResource);
|
|
359
|
+
return sessionId ?? ( sessionResource.toString());
|
|
360
|
+
}
|
|
243
361
|
logIndex() {
|
|
244
362
|
const data = this.storageService.get(ChatIndexStorageKey, this.getIndexStorageScope(), undefined);
|
|
245
363
|
this.logService.info('ChatSessionStore index: ', data);
|
|
@@ -266,42 +384,45 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
|
|
|
266
384
|
}
|
|
267
385
|
async readSession(sessionId) {
|
|
268
386
|
return await this.storeQueue.queue(async () => {
|
|
269
|
-
let rawData;
|
|
270
387
|
const storageLocation = this.getStorageLocation(sessionId);
|
|
271
|
-
|
|
272
|
-
|
|
388
|
+
return this.readSessionFromLocation(storageLocation, sessionId);
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
async readSessionFromLocation(storageLocation, sessionId) {
|
|
392
|
+
let rawData;
|
|
393
|
+
try {
|
|
394
|
+
rawData = ( (await this.fileService.readFile(storageLocation)).value.toString());
|
|
395
|
+
}
|
|
396
|
+
catch (e) {
|
|
397
|
+
this.reportError('sessionReadFile', `Error reading chat session file ${sessionId}`, e);
|
|
398
|
+
if (toFileOperationResult(e) === FileOperationResult.FILE_NOT_FOUND && this.previousEmptyWindowStorageRoot) {
|
|
399
|
+
rawData = await this.readSessionFromPreviousLocation(sessionId);
|
|
273
400
|
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
if (toFileOperationResult(e) === FileOperationResult.FILE_NOT_FOUND && this.previousEmptyWindowStorageRoot) {
|
|
277
|
-
rawData = await this.readSessionFromPreviousLocation(sessionId);
|
|
278
|
-
}
|
|
279
|
-
if (!rawData) {
|
|
280
|
-
return undefined;
|
|
281
|
-
}
|
|
401
|
+
if (!rawData) {
|
|
402
|
+
return undefined;
|
|
282
403
|
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
404
|
+
}
|
|
405
|
+
try {
|
|
406
|
+
const session = revive(JSON.parse(rawData));
|
|
407
|
+
for (const request of session.requests) {
|
|
408
|
+
if (Array.isArray(request.response)) {
|
|
409
|
+
request.response = ( request.response.map((response) => {
|
|
410
|
+
if (typeof response === 'string') {
|
|
411
|
+
return ( new MarkdownString(response));
|
|
412
|
+
}
|
|
413
|
+
return response;
|
|
414
|
+
}));
|
|
415
|
+
}
|
|
416
|
+
else if (typeof request.response === 'string') {
|
|
417
|
+
request.response = [( new MarkdownString(request.response))];
|
|
297
418
|
}
|
|
298
|
-
return normalizeSerializableChatData(session);
|
|
299
|
-
}
|
|
300
|
-
catch (err) {
|
|
301
|
-
this.reportError('malformedSession', `Malformed session data in ${storageLocation.fsPath}: [${rawData.substring(0, 20)}${rawData.length > 20 ? '...' : ''}]`, err);
|
|
302
|
-
return undefined;
|
|
303
419
|
}
|
|
304
|
-
|
|
420
|
+
return normalizeSerializableChatData(session);
|
|
421
|
+
}
|
|
422
|
+
catch (err) {
|
|
423
|
+
this.reportError('malformedSession', `Malformed session data in ${storageLocation.fsPath}: [${rawData.substring(0, 20)}${rawData.length > 20 ? '...' : ''}]`, err);
|
|
424
|
+
return undefined;
|
|
425
|
+
}
|
|
305
426
|
}
|
|
306
427
|
async readSessionFromPreviousLocation(sessionId) {
|
|
307
428
|
let rawData;
|
|
@@ -321,11 +442,15 @@ let ChatSessionStore = class ChatSessionStore extends Disposable {
|
|
|
321
442
|
getStorageLocation(chatSessionId) {
|
|
322
443
|
return joinPath(this.storageRoot, `${chatSessionId}.json`);
|
|
323
444
|
}
|
|
445
|
+
getTransferredSessionStorageLocation(sessionResource) {
|
|
446
|
+
const sessionId = LocalChatSessionUri.parseLocalSessionId(sessionResource);
|
|
447
|
+
return joinPath(this.transferredSessionStorageRoot, `${sessionId}.json`);
|
|
448
|
+
}
|
|
324
449
|
getChatStorageFolder() {
|
|
325
450
|
return this.storageRoot;
|
|
326
451
|
}
|
|
327
452
|
};
|
|
328
|
-
ChatSessionStore = ( __decorate([
|
|
453
|
+
ChatSessionStore = ChatSessionStore_1 = ( __decorate([
|
|
329
454
|
( __param(0, IFileService)),
|
|
330
455
|
( __param(1, IEnvironmentService)),
|
|
331
456
|
( __param(2, ILogService)),
|
|
@@ -374,7 +499,7 @@ async function getSessionMetadata(session) {
|
|
|
374
499
|
};
|
|
375
500
|
return {
|
|
376
501
|
sessionId: session.sessionId,
|
|
377
|
-
title: title || ( localize(
|
|
502
|
+
title: title || ( localize(5967, "New Chat")),
|
|
378
503
|
lastMessageDate: session.lastMessageDate,
|
|
379
504
|
timing,
|
|
380
505
|
initialLocation: session.initialLocation,
|
|
@@ -3,7 +3,7 @@ import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform
|
|
|
3
3
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
4
4
|
import { IWorkspaceTrustManagementService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspaceTrust.service";
|
|
5
5
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
6
|
-
import { IChatTransferService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatTransferService.service";
|
|
6
|
+
import { IChatTransferService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatTransferService.service";
|
|
7
7
|
export declare class ChatTransferService implements IChatTransferService {
|
|
8
8
|
private readonly workspaceService;
|
|
9
9
|
private readonly storageService;
|
|
@@ -11,8 +11,8 @@ export declare class ChatTransferService implements IChatTransferService {
|
|
|
11
11
|
private readonly workspaceTrustManagementService;
|
|
12
12
|
_serviceBrand: undefined;
|
|
13
13
|
constructor(workspaceService: IWorkspaceContextService, storageService: IStorageService, fileService: IFileService, workspaceTrustManagementService: IWorkspaceTrustManagementService);
|
|
14
|
-
deleteWorkspaceFromTransferredList
|
|
14
|
+
private deleteWorkspaceFromTransferredList;
|
|
15
15
|
addWorkspaceToTransferred(workspace: URI): void;
|
|
16
16
|
checkAndSetTransferredWorkspaceTrust(): Promise<void>;
|
|
17
|
-
isChatTransferredWorkspace
|
|
17
|
+
private isChatTransferredWorkspace;
|
|
18
18
|
}
|
|
@@ -5,7 +5,7 @@ import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode
|
|
|
5
5
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
6
6
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
7
7
|
import { IWorkspaceTrustManagementService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspaceTrust.service';
|
|
8
|
-
import { areWorkspaceFoldersEmpty } from '
|
|
8
|
+
import { areWorkspaceFoldersEmpty } from '../../../../services/workspaces/common/workspaceUtils.js';
|
|
9
9
|
|
|
10
10
|
const transferredWorkspacesKey = 'chat.transferedWorkspaces';
|
|
11
11
|
let ChatTransferService = class ChatTransferService {
|
|
@@ -3,11 +3,11 @@ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event"
|
|
|
3
3
|
import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
4
4
|
import { IProgress } from "@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress";
|
|
5
5
|
import { IChatMessage } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels";
|
|
6
|
-
import { IChatFollowup, IChatProgress, IChatResponseProgressFileTreeData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
6
|
+
import { IChatFollowup, IChatProgress, IChatResponseProgressFileTreeData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
7
7
|
import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
8
8
|
import { ChatAgentLocation, ChatModeKind } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants";
|
|
9
9
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
10
|
-
import { IChatSlashCommandService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSlashCommands.service";
|
|
10
|
+
import { IChatSlashCommandService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatSlashCommands.service";
|
|
11
11
|
export interface IChatSlashData {
|
|
12
12
|
command: string;
|
|
13
13
|
detail: string;
|
package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js
CHANGED
|
@@ -11,34 +11,30 @@ function registerChatFilesExtensionPoint(point) {
|
|
|
11
11
|
return ExtensionsRegistry.registerExtensionPoint({
|
|
12
12
|
extensionPoint: point,
|
|
13
13
|
jsonSchema: {
|
|
14
|
-
description: ( localize(
|
|
14
|
+
description: ( localize(5968, 'Contributes {0} for chat prompts.', point)),
|
|
15
15
|
type: 'array',
|
|
16
16
|
items: {
|
|
17
17
|
additionalProperties: false,
|
|
18
18
|
type: 'object',
|
|
19
19
|
defaultSnippets: [{
|
|
20
20
|
body: {
|
|
21
|
-
name: 'exampleName',
|
|
22
21
|
path: './relative/path/to/file.md',
|
|
23
|
-
description: 'Optional description'
|
|
24
22
|
}
|
|
25
23
|
}],
|
|
26
|
-
required: ['
|
|
24
|
+
required: ['path'],
|
|
27
25
|
properties: {
|
|
28
|
-
name: {
|
|
29
|
-
description: ( localize(
|
|
30
|
-
5967,
|
|
31
|
-
'Identifier for this file. Must be unique within this extension for this contribution point.'
|
|
32
|
-
)),
|
|
33
|
-
type: 'string',
|
|
34
|
-
pattern: '^[\\w.-]+$'
|
|
35
|
-
},
|
|
36
26
|
path: {
|
|
37
|
-
description: ( localize(
|
|
27
|
+
description: ( localize(5969, 'Path to the file relative to the extension root.')),
|
|
28
|
+
type: 'string'
|
|
29
|
+
},
|
|
30
|
+
name: {
|
|
31
|
+
description: ( localize(5970, '(Optional) Name for this entry.')),
|
|
32
|
+
deprecationMessage: ( localize(5971, 'Specify "name" in the prompt file itself instead.')),
|
|
38
33
|
type: 'string'
|
|
39
34
|
},
|
|
40
35
|
description: {
|
|
41
|
-
description: ( localize(
|
|
36
|
+
description: ( localize(5972, '(Optional) Description of the entry.')),
|
|
37
|
+
deprecationMessage: ( localize(5973, 'Specify "description" in the prompt file itself instead.')),
|
|
42
38
|
type: 'string'
|
|
43
39
|
}
|
|
44
40
|
}
|
|
@@ -56,8 +52,8 @@ function pointToType(contributionPoint) {
|
|
|
56
52
|
case 'chatAgents': return PromptsType.agent;
|
|
57
53
|
}
|
|
58
54
|
}
|
|
59
|
-
function key(extensionId, type,
|
|
60
|
-
return `${extensionId.value}/${type}/${
|
|
55
|
+
function key(extensionId, type, path) {
|
|
56
|
+
return `${extensionId.value}/${type}/${path}`;
|
|
61
57
|
}
|
|
62
58
|
let ChatPromptFilesExtensionPointHandler = class ChatPromptFilesExtensionPointHandler {
|
|
63
59
|
static { this.ID = 'workbench.contrib.chatPromptFilesExtensionPointHandler'; }
|
|
@@ -73,58 +69,38 @@ let ChatPromptFilesExtensionPointHandler = class ChatPromptFilesExtensionPointHa
|
|
|
73
69
|
for (const ext of delta.added) {
|
|
74
70
|
const type = pointToType(contributionPoint);
|
|
75
71
|
for (const raw of ext.value) {
|
|
76
|
-
if (!raw.name || !raw.name.match(/^[\w.-]+$/)) {
|
|
77
|
-
ext.collector.error(( localize(
|
|
78
|
-
5970,
|
|
79
|
-
"Extension '{0}' cannot register {1} entry with invalid name '{2}'.",
|
|
80
|
-
ext.description.identifier.value,
|
|
81
|
-
contributionPoint,
|
|
82
|
-
raw.name
|
|
83
|
-
)));
|
|
84
|
-
continue;
|
|
85
|
-
}
|
|
86
72
|
if (!raw.path) {
|
|
87
73
|
ext.collector.error(( localize(
|
|
88
|
-
|
|
89
|
-
"Extension '{0}' cannot register {1} entry
|
|
90
|
-
ext.description.identifier.value,
|
|
91
|
-
contributionPoint,
|
|
92
|
-
raw.name
|
|
93
|
-
)));
|
|
94
|
-
continue;
|
|
95
|
-
}
|
|
96
|
-
if (!raw.description) {
|
|
97
|
-
ext.collector.error(( localize(
|
|
98
|
-
5972,
|
|
99
|
-
"Extension '{0}' cannot register {1} entry '{2}' without description.",
|
|
74
|
+
5974,
|
|
75
|
+
"Extension '{0}' cannot register {1} entry without path.",
|
|
100
76
|
ext.description.identifier.value,
|
|
101
|
-
contributionPoint
|
|
102
|
-
raw.name
|
|
77
|
+
contributionPoint
|
|
103
78
|
)));
|
|
104
79
|
continue;
|
|
105
80
|
}
|
|
106
81
|
const fileUri = joinPath(ext.description.extensionLocation, raw.path);
|
|
107
82
|
if (!isEqualOrParent(fileUri, ext.description.extensionLocation)) {
|
|
108
83
|
ext.collector.error(( localize(
|
|
109
|
-
|
|
110
|
-
"Extension '{0}' {1} entry '{2}'
|
|
84
|
+
5975,
|
|
85
|
+
"Extension '{0}' {1} entry '{2}' resolves outside the extension.",
|
|
111
86
|
ext.description.identifier.value,
|
|
112
87
|
contributionPoint,
|
|
113
|
-
raw.
|
|
88
|
+
raw.path
|
|
114
89
|
)));
|
|
115
90
|
continue;
|
|
116
91
|
}
|
|
117
92
|
try {
|
|
118
|
-
const d = this.promptsService.registerContributedFile(type,
|
|
119
|
-
this.registrations.set(key(ext.description.identifier, type, raw.
|
|
93
|
+
const d = this.promptsService.registerContributedFile(type, fileUri, ext.description, raw.name, raw.description);
|
|
94
|
+
this.registrations.set(key(ext.description.identifier, type, raw.path), d);
|
|
120
95
|
}
|
|
121
96
|
catch (e) {
|
|
122
97
|
const msg = e instanceof Error ? e.message : String(e);
|
|
123
98
|
ext.collector.error(( localize(
|
|
124
|
-
|
|
125
|
-
"
|
|
99
|
+
5976,
|
|
100
|
+
"Extension '{0}' {1}. Failed to register {2}: {3}",
|
|
101
|
+
ext.description.identifier.value,
|
|
126
102
|
contributionPoint,
|
|
127
|
-
raw.
|
|
103
|
+
raw.path,
|
|
128
104
|
msg
|
|
129
105
|
)));
|
|
130
106
|
}
|
|
@@ -133,7 +109,7 @@ let ChatPromptFilesExtensionPointHandler = class ChatPromptFilesExtensionPointHa
|
|
|
133
109
|
for (const ext of delta.removed) {
|
|
134
110
|
const type = pointToType(contributionPoint);
|
|
135
111
|
for (const raw of ext.value) {
|
|
136
|
-
this.registrations.deleteAndDispose(key(ext.description.identifier, type, raw.
|
|
112
|
+
this.registrations.deleteAndDispose(key(ext.description.identifier, type, raw.path));
|
|
137
113
|
}
|
|
138
114
|
}
|
|
139
115
|
});
|
|
@@ -3,7 +3,7 @@ import { Position } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/c
|
|
|
3
3
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
4
4
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
5
5
|
import { CompletionContext, CompletionItemProvider, CompletionList } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages";
|
|
6
|
-
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service";
|
|
6
|
+
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service";
|
|
7
7
|
/**
|
|
8
8
|
* Provides autocompletion for the variables inside prompt bodies.
|
|
9
9
|
* - #file: paths to files and folders in the workspace
|
|
@@ -7,8 +7,8 @@ import { CompletionItemKind } from '@codingame/monaco-vscode-api/vscode/vs/edito
|
|
|
7
7
|
import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
|
|
8
8
|
import { CharCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/charCode';
|
|
9
9
|
import { getWordAtText } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/wordHelper';
|
|
10
|
-
import { chatVariableLeader } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
|
|
11
|
-
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service';
|
|
10
|
+
import { chatVariableLeader } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes';
|
|
11
|
+
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
|
|
12
12
|
|
|
13
13
|
let PromptBodyAutocompletion = class PromptBodyAutocompletion {
|
|
14
14
|
constructor(fileService, languageModelToolsService) {
|
|
@@ -2,7 +2,7 @@ import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/c
|
|
|
2
2
|
import { Range } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
|
|
3
3
|
import { CodeActionContext, CodeActionList, CodeActionProvider } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages";
|
|
4
4
|
import { ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
|
|
5
|
-
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service";
|
|
5
|
+
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service";
|
|
6
6
|
import { IPromptsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service";
|
|
7
7
|
import { Selection } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/selection";
|
|
8
8
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|