@codingame/monaco-vscode-chat-service-override 28.4.0 → 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 +23 -18
- 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,4 +1,5 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { OperatingSystem } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform";
|
|
2
3
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
4
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
4
5
|
import { IEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service";
|
|
@@ -6,7 +7,14 @@ import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/fi
|
|
|
6
7
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
7
8
|
import { IRemoteAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service";
|
|
8
9
|
import { ITrustedDomainService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/url/common/trustedDomainService.service";
|
|
10
|
+
import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
|
|
11
|
+
import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
|
|
12
|
+
import { ILifecycleService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service";
|
|
9
13
|
import { ITerminalSandboxService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.service";
|
|
14
|
+
export interface ITerminalSandboxResolvedNetworkDomains {
|
|
15
|
+
allowedDomains: string[];
|
|
16
|
+
deniedDomains: string[];
|
|
17
|
+
}
|
|
10
18
|
export declare class TerminalSandboxService extends Disposable implements ITerminalSandboxService {
|
|
11
19
|
private readonly _configurationService;
|
|
12
20
|
private readonly _fileService;
|
|
@@ -14,6 +22,9 @@ export declare class TerminalSandboxService extends Disposable implements ITermi
|
|
|
14
22
|
private readonly _logService;
|
|
15
23
|
private readonly _remoteAgentService;
|
|
16
24
|
private readonly _trustedDomainService;
|
|
25
|
+
private readonly _workspaceContextService;
|
|
26
|
+
private readonly _productService;
|
|
27
|
+
private readonly _lifecycleService;
|
|
17
28
|
readonly _serviceBrand: undefined;
|
|
18
29
|
private _srtPath;
|
|
19
30
|
private _rgPath;
|
|
@@ -28,8 +39,10 @@ export declare class TerminalSandboxService extends Disposable implements ITermi
|
|
|
28
39
|
private _appRoot;
|
|
29
40
|
private _os;
|
|
30
41
|
private _defaultWritePaths;
|
|
31
|
-
|
|
42
|
+
private static readonly _sandboxTempDirName;
|
|
43
|
+
constructor(_configurationService: IConfigurationService, _fileService: IFileService, _environmentService: IEnvironmentService, _logService: ILogService, _remoteAgentService: IRemoteAgentService, _trustedDomainService: ITrustedDomainService, _workspaceContextService: IWorkspaceContextService, _productService: IProductService, _lifecycleService: ILifecycleService);
|
|
32
44
|
isEnabled(): Promise<boolean>;
|
|
45
|
+
getOS(): Promise<OperatingSystem>;
|
|
33
46
|
wrapCommand(command: string): string;
|
|
34
47
|
getTempDir(): URI | undefined;
|
|
35
48
|
setNeedsForceUpdateConfigFile(): void;
|
|
@@ -39,5 +52,10 @@ export declare class TerminalSandboxService extends Disposable implements ITermi
|
|
|
39
52
|
private _createSandboxConfig;
|
|
40
53
|
private _pathJoin;
|
|
41
54
|
private _initTempDir;
|
|
55
|
+
private _cleanupSandboxTempDir;
|
|
56
|
+
private _getSandboxTempDirPath;
|
|
57
|
+
private _getSandboxWindowTempDirName;
|
|
58
|
+
getResolvedNetworkDomains(): ITerminalSandboxResolvedNetworkDomains;
|
|
42
59
|
private _addTrustedDomainsToAllowedDomains;
|
|
60
|
+
private _updateAllowWritePathsWithWorkspaceFolders;
|
|
43
61
|
}
|
|
@@ -8,6 +8,7 @@ import { win32, posix, dirname } from '@codingame/monaco-vscode-api/vscode/vs/ba
|
|
|
8
8
|
import { OS, OperatingSystem } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
9
9
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
10
10
|
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
11
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
11
12
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
12
13
|
import { IEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service';
|
|
13
14
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
@@ -15,15 +16,29 @@ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log
|
|
|
15
16
|
import { IRemoteAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service';
|
|
16
17
|
import { TerminalChatAgentToolsSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration';
|
|
17
18
|
import { ITrustedDomainService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/url/common/trustedDomainService.service';
|
|
19
|
+
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
20
|
+
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
21
|
+
import { WillShutdownJoinerOrder } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
22
|
+
import { ILifecycleService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
18
23
|
|
|
24
|
+
var TerminalSandboxService_1;
|
|
19
25
|
let TerminalSandboxService = class TerminalSandboxService extends Disposable {
|
|
26
|
+
static {
|
|
27
|
+
TerminalSandboxService_1 = this;
|
|
28
|
+
}
|
|
29
|
+
static {
|
|
30
|
+
this._sandboxTempDirName = "tmp";
|
|
31
|
+
}
|
|
20
32
|
constructor(
|
|
21
33
|
_configurationService,
|
|
22
34
|
_fileService,
|
|
23
35
|
_environmentService,
|
|
24
36
|
_logService,
|
|
25
37
|
_remoteAgentService,
|
|
26
|
-
_trustedDomainService
|
|
38
|
+
_trustedDomainService,
|
|
39
|
+
_workspaceContextService,
|
|
40
|
+
_productService,
|
|
41
|
+
_lifecycleService
|
|
27
42
|
) {
|
|
28
43
|
super();
|
|
29
44
|
this._configurationService = _configurationService;
|
|
@@ -32,6 +47,9 @@ let TerminalSandboxService = class TerminalSandboxService extends Disposable {
|
|
|
32
47
|
this._logService = _logService;
|
|
33
48
|
this._remoteAgentService = _remoteAgentService;
|
|
34
49
|
this._trustedDomainService = _trustedDomainService;
|
|
50
|
+
this._workspaceContextService = _workspaceContextService;
|
|
51
|
+
this._productService = _productService;
|
|
52
|
+
this._lifecycleService = _lifecycleService;
|
|
35
53
|
this._srtPathResolved = false;
|
|
36
54
|
this._needsForceUpdateConfigFile = true;
|
|
37
55
|
this._remoteEnvDetails = null;
|
|
@@ -48,7 +66,7 @@ let TerminalSandboxService = class TerminalSandboxService extends Disposable {
|
|
|
48
66
|
this._remoteEnvDetailsPromise = this._remoteAgentService.getEnvironment();
|
|
49
67
|
this._register(
|
|
50
68
|
Event.runAndSubscribe(this._configurationService.onDidChangeConfiguration, e => {
|
|
51
|
-
if (e?.affectsConfiguration(TerminalChatAgentToolsSettingId.TerminalSandboxEnabled) || e?.affectsConfiguration(TerminalChatAgentToolsSettingId.
|
|
69
|
+
if (e?.affectsConfiguration(TerminalChatAgentToolsSettingId.TerminalSandboxEnabled) || e?.affectsConfiguration(TerminalChatAgentToolsSettingId.TerminalSandboxNetworkAllowedDomains) || e?.affectsConfiguration(TerminalChatAgentToolsSettingId.TerminalSandboxNetworkDeniedDomains) || e?.affectsConfiguration(TerminalChatAgentToolsSettingId.TerminalSandboxNetworkAllowTrustedDomains) || e?.affectsConfiguration(TerminalChatAgentToolsSettingId.TerminalSandboxLinuxFileSystem) || e?.affectsConfiguration(TerminalChatAgentToolsSettingId.TerminalSandboxMacFileSystem)) {
|
|
52
70
|
this.setNeedsForceUpdateConfigFile();
|
|
53
71
|
}
|
|
54
72
|
})
|
|
@@ -56,15 +74,32 @@ let TerminalSandboxService = class TerminalSandboxService extends Disposable {
|
|
|
56
74
|
this._register(this._trustedDomainService.onDidChangeTrustedDomains(() => {
|
|
57
75
|
this.setNeedsForceUpdateConfigFile();
|
|
58
76
|
}));
|
|
77
|
+
this._register(this._workspaceContextService.onDidChangeWorkspaceFolders(() => {
|
|
78
|
+
this.setNeedsForceUpdateConfigFile();
|
|
79
|
+
}));
|
|
80
|
+
this._register(this._lifecycleService.onWillShutdown(e => {
|
|
81
|
+
if (!this._tempDir) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
e.join(this._cleanupSandboxTempDir(), {
|
|
85
|
+
id: "join.deleteFilesInSandboxTempDir",
|
|
86
|
+
label: ( localize(13961, "Delete Files in Sandbox Temp Dir")),
|
|
87
|
+
order: WillShutdownJoinerOrder.Default
|
|
88
|
+
});
|
|
89
|
+
}));
|
|
59
90
|
}
|
|
60
91
|
async isEnabled() {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
if (this._os === OperatingSystem.Windows) {
|
|
92
|
+
const os = await this.getOS();
|
|
93
|
+
if (os === OperatingSystem.Windows) {
|
|
64
94
|
return false;
|
|
65
95
|
}
|
|
66
96
|
return this._configurationService.getValue(TerminalChatAgentToolsSettingId.TerminalSandboxEnabled);
|
|
67
97
|
}
|
|
98
|
+
async getOS() {
|
|
99
|
+
this._remoteEnvDetails = await this._remoteEnvDetailsPromise;
|
|
100
|
+
this._os = this._remoteEnvDetails ? this._remoteEnvDetails.os : OS;
|
|
101
|
+
return this._os;
|
|
102
|
+
}
|
|
68
103
|
wrapCommand(command) {
|
|
69
104
|
if (!this._sandboxConfigPath || !this._tempDir) {
|
|
70
105
|
throw ( new Error("Sandbox config path or temp dir not initialized"));
|
|
@@ -78,7 +113,7 @@ let TerminalSandboxService = class TerminalSandboxService extends Disposable {
|
|
|
78
113
|
if (!this._rgPath) {
|
|
79
114
|
throw ( new Error("Ripgrep path not resolved"));
|
|
80
115
|
}
|
|
81
|
-
const wrappedCommand = `PATH="$PATH:${dirname(this._rgPath)}" TMPDIR="${this._tempDir.path}" "${this._execPath}" "${this._srtPath}" --settings "${this._sandboxConfigPath}" -c ${this._quoteShellArgument(command)}`;
|
|
116
|
+
const wrappedCommand = `PATH="$PATH:${dirname(this._rgPath)}" TMPDIR="${this._tempDir.path}" CLAUDE_TMPDIR="${this._tempDir.path}" "${this._execPath}" "${this._srtPath}" --settings "${this._sandboxConfigPath}" -c ${this._quoteShellArgument(command)}`;
|
|
82
117
|
if (this._remoteEnvDetails) {
|
|
83
118
|
return `${wrappedCommand}`;
|
|
84
119
|
}
|
|
@@ -109,7 +144,7 @@ let TerminalSandboxService = class TerminalSandboxService extends Disposable {
|
|
|
109
144
|
const remoteEnv = this._remoteEnvDetails || (await this._remoteEnvDetailsPromise);
|
|
110
145
|
if (remoteEnv) {
|
|
111
146
|
this._appRoot = remoteEnv.appRoot.path;
|
|
112
|
-
this._execPath =
|
|
147
|
+
this._execPath = remoteEnv.execPath;
|
|
113
148
|
}
|
|
114
149
|
this._srtPath = this._pathJoin(
|
|
115
150
|
this._appRoot,
|
|
@@ -126,21 +161,22 @@ let TerminalSandboxService = class TerminalSandboxService extends Disposable {
|
|
|
126
161
|
await this._initTempDir();
|
|
127
162
|
}
|
|
128
163
|
if (this._tempDir) {
|
|
129
|
-
const
|
|
164
|
+
const allowedDomainsSetting = this._configurationService.getValue(TerminalChatAgentToolsSettingId.TerminalSandboxNetworkAllowedDomains) ?? [];
|
|
165
|
+
const deniedDomainsSetting = this._configurationService.getValue(TerminalChatAgentToolsSettingId.TerminalSandboxNetworkDeniedDomains) ?? [];
|
|
166
|
+
const allowTrustedDomains = this._configurationService.getValue(TerminalChatAgentToolsSettingId.TerminalSandboxNetworkAllowTrustedDomains) ?? false;
|
|
130
167
|
const linuxFileSystemSetting = this._os === OperatingSystem.Linux ? this._configurationService.getValue(TerminalChatAgentToolsSettingId.TerminalSandboxLinuxFileSystem) ?? {} : {};
|
|
131
168
|
const macFileSystemSetting = this._os === OperatingSystem.Macintosh ? this._configurationService.getValue(TerminalChatAgentToolsSettingId.TerminalSandboxMacFileSystem) ?? {} : {};
|
|
132
169
|
const configFileUri = URI.joinPath(this._tempDir, `vscode-sandbox-settings-${this._sandboxSettingsId}.json`);
|
|
133
|
-
const
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
if (networkSetting.allowTrustedDomains) {
|
|
170
|
+
const linuxAllowWrite = this._updateAllowWritePathsWithWorkspaceFolders(linuxFileSystemSetting.allowWrite);
|
|
171
|
+
const macAllowWrite = this._updateAllowWritePathsWithWorkspaceFolders(macFileSystemSetting.allowWrite);
|
|
172
|
+
let allowedDomains = allowedDomainsSetting;
|
|
173
|
+
if (allowTrustedDomains) {
|
|
138
174
|
allowedDomains = this._addTrustedDomainsToAllowedDomains(allowedDomains);
|
|
139
175
|
}
|
|
140
176
|
const sandboxSettings = {
|
|
141
177
|
network: {
|
|
142
178
|
allowedDomains,
|
|
143
|
-
deniedDomains:
|
|
179
|
+
deniedDomains: deniedDomainsSetting
|
|
144
180
|
},
|
|
145
181
|
filesystem: {
|
|
146
182
|
denyRead: this._os === OperatingSystem.Macintosh ? macFileSystemSetting.denyRead : linuxFileSystemSetting.denyRead,
|
|
@@ -164,13 +200,9 @@ let TerminalSandboxService = class TerminalSandboxService extends Disposable {
|
|
|
164
200
|
if (await this.isEnabled()) {
|
|
165
201
|
this._needsForceUpdateConfigFile = true;
|
|
166
202
|
const remoteEnv = this._remoteEnvDetails || (await this._remoteEnvDetailsPromise);
|
|
167
|
-
|
|
168
|
-
this._tempDir = remoteEnv.tmpDir;
|
|
169
|
-
} else {
|
|
170
|
-
const environmentService = this._environmentService;
|
|
171
|
-
this._tempDir = environmentService.tmpDir;
|
|
172
|
-
}
|
|
203
|
+
this._tempDir = this._getSandboxTempDirPath(remoteEnv);
|
|
173
204
|
if (this._tempDir) {
|
|
205
|
+
await this._fileService.createFolder(this._tempDir);
|
|
174
206
|
this._defaultWritePaths.push(this._tempDir.path);
|
|
175
207
|
}
|
|
176
208
|
if (!this._tempDir) {
|
|
@@ -180,6 +212,57 @@ let TerminalSandboxService = class TerminalSandboxService extends Disposable {
|
|
|
180
212
|
}
|
|
181
213
|
}
|
|
182
214
|
}
|
|
215
|
+
async _cleanupSandboxTempDir() {
|
|
216
|
+
if (!this._tempDir) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
try {
|
|
220
|
+
await this._fileService.del(this._tempDir, {
|
|
221
|
+
recursive: true,
|
|
222
|
+
useTrash: false
|
|
223
|
+
});
|
|
224
|
+
} catch (error) {
|
|
225
|
+
this._logService.warn("TerminalSandboxService: Failed to delete sandbox temp dir", error);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
_getSandboxTempDirPath(remoteEnv) {
|
|
229
|
+
const sandboxTempDirName = this._getSandboxWindowTempDirName();
|
|
230
|
+
if (remoteEnv?.userHome) {
|
|
231
|
+
const sandboxRoot = URI.joinPath(
|
|
232
|
+
remoteEnv.userHome,
|
|
233
|
+
this._productService.serverDataFolderName ?? this._productService.dataFolderName,
|
|
234
|
+
TerminalSandboxService_1._sandboxTempDirName
|
|
235
|
+
);
|
|
236
|
+
return sandboxTempDirName ? URI.joinPath(sandboxRoot, sandboxTempDirName) : sandboxRoot;
|
|
237
|
+
}
|
|
238
|
+
const nativeEnv = this._environmentService;
|
|
239
|
+
if (nativeEnv.userHome) {
|
|
240
|
+
const sandboxRoot = URI.joinPath(
|
|
241
|
+
nativeEnv.userHome,
|
|
242
|
+
this._productService.dataFolderName,
|
|
243
|
+
TerminalSandboxService_1._sandboxTempDirName
|
|
244
|
+
);
|
|
245
|
+
return sandboxTempDirName ? URI.joinPath(sandboxRoot, sandboxTempDirName) : sandboxRoot;
|
|
246
|
+
}
|
|
247
|
+
return undefined;
|
|
248
|
+
}
|
|
249
|
+
_getSandboxWindowTempDirName() {
|
|
250
|
+
const workbenchEnv = this._environmentService;
|
|
251
|
+
const windowId = workbenchEnv.window?.id;
|
|
252
|
+
return typeof windowId === "number" ? `tmp_vscode_${windowId}` : undefined;
|
|
253
|
+
}
|
|
254
|
+
getResolvedNetworkDomains() {
|
|
255
|
+
let allowedDomains = this._configurationService.getValue(TerminalChatAgentToolsSettingId.TerminalSandboxNetworkAllowedDomains) ?? [];
|
|
256
|
+
const deniedDomains = this._configurationService.getValue(TerminalChatAgentToolsSettingId.TerminalSandboxNetworkDeniedDomains) ?? [];
|
|
257
|
+
const allowTrustedDomains = this._configurationService.getValue(TerminalChatAgentToolsSettingId.TerminalSandboxNetworkAllowTrustedDomains) ?? false;
|
|
258
|
+
if (allowTrustedDomains) {
|
|
259
|
+
allowedDomains = this._addTrustedDomainsToAllowedDomains(allowedDomains);
|
|
260
|
+
}
|
|
261
|
+
return {
|
|
262
|
+
allowedDomains,
|
|
263
|
+
deniedDomains
|
|
264
|
+
};
|
|
265
|
+
}
|
|
183
266
|
_addTrustedDomainsToAllowedDomains(allowedDomains) {
|
|
184
267
|
const allowedDomainsSet = ( new Set(allowedDomains));
|
|
185
268
|
for (const domain of this._trustedDomainService.trustedDomains) {
|
|
@@ -194,7 +277,15 @@ let TerminalSandboxService = class TerminalSandboxService extends Disposable {
|
|
|
194
277
|
}
|
|
195
278
|
return Array.from(allowedDomainsSet);
|
|
196
279
|
}
|
|
280
|
+
_updateAllowWritePathsWithWorkspaceFolders(configuredAllowWrite) {
|
|
281
|
+
const workspaceFolderPaths = ( this._workspaceContextService.getWorkspace().folders.map(folder => folder.uri.path));
|
|
282
|
+
return [...( new Set([
|
|
283
|
+
...workspaceFolderPaths,
|
|
284
|
+
...this._defaultWritePaths,
|
|
285
|
+
...(configuredAllowWrite ?? [])
|
|
286
|
+
]))];
|
|
287
|
+
}
|
|
197
288
|
};
|
|
198
|
-
TerminalSandboxService = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, IFileService)), ( __param(2, IEnvironmentService)), ( __param(3, ILogService)), ( __param(4, IRemoteAgentService)), ( __param(5, ITrustedDomainService))], TerminalSandboxService));
|
|
289
|
+
TerminalSandboxService = TerminalSandboxService_1 = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, IFileService)), ( __param(2, IEnvironmentService)), ( __param(3, ILogService)), ( __param(4, IRemoteAgentService)), ( __param(5, ITrustedDomainService)), ( __param(6, IWorkspaceContextService)), ( __param(7, IProductService)), ( __param(8, ILifecycleService))], TerminalSandboxService));
|
|
199
290
|
|
|
200
291
|
export { TerminalSandboxService };
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
2
|
-
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
-
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
|
-
import { IRange } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
|
|
5
|
-
import { IChatEditingService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService.service";
|
|
6
|
-
import { IAgentSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service";
|
|
7
|
-
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
8
|
-
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
9
|
-
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
10
|
-
import { IAgentFeedbackService } from "@codingame/monaco-vscode-api/vscode/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.service";
|
|
11
|
-
export interface IAgentFeedback {
|
|
12
|
-
readonly id: string;
|
|
13
|
-
readonly text: string;
|
|
14
|
-
readonly resourceUri: URI;
|
|
15
|
-
readonly range: IRange;
|
|
16
|
-
readonly sessionResource: URI;
|
|
17
|
-
}
|
|
18
|
-
export interface IAgentFeedbackChangeEvent {
|
|
19
|
-
readonly sessionResource: URI;
|
|
20
|
-
readonly feedbackItems: readonly IAgentFeedback[];
|
|
21
|
-
}
|
|
22
|
-
export interface IAgentFeedbackNavigationBearing {
|
|
23
|
-
readonly activeIdx: number;
|
|
24
|
-
readonly totalCount: number;
|
|
25
|
-
}
|
|
26
|
-
export declare class AgentFeedbackService extends Disposable implements IAgentFeedbackService {
|
|
27
|
-
private readonly _chatEditingService;
|
|
28
|
-
private readonly _agentSessionsService;
|
|
29
|
-
private readonly _editorService;
|
|
30
|
-
private readonly _chatWidgetService;
|
|
31
|
-
private readonly _commandService;
|
|
32
|
-
readonly _serviceBrand: undefined;
|
|
33
|
-
private readonly _onDidChangeFeedback;
|
|
34
|
-
readonly onDidChangeFeedback: Event<IAgentFeedbackChangeEvent>;
|
|
35
|
-
private readonly _onDidChangeNavigation;
|
|
36
|
-
readonly onDidChangeNavigation: Event<URI>;
|
|
37
|
-
/** sessionResource → feedback items */
|
|
38
|
-
private readonly _feedbackBySession;
|
|
39
|
-
private readonly _sessionUpdatedOrder;
|
|
40
|
-
private _sessionUpdatedSequence;
|
|
41
|
-
private readonly _navigationAnchorBySession;
|
|
42
|
-
constructor(_chatEditingService: IChatEditingService, _agentSessionsService: IAgentSessionsService, _editorService: IEditorService, _chatWidgetService: IChatWidgetService, _commandService: ICommandService);
|
|
43
|
-
addFeedback(sessionResource: URI, resourceUri: URI, range: IRange, text: string): IAgentFeedback;
|
|
44
|
-
removeFeedback(sessionResource: URI, feedbackId: string): void;
|
|
45
|
-
getFeedback(sessionResource: URI): readonly IAgentFeedback[];
|
|
46
|
-
getMostRecentSessionForResource(resourceUri: URI): URI | undefined;
|
|
47
|
-
private _sessionContainsResource;
|
|
48
|
-
revealFeedback(sessionResource: URI, feedbackId: string): Promise<void>;
|
|
49
|
-
getNextFeedback(sessionResource: URI, next: boolean): IAgentFeedback | undefined;
|
|
50
|
-
getNavigationBearing(sessionResource: URI): IAgentFeedbackNavigationBearing;
|
|
51
|
-
clearFeedback(sessionResource: URI): void;
|
|
52
|
-
addFeedbackAndSubmit(sessionResource: URI, resourceUri: URI, range: IRange, text: string): Promise<void>;
|
|
53
|
-
}
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
|
-
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
-
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
6
|
-
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
7
|
-
import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService.service';
|
|
8
|
-
import { IAgentSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service';
|
|
9
|
-
import { editingEntriesContainResource, agentSessionContainsResource } from '../../../../workbench/contrib/chat/browser/sessionResourceMatching.js';
|
|
10
|
-
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
11
|
-
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
12
|
-
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
13
|
-
|
|
14
|
-
let AgentFeedbackService = class AgentFeedbackService extends Disposable {
|
|
15
|
-
constructor(
|
|
16
|
-
_chatEditingService,
|
|
17
|
-
_agentSessionsService,
|
|
18
|
-
_editorService,
|
|
19
|
-
_chatWidgetService,
|
|
20
|
-
_commandService
|
|
21
|
-
) {
|
|
22
|
-
super();
|
|
23
|
-
this._chatEditingService = _chatEditingService;
|
|
24
|
-
this._agentSessionsService = _agentSessionsService;
|
|
25
|
-
this._editorService = _editorService;
|
|
26
|
-
this._chatWidgetService = _chatWidgetService;
|
|
27
|
-
this._commandService = _commandService;
|
|
28
|
-
this._onDidChangeFeedback = this._store.add(( new Emitter()));
|
|
29
|
-
this.onDidChangeFeedback = this._onDidChangeFeedback.event;
|
|
30
|
-
this._onDidChangeNavigation = this._store.add(( new Emitter()));
|
|
31
|
-
this.onDidChangeNavigation = this._onDidChangeNavigation.event;
|
|
32
|
-
this._feedbackBySession = ( new Map());
|
|
33
|
-
this._sessionUpdatedOrder = ( new Map());
|
|
34
|
-
this._sessionUpdatedSequence = 0;
|
|
35
|
-
this._navigationAnchorBySession = ( new Map());
|
|
36
|
-
}
|
|
37
|
-
addFeedback(sessionResource, resourceUri, range, text) {
|
|
38
|
-
const key = ( sessionResource.toString());
|
|
39
|
-
let feedbackItems = this._feedbackBySession.get(key);
|
|
40
|
-
if (!feedbackItems) {
|
|
41
|
-
feedbackItems = [];
|
|
42
|
-
this._feedbackBySession.set(key, feedbackItems);
|
|
43
|
-
}
|
|
44
|
-
const feedback = {
|
|
45
|
-
id: generateUuid(),
|
|
46
|
-
text,
|
|
47
|
-
resourceUri,
|
|
48
|
-
range,
|
|
49
|
-
sessionResource
|
|
50
|
-
};
|
|
51
|
-
const resourceStr = ( resourceUri.toString());
|
|
52
|
-
const hasExistingForFile = ( feedbackItems.some(f => ( f.resourceUri.toString()) === resourceStr));
|
|
53
|
-
if (!hasExistingForFile) {
|
|
54
|
-
feedbackItems.push(feedback);
|
|
55
|
-
} else {
|
|
56
|
-
let insertIdx = feedbackItems.length;
|
|
57
|
-
for (let i = 0; i < feedbackItems.length; i++) {
|
|
58
|
-
if (( feedbackItems[i].resourceUri.toString()) === resourceStr && feedbackItems[i].range.startLineNumber > range.startLineNumber) {
|
|
59
|
-
insertIdx = i;
|
|
60
|
-
break;
|
|
61
|
-
}
|
|
62
|
-
if (( feedbackItems[i].resourceUri.toString()) === resourceStr) {
|
|
63
|
-
insertIdx = i + 1;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
feedbackItems.splice(insertIdx, 0, feedback);
|
|
67
|
-
}
|
|
68
|
-
this._sessionUpdatedOrder.set(key, ++this._sessionUpdatedSequence);
|
|
69
|
-
this._onDidChangeNavigation.fire(sessionResource);
|
|
70
|
-
this._onDidChangeFeedback.fire({
|
|
71
|
-
sessionResource,
|
|
72
|
-
feedbackItems
|
|
73
|
-
});
|
|
74
|
-
return feedback;
|
|
75
|
-
}
|
|
76
|
-
removeFeedback(sessionResource, feedbackId) {
|
|
77
|
-
const key = ( sessionResource.toString());
|
|
78
|
-
const feedbackItems = this._feedbackBySession.get(key);
|
|
79
|
-
if (!feedbackItems) {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
const idx = feedbackItems.findIndex(f => f.id === feedbackId);
|
|
83
|
-
if (idx >= 0) {
|
|
84
|
-
feedbackItems.splice(idx, 1);
|
|
85
|
-
if (this._navigationAnchorBySession.get(key) === feedbackId) {
|
|
86
|
-
this._navigationAnchorBySession.delete(key);
|
|
87
|
-
this._onDidChangeNavigation.fire(sessionResource);
|
|
88
|
-
}
|
|
89
|
-
if (feedbackItems.length > 0) {
|
|
90
|
-
this._sessionUpdatedOrder.set(key, ++this._sessionUpdatedSequence);
|
|
91
|
-
} else {
|
|
92
|
-
this._sessionUpdatedOrder.delete(key);
|
|
93
|
-
}
|
|
94
|
-
this._onDidChangeFeedback.fire({
|
|
95
|
-
sessionResource,
|
|
96
|
-
feedbackItems
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
getFeedback(sessionResource) {
|
|
101
|
-
return this._feedbackBySession.get(( sessionResource.toString())) ?? [];
|
|
102
|
-
}
|
|
103
|
-
getMostRecentSessionForResource(resourceUri) {
|
|
104
|
-
let bestSession;
|
|
105
|
-
let bestSequence = -1;
|
|
106
|
-
for (const [, feedbackItems] of this._feedbackBySession) {
|
|
107
|
-
if (!feedbackItems.length) {
|
|
108
|
-
continue;
|
|
109
|
-
}
|
|
110
|
-
const candidate = feedbackItems[0].sessionResource;
|
|
111
|
-
if (!this._sessionContainsResource(candidate, resourceUri, feedbackItems)) {
|
|
112
|
-
continue;
|
|
113
|
-
}
|
|
114
|
-
const sequence = this._sessionUpdatedOrder.get(( candidate.toString())) ?? 0;
|
|
115
|
-
if (sequence > bestSequence) {
|
|
116
|
-
bestSession = candidate;
|
|
117
|
-
bestSequence = sequence;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
return bestSession;
|
|
121
|
-
}
|
|
122
|
-
_sessionContainsResource(sessionResource, resourceUri, feedbackItems) {
|
|
123
|
-
if (( feedbackItems.some(item => isEqual(item.resourceUri, resourceUri)))) {
|
|
124
|
-
return true;
|
|
125
|
-
}
|
|
126
|
-
for (const editingSession of this._chatEditingService.editingSessionsObs.get()) {
|
|
127
|
-
if (!isEqual(editingSession.chatSessionResource, sessionResource)) {
|
|
128
|
-
continue;
|
|
129
|
-
}
|
|
130
|
-
if (editingEntriesContainResource(editingSession.entries.get(), resourceUri)) {
|
|
131
|
-
return true;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
for (const session of this._agentSessionsService.model.sessions) {
|
|
135
|
-
if (!isEqual(session.resource, sessionResource)) {
|
|
136
|
-
continue;
|
|
137
|
-
}
|
|
138
|
-
if (agentSessionContainsResource(session, resourceUri)) {
|
|
139
|
-
return true;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
return false;
|
|
143
|
-
}
|
|
144
|
-
async revealFeedback(sessionResource, feedbackId) {
|
|
145
|
-
const key = ( sessionResource.toString());
|
|
146
|
-
const feedbackItems = this._feedbackBySession.get(key);
|
|
147
|
-
const feedback = feedbackItems?.find(f => f.id === feedbackId);
|
|
148
|
-
if (!feedback) {
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
await this._editorService.openEditor({
|
|
152
|
-
resource: feedback.resourceUri,
|
|
153
|
-
options: {
|
|
154
|
-
preserveFocus: false,
|
|
155
|
-
revealIfVisible: true
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
setTimeout(() => {
|
|
159
|
-
this._navigationAnchorBySession.set(key, feedbackId);
|
|
160
|
-
this._onDidChangeNavigation.fire(sessionResource);
|
|
161
|
-
}, 50);
|
|
162
|
-
}
|
|
163
|
-
getNextFeedback(sessionResource, next) {
|
|
164
|
-
const key = ( sessionResource.toString());
|
|
165
|
-
const feedbackItems = this._feedbackBySession.get(key);
|
|
166
|
-
if (!feedbackItems?.length) {
|
|
167
|
-
this._navigationAnchorBySession.delete(key);
|
|
168
|
-
return undefined;
|
|
169
|
-
}
|
|
170
|
-
const anchorId = this._navigationAnchorBySession.get(key);
|
|
171
|
-
let anchorIndex = anchorId ? feedbackItems.findIndex(item => item.id === anchorId) : -1;
|
|
172
|
-
if (anchorIndex < 0 && !next) {
|
|
173
|
-
anchorIndex = 0;
|
|
174
|
-
}
|
|
175
|
-
const nextIndex = next ? (anchorIndex + 1) % feedbackItems.length : (anchorIndex - 1 + feedbackItems.length) % feedbackItems.length;
|
|
176
|
-
const feedback = feedbackItems[nextIndex];
|
|
177
|
-
this._navigationAnchorBySession.set(key, feedback.id);
|
|
178
|
-
this._onDidChangeNavigation.fire(sessionResource);
|
|
179
|
-
return feedback;
|
|
180
|
-
}
|
|
181
|
-
getNavigationBearing(sessionResource) {
|
|
182
|
-
const key = ( sessionResource.toString());
|
|
183
|
-
const feedbackItems = this._feedbackBySession.get(key) ?? [];
|
|
184
|
-
const anchorId = this._navigationAnchorBySession.get(key);
|
|
185
|
-
const activeIdx = anchorId ? feedbackItems.findIndex(item => item.id === anchorId) : -1;
|
|
186
|
-
return {
|
|
187
|
-
activeIdx,
|
|
188
|
-
totalCount: feedbackItems.length
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
clearFeedback(sessionResource) {
|
|
192
|
-
const key = ( sessionResource.toString());
|
|
193
|
-
this._feedbackBySession.delete(key);
|
|
194
|
-
this._sessionUpdatedOrder.delete(key);
|
|
195
|
-
this._navigationAnchorBySession.delete(key);
|
|
196
|
-
this._onDidChangeNavigation.fire(sessionResource);
|
|
197
|
-
this._onDidChangeFeedback.fire({
|
|
198
|
-
sessionResource,
|
|
199
|
-
feedbackItems: []
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
async addFeedbackAndSubmit(sessionResource, resourceUri, range, text) {
|
|
203
|
-
this.addFeedback(sessionResource, resourceUri, range, text);
|
|
204
|
-
const widget = this._chatWidgetService.getWidgetBySessionResource(sessionResource);
|
|
205
|
-
if (widget) {
|
|
206
|
-
const attachmentId = "agentFeedback:" + ( sessionResource.toString());
|
|
207
|
-
const hasAttachment = () => ( widget.attachmentModel.attachments.some(a => a.id === attachmentId));
|
|
208
|
-
if (!hasAttachment()) {
|
|
209
|
-
await Event.toPromise(Event.filter(widget.attachmentModel.onDidChange, () => hasAttachment()));
|
|
210
|
-
}
|
|
211
|
-
} else {
|
|
212
|
-
await ( new Promise(resolve => setTimeout(resolve, 100)));
|
|
213
|
-
}
|
|
214
|
-
await this._commandService.executeCommand("agentFeedbackEditor.action.submit");
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
|
-
AgentFeedbackService = ( __decorate([( __param(0, IChatEditingService)), ( __param(1, IAgentSessionsService)), ( __param(2, IEditorService)), ( __param(3, IChatWidgetService)), ( __param(4, ICommandService))], AgentFeedbackService));
|
|
218
|
-
|
|
219
|
-
export { AgentFeedbackService };
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
2
|
-
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
|
-
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
4
|
-
import { AICustomizationManagementSection, IStorageSourceFilter } from "../../../../workbench/contrib/chat/common/aiCustomizationWorkspaceService.js";
|
|
5
|
-
import { IAICustomizationWorkspaceService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.service";
|
|
6
|
-
import { IChatPromptSlashCommand } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService";
|
|
7
|
-
import { IPromptsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service";
|
|
8
|
-
import { ISessionsManagementService } from "@codingame/monaco-vscode-api/vscode/vs/sessions/contrib/sessions/browser/sessionsManagementService.service";
|
|
9
|
-
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
10
|
-
import { PromptsType } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes";
|
|
11
|
-
import { IPathService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service";
|
|
12
|
-
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
13
|
-
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
14
|
-
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
15
|
-
import { INotificationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service";
|
|
16
|
-
/**
|
|
17
|
-
* Agent Sessions override of IAICustomizationWorkspaceService.
|
|
18
|
-
* Delegates to ISessionsManagementService to provide the active session's
|
|
19
|
-
* worktree/repository as the project root, and supports worktree commit.
|
|
20
|
-
*
|
|
21
|
-
* Customization files are always committed to the main repository so they
|
|
22
|
-
* persist across worktrees. When a worktree is active the file is also
|
|
23
|
-
* copied into the worktree and committed there so the running session
|
|
24
|
-
* picks it up immediately.
|
|
25
|
-
*/
|
|
26
|
-
export declare class SessionsAICustomizationWorkspaceService implements IAICustomizationWorkspaceService {
|
|
27
|
-
private readonly sessionsService;
|
|
28
|
-
private readonly instantiationService;
|
|
29
|
-
private readonly promptsService;
|
|
30
|
-
private readonly commandService;
|
|
31
|
-
private readonly logService;
|
|
32
|
-
private readonly fileService;
|
|
33
|
-
private readonly notificationService;
|
|
34
|
-
readonly _serviceBrand: undefined;
|
|
35
|
-
readonly activeProjectRoot: IObservable<URI | undefined>;
|
|
36
|
-
readonly hasOverrideProjectRoot: IObservable<boolean>;
|
|
37
|
-
/**
|
|
38
|
-
* Transient override for the project root. When set, `activeProjectRoot`
|
|
39
|
-
* returns this value instead of the session-derived root.
|
|
40
|
-
*/
|
|
41
|
-
private readonly _overrideRoot;
|
|
42
|
-
/**
|
|
43
|
-
* CLI-accessible user directories for customization file filtering and creation.
|
|
44
|
-
*/
|
|
45
|
-
private readonly _cliUserRoots;
|
|
46
|
-
/**
|
|
47
|
-
* Pre-built filter for types that should only show CLI-accessible user roots.
|
|
48
|
-
*/
|
|
49
|
-
private readonly _cliUserFilter;
|
|
50
|
-
constructor(sessionsService: ISessionsManagementService, instantiationService: IInstantiationService, promptsService: IPromptsService, pathService: IPathService, commandService: ICommandService, logService: ILogService, fileService: IFileService, notificationService: INotificationService);
|
|
51
|
-
getActiveProjectRoot(): URI | undefined;
|
|
52
|
-
setOverrideProjectRoot(root: URI): void;
|
|
53
|
-
clearOverrideProjectRoot(): void;
|
|
54
|
-
readonly managementSections: readonly AICustomizationManagementSection[];
|
|
55
|
-
private static readonly _hooksFilter;
|
|
56
|
-
private static readonly _allUserRootsFilter;
|
|
57
|
-
getStorageSourceFilter(type: PromptsType): IStorageSourceFilter;
|
|
58
|
-
readonly isSessionsWindow = true;
|
|
59
|
-
/**
|
|
60
|
-
* Commits customization files. Always commits to the main repository
|
|
61
|
-
* so the change persists across worktrees. When a worktree is active
|
|
62
|
-
* the file is also committed there so the session sees it immediately.
|
|
63
|
-
*/
|
|
64
|
-
commitFiles(_projectRoot: URI, fileUris: URI[]): Promise<void>;
|
|
65
|
-
/**
|
|
66
|
-
* Commits the deletion of files that have already been removed from disk.
|
|
67
|
-
* Always stages + commits the removal in the main repository, and also
|
|
68
|
-
* in the worktree if one is active.
|
|
69
|
-
*/
|
|
70
|
-
deleteFiles(_projectRoot: URI, fileUris: URI[]): Promise<void>;
|
|
71
|
-
/**
|
|
72
|
-
* Computes the repository-relative path for a file. The file may be
|
|
73
|
-
* located under the worktree or the repository root.
|
|
74
|
-
*/
|
|
75
|
-
private getRelativePath;
|
|
76
|
-
/**
|
|
77
|
-
* Commits a single file to the main repository and optionally the worktree.
|
|
78
|
-
* Copies the file content between trees when needed.
|
|
79
|
-
*/
|
|
80
|
-
private commitFileToRepos;
|
|
81
|
-
/**
|
|
82
|
-
* Commits the deletion of a file to the main repository and optionally
|
|
83
|
-
* the worktree. The file is already deleted from disk before this is called;
|
|
84
|
-
* `git add` on a deleted path stages the removal.
|
|
85
|
-
*/
|
|
86
|
-
private commitDeletionToRepos;
|
|
87
|
-
generateCustomization(type: PromptsType): Promise<void>;
|
|
88
|
-
getFilteredPromptSlashCommands(token: CancellationToken): Promise<readonly IChatPromptSlashCommand[]>;
|
|
89
|
-
}
|