@umsai/ums-code 0.1.4-v2 → 0.3.0-v1
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/dist/package.json +11 -3
- package/dist/src/config/config.d.ts +6 -0
- package/dist/src/config/config.js +102 -11
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/settings.d.ts +5 -0
- package/dist/src/config/settings.js +15 -1
- package/dist/src/config/settings.js.map +1 -1
- package/dist/src/config/settingsSchema.d.ts +75 -17
- package/dist/src/config/settingsSchema.js +57 -17
- package/dist/src/config/settingsSchema.js.map +1 -1
- package/dist/src/config/webSearch.d.ts +35 -0
- package/dist/src/config/webSearch.js +87 -0
- package/dist/src/config/webSearch.js.map +1 -0
- package/dist/src/core/auth.d.ts +1 -1
- package/dist/src/core/auth.js +19 -3
- package/dist/src/core/auth.js.map +1 -1
- package/dist/src/core/initializer.js +13 -2
- package/dist/src/core/initializer.js.map +1 -1
- package/dist/src/core/theme.js +4 -1
- package/dist/src/core/theme.js.map +1 -1
- package/dist/src/gemini.d.ts +1 -1
- package/dist/src/gemini.js +53 -44
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/gemini.test.js +117 -0
- package/dist/src/gemini.test.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +2 -2
- package/dist/src/generated/git-commit.js +2 -2
- package/dist/src/i18n/index.d.ts +18 -0
- package/dist/src/i18n/index.js +184 -0
- package/dist/src/i18n/index.js.map +1 -0
- package/dist/src/i18n/locales/en.js +1129 -0
- package/dist/src/i18n/locales/zh.js +1052 -0
- package/dist/src/nonInteractive/control/ControlContext.d.ts +63 -0
- package/dist/src/nonInteractive/control/ControlContext.js +31 -0
- package/dist/src/nonInteractive/control/ControlContext.js.map +1 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.d.ts +86 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.js +238 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.js.map +1 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.test.d.ts +6 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.test.js +549 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.test.js.map +1 -0
- package/dist/src/nonInteractive/control/ControlService.d.ts +78 -0
- package/dist/src/nonInteractive/control/ControlService.js +154 -0
- package/dist/src/nonInteractive/control/ControlService.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/baseController.d.ts +50 -0
- package/dist/src/nonInteractive/control/controllers/baseController.js +102 -0
- package/dist/src/nonInteractive/control/controllers/baseController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/hookController.d.ts +25 -0
- package/dist/src/nonInteractive/control/controllers/hookController.js +42 -0
- package/dist/src/nonInteractive/control/controllers/hookController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/mcpController.d.ts +42 -0
- package/dist/src/nonInteractive/control/controllers/mcpController.js +205 -0
- package/dist/src/nonInteractive/control/controllers/mcpController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/permissionController.d.ts +78 -0
- package/dist/src/nonInteractive/control/controllers/permissionController.js +358 -0
- package/dist/src/nonInteractive/control/controllers/permissionController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/systemController.d.ts +56 -0
- package/dist/src/nonInteractive/control/controllers/systemController.js +166 -0
- package/dist/src/nonInteractive/control/controllers/systemController.js.map +1 -0
- package/dist/src/nonInteractive/control/types/serviceAPIs.d.ts +120 -0
- package/dist/src/nonInteractive/control/types/serviceAPIs.js +7 -0
- package/dist/src/nonInteractive/control/types/serviceAPIs.js.map +1 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.d.ts +446 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.js +891 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.js.map +1 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.test.d.ts +6 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.test.js +1197 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.test.js.map +1 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.d.ts +29 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.js +56 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.js.map +1 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.test.d.ts +6 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.test.js +624 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.test.js.map +1 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.d.ts +16 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.js +54 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.js.map +1 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.test.d.ts +6 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.test.js +178 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.test.js.map +1 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.d.ts +69 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.js +185 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.js.map +1 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.d.ts +6 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.js +808 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.js.map +1 -0
- package/dist/src/nonInteractive/session.d.ts +23 -0
- package/dist/src/nonInteractive/session.js +549 -0
- package/dist/src/nonInteractive/session.js.map +1 -0
- package/dist/src/nonInteractive/session.test.d.ts +6 -0
- package/dist/src/nonInteractive/session.test.js +407 -0
- package/dist/src/nonInteractive/session.test.js.map +1 -0
- package/dist/src/nonInteractive/types.d.ts +344 -0
- package/dist/src/nonInteractive/types.js +78 -0
- package/dist/src/nonInteractive/types.js.map +1 -0
- package/dist/src/nonInteractiveCli.d.ts +21 -1
- package/dist/src/nonInteractiveCli.js +204 -57
- package/dist/src/nonInteractiveCli.js.map +1 -1
- package/dist/src/nonInteractiveCliCommands.d.ts +19 -1
- package/dist/src/nonInteractiveCliCommands.js +69 -4
- package/dist/src/nonInteractiveCliCommands.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.js +2 -0
- package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
- package/dist/src/services/FileCommandLoader.js +4 -1
- package/dist/src/services/FileCommandLoader.js.map +1 -1
- package/dist/src/ui/AppContainer.js +41 -38
- package/dist/src/ui/AppContainer.js.map +1 -1
- package/dist/src/ui/auth/AuthDialog.d.ts +1 -13
- package/dist/src/ui/auth/AuthDialog.js +41 -111
- package/dist/src/ui/auth/AuthDialog.js.map +1 -1
- package/dist/src/ui/auth/AuthDialog.test.js +49 -19
- package/dist/src/ui/auth/AuthDialog.test.js.map +1 -1
- package/dist/src/ui/auth/AuthInProgress.js +2 -1
- package/dist/src/ui/auth/AuthInProgress.js.map +1 -1
- package/dist/src/ui/auth/useAuth.d.ts +9 -8
- package/dist/src/ui/auth/useAuth.js +135 -63
- package/dist/src/ui/auth/useAuth.js.map +1 -1
- package/dist/src/ui/commands/aboutCommand.js +7 -31
- package/dist/src/ui/commands/aboutCommand.js.map +1 -1
- package/dist/src/ui/commands/agentsCommand.js +10 -3
- package/dist/src/ui/commands/agentsCommand.js.map +1 -1
- package/dist/src/ui/commands/approvalModeCommand.js +8 -329
- package/dist/src/ui/commands/approvalModeCommand.js.map +1 -1
- package/dist/src/ui/commands/approvalModeCommand.test.js +19 -263
- package/dist/src/ui/commands/approvalModeCommand.test.js.map +1 -1
- package/dist/src/ui/commands/authCommand.js +4 -1
- package/dist/src/ui/commands/authCommand.js.map +1 -1
- package/dist/src/ui/commands/bugCommand.js +13 -47
- package/dist/src/ui/commands/bugCommand.js.map +1 -1
- package/dist/src/ui/commands/chatCommand.js +51 -25
- package/dist/src/ui/commands/chatCommand.js.map +1 -1
- package/dist/src/ui/commands/clearCommand.js +6 -3
- package/dist/src/ui/commands/clearCommand.js.map +1 -1
- package/dist/src/ui/commands/compressCommand.js +9 -4
- package/dist/src/ui/commands/compressCommand.js.map +1 -1
- package/dist/src/ui/commands/copyCommand.js +4 -1
- package/dist/src/ui/commands/copyCommand.js.map +1 -1
- package/dist/src/ui/commands/directoryCommand.js +30 -12
- package/dist/src/ui/commands/directoryCommand.js.map +1 -1
- package/dist/src/ui/commands/docsCommand.js +9 -3
- package/dist/src/ui/commands/docsCommand.js.map +1 -1
- package/dist/src/ui/commands/editorCommand.js +4 -1
- package/dist/src/ui/commands/editorCommand.js.map +1 -1
- package/dist/src/ui/commands/extensionsCommand.js +10 -3
- package/dist/src/ui/commands/extensionsCommand.js.map +1 -1
- package/dist/src/ui/commands/helpCommand.js +4 -1
- package/dist/src/ui/commands/helpCommand.js.map +1 -1
- package/dist/src/ui/commands/ideCommand.js +23 -7
- package/dist/src/ui/commands/ideCommand.js.map +1 -1
- package/dist/src/ui/commands/initCommand.js +5 -3
- package/dist/src/ui/commands/initCommand.js.map +1 -1
- package/dist/src/ui/commands/languageCommand.d.ts +7 -0
- package/dist/src/ui/commands/languageCommand.js +386 -0
- package/dist/src/ui/commands/languageCommand.js.map +1 -0
- package/dist/src/ui/commands/mcpCommand.js +38 -18
- package/dist/src/ui/commands/mcpCommand.js.map +1 -1
- package/dist/src/ui/commands/memoryCommand.js +54 -25
- package/dist/src/ui/commands/memoryCommand.js.map +1 -1
- package/dist/src/ui/commands/modelCommand.js +9 -4
- package/dist/src/ui/commands/modelCommand.js.map +1 -1
- package/dist/src/ui/commands/permissionsCommand.js +4 -1
- package/dist/src/ui/commands/permissionsCommand.js.map +1 -1
- package/dist/src/ui/commands/quitCommand.js +7 -2
- package/dist/src/ui/commands/quitCommand.js.map +1 -1
- package/dist/src/ui/commands/settingsCommand.js +4 -1
- package/dist/src/ui/commands/settingsCommand.js.map +1 -1
- package/dist/src/ui/commands/setupGithubCommand.js +4 -1
- package/dist/src/ui/commands/setupGithubCommand.js.map +1 -1
- package/dist/src/ui/commands/statsCommand.js +11 -4
- package/dist/src/ui/commands/statsCommand.js.map +1 -1
- package/dist/src/ui/commands/summaryCommand.js +15 -8
- package/dist/src/ui/commands/summaryCommand.js.map +1 -1
- package/dist/src/ui/commands/terminalSetupCommand.js +9 -3
- package/dist/src/ui/commands/terminalSetupCommand.js.map +1 -1
- package/dist/src/ui/commands/themeCommand.js +4 -1
- package/dist/src/ui/commands/themeCommand.js.map +1 -1
- package/dist/src/ui/commands/toolsCommand.js +5 -2
- package/dist/src/ui/commands/toolsCommand.js.map +1 -1
- package/dist/src/ui/commands/types.d.ts +1 -1
- package/dist/src/ui/commands/types.js.map +1 -1
- package/dist/src/ui/commands/vimCommand.js +4 -1
- package/dist/src/ui/commands/vimCommand.js.map +1 -1
- package/dist/src/ui/components/AboutBox.d.ts +2 -9
- package/dist/src/ui/components/AboutBox.js +6 -2
- package/dist/src/ui/components/AboutBox.js.map +1 -1
- package/dist/src/ui/components/ApprovalModeDialog.d.ts +21 -0
- package/dist/src/ui/components/ApprovalModeDialog.js +68 -0
- package/dist/src/ui/components/ApprovalModeDialog.js.map +1 -0
- package/dist/src/ui/components/AutoAcceptIndicator.js +7 -6
- package/dist/src/ui/components/AutoAcceptIndicator.js.map +1 -1
- package/dist/src/ui/components/Composer.js +4 -3
- package/dist/src/ui/components/Composer.js.map +1 -1
- package/dist/src/ui/components/ConfigInitDisplay.js +7 -3
- package/dist/src/ui/components/ConfigInitDisplay.js.map +1 -1
- package/dist/src/ui/components/ContextSummaryDisplay.js +33 -9
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -1
- package/dist/src/ui/components/DialogManager.js +60 -13
- package/dist/src/ui/components/DialogManager.js.map +1 -1
- package/dist/src/ui/components/EditorSettingsDialog.js +8 -3
- package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -1
- package/dist/src/ui/components/Help.js +14 -4
- package/dist/src/ui/components/Help.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.js +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.test.js +17 -8
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.js +10 -136
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/LoadingIndicator.js +6 -1
- package/dist/src/ui/components/LoadingIndicator.js.map +1 -1
- package/dist/src/ui/components/ModelDialog.js +2 -1
- package/dist/src/ui/components/ModelDialog.js.map +1 -1
- package/dist/src/ui/components/ModelStatsDisplay.js +6 -5
- package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -1
- package/dist/src/ui/components/OpenAIKeyPrompt.d.ts +19 -1
- package/dist/src/ui/components/OpenAIKeyPrompt.js +38 -6
- package/dist/src/ui/components/OpenAIKeyPrompt.js.map +1 -1
- package/dist/src/ui/components/ProQuotaDialog.js +5 -4
- package/dist/src/ui/components/ProQuotaDialog.js.map +1 -1
- package/dist/src/ui/components/QuitConfirmationDialog.js +6 -5
- package/dist/src/ui/components/QuitConfirmationDialog.js.map +1 -1
- package/dist/src/ui/components/QwenOAuthProgress.d.ts +2 -2
- package/dist/src/ui/components/QwenOAuthProgress.js +14 -7
- package/dist/src/ui/components/QwenOAuthProgress.js.map +1 -1
- package/dist/src/ui/components/QwenOAuthProgress.test.js +1 -0
- package/dist/src/ui/components/QwenOAuthProgress.test.js.map +1 -1
- package/dist/src/ui/components/SessionSummaryDisplay.js +2 -1
- package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.d.ts +3 -1
- package/dist/src/ui/components/SettingsDialog.js +35 -12
- package/dist/src/ui/components/SettingsDialog.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.test.js +5 -4
- package/dist/src/ui/components/SettingsDialog.test.js.map +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.js +5 -4
- package/dist/src/ui/components/ShellConfirmationDialog.js.map +1 -1
- package/dist/src/ui/components/StatsDisplay.js +5 -4
- package/dist/src/ui/components/StatsDisplay.js.map +1 -1
- package/dist/src/ui/components/ThemeDialog.js +5 -2
- package/dist/src/ui/components/ThemeDialog.js.map +1 -1
- package/dist/src/ui/components/ToolStatsDisplay.js +3 -2
- package/dist/src/ui/components/ToolStatsDisplay.js.map +1 -1
- package/dist/src/ui/components/WelcomeBackDialog.js +13 -4
- package/dist/src/ui/components/WelcomeBackDialog.js.map +1 -1
- package/dist/src/ui/components/messages/CompressionMessage.js +10 -6
- package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +40 -29
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
- package/dist/src/ui/components/shared/BaseSelectionList.test.js +1 -1
- package/dist/src/ui/components/shared/BaseSelectionList.test.js.map +1 -1
- package/dist/src/ui/components/shared/ScopeSelector.js +3 -1
- package/dist/src/ui/components/shared/ScopeSelector.js.map +1 -1
- package/dist/src/ui/components/subagents/create/AgentCreationWizard.js +39 -26
- package/dist/src/ui/components/subagents/create/AgentCreationWizard.js.map +1 -1
- package/dist/src/ui/components/subagents/create/CreationSummary.js +20 -10
- package/dist/src/ui/components/subagents/create/CreationSummary.js.map +1 -1
- package/dist/src/ui/components/subagents/create/DescriptionInput.js +6 -3
- package/dist/src/ui/components/subagents/create/DescriptionInput.js.map +1 -1
- package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js +7 -2
- package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js.map +1 -1
- package/dist/src/ui/components/subagents/create/LocationSelector.js +7 -2
- package/dist/src/ui/components/subagents/create/LocationSelector.js.map +1 -1
- package/dist/src/ui/components/subagents/create/ToolSelector.js +8 -7
- package/dist/src/ui/components/subagents/create/ToolSelector.js.map +1 -1
- package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js +29 -4
- package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js.map +1 -1
- package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js +6 -3
- package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js.map +1 -1
- package/dist/src/ui/components/subagents/manage/AgentEditStep.js +14 -5
- package/dist/src/ui/components/subagents/manage/AgentEditStep.js.map +1 -1
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js +13 -6
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js.map +1 -1
- package/dist/src/ui/components/subagents/manage/AgentViewerStep.js +3 -2
- package/dist/src/ui/components/subagents/manage/AgentViewerStep.js.map +1 -1
- package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js +14 -13
- package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js.map +1 -1
- package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.js +8 -8
- package/dist/src/ui/components/views/McpStatus.js +28 -15
- package/dist/src/ui/components/views/McpStatus.js.map +1 -1
- package/dist/src/ui/components/views/ToolsList.js +2 -1
- package/dist/src/ui/components/views/ToolsList.js.map +1 -1
- package/dist/src/ui/contexts/UIActionsContext.d.ts +5 -4
- package/dist/src/ui/contexts/UIActionsContext.js +1 -0
- package/dist/src/ui/contexts/UIActionsContext.js.map +1 -1
- package/dist/src/ui/contexts/UIStateContext.d.ts +5 -7
- package/dist/src/ui/contexts/UIStateContext.js.map +1 -1
- package/dist/src/ui/editors/editorSettingsManager.js +1 -0
- package/dist/src/ui/editors/editorSettingsManager.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.test.js +2 -0
- package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +1 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js +4 -7
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/useApprovalModeCommand.d.ts +14 -0
- package/dist/src/ui/hooks/useApprovalModeCommand.js +33 -0
- package/dist/src/ui/hooks/useApprovalModeCommand.js.map +1 -0
- package/dist/src/ui/hooks/useAttentionNotifications.d.ts +14 -0
- package/dist/src/ui/hooks/useAttentionNotifications.js +41 -0
- package/dist/src/ui/hooks/useAttentionNotifications.js.map +1 -0
- package/dist/src/ui/hooks/useAttentionNotifications.test.d.ts +6 -0
- package/dist/src/ui/hooks/useAttentionNotifications.test.js +113 -0
- package/dist/src/ui/hooks/useAttentionNotifications.test.js.map +1 -0
- package/dist/src/ui/hooks/useCommandCompletion.d.ts +1 -4
- package/dist/src/ui/hooks/useCommandCompletion.js +1 -23
- package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useDialogClose.d.ts +6 -3
- package/dist/src/ui/hooks/useDialogClose.js +5 -0
- package/dist/src/ui/hooks/useDialogClose.js.map +1 -1
- package/dist/src/ui/hooks/useGitBranchName.js +6 -3
- package/dist/src/ui/hooks/useGitBranchName.js.map +1 -1
- package/dist/src/ui/hooks/useGitBranchName.test.js +39 -21
- package/dist/src/ui/hooks/useGitBranchName.test.js.map +1 -1
- package/dist/src/ui/hooks/useInitializationAuthError.d.ts +22 -0
- package/dist/src/ui/hooks/useInitializationAuthError.js +40 -0
- package/dist/src/ui/hooks/useInitializationAuthError.js.map +1 -0
- package/dist/src/ui/hooks/usePhraseCycler.js +6 -4
- package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -1
- package/dist/src/ui/hooks/useQwenAuth.d.ts +7 -12
- package/dist/src/ui/hooks/useQwenAuth.js +4 -8
- package/dist/src/ui/hooks/useQwenAuth.js.map +1 -1
- package/dist/src/ui/hooks/useQwenAuth.test.js +72 -98
- package/dist/src/ui/hooks/useQwenAuth.test.js.map +1 -1
- package/dist/src/ui/hooks/useThemeCommand.js +8 -3
- package/dist/src/ui/hooks/useThemeCommand.js.map +1 -1
- package/dist/src/ui/models/availableModels.js +7 -2
- package/dist/src/ui/models/availableModels.js.map +1 -1
- package/dist/src/ui/types.d.ts +32 -14
- package/dist/src/ui/types.js.map +1 -1
- package/dist/src/ui/utils/clipboardUtils.js +3 -3
- package/dist/src/ui/utils/clipboardUtils.js.map +1 -1
- package/dist/src/ui/utils/commandUtils.d.ts +16 -0
- package/dist/src/ui/utils/commandUtils.js +16 -1
- package/dist/src/ui/utils/commandUtils.js.map +1 -1
- package/dist/src/ui/utils/commandUtils.test.js +5 -2
- package/dist/src/ui/utils/commandUtils.test.js.map +1 -1
- package/dist/src/ui/utils/terminalSetup.js +45 -18
- package/dist/src/ui/utils/terminalSetup.js.map +1 -1
- package/dist/src/utils/attentionNotification.d.ts +20 -0
- package/dist/src/utils/attentionNotification.js +34 -0
- package/dist/src/utils/attentionNotification.js.map +1 -0
- package/dist/src/utils/attentionNotification.test.d.ts +6 -0
- package/dist/src/utils/attentionNotification.test.js +46 -0
- package/dist/src/utils/attentionNotification.test.js.map +1 -0
- package/dist/src/utils/dialogScopeUtils.d.ts +0 -4
- package/dist/src/utils/dialogScopeUtils.js +5 -2
- package/dist/src/utils/dialogScopeUtils.js.map +1 -1
- package/dist/src/utils/errors.d.ts +10 -2
- package/dist/src/utils/errors.js +14 -13
- package/dist/src/utils/errors.js.map +1 -1
- package/dist/src/utils/errors.test.js +91 -54
- package/dist/src/utils/errors.test.js.map +1 -1
- package/dist/src/utils/nonInteractiveHelpers.d.ts +88 -0
- package/dist/src/utils/nonInteractiveHelpers.js +470 -0
- package/dist/src/utils/nonInteractiveHelpers.js.map +1 -0
- package/dist/src/utils/nonInteractiveHelpers.test.d.ts +6 -0
- package/dist/src/utils/nonInteractiveHelpers.test.js +945 -0
- package/dist/src/utils/nonInteractiveHelpers.test.js.map +1 -0
- package/dist/src/utils/sandbox.js +1 -1
- package/dist/src/utils/sandbox.js.map +1 -1
- package/dist/src/utils/settingsUtils.js +7 -1
- package/dist/src/utils/settingsUtils.js.map +1 -1
- package/dist/src/utils/systemInfo.d.ts +66 -0
- package/dist/src/utils/systemInfo.js +125 -0
- package/dist/src/utils/systemInfo.js.map +1 -0
- package/dist/src/utils/systemInfo.test.d.ts +6 -0
- package/dist/src/utils/systemInfo.test.js +259 -0
- package/dist/src/utils/systemInfo.test.js.map +1 -0
- package/dist/src/utils/systemInfoFields.d.ts +22 -0
- package/dist/src/utils/systemInfoFields.js +96 -0
- package/dist/src/utils/systemInfoFields.js.map +1 -0
- package/dist/src/utils/userStartupWarnings.js +9 -4
- package/dist/src/utils/userStartupWarnings.js.map +1 -1
- package/dist/src/validateNonInterActiveAuth.js +27 -6
- package/dist/src/validateNonInterActiveAuth.js.map +1 -1
- package/dist/src/zed-integration/acp.js +1 -2
- package/dist/src/zed-integration/acp.js.map +1 -1
- package/dist/src/zed-integration/schema.d.ts +506 -264
- package/dist/src/zed-integration/schema.js +13 -0
- package/dist/src/zed-integration/schema.js.map +1 -1
- package/dist/src/zed-integration/zedIntegration.js +376 -32
- package/dist/src/zed-integration/zedIntegration.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -4
|
@@ -237,6 +237,18 @@ export const promptRequestSchema = z.object({
|
|
|
237
237
|
prompt: z.array(contentBlockSchema),
|
|
238
238
|
sessionId: z.string(),
|
|
239
239
|
});
|
|
240
|
+
export const availableCommandInputSchema = z.object({
|
|
241
|
+
hint: z.string(),
|
|
242
|
+
});
|
|
243
|
+
export const availableCommandSchema = z.object({
|
|
244
|
+
description: z.string(),
|
|
245
|
+
input: availableCommandInputSchema.nullable().optional(),
|
|
246
|
+
name: z.string(),
|
|
247
|
+
});
|
|
248
|
+
export const availableCommandsUpdateSchema = z.object({
|
|
249
|
+
availableCommands: z.array(availableCommandSchema),
|
|
250
|
+
sessionUpdate: z.literal('available_commands_update'),
|
|
251
|
+
});
|
|
240
252
|
export const sessionUpdateSchema = z.union([
|
|
241
253
|
z.object({
|
|
242
254
|
content: contentBlockSchema,
|
|
@@ -274,6 +286,7 @@ export const sessionUpdateSchema = z.union([
|
|
|
274
286
|
entries: z.array(planEntrySchema),
|
|
275
287
|
sessionUpdate: z.literal('plan'),
|
|
276
288
|
}),
|
|
289
|
+
availableCommandsUpdateSchema,
|
|
277
290
|
]);
|
|
278
291
|
export const agentResponseSchema = z.union([
|
|
279
292
|
initializeResponseSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/zed-integration/schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,YAAY,EAAE,cAAc;IAC5B,UAAU,EAAE,YAAY;IACxB,cAAc,EAAE,gBAAgB;IAChC,YAAY,EAAE,cAAc;IAC5B,WAAW,EAAE,aAAa;IAC1B,cAAc,EAAE,gBAAgB;CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,iBAAiB,EAAE,mBAAmB;IACtC,kBAAkB,EAAE,oBAAoB;IACxC,0BAA0B,EAAE,4BAA4B;IACxD,cAAc,EAAE,gBAAgB;CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AA0GlC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACvC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACtC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC;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AM,EAAE;IACrB,QAAQ,EAAE,cAAc;CACzB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,kBAAkB,EAAE,wBAAwB;IAC5C,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;CAC5B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,MAAM,EAAE,mBAAmB;CAC5B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC;IACzC,0BAA0B;IAC1B,yBAAyB;IACzB,8BAA8B;CAC/B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC;IACxC,uBAAuB;IACvB,yBAAyB;IACzB,uBAAuB;IACvB,wBAAwB;IACxB,mBAAmB;CACpB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,yBAAyB,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { AuthType, clearCachedCredentialFile, convertToFunctionResponse, DiscoveredMCPTool, StreamEventType, DEFAULT_GEMINI_MODEL, DEFAULT_GEMINI_MODEL_AUTO, DEFAULT_GEMINI_FLASH_MODEL, MCPServerConfig, ToolConfirmationOutcome, logToolCall, getErrorStatus, isWithinRoot, isNodeError, } from '@umsai/ums-code-core';
|
|
6
|
+
import { AuthType, clearCachedCredentialFile, convertToFunctionResponse, DiscoveredMCPTool, StreamEventType, DEFAULT_GEMINI_MODEL, DEFAULT_GEMINI_MODEL_AUTO, DEFAULT_GEMINI_FLASH_MODEL, MCPServerConfig, ToolConfirmationOutcome, logToolCall, logUserPrompt, getErrorStatus, isWithinRoot, isNodeError, SubAgentEventType, TaskTool, Kind, TodoWriteTool, UserPromptEvent, } from '@umsai/ums-code-core';
|
|
7
7
|
import * as acp from './acp.js';
|
|
8
8
|
import { AcpFileSystemService } from './fileSystemService.js';
|
|
9
9
|
import { Readable, Writable } from 'node:stream';
|
|
@@ -16,6 +16,21 @@ import { getErrorMessage } from '../utils/errors.js';
|
|
|
16
16
|
import { ExtensionStorage } from '../config/extension.js';
|
|
17
17
|
import { loadCliConfig } from '../config/config.js';
|
|
18
18
|
import { ExtensionEnablementManager } from '../config/extensions/extensionEnablement.js';
|
|
19
|
+
import { handleSlashCommand, getAvailableCommands, } from '../nonInteractiveCliCommands.js';
|
|
20
|
+
import { isSlashCommand } from '../ui/utils/commandUtils.js';
|
|
21
|
+
/**
|
|
22
|
+
* Built-in commands that are allowed in ACP integration mode.
|
|
23
|
+
* Only these commands will be available when using handleSlashCommand
|
|
24
|
+
* or getAvailableCommands in ACP integration.
|
|
25
|
+
*
|
|
26
|
+
* Currently, only "init" is supported because `handleSlashCommand` in
|
|
27
|
+
* nonInteractiveCliCommands.ts only supports handling results where
|
|
28
|
+
* result.type is "submit_prompt". Other result types are either coupled
|
|
29
|
+
* to the UI or cannot send notifications to the client via ACP.
|
|
30
|
+
*
|
|
31
|
+
* If you have a good idea to add support for more commands, PRs are welcome!
|
|
32
|
+
*/
|
|
33
|
+
const ALLOWED_BUILTIN_COMMANDS_FOR_ACP = ['init'];
|
|
19
34
|
/**
|
|
20
35
|
* Resolves the model to use based on the current configuration.
|
|
21
36
|
*
|
|
@@ -87,7 +102,7 @@ class GeminiAgent {
|
|
|
87
102
|
this.settings.setValue(SettingScope.User, 'security.auth.selectedType', method);
|
|
88
103
|
}
|
|
89
104
|
async newSession({ cwd, mcpServers, }) {
|
|
90
|
-
const sessionId = randomUUID();
|
|
105
|
+
const sessionId = this.config.getSessionId() || randomUUID();
|
|
91
106
|
const config = await this.newSessionConfig(sessionId, cwd, mcpServers);
|
|
92
107
|
let isAuthenticated = false;
|
|
93
108
|
if (this.settings.merged.security?.auth?.selectedType) {
|
|
@@ -108,8 +123,12 @@ class GeminiAgent {
|
|
|
108
123
|
}
|
|
109
124
|
const geminiClient = config.getGeminiClient();
|
|
110
125
|
const chat = await geminiClient.startChat();
|
|
111
|
-
const session = new Session(sessionId, chat, config, this.client);
|
|
126
|
+
const session = new Session(sessionId, chat, config, this.client, this.settings);
|
|
112
127
|
this.sessions.set(sessionId, session);
|
|
128
|
+
// Send available commands update as the first session update
|
|
129
|
+
setTimeout(async () => {
|
|
130
|
+
await session.sendAvailableCommandsUpdate();
|
|
131
|
+
}, 0);
|
|
113
132
|
return {
|
|
114
133
|
sessionId,
|
|
115
134
|
};
|
|
@@ -148,12 +167,15 @@ class Session {
|
|
|
148
167
|
chat;
|
|
149
168
|
config;
|
|
150
169
|
client;
|
|
170
|
+
settings;
|
|
151
171
|
pendingPrompt = null;
|
|
152
|
-
|
|
172
|
+
turn = 0;
|
|
173
|
+
constructor(id, chat, config, client, settings) {
|
|
153
174
|
this.id = id;
|
|
154
175
|
this.chat = chat;
|
|
155
176
|
this.config = config;
|
|
156
177
|
this.client = client;
|
|
178
|
+
this.settings = settings;
|
|
157
179
|
}
|
|
158
180
|
async cancelPendingPrompt() {
|
|
159
181
|
if (!this.pendingPrompt) {
|
|
@@ -166,9 +188,38 @@ class Session {
|
|
|
166
188
|
this.pendingPrompt?.abort();
|
|
167
189
|
const pendingSend = new AbortController();
|
|
168
190
|
this.pendingPrompt = pendingSend;
|
|
169
|
-
|
|
191
|
+
// Increment turn counter for each user prompt
|
|
192
|
+
this.turn += 1;
|
|
170
193
|
const chat = this.chat;
|
|
171
|
-
const
|
|
194
|
+
const promptId = this.config.getSessionId() + '########' + this.turn;
|
|
195
|
+
// Extract text from all text blocks to construct the full prompt text for logging
|
|
196
|
+
const promptText = params.prompt
|
|
197
|
+
.filter((block) => block.type === 'text')
|
|
198
|
+
.map((block) => (block.type === 'text' ? block.text : ''))
|
|
199
|
+
.join(' ');
|
|
200
|
+
// Log user prompt
|
|
201
|
+
logUserPrompt(this.config, new UserPromptEvent(promptText.length, promptId, this.config.getContentGeneratorConfig()?.authType, promptText));
|
|
202
|
+
// Check if the input contains a slash command
|
|
203
|
+
// Extract text from the first text block if present
|
|
204
|
+
const firstTextBlock = params.prompt.find((block) => block.type === 'text');
|
|
205
|
+
const inputText = firstTextBlock?.text || '';
|
|
206
|
+
let parts;
|
|
207
|
+
if (isSlashCommand(inputText)) {
|
|
208
|
+
// Handle slash command - allow specific built-in commands for ACP integration
|
|
209
|
+
const slashCommandResult = await handleSlashCommand(inputText, pendingSend, this.config, this.settings, ALLOWED_BUILTIN_COMMANDS_FOR_ACP);
|
|
210
|
+
if (slashCommandResult) {
|
|
211
|
+
// Use the result from the slash command
|
|
212
|
+
parts = slashCommandResult;
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
// Slash command didn't return a prompt, continue with normal processing
|
|
216
|
+
parts = await this.#resolvePrompt(params.prompt, pendingSend.signal);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
// Normal processing for non-slash commands
|
|
221
|
+
parts = await this.#resolvePrompt(params.prompt, pendingSend.signal);
|
|
222
|
+
}
|
|
172
223
|
let nextMessage = { role: 'user', parts };
|
|
173
224
|
while (nextMessage !== null) {
|
|
174
225
|
if (pendingSend.signal.aborted) {
|
|
@@ -237,6 +288,27 @@ class Session {
|
|
|
237
288
|
};
|
|
238
289
|
await this.client.sessionUpdate(params);
|
|
239
290
|
}
|
|
291
|
+
async sendAvailableCommandsUpdate() {
|
|
292
|
+
const abortController = new AbortController();
|
|
293
|
+
try {
|
|
294
|
+
const slashCommands = await getAvailableCommands(this.config, this.settings, abortController.signal, ALLOWED_BUILTIN_COMMANDS_FOR_ACP);
|
|
295
|
+
// Convert SlashCommand[] to AvailableCommand[] format for ACP protocol
|
|
296
|
+
const availableCommands = slashCommands.map((cmd) => ({
|
|
297
|
+
name: cmd.name,
|
|
298
|
+
description: cmd.description,
|
|
299
|
+
input: null,
|
|
300
|
+
}));
|
|
301
|
+
const update = {
|
|
302
|
+
sessionUpdate: 'available_commands_update',
|
|
303
|
+
availableCommands,
|
|
304
|
+
};
|
|
305
|
+
await this.sendUpdate(update);
|
|
306
|
+
}
|
|
307
|
+
catch (error) {
|
|
308
|
+
// Log error but don't fail session creation
|
|
309
|
+
console.error('Error sending available commands update:', error);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
240
312
|
async runTool(abortSignal, promptId, fc) {
|
|
241
313
|
const callId = fc.id ?? `${fc.name}-${Date.now()}`;
|
|
242
314
|
const args = (fc.args ?? {});
|
|
@@ -275,8 +347,20 @@ class Session {
|
|
|
275
347
|
if (!tool) {
|
|
276
348
|
return errorResponse(new Error(`Tool "${fc.name}" not found in registry.`));
|
|
277
349
|
}
|
|
350
|
+
// Detect TodoWriteTool early - route to plan updates instead of tool_call events
|
|
351
|
+
const isTodoWriteTool = fc.name === TodoWriteTool.Name || tool.name === TodoWriteTool.Name;
|
|
352
|
+
// Declare subAgentToolEventListeners outside try block for cleanup in catch
|
|
353
|
+
let subAgentToolEventListeners = [];
|
|
278
354
|
try {
|
|
279
355
|
const invocation = tool.build(args);
|
|
356
|
+
// Detect TaskTool and set up sub-agent tool tracking
|
|
357
|
+
const isTaskTool = tool.name === TaskTool.Name;
|
|
358
|
+
if (isTaskTool && 'eventEmitter' in invocation) {
|
|
359
|
+
// Access eventEmitter from TaskTool invocation
|
|
360
|
+
const taskEventEmitter = invocation.eventEmitter;
|
|
361
|
+
// Set up sub-agent tool tracking
|
|
362
|
+
subAgentToolEventListeners = this.setupSubAgentToolTracking(taskEventEmitter, abortSignal);
|
|
363
|
+
}
|
|
280
364
|
const confirmationDetails = await invocation.shouldConfirmExecute(abortSignal);
|
|
281
365
|
if (confirmationDetails) {
|
|
282
366
|
const content = [];
|
|
@@ -322,7 +406,8 @@ class Session {
|
|
|
322
406
|
}
|
|
323
407
|
}
|
|
324
408
|
}
|
|
325
|
-
else {
|
|
409
|
+
else if (!isTodoWriteTool) {
|
|
410
|
+
// Skip tool_call event for TodoWriteTool
|
|
326
411
|
await this.sendUpdate({
|
|
327
412
|
sessionUpdate: 'tool_call',
|
|
328
413
|
toolCallId: callId,
|
|
@@ -334,13 +419,45 @@ class Session {
|
|
|
334
419
|
});
|
|
335
420
|
}
|
|
336
421
|
const toolResult = await invocation.execute(abortSignal);
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
422
|
+
// Clean up event listeners
|
|
423
|
+
subAgentToolEventListeners.forEach((cleanup) => cleanup());
|
|
424
|
+
// Handle TodoWriteTool: extract todos and send plan update
|
|
425
|
+
if (isTodoWriteTool) {
|
|
426
|
+
// Extract todos from args (initial state)
|
|
427
|
+
let todos = [];
|
|
428
|
+
if (Array.isArray(args['todos'])) {
|
|
429
|
+
todos = args['todos'];
|
|
430
|
+
}
|
|
431
|
+
// If returnDisplay has todos (e.g., modified by user), use those instead
|
|
432
|
+
if (toolResult.returnDisplay &&
|
|
433
|
+
typeof toolResult.returnDisplay === 'object' &&
|
|
434
|
+
'type' in toolResult.returnDisplay &&
|
|
435
|
+
toolResult.returnDisplay.type === 'todo_list' &&
|
|
436
|
+
'todos' in toolResult.returnDisplay &&
|
|
437
|
+
Array.isArray(toolResult.returnDisplay.todos)) {
|
|
438
|
+
todos = toolResult.returnDisplay.todos;
|
|
439
|
+
}
|
|
440
|
+
// Convert todos to plan entries and send plan update
|
|
441
|
+
if (todos.length > 0 || Array.isArray(args['todos'])) {
|
|
442
|
+
const planEntries = convertTodosToPlanEntries(todos);
|
|
443
|
+
await this.sendUpdate({
|
|
444
|
+
sessionUpdate: 'plan',
|
|
445
|
+
entries: planEntries,
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
// Skip tool_call_update event for TodoWriteTool
|
|
449
|
+
// Still log and return function response for LLM
|
|
450
|
+
}
|
|
451
|
+
else {
|
|
452
|
+
// Normal tool handling: send tool_call_update
|
|
453
|
+
const content = toToolCallContent(toolResult);
|
|
454
|
+
await this.sendUpdate({
|
|
455
|
+
sessionUpdate: 'tool_call_update',
|
|
456
|
+
toolCallId: callId,
|
|
457
|
+
status: 'completed',
|
|
458
|
+
content: content ? [content] : [],
|
|
459
|
+
});
|
|
460
|
+
}
|
|
344
461
|
const durationMs = Date.now() - startTime;
|
|
345
462
|
logToolCall(this.config, {
|
|
346
463
|
'event.name': 'tool_call',
|
|
@@ -358,6 +475,8 @@ class Session {
|
|
|
358
475
|
return convertToFunctionResponse(fc.name, callId, toolResult.llmContent);
|
|
359
476
|
}
|
|
360
477
|
catch (e) {
|
|
478
|
+
// Ensure cleanup on error
|
|
479
|
+
subAgentToolEventListeners.forEach((cleanup) => cleanup());
|
|
361
480
|
const error = e instanceof Error ? e : new Error(String(e));
|
|
362
481
|
await this.sendUpdate({
|
|
363
482
|
sessionUpdate: 'tool_call_update',
|
|
@@ -370,6 +489,235 @@ class Session {
|
|
|
370
489
|
return errorResponse(error);
|
|
371
490
|
}
|
|
372
491
|
}
|
|
492
|
+
/**
|
|
493
|
+
* Sets up event listeners to track sub-agent tool calls within a TaskTool execution.
|
|
494
|
+
* Converts subagent tool call events into zedIntegration session updates.
|
|
495
|
+
*
|
|
496
|
+
* @param eventEmitter - The SubAgentEventEmitter from TaskTool
|
|
497
|
+
* @param abortSignal - Signal to abort tracking if parent is cancelled
|
|
498
|
+
* @returns Array of cleanup functions to remove event listeners
|
|
499
|
+
*/
|
|
500
|
+
setupSubAgentToolTracking(eventEmitter, abortSignal) {
|
|
501
|
+
const cleanupFunctions = [];
|
|
502
|
+
const toolRegistry = this.config.getToolRegistry();
|
|
503
|
+
// Track subagent tool call states
|
|
504
|
+
const subAgentToolStates = new Map();
|
|
505
|
+
// Listen for tool call start
|
|
506
|
+
const onToolCall = (...args) => {
|
|
507
|
+
const event = args[0];
|
|
508
|
+
if (abortSignal.aborted)
|
|
509
|
+
return;
|
|
510
|
+
const subAgentTool = toolRegistry.getTool(event.name);
|
|
511
|
+
let subAgentInvocation;
|
|
512
|
+
let toolKind = 'other';
|
|
513
|
+
let locations = [];
|
|
514
|
+
if (subAgentTool) {
|
|
515
|
+
try {
|
|
516
|
+
subAgentInvocation = subAgentTool.build(event.args);
|
|
517
|
+
toolKind = this.mapToolKind(subAgentTool.kind);
|
|
518
|
+
locations = subAgentInvocation.toolLocations().map((loc) => ({
|
|
519
|
+
path: loc.path,
|
|
520
|
+
line: loc.line ?? null,
|
|
521
|
+
}));
|
|
522
|
+
}
|
|
523
|
+
catch (e) {
|
|
524
|
+
// If building fails, continue with defaults
|
|
525
|
+
console.warn(`Failed to build subagent tool ${event.name}:`, e);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
// Save state for subsequent updates
|
|
529
|
+
subAgentToolStates.set(event.callId, {
|
|
530
|
+
tool: subAgentTool,
|
|
531
|
+
invocation: subAgentInvocation,
|
|
532
|
+
args: event.args,
|
|
533
|
+
});
|
|
534
|
+
// Check if this is TodoWriteTool - if so, skip sending tool_call event
|
|
535
|
+
// Plan update will be sent in onToolResult when we have the final state
|
|
536
|
+
if (event.name === TodoWriteTool.Name) {
|
|
537
|
+
return;
|
|
538
|
+
}
|
|
539
|
+
// Send tool call start update with rawInput
|
|
540
|
+
void this.sendUpdate({
|
|
541
|
+
sessionUpdate: 'tool_call',
|
|
542
|
+
toolCallId: event.callId,
|
|
543
|
+
status: 'in_progress',
|
|
544
|
+
title: event.description || event.name,
|
|
545
|
+
content: [],
|
|
546
|
+
locations,
|
|
547
|
+
kind: toolKind,
|
|
548
|
+
rawInput: event.args,
|
|
549
|
+
});
|
|
550
|
+
};
|
|
551
|
+
// Listen for tool call result
|
|
552
|
+
const onToolResult = (...args) => {
|
|
553
|
+
const event = args[0];
|
|
554
|
+
if (abortSignal.aborted)
|
|
555
|
+
return;
|
|
556
|
+
const state = subAgentToolStates.get(event.callId);
|
|
557
|
+
// Check if this is TodoWriteTool - if so, route to plan updates
|
|
558
|
+
if (event.name === TodoWriteTool.Name) {
|
|
559
|
+
let todos;
|
|
560
|
+
// Try to extract todos from resultDisplay first (final state)
|
|
561
|
+
if (event.resultDisplay) {
|
|
562
|
+
try {
|
|
563
|
+
// resultDisplay might be a JSON stringified object
|
|
564
|
+
const parsed = typeof event.resultDisplay === 'string'
|
|
565
|
+
? JSON.parse(event.resultDisplay)
|
|
566
|
+
: event.resultDisplay;
|
|
567
|
+
if (typeof parsed === 'object' &&
|
|
568
|
+
parsed !== null &&
|
|
569
|
+
'type' in parsed &&
|
|
570
|
+
parsed.type === 'todo_list' &&
|
|
571
|
+
'todos' in parsed &&
|
|
572
|
+
Array.isArray(parsed.todos)) {
|
|
573
|
+
todos = parsed.todos;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
catch {
|
|
577
|
+
// If parsing fails, ignore - resultDisplay might not be JSON
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
// Fallback to args if resultDisplay doesn't have todos
|
|
581
|
+
if (!todos && state?.args && Array.isArray(state.args['todos'])) {
|
|
582
|
+
todos = state.args['todos'];
|
|
583
|
+
}
|
|
584
|
+
// Send plan update if we have todos
|
|
585
|
+
if (todos) {
|
|
586
|
+
const planEntries = convertTodosToPlanEntries(todos);
|
|
587
|
+
void this.sendUpdate({
|
|
588
|
+
sessionUpdate: 'plan',
|
|
589
|
+
entries: planEntries,
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
// Skip sending tool_call_update event for TodoWriteTool
|
|
593
|
+
// Clean up state
|
|
594
|
+
subAgentToolStates.delete(event.callId);
|
|
595
|
+
return;
|
|
596
|
+
}
|
|
597
|
+
let content = [];
|
|
598
|
+
// If there's a result display, try to convert to ToolCallContent
|
|
599
|
+
if (event.resultDisplay && state?.invocation) {
|
|
600
|
+
// resultDisplay is typically a string
|
|
601
|
+
if (typeof event.resultDisplay === 'string') {
|
|
602
|
+
content = [
|
|
603
|
+
{
|
|
604
|
+
type: 'content',
|
|
605
|
+
content: {
|
|
606
|
+
type: 'text',
|
|
607
|
+
text: event.resultDisplay,
|
|
608
|
+
},
|
|
609
|
+
},
|
|
610
|
+
];
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
// Send tool call completion update
|
|
614
|
+
void this.sendUpdate({
|
|
615
|
+
sessionUpdate: 'tool_call_update',
|
|
616
|
+
toolCallId: event.callId,
|
|
617
|
+
status: event.success ? 'completed' : 'failed',
|
|
618
|
+
content: content.length > 0 ? content : [],
|
|
619
|
+
title: state?.invocation?.getDescription() ?? event.name,
|
|
620
|
+
kind: state?.tool ? this.mapToolKind(state.tool.kind) : null,
|
|
621
|
+
locations: state?.invocation?.toolLocations().map((loc) => ({
|
|
622
|
+
path: loc.path,
|
|
623
|
+
line: loc.line ?? null,
|
|
624
|
+
})) ?? null,
|
|
625
|
+
rawInput: state?.args,
|
|
626
|
+
});
|
|
627
|
+
// Clean up state
|
|
628
|
+
subAgentToolStates.delete(event.callId);
|
|
629
|
+
};
|
|
630
|
+
// Listen for permission requests
|
|
631
|
+
const onToolWaitingApproval = async (...args) => {
|
|
632
|
+
const event = args[0];
|
|
633
|
+
if (abortSignal.aborted)
|
|
634
|
+
return;
|
|
635
|
+
const state = subAgentToolStates.get(event.callId);
|
|
636
|
+
const content = [];
|
|
637
|
+
// Handle different confirmation types
|
|
638
|
+
if (event.confirmationDetails.type === 'edit') {
|
|
639
|
+
const editDetails = event.confirmationDetails;
|
|
640
|
+
content.push({
|
|
641
|
+
type: 'diff',
|
|
642
|
+
path: editDetails.fileName,
|
|
643
|
+
oldText: editDetails.originalContent ?? '',
|
|
644
|
+
newText: editDetails.newContent,
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
// Build permission request options from confirmation details
|
|
648
|
+
// event.confirmationDetails already contains all fields except onConfirm,
|
|
649
|
+
// which we add here to satisfy the type requirement for toPermissionOptions
|
|
650
|
+
const fullConfirmationDetails = {
|
|
651
|
+
...event.confirmationDetails,
|
|
652
|
+
onConfirm: async () => {
|
|
653
|
+
// This is a placeholder - the actual response is handled via event.respond
|
|
654
|
+
},
|
|
655
|
+
};
|
|
656
|
+
const params = {
|
|
657
|
+
sessionId: this.id,
|
|
658
|
+
options: toPermissionOptions(fullConfirmationDetails),
|
|
659
|
+
toolCall: {
|
|
660
|
+
toolCallId: event.callId,
|
|
661
|
+
status: 'pending',
|
|
662
|
+
title: event.description || event.name,
|
|
663
|
+
content,
|
|
664
|
+
locations: state?.invocation?.toolLocations().map((loc) => ({
|
|
665
|
+
path: loc.path,
|
|
666
|
+
line: loc.line ?? null,
|
|
667
|
+
})) ?? [],
|
|
668
|
+
kind: state?.tool ? this.mapToolKind(state.tool.kind) : 'other',
|
|
669
|
+
rawInput: state?.args,
|
|
670
|
+
},
|
|
671
|
+
};
|
|
672
|
+
try {
|
|
673
|
+
// Request permission from zed client
|
|
674
|
+
const output = await this.client.requestPermission(params);
|
|
675
|
+
const outcome = output.outcome.outcome === 'cancelled'
|
|
676
|
+
? ToolConfirmationOutcome.Cancel
|
|
677
|
+
: z
|
|
678
|
+
.nativeEnum(ToolConfirmationOutcome)
|
|
679
|
+
.parse(output.outcome.optionId);
|
|
680
|
+
// Respond to subagent with the outcome
|
|
681
|
+
await event.respond(outcome);
|
|
682
|
+
}
|
|
683
|
+
catch (error) {
|
|
684
|
+
// If permission request fails, cancel the tool call
|
|
685
|
+
console.error(`Permission request failed for subagent tool ${event.name}:`, error);
|
|
686
|
+
await event.respond(ToolConfirmationOutcome.Cancel);
|
|
687
|
+
}
|
|
688
|
+
};
|
|
689
|
+
// Register event listeners
|
|
690
|
+
eventEmitter.on(SubAgentEventType.TOOL_CALL, onToolCall);
|
|
691
|
+
eventEmitter.on(SubAgentEventType.TOOL_RESULT, onToolResult);
|
|
692
|
+
eventEmitter.on(SubAgentEventType.TOOL_WAITING_APPROVAL, onToolWaitingApproval);
|
|
693
|
+
// Return cleanup functions
|
|
694
|
+
cleanupFunctions.push(() => {
|
|
695
|
+
eventEmitter.off(SubAgentEventType.TOOL_CALL, onToolCall);
|
|
696
|
+
eventEmitter.off(SubAgentEventType.TOOL_RESULT, onToolResult);
|
|
697
|
+
eventEmitter.off(SubAgentEventType.TOOL_WAITING_APPROVAL, onToolWaitingApproval);
|
|
698
|
+
});
|
|
699
|
+
return cleanupFunctions;
|
|
700
|
+
}
|
|
701
|
+
/**
|
|
702
|
+
* Maps core Tool Kind enum to ACP ToolKind string literals.
|
|
703
|
+
*
|
|
704
|
+
* @param kind - The core Kind enum value
|
|
705
|
+
* @returns The corresponding ACP ToolKind string literal
|
|
706
|
+
*/
|
|
707
|
+
mapToolKind(kind) {
|
|
708
|
+
const kindMap = {
|
|
709
|
+
[Kind.Read]: 'read',
|
|
710
|
+
[Kind.Edit]: 'edit',
|
|
711
|
+
[Kind.Delete]: 'delete',
|
|
712
|
+
[Kind.Move]: 'move',
|
|
713
|
+
[Kind.Search]: 'search',
|
|
714
|
+
[Kind.Execute]: 'execute',
|
|
715
|
+
[Kind.Think]: 'think',
|
|
716
|
+
[Kind.Fetch]: 'fetch',
|
|
717
|
+
[Kind.Other]: 'other',
|
|
718
|
+
};
|
|
719
|
+
return kindMap[kind] ?? 'other';
|
|
720
|
+
}
|
|
373
721
|
async #resolvePrompt(message, abortSignal) {
|
|
374
722
|
const FILE_URI_SCHEME = 'file://';
|
|
375
723
|
const embeddedContext = [];
|
|
@@ -666,6 +1014,20 @@ class Session {
|
|
|
666
1014
|
}
|
|
667
1015
|
}
|
|
668
1016
|
}
|
|
1017
|
+
/**
|
|
1018
|
+
* Converts todo items to plan entries format for zed integration.
|
|
1019
|
+
* Maps todo status to plan status and assigns a default priority.
|
|
1020
|
+
*
|
|
1021
|
+
* @param todos - Array of todo items with id, content, and status
|
|
1022
|
+
* @returns Array of plan entries with content, priority, and status
|
|
1023
|
+
*/
|
|
1024
|
+
function convertTodosToPlanEntries(todos) {
|
|
1025
|
+
return todos.map((todo) => ({
|
|
1026
|
+
content: todo.content,
|
|
1027
|
+
priority: 'medium', // Default priority since todos don't have priority
|
|
1028
|
+
status: todo.status,
|
|
1029
|
+
}));
|
|
1030
|
+
}
|
|
669
1031
|
function toToolCallContent(toolResult) {
|
|
670
1032
|
if (toolResult.error?.message) {
|
|
671
1033
|
throw new Error(toolResult.error.message);
|
|
@@ -677,24 +1039,6 @@ function toToolCallContent(toolResult) {
|
|
|
677
1039
|
content: { type: 'text', text: toolResult.returnDisplay },
|
|
678
1040
|
};
|
|
679
1041
|
}
|
|
680
|
-
else if ('type' in toolResult.returnDisplay &&
|
|
681
|
-
toolResult.returnDisplay.type === 'todo_list') {
|
|
682
|
-
// Handle TodoResultDisplay - convert to text representation
|
|
683
|
-
const todoText = toolResult.returnDisplay.todos
|
|
684
|
-
.map((todo) => {
|
|
685
|
-
const statusIcon = {
|
|
686
|
-
pending: '○',
|
|
687
|
-
in_progress: '◐',
|
|
688
|
-
completed: '●',
|
|
689
|
-
}[todo.status];
|
|
690
|
-
return `${statusIcon} ${todo.content}`;
|
|
691
|
-
})
|
|
692
|
-
.join('\n');
|
|
693
|
-
return {
|
|
694
|
-
type: 'content',
|
|
695
|
-
content: { type: 'text', text: todoText },
|
|
696
|
-
};
|
|
697
|
-
}
|
|
698
1042
|
else if ('type' in toolResult.returnDisplay &&
|
|
699
1043
|
toolResult.returnDisplay.type === 'plan_summary') {
|
|
700
1044
|
const planDisplay = toolResult.returnDisplay;
|