@codingame/monaco-vscode-chat-service-override 30.0.0 → 31.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 +21 -3
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.d.ts +125 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.js +393 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.d.ts +65 -0
- package/vscode/src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.js +453 -0
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.d.ts +28 -0
- package/vscode/src/vs/platform/agentHost/browser/webSocketClientTransport.js +81 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.d.ts +75 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostFileSystemProvider.js +180 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +202 -51
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.d.ts +182 -0
- package/vscode/src/vs/platform/agentHost/common/state/agentSubscription.js +282 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +303 -32
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.js +14 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +1 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.js +9 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.d.ts +30 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.js +662 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +12 -5
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.js +9 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionCapabilities.d.ts +17 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionCapabilities.js +5 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +5 -5
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.js +14 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionTransport.d.ts +42 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionTransport.js +7 -0
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.d.ts +118 -0
- package/vscode/src/vs/platform/agentPlugins/common/pluginParsers.js +551 -0
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.d.ts +22 -0
- package/vscode/src/vs/platform/networkFilter/common/networkFilterService.js +83 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +16 -16
- 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.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +17 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +113 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +81 -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 +47 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +15 -10
- 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 +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +13 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +15 -14
- 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 +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +58 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +24 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +29 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionWorkingDirectoryResolver.js +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +65 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
- 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.js +4 -4
- 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 +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +28 -28
- 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/aiCustomization/aiCustomizationDebugPanel.d.ts +10 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +80 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +20 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +30 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.d.ts +131 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.js +363 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +31 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +374 -764
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.js +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +222 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +20 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +269 -123
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePage.js +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +249 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +5 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +14 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +113 -58
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +202 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationWelcomePromptLaunchers.css +246 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +15 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +162 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.js +306 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +581 -257
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +15 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +245 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +25 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +3 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +103 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +80 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +20 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +128 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +28 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -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 +2 -2
- 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 +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +10 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +4 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +4 -310
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +3 -30
- 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 +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +61 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatManagementEditor.css +0 -110
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +31 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +46 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +17 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +96 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +21 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +15 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +315 -263
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +196 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +56 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +8 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +26 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +48 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +6 -6
- 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.d.ts +2 -2
- 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 +8 -8
- 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 +11 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +226 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/telemetry/chatModelCountTelemetry.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/telemetry/chatModelCountTelemetry.js +82 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +108 -56
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +24 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +7 -7
- 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.d.ts +3 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +9 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +21 -80
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +26 -59
- 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 +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +46 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugEvents.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugEvents.js +60 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +32 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +152 -26
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +5 -9
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +265 -261
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +28 -2
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.js +75 -7
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +9 -1
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +32 -4
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +10 -25
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +7 -52
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +58 -466
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +3 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +36 -18
- 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 +0 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +168 -182
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +49 -29
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +491 -462
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +16 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +18 -12
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.d.ts +24 -4
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.js +145 -68
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +25 -25
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.js +19 -17
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +3 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +5 -17
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +77 -157
- 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 +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +17 -17
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibleView.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +21 -21
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +29 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +12 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +49 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +9 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +13 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.d.ts +53 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +319 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +15 -15
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +8 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +15 -15
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +2 -2
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.d.ts +21 -0
- package/vscode/src/vs/workbench/services/agentHost/common/agentHostFileSystemService.js +35 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.service.d.ts +0 -94
- package/vscode/src/vs/platform/agentHost/common/state/protocol/action-origin.generated.d.ts +0 -16
- package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.d.ts +0 -578
- package/vscode/src/vs/platform/agentHost/common/state/protocol/messages.d.ts +0 -206
- package/vscode/src/vs/platform/agentHost/common/state/protocol/notifications.d.ts +0 -114
- package/vscode/src/vs/platform/agentHost/common/state/protocol/state.d.ts +0 -860
- package/vscode/src/vs/platform/agentHost/common/state/sessionState.d.ts +0 -27
- package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +0 -58
- package/vscode/src/vs/platform/browserElements/common/browserElements.js +0 -16
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.d.ts +0 -18
- package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.js +0 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/media/simpleBrowserOverlay.css +0 -85
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +0 -443
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +0 -132
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatUsageWidget.css +0 -69
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +0 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +0 -66
- package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.js +0 -158
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.js +0 -41
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/commandFileWriteParser.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.d.ts +0 -26
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.js +0 -142
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +0 -45
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +0 -164
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +0 -163
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +0 -142
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +0 -29
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +0 -137
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +0 -174
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +0 -39
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +0 -32
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +0 -249
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +0 -92
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +0 -209
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +0 -106
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.d.ts +0 -31
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js +0 -392
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.d.ts +0 -45
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +0 -243
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +0 -52
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.js +0 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +0 -310
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +0 -168
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +0 -25
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/commandLinePresenter.d.ts +0 -41
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.js +0 -37
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.js +0 -37
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.js +0 -44
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +0 -21
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.js +0 -27
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.d.ts +0 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.js +0 -29
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.js +0 -33
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +0 -28
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +0 -118
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +0 -1019
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +0 -49
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.js +0 -23
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +0 -150
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +0 -1619
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +0 -41
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +0 -118
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/toolIds.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/toolIds.js +0 -17
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +0 -130
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +0 -122
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +0 -482
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
2
|
-
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
3
|
-
import { IExtensionsWorkbenchService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions.service";
|
|
4
|
-
export type InstallChatClassification = {
|
|
5
|
-
owner: "bpasero";
|
|
6
|
-
comment: "Provides insight into chat installation.";
|
|
7
|
-
installResult: {
|
|
8
|
-
classification: "SystemMetaData";
|
|
9
|
-
purpose: "FeatureInsight";
|
|
10
|
-
comment: "Whether the extension was installed successfully, cancelled or failed to install.";
|
|
11
|
-
};
|
|
12
|
-
installDuration: {
|
|
13
|
-
classification: "SystemMetaData";
|
|
14
|
-
purpose: "FeatureInsight";
|
|
15
|
-
comment: "The duration it took to install the extension.";
|
|
16
|
-
};
|
|
17
|
-
signUpErrorCode: {
|
|
18
|
-
classification: "SystemMetaData";
|
|
19
|
-
purpose: "FeatureInsight";
|
|
20
|
-
comment: "The error code in case of an error signing up.";
|
|
21
|
-
};
|
|
22
|
-
provider: {
|
|
23
|
-
classification: "SystemMetaData";
|
|
24
|
-
purpose: "FeatureInsight";
|
|
25
|
-
comment: "The provider used for the chat installation.";
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
export type InstallChatEvent = {
|
|
29
|
-
installResult: "installed" | "alreadyInstalled" | "cancelled" | "failedInstall" | "failedNotSignedIn" | "failedSignUp" | "failedNotTrusted" | "failedNoSession" | "failedMaybeLater" | "failedEnterpriseSetup";
|
|
30
|
-
installDuration: number;
|
|
31
|
-
signUpErrorCode: number | undefined;
|
|
32
|
-
provider: string | undefined;
|
|
33
|
-
};
|
|
34
|
-
export declare enum ChatSetupAnonymous {
|
|
35
|
-
Disabled = 0,
|
|
36
|
-
EnabledWithDialog = 1,
|
|
37
|
-
EnabledWithoutDialog = 2
|
|
38
|
-
}
|
|
39
|
-
export declare enum ChatSetupStep {
|
|
40
|
-
Initial = 1,
|
|
41
|
-
SigningIn = 2,
|
|
42
|
-
Installing = 3
|
|
43
|
-
}
|
|
44
|
-
export declare enum ChatSetupStrategy {
|
|
45
|
-
Canceled = 0,
|
|
46
|
-
DefaultSetup = 1,
|
|
47
|
-
SetupWithoutEnterpriseProvider = 2,
|
|
48
|
-
SetupWithEnterpriseProvider = 3,
|
|
49
|
-
SetupWithGoogleProvider = 4,
|
|
50
|
-
SetupWithAppleProvider = 5
|
|
51
|
-
}
|
|
52
|
-
export type ChatSetupResultValue = boolean | undefined;
|
|
53
|
-
export interface IChatSetupResult {
|
|
54
|
-
readonly success: ChatSetupResultValue;
|
|
55
|
-
readonly dialogSkipped: boolean;
|
|
56
|
-
}
|
|
57
|
-
export declare function refreshTokens(commandService: ICommandService): void;
|
|
58
|
-
/**
|
|
59
|
-
* Ensures the authentication provider extension is enabled.
|
|
60
|
-
* If the extension is found locally but disabled, it will be
|
|
61
|
-
* re-enabled and running extensions will be updated.
|
|
62
|
-
*
|
|
63
|
-
* @returns `true` if the extension was re-enabled, `false` otherwise.
|
|
64
|
-
*/
|
|
65
|
-
export declare function maybeEnableAuthExtension(extensionsWorkbenchService: IExtensionsWorkbenchService, logService: ILogService): Promise<boolean>;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { ExtensionIdentifier } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
|
|
3
|
-
import product from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/product';
|
|
4
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
5
|
-
import { EnablementState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionManagement/common/extensionManagement';
|
|
6
|
-
|
|
7
|
-
const defaultChat = {
|
|
8
|
-
completionsRefreshTokenCommand: product.defaultChatAgent?.completionsRefreshTokenCommand ?? "",
|
|
9
|
-
chatRefreshTokenCommand: product.defaultChatAgent?.chatRefreshTokenCommand ?? "",
|
|
10
|
-
providerExtensionId: product.defaultChatAgent?.providerExtensionId ?? ""
|
|
11
|
-
};
|
|
12
|
-
var ChatSetupAnonymous;
|
|
13
|
-
(function(ChatSetupAnonymous) {
|
|
14
|
-
ChatSetupAnonymous[ChatSetupAnonymous["Disabled"] = 0] = "Disabled";
|
|
15
|
-
ChatSetupAnonymous[ChatSetupAnonymous["EnabledWithDialog"] = 1] = "EnabledWithDialog";
|
|
16
|
-
ChatSetupAnonymous[ChatSetupAnonymous["EnabledWithoutDialog"] = 2] = "EnabledWithoutDialog";
|
|
17
|
-
})(ChatSetupAnonymous || (ChatSetupAnonymous = {}));
|
|
18
|
-
var ChatSetupStep;
|
|
19
|
-
(function(ChatSetupStep) {
|
|
20
|
-
ChatSetupStep[ChatSetupStep["Initial"] = 1] = "Initial";
|
|
21
|
-
ChatSetupStep[ChatSetupStep["SigningIn"] = 2] = "SigningIn";
|
|
22
|
-
ChatSetupStep[ChatSetupStep["Installing"] = 3] = "Installing";
|
|
23
|
-
})(ChatSetupStep || (ChatSetupStep = {}));
|
|
24
|
-
var ChatSetupStrategy;
|
|
25
|
-
(function(ChatSetupStrategy) {
|
|
26
|
-
ChatSetupStrategy[ChatSetupStrategy["Canceled"] = 0] = "Canceled";
|
|
27
|
-
ChatSetupStrategy[ChatSetupStrategy["DefaultSetup"] = 1] = "DefaultSetup";
|
|
28
|
-
ChatSetupStrategy[ChatSetupStrategy["SetupWithoutEnterpriseProvider"] = 2] = "SetupWithoutEnterpriseProvider";
|
|
29
|
-
ChatSetupStrategy[ChatSetupStrategy["SetupWithEnterpriseProvider"] = 3] = "SetupWithEnterpriseProvider";
|
|
30
|
-
ChatSetupStrategy[ChatSetupStrategy["SetupWithGoogleProvider"] = 4] = "SetupWithGoogleProvider";
|
|
31
|
-
ChatSetupStrategy[ChatSetupStrategy["SetupWithAppleProvider"] = 5] = "SetupWithAppleProvider";
|
|
32
|
-
})(ChatSetupStrategy || (ChatSetupStrategy = {}));
|
|
33
|
-
function refreshTokens(commandService) {
|
|
34
|
-
commandService.executeCommand(defaultChat.completionsRefreshTokenCommand);
|
|
35
|
-
commandService.executeCommand(defaultChat.chatRefreshTokenCommand);
|
|
36
|
-
}
|
|
37
|
-
async function maybeEnableAuthExtension(extensionsWorkbenchService, logService) {
|
|
38
|
-
if (!defaultChat.providerExtensionId) {
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
const providerExtension = extensionsWorkbenchService.local.find(
|
|
42
|
-
e => ExtensionIdentifier.equals(e.identifier.id, defaultChat.providerExtensionId)
|
|
43
|
-
);
|
|
44
|
-
if (!providerExtension) {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
if (providerExtension.enablementState === EnablementState.DisabledGlobally || providerExtension.enablementState === EnablementState.DisabledWorkspace) {
|
|
48
|
-
logService.info(
|
|
49
|
-
`[chat setup] auth provider extension '${defaultChat.providerExtensionId}' is disabled, re-enabling it`
|
|
50
|
-
);
|
|
51
|
-
try {
|
|
52
|
-
await extensionsWorkbenchService.setEnablement([providerExtension], EnablementState.EnabledGlobally);
|
|
53
|
-
await extensionsWorkbenchService.updateRunningExtensions(( localize(6240, "Enabling GitHub Authentication")));
|
|
54
|
-
return true;
|
|
55
|
-
} catch (error) {
|
|
56
|
-
logService.error(
|
|
57
|
-
`[chat setup] failed to re-enable auth provider extension '${defaultChat.providerExtensionId}'`,
|
|
58
|
-
error
|
|
59
|
-
);
|
|
60
|
-
return false;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export { ChatSetupAnonymous, ChatSetupStep, ChatSetupStrategy, maybeEnableAuthExtension, refreshTokens };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
-
import { IResponse } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
|
|
3
|
-
import { IArtifactGroupConfig, IChatArtifact } from "./tools/chatArtifactsService.js";
|
|
4
|
-
/**
|
|
5
|
-
* Extracts artifacts from a single response's content parts, applying the given rules.
|
|
6
|
-
* Pure function, no side effects.
|
|
7
|
-
*/
|
|
8
|
-
export declare function extractArtifactsFromResponse(response: IResponse, sessionResource: URI, byMimeType: Record<string, IArtifactGroupConfig>, byFilePath: Record<string, IArtifactGroupConfig>): IChatArtifact[];
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { match } from '@codingame/monaco-vscode-api/vscode/vs/base/common/glob';
|
|
3
|
-
import { getExtensionForMimeType } from '@codingame/monaco-vscode-api/vscode/vs/base/common/mime';
|
|
4
|
-
import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
|
|
5
|
-
import { basename as basename$1 } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
6
|
-
import { IChatToolInvocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
7
|
-
import { ChatResponseResource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel';
|
|
8
|
-
import { isToolResultInputOutputDetails } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
9
|
-
|
|
10
|
-
function matchMimeType(pattern, mimeType) {
|
|
11
|
-
if (pattern === mimeType) {
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
const [patternType, patternSubtype] = pattern.split("/");
|
|
15
|
-
const [type] = mimeType.split("/");
|
|
16
|
-
return patternSubtype === "*" && patternType === type;
|
|
17
|
-
}
|
|
18
|
-
function findFilePathRule(filePath, byFilePath) {
|
|
19
|
-
const fileBasename = basename(filePath);
|
|
20
|
-
for (const [pattern, config] of Object.entries(byFilePath)) {
|
|
21
|
-
if (match(pattern, filePath) || match(pattern, fileBasename)) {
|
|
22
|
-
return config;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return undefined;
|
|
26
|
-
}
|
|
27
|
-
function findMimeTypeRule(mimeType, byMimeType) {
|
|
28
|
-
for (const [pattern, config] of Object.entries(byMimeType)) {
|
|
29
|
-
if (matchMimeType(pattern, mimeType)) {
|
|
30
|
-
return config;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return undefined;
|
|
34
|
-
}
|
|
35
|
-
function isToolResultOutputDetailsSerialized(obj) {
|
|
36
|
-
return typeof obj === "object" && obj !== null && "output" in obj && typeof obj.output === "object" && obj.output?.type === "data" && typeof obj.output?.mimeType === "string";
|
|
37
|
-
}
|
|
38
|
-
function extractArtifactsFromResponse(response, sessionResource, byMimeType, byFilePath) {
|
|
39
|
-
const artifacts = [];
|
|
40
|
-
const seenUris = ( new Set());
|
|
41
|
-
for (const part of response.value) {
|
|
42
|
-
if (part.kind === "codeblockUri") {
|
|
43
|
-
const uri = part.uri;
|
|
44
|
-
const uriStr = ( uri.toString());
|
|
45
|
-
if (( seenUris.has(uriStr))) {
|
|
46
|
-
continue;
|
|
47
|
-
}
|
|
48
|
-
const rule = findFilePathRule(uri.path, byFilePath);
|
|
49
|
-
if (rule) {
|
|
50
|
-
seenUris.add(uriStr);
|
|
51
|
-
artifacts.push({
|
|
52
|
-
label: basename$1(uri),
|
|
53
|
-
uri: uriStr,
|
|
54
|
-
type: "plan",
|
|
55
|
-
groupName: rule.groupName,
|
|
56
|
-
onlyShowGroup: rule.onlyShowGroup
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
if (part.kind === "textEditGroup") {
|
|
61
|
-
const uri = part.uri;
|
|
62
|
-
const uriStr = ( uri.toString());
|
|
63
|
-
if (( seenUris.has(uriStr))) {
|
|
64
|
-
continue;
|
|
65
|
-
}
|
|
66
|
-
const rule = findFilePathRule(uri.path, byFilePath);
|
|
67
|
-
if (rule) {
|
|
68
|
-
seenUris.add(uriStr);
|
|
69
|
-
artifacts.push({
|
|
70
|
-
label: basename$1(uri),
|
|
71
|
-
uri: uriStr,
|
|
72
|
-
type: "plan",
|
|
73
|
-
groupName: rule.groupName,
|
|
74
|
-
onlyShowGroup: rule.onlyShowGroup
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
if (part.kind === "workspaceEdit") {
|
|
79
|
-
for (const edit of part.edits) {
|
|
80
|
-
const uri = edit.newResource ?? edit.oldResource;
|
|
81
|
-
if (!uri) {
|
|
82
|
-
continue;
|
|
83
|
-
}
|
|
84
|
-
const uriStr = ( uri.toString());
|
|
85
|
-
if (( seenUris.has(uriStr))) {
|
|
86
|
-
continue;
|
|
87
|
-
}
|
|
88
|
-
const rule = findFilePathRule(uri.path, byFilePath);
|
|
89
|
-
if (rule) {
|
|
90
|
-
seenUris.add(uriStr);
|
|
91
|
-
artifacts.push({
|
|
92
|
-
label: basename$1(uri),
|
|
93
|
-
uri: uriStr,
|
|
94
|
-
type: "plan",
|
|
95
|
-
groupName: rule.groupName,
|
|
96
|
-
onlyShowGroup: rule.onlyShowGroup
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
if (part.kind === "toolInvocation" || part.kind === "toolInvocationSerialized") {
|
|
102
|
-
const details = IChatToolInvocation.resultDetails(part);
|
|
103
|
-
if (!details) {
|
|
104
|
-
continue;
|
|
105
|
-
}
|
|
106
|
-
if (isToolResultInputOutputDetails(details)) {
|
|
107
|
-
for (let i = 0; i < details.output.length; i++) {
|
|
108
|
-
const outputPart = details.output[i];
|
|
109
|
-
if (outputPart.type === "embed" && !outputPart.isText && outputPart.mimeType) {
|
|
110
|
-
const rule = findMimeTypeRule(outputPart.mimeType, byMimeType);
|
|
111
|
-
if (rule) {
|
|
112
|
-
const key = `${part.toolCallId}:${i}`;
|
|
113
|
-
if (!( seenUris.has(key))) {
|
|
114
|
-
seenUris.add(key);
|
|
115
|
-
const ext = getExtensionForMimeType(outputPart.mimeType);
|
|
116
|
-
const permalinkBasename = ext ? `file${ext}` : "file.bin";
|
|
117
|
-
const artifactUri = ChatResponseResource.createUri(sessionResource, part.toolCallId, i, permalinkBasename);
|
|
118
|
-
artifacts.push({
|
|
119
|
-
label: outputPart.uri?.path.split("/").pop() ?? `${rule.groupName} ${i + 1}`,
|
|
120
|
-
uri: ( artifactUri.toString()),
|
|
121
|
-
toolCallId: part.toolCallId,
|
|
122
|
-
dataPartIndex: i,
|
|
123
|
-
type: "screenshot",
|
|
124
|
-
groupName: rule.groupName,
|
|
125
|
-
onlyShowGroup: rule.onlyShowGroup
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
if (isToolResultOutputDetailsSerialized(details)) {
|
|
133
|
-
const rule = findMimeTypeRule(details.output.mimeType, byMimeType);
|
|
134
|
-
if (rule) {
|
|
135
|
-
const key = `${part.toolCallId}:0`;
|
|
136
|
-
if (!( seenUris.has(key))) {
|
|
137
|
-
seenUris.add(key);
|
|
138
|
-
const ext = getExtensionForMimeType(details.output.mimeType);
|
|
139
|
-
const permalinkBasename = ext ? `file${ext}` : "file.bin";
|
|
140
|
-
const artifactUri = ChatResponseResource.createUri(sessionResource, part.toolCallId, 0, permalinkBasename);
|
|
141
|
-
artifacts.push({
|
|
142
|
-
label: `${rule.groupName}`,
|
|
143
|
-
uri: ( artifactUri.toString()),
|
|
144
|
-
toolCallId: part.toolCallId,
|
|
145
|
-
dataPartIndex: 0,
|
|
146
|
-
type: "screenshot",
|
|
147
|
-
groupName: rule.groupName,
|
|
148
|
-
onlyShowGroup: rule.onlyShowGroup
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
return artifacts;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export { extractArtifactsFromResponse };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service";
|
|
2
|
-
export declare function getRecommendedToolsOverRunInTerminal(commandLine: string, languageModelToolsService: ILanguageModelToolsService): string | undefined;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
let previouslyRecommededInSession = false;
|
|
4
|
-
const terminalCommands = [{
|
|
5
|
-
commands: [( new RegExp(/^python3? -m pip install(\b)/)), ( new RegExp(/^pip3? install(\b)/))],
|
|
6
|
-
tags: ["python environment"]
|
|
7
|
-
}, {
|
|
8
|
-
commands: [( new RegExp(/^python3? -m jupyter(\b)/)), ( new RegExp(/^python3? -m pip install\b.*jupyter\b.*/)), ( new RegExp(/^pip3? install\b.*jupyter\b.*/)), (
|
|
9
|
-
new RegExp(/^jupyter(\b)/))],
|
|
10
|
-
tags: ["python environment", "jupyter environment"]
|
|
11
|
-
}];
|
|
12
|
-
function getRecommendedToolsOverRunInTerminal(commandLine, languageModelToolsService) {
|
|
13
|
-
const tools = languageModelToolsService.getTools(undefined);
|
|
14
|
-
if (!tools || previouslyRecommededInSession) {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
const recommendedTools = ( new Set());
|
|
18
|
-
const messages = [
|
|
19
|
-
`The terminal command '${commandLine}' was not executed.`,
|
|
20
|
-
`Try using some of the following tools instead of running a Terminal Command (if unable to use one of these tools as an alternative then run the same terminal command again):`
|
|
21
|
-
];
|
|
22
|
-
for (const terminalCommand of terminalCommands) {
|
|
23
|
-
if (!( terminalCommand.commands.some(condition => condition.test(commandLine)))) {
|
|
24
|
-
continue;
|
|
25
|
-
}
|
|
26
|
-
const tagsToSearchFor = terminalCommand.tags;
|
|
27
|
-
Array.from(tools).filter(t => ( tagsToSearchFor.some(tag => t.tags?.includes(tag)))).forEach(tool => {
|
|
28
|
-
recommendedTools.add(tool.id);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
recommendedTools.forEach(toolName => {
|
|
32
|
-
messages.push(`- ${toolName}`);
|
|
33
|
-
});
|
|
34
|
-
if (recommendedTools.size) {
|
|
35
|
-
previouslyRecommededInSession = true;
|
|
36
|
-
return messages.join(" \n");
|
|
37
|
-
}
|
|
38
|
-
return undefined;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export { getRecommendedToolsOverRunInTerminal };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interface for command-specific file write parsers.
|
|
3
|
-
* Each parser is responsible for detecting when a specific command will write to files
|
|
4
|
-
* (beyond simple shell redirections which are handled separately via tree-sitter queries).
|
|
5
|
-
*/
|
|
6
|
-
export interface ICommandFileWriteParser {
|
|
7
|
-
/**
|
|
8
|
-
* The name of the command this parser handles (e.g., 'sed', 'tee').
|
|
9
|
-
*/
|
|
10
|
-
readonly commandName: string;
|
|
11
|
-
/**
|
|
12
|
-
* Checks if this parser can handle the given command text.
|
|
13
|
-
* Should return true only if the command would write to files.
|
|
14
|
-
* @param commandText The full text of a single command (not a pipeline).
|
|
15
|
-
*/
|
|
16
|
-
canHandle(commandText: string): boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Extracts the file paths that would be written to by this command.
|
|
19
|
-
* Should only be called if canHandle() returns true.
|
|
20
|
-
* @param commandText The full text of a single command (not a pipeline).
|
|
21
|
-
* @returns Array of file paths that would be modified.
|
|
22
|
-
*/
|
|
23
|
-
extractFileWrites(commandText: string): string[];
|
|
24
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ICommandFileWriteParser } from "./commandFileWriteParser.js";
|
|
2
|
-
/**
|
|
3
|
-
* Parser for detecting file writes from `sed` commands using in-place editing.
|
|
4
|
-
*
|
|
5
|
-
* Handles:
|
|
6
|
-
* - `sed -i 's/foo/bar/' file.txt` (GNU)
|
|
7
|
-
* - `sed -i.bak 's/foo/bar/' file.txt` (GNU with backup suffix)
|
|
8
|
-
* - `sed -i '' 's/foo/bar/' file.txt` (macOS/BSD with empty backup suffix)
|
|
9
|
-
* - `sed --in-place 's/foo/bar/' file.txt` (GNU long form)
|
|
10
|
-
* - `sed --in-place=.bak 's/foo/bar/' file.txt` (GNU long form with backup)
|
|
11
|
-
* - `sed -I 's/foo/bar/' file.txt` (BSD case-insensitive variant)
|
|
12
|
-
*/
|
|
13
|
-
export declare class SedFileWriteParser implements ICommandFileWriteParser {
|
|
14
|
-
readonly commandName = "sed";
|
|
15
|
-
canHandle(commandText: string): boolean;
|
|
16
|
-
extractFileWrites(commandText: string): string[];
|
|
17
|
-
/**
|
|
18
|
-
* Tokenizes a command into individual arguments, handling quotes and escapes.
|
|
19
|
-
*/
|
|
20
|
-
private _tokenizeCommand;
|
|
21
|
-
/**
|
|
22
|
-
* Extracts file targets from tokenized sed command arguments.
|
|
23
|
-
* Files are generally the last non-option, non-script arguments.
|
|
24
|
-
*/
|
|
25
|
-
private _extractFileTargets;
|
|
26
|
-
}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
class SedFileWriteParser {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.commandName = 'sed';
|
|
6
|
-
}
|
|
7
|
-
canHandle(commandText) {
|
|
8
|
-
if (!commandText.match(/^sed\s+/)) {
|
|
9
|
-
return false;
|
|
10
|
-
}
|
|
11
|
-
const inPlaceRegex = /(?:^|\s)(-[a-zA-Z]*[iI][a-zA-Z]*\S*|--in-place(?:=\S*)?|(-i|-I)\s*'[^']*'|(-i|-I)\s*"[^"]*")(?:\s|$)/;
|
|
12
|
-
return inPlaceRegex.test(commandText);
|
|
13
|
-
}
|
|
14
|
-
extractFileWrites(commandText) {
|
|
15
|
-
const tokens = this._tokenizeCommand(commandText);
|
|
16
|
-
return this._extractFileTargets(tokens);
|
|
17
|
-
}
|
|
18
|
-
_tokenizeCommand(commandText) {
|
|
19
|
-
const tokens = [];
|
|
20
|
-
let current = '';
|
|
21
|
-
let inSingleQuote = false;
|
|
22
|
-
let inDoubleQuote = false;
|
|
23
|
-
let escaped = false;
|
|
24
|
-
for (let i = 0; i < commandText.length; i++) {
|
|
25
|
-
const char = commandText[i];
|
|
26
|
-
if (escaped) {
|
|
27
|
-
current += char;
|
|
28
|
-
escaped = false;
|
|
29
|
-
continue;
|
|
30
|
-
}
|
|
31
|
-
if (char === '\\' && !inSingleQuote) {
|
|
32
|
-
escaped = true;
|
|
33
|
-
current += char;
|
|
34
|
-
continue;
|
|
35
|
-
}
|
|
36
|
-
if (char === '\'' && !inDoubleQuote) {
|
|
37
|
-
inSingleQuote = !inSingleQuote;
|
|
38
|
-
current += char;
|
|
39
|
-
continue;
|
|
40
|
-
}
|
|
41
|
-
if (char === '"' && !inSingleQuote) {
|
|
42
|
-
inDoubleQuote = !inDoubleQuote;
|
|
43
|
-
current += char;
|
|
44
|
-
continue;
|
|
45
|
-
}
|
|
46
|
-
if (/\s/.test(char) && !inSingleQuote && !inDoubleQuote) {
|
|
47
|
-
if (current) {
|
|
48
|
-
tokens.push(current);
|
|
49
|
-
current = '';
|
|
50
|
-
}
|
|
51
|
-
continue;
|
|
52
|
-
}
|
|
53
|
-
current += char;
|
|
54
|
-
}
|
|
55
|
-
if (current) {
|
|
56
|
-
tokens.push(current);
|
|
57
|
-
}
|
|
58
|
-
return tokens;
|
|
59
|
-
}
|
|
60
|
-
_extractFileTargets(tokens) {
|
|
61
|
-
if (tokens.length === 0 || tokens[0] !== 'sed') {
|
|
62
|
-
return [];
|
|
63
|
-
}
|
|
64
|
-
const files = [];
|
|
65
|
-
let i = 1;
|
|
66
|
-
let foundScript = false;
|
|
67
|
-
while (i < tokens.length) {
|
|
68
|
-
const token = tokens[i];
|
|
69
|
-
if (token.startsWith('--')) {
|
|
70
|
-
if (token === '--in-place' || token.startsWith('--in-place=')) {
|
|
71
|
-
i++;
|
|
72
|
-
continue;
|
|
73
|
-
}
|
|
74
|
-
if (token === '--expression' || token === '--file') {
|
|
75
|
-
i += 2;
|
|
76
|
-
foundScript = true;
|
|
77
|
-
continue;
|
|
78
|
-
}
|
|
79
|
-
if (token.startsWith('--expression=') || token.startsWith('--file=')) {
|
|
80
|
-
i++;
|
|
81
|
-
foundScript = true;
|
|
82
|
-
continue;
|
|
83
|
-
}
|
|
84
|
-
i++;
|
|
85
|
-
continue;
|
|
86
|
-
}
|
|
87
|
-
if (token.startsWith('-') && token.length > 1 && token[1] !== '-') {
|
|
88
|
-
const flags = token.slice(1);
|
|
89
|
-
const iIndex = flags.indexOf('i');
|
|
90
|
-
const IIndex = flags.indexOf('I');
|
|
91
|
-
const inPlaceIndex = iIndex >= 0 ? iIndex : IIndex;
|
|
92
|
-
if (inPlaceIndex >= 0 && inPlaceIndex < flags.length - 1) {
|
|
93
|
-
i++;
|
|
94
|
-
continue;
|
|
95
|
-
}
|
|
96
|
-
if ((flags.endsWith('i') || flags.endsWith('I')) && i + 1 < tokens.length) {
|
|
97
|
-
const nextToken = tokens[i + 1];
|
|
98
|
-
if (nextToken === '\'\'' || nextToken === '""') {
|
|
99
|
-
i += 2;
|
|
100
|
-
continue;
|
|
101
|
-
}
|
|
102
|
-
if ((nextToken.startsWith('\'') && nextToken.endsWith('\'')) || (nextToken.startsWith('"') && nextToken.endsWith('"'))) {
|
|
103
|
-
const unquoted = nextToken.slice(1, -1);
|
|
104
|
-
if (unquoted.startsWith('.') && unquoted.length <= 10 && !unquoted.includes('/')) {
|
|
105
|
-
i += 2;
|
|
106
|
-
continue;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
if (flags.includes('e') || flags.includes('f')) {
|
|
111
|
-
const eIndex = flags.indexOf('e');
|
|
112
|
-
const fIndex = flags.indexOf('f');
|
|
113
|
-
const optIndex = eIndex >= 0 ? eIndex : fIndex;
|
|
114
|
-
if (optIndex < flags.length - 1) {
|
|
115
|
-
foundScript = true;
|
|
116
|
-
i++;
|
|
117
|
-
continue;
|
|
118
|
-
}
|
|
119
|
-
foundScript = true;
|
|
120
|
-
i += 2;
|
|
121
|
-
continue;
|
|
122
|
-
}
|
|
123
|
-
i++;
|
|
124
|
-
continue;
|
|
125
|
-
}
|
|
126
|
-
if (!foundScript) {
|
|
127
|
-
foundScript = true;
|
|
128
|
-
i++;
|
|
129
|
-
continue;
|
|
130
|
-
}
|
|
131
|
-
let file = token;
|
|
132
|
-
if ((file.startsWith('\'') && file.endsWith('\'')) || (file.startsWith('"') && file.endsWith('"'))) {
|
|
133
|
-
file = file.slice(1, -1);
|
|
134
|
-
}
|
|
135
|
-
files.push(file);
|
|
136
|
-
i++;
|
|
137
|
-
}
|
|
138
|
-
return files;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export { SedFileWriteParser };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
-
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
3
|
-
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
4
|
-
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
5
|
-
import type { ICommandDetectionCapability } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/capabilities/capabilities";
|
|
6
|
-
import { ITerminalLogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal.service";
|
|
7
|
-
import { type ITerminalExecuteStrategy, type ITerminalExecuteStrategyResult } from "./executeStrategy.js";
|
|
8
|
-
import type { IMarker as IXtermMarker } from "@xterm/xterm";
|
|
9
|
-
import { ITerminalInstance } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal";
|
|
10
|
-
/**
|
|
11
|
-
* This strategy is used when shell integration is enabled, but rich command detection was not
|
|
12
|
-
* declared by the shell script. This is the large spectrum between rich command detection and no
|
|
13
|
-
* shell integration, here are some problems that are expected:
|
|
14
|
-
*
|
|
15
|
-
* - `133;C` command executed may not happen.
|
|
16
|
-
* - `633;E` comamnd line reporting will likely not happen, so the command line contained in the
|
|
17
|
-
* execution start and end events will be of low confidence and chances are it will be wrong.
|
|
18
|
-
* - Execution tracking may be incorrect, particularly when `executeCommand` calls are overlapped,
|
|
19
|
-
* such as Python activating the environment at the same time as Copilot executing a command. So
|
|
20
|
-
* the end event for the execution may actually correspond to a different command.
|
|
21
|
-
*
|
|
22
|
-
* This strategy focuses on trying to get the most accurate output given these limitations and
|
|
23
|
-
* unknowns. Basically we cannot fully trust the extension APIs in this case, so polling of the data
|
|
24
|
-
* stream is used to detect idling, and we listen to the terminal's data stream instead of the
|
|
25
|
-
* execution's data stream.
|
|
26
|
-
*
|
|
27
|
-
* This is best effort with the goal being the output is accurate, though it may contain some
|
|
28
|
-
* content above and below the command output, such as prompts or even possibly other command
|
|
29
|
-
* output. We lean on the LLM to be able to differentiate the actual output from prompts and bad
|
|
30
|
-
* output when it's not ideal.
|
|
31
|
-
*/
|
|
32
|
-
export declare class BasicExecuteStrategy extends Disposable implements ITerminalExecuteStrategy {
|
|
33
|
-
private readonly _instance;
|
|
34
|
-
private readonly _hasReceivedUserInput;
|
|
35
|
-
private readonly _commandDetection;
|
|
36
|
-
private readonly _configurationService;
|
|
37
|
-
private readonly _logService;
|
|
38
|
-
readonly type = "basic";
|
|
39
|
-
private readonly _startMarker;
|
|
40
|
-
private readonly _onDidCreateStartMarker;
|
|
41
|
-
onDidCreateStartMarker: Event<IXtermMarker | undefined>;
|
|
42
|
-
constructor(_instance: ITerminalInstance, _hasReceivedUserInput: () => boolean, _commandDetection: ICommandDetectionCapability, _configurationService: IConfigurationService, _logService: ITerminalLogService);
|
|
43
|
-
execute(commandLine: string, token: CancellationToken, commandId?: string): Promise<ITerminalExecuteStrategyResult>;
|
|
44
|
-
private _log;
|
|
45
|
-
}
|