@codingame/monaco-vscode-chat-service-override 28.4.1 → 29.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 +18 -12
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +300 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.js +31 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.service.d.ts +84 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/action-origin.generated.d.ts +16 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.d.ts +488 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +424 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +50 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/messages.d.ts +202 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/notifications.d.ts +114 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/state.d.ts +723 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +33 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +40 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionState.d.ts +22 -0
- package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +29 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +59 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +76 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +162 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +167 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +52 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +82 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +195 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +97 -88
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +78 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +174 -170
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +7 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +118 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +13 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +5 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +9 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +23 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +341 -196
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +79 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.d.ts +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +22 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +15 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +85 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +668 -214
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.js +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +306 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +84 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +651 -81
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +31 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +9 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +7 -142
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.js +63 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +25 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +297 -123
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +153 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +111 -171
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +5 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +277 -186
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +31 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.d.ts +3 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.js +4 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +18 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +112 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +16 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +41 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +35 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +1 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +8 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +13 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +29 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +14 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +79 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +125 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +11 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +113 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +18 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +54 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +8 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +103 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +48 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +28 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +62 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +21 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +17 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +43 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.d.ts +59 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +194 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +9 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +8 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +81 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +22 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +29 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +19 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +105 -172
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +80 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +56 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +70 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +53 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +33 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +21 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +362 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +90 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +146 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +10 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +33 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +200 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +90 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +21 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +22 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +28 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +20 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +68 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +57 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +21 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +171 -57
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +7 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +206 -35
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +11 -3
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +44 -22
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +450 -301
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +165 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +34 -20
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +209 -144
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +205 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.js +47 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalSkill.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
- 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 +191 -159
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +6 -7
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +210 -233
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +19 -26
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +183 -193
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.js +75 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +8 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +97 -35
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.js +67 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +62 -23
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +23 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +50 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +21 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +20 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +124 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +20 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +10 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +46 -31
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.d.ts +18 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +74 -37
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +24 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +5 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +66 -64
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +5 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +32 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +390 -114
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +21 -11
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +70 -51
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +61 -51
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +94 -76
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +19 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +112 -21
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.d.ts +0 -53
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.js +0 -219
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +0 -89
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +0 -251
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +0 -123
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +0 -278
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +0 -76
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +0 -299
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.d.ts +0 -67
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.js +0 -263
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +0 -85
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +0 -397
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +0 -56
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +0 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.js +0 -30
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +0 -28
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +0 -190
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +0 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +0 -16
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +0 -20
|
@@ -1,397 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { Disposable, DisposableStore, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
-
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
5
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
6
|
-
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
7
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
8
|
-
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
9
|
-
import { RawContextKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
10
|
-
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
11
|
-
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
12
|
-
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
13
|
-
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
14
|
-
import { openSession } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener';
|
|
15
|
-
import { ChatViewPaneTarget } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
16
|
-
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
17
|
-
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
18
|
-
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
19
|
-
import { ChatAgentLocation, ChatModeKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
20
|
-
import { isAgentSession } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel';
|
|
21
|
-
import { IAgentSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service';
|
|
22
|
-
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
23
|
-
import { AgentSessionProviders } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
|
|
24
|
-
import { LocalNewSession, RemoteNewSession } from '../../chat/browser/newSession.js';
|
|
25
|
-
import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
26
|
-
import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
|
|
27
|
-
import { GITHUB_REMOTE_FILE_SCHEME } from '../../fileTreeView/browser/githubFileSystemProvider.js';
|
|
28
|
-
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
29
|
-
|
|
30
|
-
const IsNewChatSessionContext = ( new RawContextKey("isNewChatSession", true));
|
|
31
|
-
const IsActiveSessionBackgroundProviderContext = ( new RawContextKey("isActiveSessionBackgroundProvider", false, ( localize(2519, "Whether the active session uses the background agent provider"))));
|
|
32
|
-
const LAST_SELECTED_SESSION_KEY = "agentSessions.lastSelectedSession";
|
|
33
|
-
const repositoryOptionId = "repository";
|
|
34
|
-
let SessionsManagementService = class SessionsManagementService extends Disposable {
|
|
35
|
-
constructor(
|
|
36
|
-
storageService,
|
|
37
|
-
uriIdentityService,
|
|
38
|
-
agentSessionsService,
|
|
39
|
-
chatSessionsService,
|
|
40
|
-
chatWidgetService,
|
|
41
|
-
chatService,
|
|
42
|
-
instantiationService,
|
|
43
|
-
logService,
|
|
44
|
-
contextKeyService,
|
|
45
|
-
commandService,
|
|
46
|
-
languageModelsService
|
|
47
|
-
) {
|
|
48
|
-
super();
|
|
49
|
-
this.storageService = storageService;
|
|
50
|
-
this.uriIdentityService = uriIdentityService;
|
|
51
|
-
this.agentSessionsService = agentSessionsService;
|
|
52
|
-
this.chatSessionsService = chatSessionsService;
|
|
53
|
-
this.chatWidgetService = chatWidgetService;
|
|
54
|
-
this.chatService = chatService;
|
|
55
|
-
this.instantiationService = instantiationService;
|
|
56
|
-
this.logService = logService;
|
|
57
|
-
this.commandService = commandService;
|
|
58
|
-
this.languageModelsService = languageModelsService;
|
|
59
|
-
this._activeSession = observableValue(this, undefined);
|
|
60
|
-
this.activeSession = this._activeSession;
|
|
61
|
-
this._newActiveSessionDisposables = this._register(( new DisposableStore()));
|
|
62
|
-
this._newSession = this._register(( new MutableDisposable()));
|
|
63
|
-
this.isNewChatSessionContext = IsNewChatSessionContext.bindTo(contextKeyService);
|
|
64
|
-
this._isBackgroundProvider = IsActiveSessionBackgroundProviderContext.bindTo(contextKeyService);
|
|
65
|
-
this.lastSelectedSession = this.loadLastSelectedSession();
|
|
66
|
-
this._register(this.storageService.onWillSaveState(() => this.saveLastSelectedSession()));
|
|
67
|
-
this._register(
|
|
68
|
-
this.agentSessionsService.model.onDidChangeSessions(() => this.refreshActiveSessionFromModel())
|
|
69
|
-
);
|
|
70
|
-
this._register(this.agentSessionsService.model.onDidChangeSessionArchivedState(e => {
|
|
71
|
-
if (e.isArchived()) {
|
|
72
|
-
const currentActive = this._activeSession.get();
|
|
73
|
-
if (currentActive && ( currentActive.resource.toString()) === ( e.resource.toString())) {
|
|
74
|
-
this.openNewSessionView();
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}));
|
|
78
|
-
}
|
|
79
|
-
refreshActiveSessionFromModel() {
|
|
80
|
-
const currentActive = this._activeSession.get();
|
|
81
|
-
if (!currentActive) {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
const agentSession = this.agentSessionsService.model.getSession(currentActive.resource);
|
|
85
|
-
if (!agentSession) {
|
|
86
|
-
if (currentActive.isUntitled) {
|
|
87
|
-
const chatViewWidgets = this.chatWidgetService.getWidgetsByLocations(ChatAgentLocation.Chat);
|
|
88
|
-
const committedResource = chatViewWidgets[0]?.viewModel?.sessionResource;
|
|
89
|
-
const committedSession = committedResource ? this.agentSessionsService.model.getSession(committedResource) : undefined;
|
|
90
|
-
if (committedSession) {
|
|
91
|
-
this.setActiveSession(committedSession);
|
|
92
|
-
}
|
|
93
|
-
} else {
|
|
94
|
-
this.showNextSession();
|
|
95
|
-
}
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
this.setActiveSession(agentSession);
|
|
99
|
-
}
|
|
100
|
-
showNextSession() {
|
|
101
|
-
const sessions = this.agentSessionsService.model.sessions.filter(s => !s.isArchived()).sort(
|
|
102
|
-
(a, b) => (b.timing.lastRequestEnded ?? b.timing.created) - (a.timing.lastRequestEnded ?? a.timing.created)
|
|
103
|
-
);
|
|
104
|
-
if (sessions.length > 0) {
|
|
105
|
-
this.setActiveSession(sessions[0]);
|
|
106
|
-
this.instantiationService.invokeFunction(openSession, sessions[0]);
|
|
107
|
-
} else {
|
|
108
|
-
this.openNewSessionView();
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
getRepositoryFromMetadata(session) {
|
|
112
|
-
const metadata = session.metadata;
|
|
113
|
-
if (!metadata) {
|
|
114
|
-
return [undefined, undefined];
|
|
115
|
-
}
|
|
116
|
-
if (session.providerType === AgentSessionProviders.Cloud) {
|
|
117
|
-
const branch = typeof metadata.branch === "string" ? metadata.branch : "HEAD";
|
|
118
|
-
const repositoryUri = ( URI.from({
|
|
119
|
-
scheme: GITHUB_REMOTE_FILE_SCHEME,
|
|
120
|
-
authority: "github",
|
|
121
|
-
path: `/${metadata.owner}/${metadata.name}/${encodeURIComponent(branch)}`
|
|
122
|
-
}));
|
|
123
|
-
return [repositoryUri, undefined];
|
|
124
|
-
}
|
|
125
|
-
const workingDirectoryPath = metadata?.workingDirectoryPath;
|
|
126
|
-
if (workingDirectoryPath) {
|
|
127
|
-
return [URI.file(workingDirectoryPath), undefined];
|
|
128
|
-
}
|
|
129
|
-
const repositoryPath = metadata?.repositoryPath;
|
|
130
|
-
const repositoryPathUri = typeof repositoryPath === "string" ? URI.file(repositoryPath) : undefined;
|
|
131
|
-
const worktreePath = metadata?.worktreePath;
|
|
132
|
-
const worktreePathUri = typeof worktreePath === "string" ? URI.file(worktreePath) : undefined;
|
|
133
|
-
return [
|
|
134
|
-
URI.isUri(repositoryPathUri) ? repositoryPathUri : undefined,
|
|
135
|
-
URI.isUri(worktreePathUri) ? worktreePathUri : undefined
|
|
136
|
-
];
|
|
137
|
-
}
|
|
138
|
-
getRepositoryFromSessionOption(sessionResource) {
|
|
139
|
-
const optionValue = this.chatSessionsService.getSessionOption(sessionResource, repositoryOptionId);
|
|
140
|
-
if (!optionValue) {
|
|
141
|
-
return undefined;
|
|
142
|
-
}
|
|
143
|
-
const optionId = typeof optionValue === "string" ? optionValue : optionValue.id;
|
|
144
|
-
if (!optionId) {
|
|
145
|
-
return undefined;
|
|
146
|
-
}
|
|
147
|
-
try {
|
|
148
|
-
return ( URI.parse(optionId));
|
|
149
|
-
} catch {
|
|
150
|
-
return undefined;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
getActiveSession() {
|
|
154
|
-
return this._activeSession.get();
|
|
155
|
-
}
|
|
156
|
-
async openSession(sessionResource, openOptions) {
|
|
157
|
-
this.isNewChatSessionContext.set(false);
|
|
158
|
-
const existingSession = this.agentSessionsService.model.getSession(sessionResource);
|
|
159
|
-
if (existingSession) {
|
|
160
|
-
await this.openExistingSession(existingSession, openOptions);
|
|
161
|
-
} else if (this._newSession.value && this.uriIdentityService.extUri.isEqual(sessionResource, this._newSession.value.resource)) {
|
|
162
|
-
await this.openNewSession(this._newSession.value);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
async createNewSessionForTarget(target, sessionResource, defaultRepoUri) {
|
|
166
|
-
if (!this.isNewChatSessionContext.get()) {
|
|
167
|
-
this.isNewChatSessionContext.set(true);
|
|
168
|
-
}
|
|
169
|
-
let newSession;
|
|
170
|
-
if (target === AgentSessionProviders.Background) {
|
|
171
|
-
newSession = this.instantiationService.createInstance(LocalNewSession, sessionResource, defaultRepoUri);
|
|
172
|
-
} else {
|
|
173
|
-
newSession = this.instantiationService.createInstance(RemoteNewSession, sessionResource, target);
|
|
174
|
-
}
|
|
175
|
-
this._newSession.value = newSession;
|
|
176
|
-
this.setActiveSession(newSession);
|
|
177
|
-
return newSession;
|
|
178
|
-
}
|
|
179
|
-
async openExistingSession(session, openOptions) {
|
|
180
|
-
this.setActiveSession(session);
|
|
181
|
-
await this.instantiationService.invokeFunction(openSession, session, openOptions);
|
|
182
|
-
}
|
|
183
|
-
async openNewSession(newSession) {
|
|
184
|
-
this.setActiveSession(newSession);
|
|
185
|
-
const sessionResource = newSession.resource;
|
|
186
|
-
const chatWidget = await this.chatWidgetService.openSession(sessionResource, ChatViewPaneTarget);
|
|
187
|
-
if (!chatWidget?.viewModel) {
|
|
188
|
-
this.logService.warn(`[ActiveSessionService] Failed to open session: ${( sessionResource.toString())}`);
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
const repository = this.getRepositoryFromSessionOption(sessionResource);
|
|
192
|
-
this.logService.info(`[ActiveSessionService] Active session changed (new): ${( sessionResource.toString())}, repository: ${repository?.toString() ?? "none"}`);
|
|
193
|
-
}
|
|
194
|
-
async sendRequestForNewSession(sessionResource, options) {
|
|
195
|
-
const session = this._newSession.value;
|
|
196
|
-
if (!session) {
|
|
197
|
-
this.logService.error(
|
|
198
|
-
`[SessionsManagementService] No new session found for resource: ${( sessionResource.toString())}`
|
|
199
|
-
);
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
if (!this.uriIdentityService.extUri.isEqual(sessionResource, session.resource)) {
|
|
203
|
-
this.logService.error(
|
|
204
|
-
`[SessionsManagementService] Session resource mismatch. Expected: ${( session.resource.toString())}, received: ${( sessionResource.toString())}`
|
|
205
|
-
);
|
|
206
|
-
return;
|
|
207
|
-
}
|
|
208
|
-
const query = session.query;
|
|
209
|
-
if (!query) {
|
|
210
|
-
this.logService.error("[SessionsManagementService] No query set on session");
|
|
211
|
-
return;
|
|
212
|
-
}
|
|
213
|
-
const contribution = this.chatSessionsService.getChatSessionContribution(session.target);
|
|
214
|
-
const sendOptions = {
|
|
215
|
-
location: ChatAgentLocation.Chat,
|
|
216
|
-
userSelectedModelId: session.modelId,
|
|
217
|
-
modeInfo: {
|
|
218
|
-
kind: ChatModeKind.Agent,
|
|
219
|
-
isBuiltin: true,
|
|
220
|
-
modeInstructions: undefined,
|
|
221
|
-
modeId: "agent",
|
|
222
|
-
applyCodeBlockSuggestionId: undefined
|
|
223
|
-
},
|
|
224
|
-
agentIdSilent: contribution?.type,
|
|
225
|
-
attachedContext: session.attachedContext
|
|
226
|
-
};
|
|
227
|
-
await this.chatSessionsService.getOrCreateChatSession(session.resource, CancellationToken.None);
|
|
228
|
-
await this.doSendRequestForNewSession(
|
|
229
|
-
session,
|
|
230
|
-
query,
|
|
231
|
-
sendOptions,
|
|
232
|
-
session.selectedOptions,
|
|
233
|
-
options?.openNewSessionView
|
|
234
|
-
);
|
|
235
|
-
this._newSession.value = undefined;
|
|
236
|
-
}
|
|
237
|
-
async doSendRequestForNewSession(session, query, sendOptions, selectedOptions, openNewSessionView) {
|
|
238
|
-
await this.openSession(session.resource);
|
|
239
|
-
if (openNewSessionView) {
|
|
240
|
-
this.openNewSessionView();
|
|
241
|
-
}
|
|
242
|
-
const modelRef = this.chatService.acquireExistingSession(session.resource);
|
|
243
|
-
if (modelRef) {
|
|
244
|
-
const model = modelRef.object;
|
|
245
|
-
if (session.modelId) {
|
|
246
|
-
const languageModel = this.languageModelsService.lookupLanguageModel(session.modelId);
|
|
247
|
-
if (languageModel) {
|
|
248
|
-
model.inputModel.setState({
|
|
249
|
-
selectedModel: {
|
|
250
|
-
identifier: session.modelId,
|
|
251
|
-
metadata: languageModel
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
if (selectedOptions && selectedOptions.size > 0) {
|
|
257
|
-
const contributedSession = model.contributedChatSession;
|
|
258
|
-
if (contributedSession) {
|
|
259
|
-
const initialSessionOptions = ( [...selectedOptions.entries()].map(([optionId, value]) => ({
|
|
260
|
-
optionId,
|
|
261
|
-
value
|
|
262
|
-
})));
|
|
263
|
-
model.setContributedChatSession({
|
|
264
|
-
...contributedSession,
|
|
265
|
-
initialSessionOptions
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
modelRef.dispose();
|
|
270
|
-
}
|
|
271
|
-
const existingResources = ( new Set(( this.agentSessionsService.model.sessions.map(s => ( s.resource.toString())))));
|
|
272
|
-
const result = await this.chatService.sendRequest(session.resource, query, sendOptions);
|
|
273
|
-
if (result.kind === "rejected") {
|
|
274
|
-
this.logService.error(`[ActiveSessionService] sendRequest rejected: ${result.reason}`);
|
|
275
|
-
return;
|
|
276
|
-
}
|
|
277
|
-
let newSession = this.agentSessionsService.model.sessions.find(s => !( existingResources.has(( s.resource.toString()))));
|
|
278
|
-
if (!newSession) {
|
|
279
|
-
let listener;
|
|
280
|
-
newSession = await Promise.race([( new Promise(resolve => {
|
|
281
|
-
listener = this.agentSessionsService.model.onDidChangeSessions(() => {
|
|
282
|
-
const session = this.agentSessionsService.model.sessions.find(s => !( existingResources.has(( s.resource.toString()))));
|
|
283
|
-
if (session) {
|
|
284
|
-
resolve(session);
|
|
285
|
-
}
|
|
286
|
-
});
|
|
287
|
-
})), ( new Promise(resolve => setTimeout(() => resolve(undefined), 30_000)))]);
|
|
288
|
-
listener?.dispose();
|
|
289
|
-
}
|
|
290
|
-
if (newSession && !openNewSessionView) {
|
|
291
|
-
this.setActiveSession(newSession);
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
openNewSessionView() {
|
|
295
|
-
if (this.isNewChatSessionContext.get()) {
|
|
296
|
-
return;
|
|
297
|
-
}
|
|
298
|
-
this.setActiveSession(undefined);
|
|
299
|
-
this.isNewChatSessionContext.set(true);
|
|
300
|
-
}
|
|
301
|
-
setActiveSession(session) {
|
|
302
|
-
let activeSessionItem;
|
|
303
|
-
if (session) {
|
|
304
|
-
if (isAgentSession(session)) {
|
|
305
|
-
this.lastSelectedSession = session.resource;
|
|
306
|
-
const [repository, worktree] = this.getRepositoryFromMetadata(session);
|
|
307
|
-
activeSessionItem = {
|
|
308
|
-
isUntitled: this.chatService.getSession(session.resource)?.contributedChatSession?.isUntitled ?? true,
|
|
309
|
-
label: session.label,
|
|
310
|
-
resource: session.resource,
|
|
311
|
-
repository,
|
|
312
|
-
worktree,
|
|
313
|
-
providerType: session.providerType
|
|
314
|
-
};
|
|
315
|
-
} else {
|
|
316
|
-
activeSessionItem = {
|
|
317
|
-
isUntitled: true,
|
|
318
|
-
label: undefined,
|
|
319
|
-
resource: session.resource,
|
|
320
|
-
repository: session.repoUri,
|
|
321
|
-
worktree: undefined,
|
|
322
|
-
providerType: session.target
|
|
323
|
-
};
|
|
324
|
-
this._newActiveSessionDisposables.clear();
|
|
325
|
-
this._newActiveSessionDisposables.add(session.onDidChange(e => {
|
|
326
|
-
if (e === "repoUri") {
|
|
327
|
-
this.doSetActiveSession({
|
|
328
|
-
isUntitled: true,
|
|
329
|
-
label: undefined,
|
|
330
|
-
resource: session.resource,
|
|
331
|
-
repository: session.repoUri,
|
|
332
|
-
worktree: undefined,
|
|
333
|
-
providerType: session.target
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
}));
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
this.doSetActiveSession(activeSessionItem);
|
|
340
|
-
}
|
|
341
|
-
doSetActiveSession(activeSessionItem) {
|
|
342
|
-
if (this.equalsSessionItem(this._activeSession.get(), activeSessionItem)) {
|
|
343
|
-
return;
|
|
344
|
-
}
|
|
345
|
-
if (activeSessionItem) {
|
|
346
|
-
this.logService.info(`[ActiveSessionService] Active session changed: ${( activeSessionItem.resource.toString())}`);
|
|
347
|
-
this.logService.trace(
|
|
348
|
-
`[ActiveSessionService] Active session details: ${JSON.stringify(activeSessionItem)}`
|
|
349
|
-
);
|
|
350
|
-
} else {
|
|
351
|
-
this.logService.trace("[ActiveSessionService] Active session cleared");
|
|
352
|
-
}
|
|
353
|
-
this._isBackgroundProvider.set(activeSessionItem?.providerType === AgentSessionProviders.Background);
|
|
354
|
-
this._activeSession.set(activeSessionItem, undefined);
|
|
355
|
-
}
|
|
356
|
-
equalsSessionItem(a, b) {
|
|
357
|
-
if (a === b) {
|
|
358
|
-
return true;
|
|
359
|
-
}
|
|
360
|
-
if (!a || !b) {
|
|
361
|
-
return false;
|
|
362
|
-
}
|
|
363
|
-
return (a.label === b.label && ( a.resource.toString()) === ( b.resource.toString()) && a.repository?.toString() === b.repository?.toString() && a.worktree?.toString() === b.worktree?.toString() && a.providerType === b.providerType);
|
|
364
|
-
}
|
|
365
|
-
async commitWorktreeFiles(session, fileUris) {
|
|
366
|
-
const worktreeUri = session.worktree;
|
|
367
|
-
if (!worktreeUri) {
|
|
368
|
-
throw ( new Error("Cannot commit worktree files: active session has no associated worktree"));
|
|
369
|
-
}
|
|
370
|
-
for (const fileUri of fileUris) {
|
|
371
|
-
await this.commandService.executeCommand("github.copilot.cli.sessions.commitToWorktree", {
|
|
372
|
-
worktreeUri,
|
|
373
|
-
fileUri
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
await this.agentSessionsService.model.resolve(AgentSessionProviders.Background);
|
|
377
|
-
}
|
|
378
|
-
loadLastSelectedSession() {
|
|
379
|
-
const cached = this.storageService.get(LAST_SELECTED_SESSION_KEY, StorageScope.WORKSPACE);
|
|
380
|
-
if (!cached) {
|
|
381
|
-
return undefined;
|
|
382
|
-
}
|
|
383
|
-
try {
|
|
384
|
-
return ( URI.parse(cached));
|
|
385
|
-
} catch {
|
|
386
|
-
return undefined;
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
saveLastSelectedSession() {
|
|
390
|
-
if (this.lastSelectedSession) {
|
|
391
|
-
this.storageService.store(LAST_SELECTED_SESSION_KEY, ( this.lastSelectedSession.toString()), StorageScope.WORKSPACE, StorageTarget.MACHINE);
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
};
|
|
395
|
-
SessionsManagementService = ( __decorate([( __param(0, IStorageService)), ( __param(1, IUriIdentityService)), ( __param(2, IAgentSessionsService)), ( __param(3, IChatSessionsService)), ( __param(4, IChatWidgetService)), ( __param(5, IChatService)), ( __param(6, IInstantiationService)), ( __param(7, ILogService)), ( __param(8, IContextKeyService)), ( __param(9, ICommandService)), ( __param(10, ILanguageModelsService))], SessionsManagementService));
|
|
396
|
-
|
|
397
|
-
export { IsActiveSessionBackgroundProviderContext, IsNewChatSessionContext, SessionsManagementService };
|
package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { RawContextKey } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey";
|
|
2
|
-
import { MenuId } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions";
|
|
3
|
-
export { AICustomizationManagementSection } from "../../common/aiCustomizationWorkspaceService.js";
|
|
4
|
-
/**
|
|
5
|
-
* Editor pane ID for the AI Customizations Management Editor.
|
|
6
|
-
*/
|
|
7
|
-
export declare const AI_CUSTOMIZATION_MANAGEMENT_EDITOR_ID = "workbench.editor.aiCustomizationManagement";
|
|
8
|
-
/**
|
|
9
|
-
* Editor input type ID for serialization.
|
|
10
|
-
*/
|
|
11
|
-
export declare const AI_CUSTOMIZATION_MANAGEMENT_EDITOR_INPUT_ID = "workbench.input.aiCustomizationManagement";
|
|
12
|
-
/**
|
|
13
|
-
* Command IDs for the AI Customizations Management Editor.
|
|
14
|
-
*/
|
|
15
|
-
export declare const AICustomizationManagementCommands: {
|
|
16
|
-
readonly OpenEditor: "aiCustomization.openManagementEditor";
|
|
17
|
-
readonly CreateNewAgent: "aiCustomization.createNewAgent";
|
|
18
|
-
readonly CreateNewSkill: "aiCustomization.createNewSkill";
|
|
19
|
-
readonly CreateNewInstructions: "aiCustomization.createNewInstructions";
|
|
20
|
-
readonly CreateNewPrompt: "aiCustomization.createNewPrompt";
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Context key indicating the AI Customization Management Editor is focused.
|
|
24
|
-
*/
|
|
25
|
-
export declare const CONTEXT_AI_CUSTOMIZATION_MANAGEMENT_EDITOR: RawContextKey<boolean>;
|
|
26
|
-
/**
|
|
27
|
-
* Context key for the currently selected section.
|
|
28
|
-
*/
|
|
29
|
-
export declare const CONTEXT_AI_CUSTOMIZATION_MANAGEMENT_SECTION: RawContextKey<string>;
|
|
30
|
-
/**
|
|
31
|
-
* Menu ID for the AI Customization Management Editor title bar actions.
|
|
32
|
-
*/
|
|
33
|
-
export declare const AICustomizationManagementTitleMenuId: MenuId;
|
|
34
|
-
/**
|
|
35
|
-
* Menu ID for the AI Customization Management Editor item context menu.
|
|
36
|
-
*/
|
|
37
|
-
export declare const AICustomizationManagementItemMenuId: MenuId;
|
|
38
|
-
/**
|
|
39
|
-
* Storage key for persisting the selected section.
|
|
40
|
-
*/
|
|
41
|
-
export declare const AI_CUSTOMIZATION_MANAGEMENT_SELECTED_SECTION_KEY = "aiCustomizationManagement.selectedSection";
|
|
42
|
-
/**
|
|
43
|
-
* Storage key for persisting the sidebar width.
|
|
44
|
-
*/
|
|
45
|
-
export declare const AI_CUSTOMIZATION_MANAGEMENT_SIDEBAR_WIDTH_KEY = "aiCustomizationManagement.sidebarWidth";
|
|
46
|
-
/**
|
|
47
|
-
* Storage key for persisting the search query.
|
|
48
|
-
*/
|
|
49
|
-
export declare const AI_CUSTOMIZATION_MANAGEMENT_SEARCH_KEY = "aiCustomizationManagement.searchQuery";
|
|
50
|
-
/**
|
|
51
|
-
* Layout constants for the editor.
|
|
52
|
-
*/
|
|
53
|
-
export declare const SIDEBAR_DEFAULT_WIDTH = 200;
|
|
54
|
-
export declare const SIDEBAR_MIN_WIDTH = 150;
|
|
55
|
-
export declare const SIDEBAR_MAX_WIDTH = 350;
|
|
56
|
-
export declare const CONTENT_MIN_WIDTH = 400;
|
package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { RawContextKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
3
|
-
import { AICustomizationManagementSection } from '../../common/aiCustomizationWorkspaceService.js';
|
|
4
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
5
|
-
import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
6
|
-
|
|
7
|
-
const AI_CUSTOMIZATION_MANAGEMENT_EDITOR_ID = "workbench.editor.aiCustomizationManagement";
|
|
8
|
-
const AI_CUSTOMIZATION_MANAGEMENT_EDITOR_INPUT_ID = "workbench.input.aiCustomizationManagement";
|
|
9
|
-
const AICustomizationManagementCommands = {
|
|
10
|
-
OpenEditor: "aiCustomization.openManagementEditor"};
|
|
11
|
-
const CONTEXT_AI_CUSTOMIZATION_MANAGEMENT_EDITOR = ( new RawContextKey("aiCustomizationManagementEditorFocused", false, ( localize(5292, "Whether the Chat Customizations editor is focused"))));
|
|
12
|
-
const CONTEXT_AI_CUSTOMIZATION_MANAGEMENT_SECTION = ( new RawContextKey(
|
|
13
|
-
"aiCustomizationManagementSection",
|
|
14
|
-
AICustomizationManagementSection.Agents,
|
|
15
|
-
( localize(5293, "The currently selected section in the Chat Customizations editor"))
|
|
16
|
-
));
|
|
17
|
-
MenuId.for("AICustomizationManagementEditorTitle");
|
|
18
|
-
const AICustomizationManagementItemMenuId = MenuId.for("AICustomizationManagementEditorItem");
|
|
19
|
-
const AI_CUSTOMIZATION_MANAGEMENT_SELECTED_SECTION_KEY = "aiCustomizationManagement.selectedSection";
|
|
20
|
-
const AI_CUSTOMIZATION_MANAGEMENT_SIDEBAR_WIDTH_KEY = "aiCustomizationManagement.sidebarWidth";
|
|
21
|
-
const SIDEBAR_DEFAULT_WIDTH = 200;
|
|
22
|
-
const SIDEBAR_MIN_WIDTH = 150;
|
|
23
|
-
const SIDEBAR_MAX_WIDTH = 350;
|
|
24
|
-
const CONTENT_MIN_WIDTH = 400;
|
|
25
|
-
|
|
26
|
-
export { AICustomizationManagementCommands, AICustomizationManagementItemMenuId, AICustomizationManagementSection, AI_CUSTOMIZATION_MANAGEMENT_EDITOR_ID, AI_CUSTOMIZATION_MANAGEMENT_EDITOR_INPUT_ID, AI_CUSTOMIZATION_MANAGEMENT_SELECTED_SECTION_KEY, AI_CUSTOMIZATION_MANAGEMENT_SIDEBAR_WIDTH_KEY, CONTENT_MIN_WIDTH, CONTEXT_AI_CUSTOMIZATION_MANAGEMENT_EDITOR, CONTEXT_AI_CUSTOMIZATION_MANAGEMENT_SECTION, SIDEBAR_DEFAULT_WIDTH, SIDEBAR_MAX_WIDTH, SIDEBAR_MIN_WIDTH };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
-
import { IModifiedFileEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService";
|
|
3
|
-
import { IAgentSession } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel";
|
|
4
|
-
export declare function editingEntriesContainResource(entries: readonly IModifiedFileEntry[], resourceUri: URI): boolean;
|
|
5
|
-
export declare function agentSessionContainsResource(session: IAgentSession, resourceUri: URI): boolean;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
3
|
-
import { isIChatSessionFileChange2 } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
|
|
4
|
-
|
|
5
|
-
function editingEntriesContainResource(entries, resourceUri) {
|
|
6
|
-
for (const entry of entries) {
|
|
7
|
-
if (isEqual(entry.modifiedURI, resourceUri) || isEqual(entry.originalURI, resourceUri)) {
|
|
8
|
-
return true;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
function agentSessionContainsResource(session, resourceUri) {
|
|
14
|
-
if (!(session.changes instanceof Array)) {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
for (const change of session.changes) {
|
|
18
|
-
if (isIChatSessionFileChange2(change)) {
|
|
19
|
-
if (isEqual(change.uri, resourceUri) || (change.originalUri && isEqual(change.originalUri, resourceUri)) || (change.modifiedUri && isEqual(change.modifiedUri, resourceUri))) {
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
else if (isEqual(change.modifiedUri, resourceUri) || (change.originalUri && isEqual(change.originalUri, resourceUri))) {
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { agentSessionContainsResource, editingEntriesContainResource };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
-
import { PromptsStorage } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService";
|
|
3
|
-
/**
|
|
4
|
-
* Possible section IDs for the AI Customization Management Editor sidebar.
|
|
5
|
-
*/
|
|
6
|
-
export declare const AICustomizationManagementSection: {
|
|
7
|
-
readonly Agents: "agents";
|
|
8
|
-
readonly Skills: "skills";
|
|
9
|
-
readonly Instructions: "instructions";
|
|
10
|
-
readonly Prompts: "prompts";
|
|
11
|
-
readonly Hooks: "hooks";
|
|
12
|
-
readonly McpServers: "mcpServers";
|
|
13
|
-
readonly Plugins: "plugins";
|
|
14
|
-
readonly Models: "models";
|
|
15
|
-
};
|
|
16
|
-
export type AICustomizationManagementSection = typeof AICustomizationManagementSection[keyof typeof AICustomizationManagementSection];
|
|
17
|
-
/**
|
|
18
|
-
* Per-type filter policy controlling which storage sources and user file
|
|
19
|
-
* roots are visible for a given customization type.
|
|
20
|
-
*/
|
|
21
|
-
export interface IStorageSourceFilter {
|
|
22
|
-
/**
|
|
23
|
-
* Which storage groups to display (e.g. workspace, user, extension).
|
|
24
|
-
*/
|
|
25
|
-
readonly sources: readonly PromptsStorage[];
|
|
26
|
-
/**
|
|
27
|
-
* If set, only user files under these roots are shown (allowlist).
|
|
28
|
-
* If `undefined`, all user file roots are included.
|
|
29
|
-
*/
|
|
30
|
-
readonly includedUserFileRoots?: readonly URI[];
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Applies a storage source filter to an array of items that have uri and storage.
|
|
34
|
-
* Removes items whose storage is not in the filter's source list,
|
|
35
|
-
* and for user-storage items, removes those not under an allowed root.
|
|
36
|
-
*/
|
|
37
|
-
export declare function applyStorageSourceFilter<T extends {
|
|
38
|
-
readonly uri: URI;
|
|
39
|
-
readonly storage: PromptsStorage;
|
|
40
|
-
}>(items: readonly T[], filter: IStorageSourceFilter): readonly T[];
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { isEqualOrParent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
3
|
-
import { PromptsStorage } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService';
|
|
4
|
-
|
|
5
|
-
const AICustomizationManagementSection = {
|
|
6
|
-
Agents: "agents",
|
|
7
|
-
Skills: "skills",
|
|
8
|
-
Instructions: "instructions",
|
|
9
|
-
Prompts: "prompts",
|
|
10
|
-
Hooks: "hooks",
|
|
11
|
-
McpServers: "mcpServers",
|
|
12
|
-
Plugins: "plugins",
|
|
13
|
-
Models: "models"
|
|
14
|
-
};
|
|
15
|
-
function applyStorageSourceFilter(items, filter) {
|
|
16
|
-
const sourceSet = ( new Set(filter.sources));
|
|
17
|
-
return items.filter(item => {
|
|
18
|
-
if (!( sourceSet.has(item.storage))) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
if (item.storage === PromptsStorage.user && filter.includedUserFileRoots) {
|
|
22
|
-
return ( filter.includedUserFileRoots.some(root => isEqualOrParent(item.uri, root)));
|
|
23
|
-
}
|
|
24
|
-
return true;
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { AICustomizationManagementSection, applyStorageSourceFilter };
|