@akiojin/gwt 4.10.0 → 4.12.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/README.ja.md +4 -4
- package/README.md +4 -4
- package/bin/gwt.js +1 -1
- package/dist/claude.d.ts +2 -0
- package/dist/claude.d.ts.map +1 -1
- package/dist/claude.js +97 -68
- package/dist/claude.js.map +1 -1
- package/dist/cli/ui/App.solid.d.ts +29 -0
- package/dist/cli/ui/App.solid.d.ts.map +1 -0
- package/dist/cli/ui/App.solid.js +1395 -0
- package/dist/cli/ui/App.solid.js.map +1 -0
- package/dist/cli/ui/components/solid/Footer.d.ts +10 -0
- package/dist/cli/ui/components/solid/Footer.d.ts.map +1 -0
- package/dist/cli/ui/components/solid/Footer.js +10 -0
- package/dist/cli/ui/components/solid/Footer.js.map +1 -0
- package/dist/cli/ui/components/{parts → solid}/Header.d.ts +1 -6
- package/dist/cli/ui/components/solid/Header.d.ts.map +1 -0
- package/dist/cli/ui/components/solid/Header.js +13 -0
- package/dist/cli/ui/components/solid/Header.js.map +1 -0
- package/dist/cli/ui/components/solid/HelpOverlay.d.ts +8 -0
- package/dist/cli/ui/components/solid/HelpOverlay.d.ts.map +1 -0
- package/dist/cli/ui/components/solid/HelpOverlay.js +118 -0
- package/dist/cli/ui/components/solid/HelpOverlay.js.map +1 -0
- package/dist/cli/ui/components/solid/QuickStartStep.d.ts +17 -0
- package/dist/cli/ui/components/solid/QuickStartStep.d.ts.map +1 -0
- package/dist/cli/ui/components/solid/QuickStartStep.js +152 -0
- package/dist/cli/ui/components/solid/QuickStartStep.js.map +1 -0
- package/dist/cli/ui/components/solid/SelectInput.d.ts +22 -0
- package/dist/cli/ui/components/solid/SelectInput.d.ts.map +1 -0
- package/dist/cli/ui/components/solid/SelectInput.js +45 -0
- package/dist/cli/ui/components/solid/SelectInput.js.map +1 -0
- package/dist/cli/ui/components/solid/TextInput.d.ts +12 -0
- package/dist/cli/ui/components/solid/TextInput.d.ts.map +1 -0
- package/dist/cli/ui/components/solid/TextInput.js +9 -0
- package/dist/cli/ui/components/solid/TextInput.js.map +1 -0
- package/dist/cli/ui/components/solid/WizardController.d.ts +34 -0
- package/dist/cli/ui/components/solid/WizardController.d.ts.map +1 -0
- package/dist/cli/ui/components/solid/WizardController.js +223 -0
- package/dist/cli/ui/components/solid/WizardController.js.map +1 -0
- package/dist/cli/ui/components/solid/WizardPopup.d.ts +26 -0
- package/dist/cli/ui/components/solid/WizardPopup.d.ts.map +1 -0
- package/dist/cli/ui/components/solid/WizardPopup.js +68 -0
- package/dist/cli/ui/components/solid/WizardPopup.js.map +1 -0
- package/dist/cli/ui/components/solid/WizardSteps.d.ts +52 -0
- package/dist/cli/ui/components/solid/WizardSteps.d.ts.map +1 -0
- package/dist/cli/ui/components/solid/WizardSteps.js +419 -0
- package/dist/cli/ui/components/solid/WizardSteps.js.map +1 -0
- package/dist/cli/ui/core/index.d.ts +12 -0
- package/dist/cli/ui/core/index.d.ts.map +1 -0
- package/dist/cli/ui/core/index.js +15 -0
- package/dist/cli/ui/core/index.js.map +1 -0
- package/dist/cli/ui/core/keybindings.d.ts +106 -0
- package/dist/cli/ui/core/keybindings.d.ts.map +1 -0
- package/dist/cli/ui/core/keybindings.js +270 -0
- package/dist/cli/ui/core/keybindings.js.map +1 -0
- package/dist/cli/ui/core/theme.d.ts +123 -0
- package/dist/cli/ui/core/theme.d.ts.map +1 -0
- package/dist/cli/ui/core/theme.js +191 -0
- package/dist/cli/ui/core/theme.js.map +1 -0
- package/dist/cli/ui/core/types.d.ts +156 -0
- package/dist/cli/ui/core/types.d.ts.map +1 -0
- package/dist/cli/ui/core/types.js +10 -0
- package/dist/cli/ui/core/types.js.map +1 -0
- package/dist/cli/ui/hooks/solid/useScrollableList.d.ts +26 -0
- package/dist/cli/ui/hooks/solid/useScrollableList.d.ts.map +1 -0
- package/dist/cli/ui/hooks/solid/useScrollableList.js +89 -0
- package/dist/cli/ui/hooks/solid/useScrollableList.js.map +1 -0
- package/dist/cli/ui/hooks/solid/useTerminalSize.d.ts +10 -0
- package/dist/cli/ui/hooks/solid/useTerminalSize.d.ts.map +1 -0
- package/dist/cli/ui/hooks/solid/useTerminalSize.js +16 -0
- package/dist/cli/ui/hooks/solid/useTerminalSize.js.map +1 -0
- package/dist/cli/ui/index.solid.d.ts +5 -0
- package/dist/cli/ui/index.solid.d.ts.map +1 -0
- package/dist/cli/ui/index.solid.js +21 -0
- package/dist/cli/ui/index.solid.js.map +1 -0
- package/dist/cli/ui/screens/solid/BranchListScreen.d.ts +53 -0
- package/dist/cli/ui/screens/solid/BranchListScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/BranchListScreen.js +829 -0
- package/dist/cli/ui/screens/solid/BranchListScreen.js.map +1 -0
- package/dist/cli/ui/screens/solid/ConfirmScreen.d.ts +11 -0
- package/dist/cli/ui/screens/solid/ConfirmScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/ConfirmScreen.js +45 -0
- package/dist/cli/ui/screens/solid/ConfirmScreen.js.map +1 -0
- package/dist/cli/ui/screens/solid/EnvironmentScreen.d.ts +14 -0
- package/dist/cli/ui/screens/solid/EnvironmentScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/EnvironmentScreen.js +90 -0
- package/dist/cli/ui/screens/solid/EnvironmentScreen.js.map +1 -0
- package/dist/cli/ui/screens/solid/ErrorScreen.d.ts +8 -0
- package/dist/cli/ui/screens/solid/ErrorScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/ErrorScreen.js +18 -0
- package/dist/cli/ui/screens/solid/ErrorScreen.js.map +1 -0
- package/dist/cli/ui/screens/solid/InputScreen.d.ts +13 -0
- package/dist/cli/ui/screens/solid/InputScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/InputScreen.js +17 -0
- package/dist/cli/ui/screens/solid/InputScreen.js.map +1 -0
- package/dist/cli/ui/screens/solid/LoadingIndicator.d.ts +9 -0
- package/dist/cli/ui/screens/solid/LoadingIndicator.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/LoadingIndicator.js +43 -0
- package/dist/cli/ui/screens/solid/LoadingIndicator.js.map +1 -0
- package/dist/cli/ui/{components/screens → screens/solid}/LogDetailScreen.d.ts +2 -2
- package/dist/cli/ui/screens/solid/LogDetailScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/LogDetailScreen.js +34 -0
- package/dist/cli/ui/screens/solid/LogDetailScreen.js.map +1 -0
- package/dist/cli/ui/{components/screens/LogListScreen.d.ts → screens/solid/LogScreen.d.ts} +10 -4
- package/dist/cli/ui/screens/solid/LogScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/LogScreen.js +333 -0
- package/dist/cli/ui/screens/solid/LogScreen.js.map +1 -0
- package/dist/cli/ui/screens/solid/ProfileEnvScreen.d.ts +17 -0
- package/dist/cli/ui/screens/solid/ProfileEnvScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/ProfileEnvScreen.js +115 -0
- package/dist/cli/ui/screens/solid/ProfileEnvScreen.js.map +1 -0
- package/dist/cli/ui/screens/solid/ProfileScreen.d.ts +17 -0
- package/dist/cli/ui/screens/solid/ProfileScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/ProfileScreen.js +50 -0
- package/dist/cli/ui/screens/solid/ProfileScreen.js.map +1 -0
- package/dist/cli/ui/screens/solid/SelectorScreen.d.ts +20 -0
- package/dist/cli/ui/screens/solid/SelectorScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/SelectorScreen.js +98 -0
- package/dist/cli/ui/screens/solid/SelectorScreen.js.map +1 -0
- package/dist/cli/ui/screens/solid/WorktreeCreateScreen.d.ts +13 -0
- package/dist/cli/ui/screens/solid/WorktreeCreateScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/WorktreeCreateScreen.js +59 -0
- package/dist/cli/ui/screens/solid/WorktreeCreateScreen.js.map +1 -0
- package/dist/cli/ui/stores/appStore.d.ts +143 -0
- package/dist/cli/ui/stores/appStore.d.ts.map +1 -0
- package/dist/cli/ui/stores/appStore.js +158 -0
- package/dist/cli/ui/stores/appStore.js.map +1 -0
- package/dist/cli/ui/stores/branchStore.d.ts +159 -0
- package/dist/cli/ui/stores/branchStore.d.ts.map +1 -0
- package/dist/cli/ui/stores/branchStore.js +275 -0
- package/dist/cli/ui/stores/branchStore.js.map +1 -0
- package/dist/cli/ui/stores/index.d.ts +11 -0
- package/dist/cli/ui/stores/index.d.ts.map +1 -0
- package/dist/cli/ui/stores/index.js +14 -0
- package/dist/cli/ui/stores/index.js.map +1 -0
- package/dist/cli/ui/stores/uiStore.d.ts +146 -0
- package/dist/cli/ui/stores/uiStore.d.ts.map +1 -0
- package/dist/cli/ui/stores/uiStore.js +166 -0
- package/dist/cli/ui/stores/uiStore.js.map +1 -0
- package/dist/cli/ui/types.d.ts +17 -1
- package/dist/cli/ui/types.d.ts.map +1 -1
- package/dist/cli/ui/utils/branchFormatter.d.ts +1 -0
- package/dist/cli/ui/utils/branchFormatter.d.ts.map +1 -1
- package/dist/cli/ui/utils/branchFormatter.js +36 -217
- package/dist/cli/ui/utils/branchFormatter.js.map +1 -1
- package/dist/cli/ui/utils/continueSession.d.ts +18 -0
- package/dist/cli/ui/utils/continueSession.d.ts.map +1 -1
- package/dist/cli/ui/utils/continueSession.js +90 -2
- package/dist/cli/ui/utils/continueSession.js.map +1 -1
- package/dist/cli/ui/utils/versionCache.d.ts +37 -0
- package/dist/cli/ui/utils/versionCache.d.ts.map +1 -0
- package/dist/cli/ui/utils/versionCache.js +70 -0
- package/dist/cli/ui/utils/versionCache.js.map +1 -0
- package/dist/cli/ui/utils/versionFetcher.d.ts +41 -0
- package/dist/cli/ui/utils/versionFetcher.d.ts.map +1 -0
- package/dist/cli/ui/utils/versionFetcher.js +89 -0
- package/dist/cli/ui/utils/versionFetcher.js.map +1 -0
- package/dist/client/assets/{index-ChHC-Puh.css → index-BbfV7Wuj.css} +1 -1
- package/dist/client/assets/index-CoAyq5x1.js +78 -0
- package/dist/client/index.html +2 -2
- package/dist/codex.d.ts +2 -0
- package/dist/codex.d.ts.map +1 -1
- package/dist/codex.js +109 -39
- package/dist/codex.js.map +1 -1
- package/dist/config/builtin-coding-agents.js +4 -4
- package/dist/config/builtin-coding-agents.js.map +1 -1
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +11 -0
- package/dist/config/index.js.map +1 -1
- package/dist/gemini.d.ts +2 -0
- package/dist/gemini.d.ts.map +1 -1
- package/dist/gemini.js +77 -39
- package/dist/gemini.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +153 -103
- package/dist/index.js.map +1 -1
- package/dist/launcher.d.ts.map +1 -1
- package/dist/launcher.js +56 -6
- package/dist/launcher.js.map +1 -1
- package/dist/logging/agentOutput.d.ts +21 -0
- package/dist/logging/agentOutput.d.ts.map +1 -0
- package/dist/logging/agentOutput.js +164 -0
- package/dist/logging/agentOutput.js.map +1 -0
- package/dist/logging/formatter.d.ts.map +1 -1
- package/dist/logging/formatter.js +18 -4
- package/dist/logging/formatter.js.map +1 -1
- package/dist/logging/logger.d.ts.map +1 -1
- package/dist/logging/logger.js +28 -9
- package/dist/logging/logger.js.map +1 -1
- package/dist/logging/reader.d.ts +21 -0
- package/dist/logging/reader.d.ts.map +1 -1
- package/dist/logging/reader.js +79 -0
- package/dist/logging/reader.js.map +1 -1
- package/dist/opentui/highlights-eq9cgrbb.scm +604 -0
- package/dist/opentui/highlights-ghv9g403.scm +205 -0
- package/dist/opentui/highlights-hk7bwhj4.scm +284 -0
- package/dist/opentui/highlights-r812a2qc.scm +150 -0
- package/dist/opentui/highlights-x6tmsnaa.scm +115 -0
- package/dist/opentui/index.solid.d.ts +2 -0
- package/dist/opentui/index.solid.d.ts.map +1 -0
- package/dist/opentui/index.solid.js +53687 -0
- package/dist/opentui/index.solid.js.map +1 -0
- package/dist/opentui/injections-73j83es3.scm +27 -0
- package/dist/opentui/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
- package/dist/opentui/tree-sitter-markdown-411r6y9b.wasm +0 -0
- package/dist/opentui/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
- package/dist/opentui/tree-sitter-typescript-zxjzwt75.wasm +0 -0
- package/dist/opentui/tree-sitter-zig-e78zbjpm.wasm +0 -0
- package/dist/repositories/worktree.repository.d.ts +1 -0
- package/dist/repositories/worktree.repository.d.ts.map +1 -1
- package/dist/repositories/worktree.repository.js +7 -0
- package/dist/repositories/worktree.repository.js.map +1 -1
- package/dist/services/codingAgentResolver.d.ts +2 -0
- package/dist/services/codingAgentResolver.d.ts.map +1 -1
- package/dist/services/codingAgentResolver.js +30 -4
- package/dist/services/codingAgentResolver.js.map +1 -1
- package/dist/services/dependency-installer.d.ts.map +1 -1
- package/dist/services/dependency-installer.js +2 -7
- package/dist/services/dependency-installer.js.map +1 -1
- package/dist/types/api.d.ts +3 -0
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/coding-agent.d.ts +62 -0
- package/dist/types/coding-agent.d.ts.map +1 -0
- package/dist/types/coding-agent.js +29 -0
- package/dist/types/coding-agent.js.map +1 -0
- package/dist/types/tools.d.ts +17 -0
- package/dist/types/tools.d.ts.map +1 -1
- package/dist/utils/coding-agent-colors.d.ts +88 -0
- package/dist/utils/coding-agent-colors.d.ts.map +1 -0
- package/dist/utils/coding-agent-colors.js +137 -0
- package/dist/utils/coding-agent-colors.js.map +1 -0
- package/dist/utils/command.d.ts +1 -1
- package/dist/utils/command.js +1 -1
- package/dist/utils/error-utils.d.ts +27 -0
- package/dist/utils/error-utils.d.ts.map +1 -0
- package/dist/utils/error-utils.js +98 -0
- package/dist/utils/error-utils.js.map +1 -0
- package/dist/utils/npmRegistry.d.ts +61 -0
- package/dist/utils/npmRegistry.d.ts.map +1 -0
- package/dist/utils/npmRegistry.js +180 -0
- package/dist/utils/npmRegistry.js.map +1 -0
- package/dist/utils/prompt.d.ts +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/session/common.d.ts +8 -0
- package/dist/utils/session/common.d.ts.map +1 -1
- package/dist/utils/session/common.js +22 -0
- package/dist/utils/session/common.js.map +1 -1
- package/dist/utils/session/parsers/claude.d.ts +10 -4
- package/dist/utils/session/parsers/claude.d.ts.map +1 -1
- package/dist/utils/session/parsers/claude.js +64 -18
- package/dist/utils/session/parsers/claude.js.map +1 -1
- package/dist/utils/session/parsers/codex.d.ts.map +1 -1
- package/dist/utils/session/parsers/codex.js +47 -20
- package/dist/utils/session/parsers/codex.js.map +1 -1
- package/dist/utils/session/parsers/gemini.d.ts.map +1 -1
- package/dist/utils/session/parsers/gemini.js +43 -6
- package/dist/utils/session/parsers/gemini.js.map +1 -1
- package/dist/utils/session/parsers/opencode.d.ts.map +1 -1
- package/dist/utils/session/parsers/opencode.js +43 -6
- package/dist/utils/session/parsers/opencode.js.map +1 -1
- package/dist/utils/session/types.d.ts +7 -0
- package/dist/utils/session/types.d.ts.map +1 -1
- package/dist/utils/terminal.d.ts +1 -0
- package/dist/utils/terminal.d.ts.map +1 -1
- package/dist/utils/terminal.js +20 -0
- package/dist/utils/terminal.js.map +1 -1
- package/dist/utils.d.ts +9 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +33 -2
- package/dist/utils.js.map +1 -1
- package/dist/web/client/src/components/CodingAgentLaunchModal.d.ts.map +1 -1
- package/dist/web/client/src/components/CodingAgentLaunchModal.js +7 -16
- package/dist/web/client/src/components/CodingAgentLaunchModal.js.map +1 -1
- package/dist/web/client/src/components/branch-detail/BranchInfoCards.d.ts.map +1 -1
- package/dist/web/client/src/components/branch-detail/BranchInfoCards.js +7 -2
- package/dist/web/client/src/components/branch-detail/BranchInfoCards.js.map +1 -1
- package/dist/web/client/src/components/branch-detail/SessionHistoryTable.d.ts.map +1 -1
- package/dist/web/client/src/components/branch-detail/SessionHistoryTable.js +2 -1
- package/dist/web/client/src/components/branch-detail/SessionHistoryTable.js.map +1 -1
- package/dist/web/client/src/components/branch-detail/ToolLauncher.d.ts +2 -2
- package/dist/web/client/src/components/branch-detail/ToolLauncher.d.ts.map +1 -1
- package/dist/web/client/src/components/branch-detail/ToolLauncher.js +5 -5
- package/dist/web/client/src/components/branch-detail/ToolLauncher.js.map +1 -1
- package/dist/web/client/src/components/ui/alert.d.ts +1 -1
- package/dist/web/client/src/lib/coding-agent-colors.d.ts +86 -0
- package/dist/web/client/src/lib/coding-agent-colors.d.ts.map +1 -0
- package/dist/web/client/src/lib/coding-agent-colors.js +135 -0
- package/dist/web/client/src/lib/coding-agent-colors.js.map +1 -0
- package/dist/web/client/src/pages/BranchDetailPage.js +10 -10
- package/dist/web/client/src/pages/BranchDetailPage.js.map +1 -1
- package/dist/web/server/pty/manager.d.ts +2 -0
- package/dist/web/server/pty/manager.d.ts.map +1 -1
- package/dist/web/server/pty/manager.js +104 -0
- package/dist/web/server/pty/manager.js.map +1 -1
- package/dist/web/server/routes/sessions.d.ts.map +1 -1
- package/dist/web/server/routes/sessions.js +5 -1
- package/dist/web/server/routes/sessions.js.map +1 -1
- package/dist/web/server/services/branches.d.ts.map +1 -1
- package/dist/web/server/services/branches.js +10 -8
- package/dist/web/server/services/branches.js.map +1 -1
- package/dist/web/server/services/worktrees.js +2 -2
- package/dist/web/server/services/worktrees.js.map +1 -1
- package/dist/worktree.d.ts +50 -1
- package/dist/worktree.d.ts.map +1 -1
- package/dist/worktree.js +292 -100
- package/dist/worktree.js.map +1 -1
- package/package.json +13 -14
- package/src/claude.ts +129 -95
- package/src/cli/ui/App.solid.tsx +2096 -0
- package/src/cli/ui/__tests__/solid/AppSolid.cleanup.test.tsx +1084 -0
- package/src/cli/ui/__tests__/solid/BranchListScreen.test.tsx +343 -0
- package/src/cli/ui/__tests__/solid/ConfirmScreen.test.tsx +77 -0
- package/src/cli/ui/__tests__/solid/LogScreen.test.tsx +351 -0
- package/src/cli/ui/__tests__/solid/components/QuickStartStep.test.tsx +308 -0
- package/src/cli/ui/__tests__/solid/components/WizardPopup.test.tsx +231 -0
- package/src/cli/ui/__tests__/solid/components/WizardSteps.test.tsx +241 -0
- package/src/cli/ui/__tests__/utils/branchFormatter.test.ts +79 -334
- package/src/cli/ui/__tests__/utils/clipboard.test.ts +3 -3
- package/src/cli/ui/__tests__/utils/statisticsCalculator.test.ts +1 -1
- package/src/cli/ui/components/solid/Footer.tsx +36 -0
- package/src/cli/ui/components/{parts → solid}/Header.tsx +17 -28
- package/src/cli/ui/components/solid/HelpOverlay.tsx +194 -0
- package/src/cli/ui/components/solid/QuickStartStep.tsx +209 -0
- package/src/cli/ui/components/{parts → solid}/ScrollableList.tsx +7 -8
- package/src/cli/ui/components/solid/SearchInput.tsx +42 -0
- package/src/cli/ui/components/solid/SelectInput.tsx +88 -0
- package/src/cli/ui/components/solid/Stats.tsx +92 -0
- package/src/cli/ui/components/solid/TextInput.tsx +49 -0
- package/src/cli/ui/components/solid/WizardController.tsx +393 -0
- package/src/cli/ui/components/solid/WizardPopup.tsx +135 -0
- package/src/cli/ui/components/solid/WizardSteps.tsx +736 -0
- package/src/cli/ui/core/index.ts +17 -0
- package/src/cli/ui/core/keybindings.ts +367 -0
- package/src/cli/ui/core/theme.ts +266 -0
- package/src/cli/ui/core/types.ts +235 -0
- package/src/cli/ui/hooks/solid/useAsyncOperation.ts +78 -0
- package/src/cli/ui/hooks/solid/useFilter.ts +86 -0
- package/src/cli/ui/hooks/solid/useGitOperations.ts +81 -0
- package/src/cli/ui/hooks/solid/useKeyHandler.ts +103 -0
- package/src/cli/ui/hooks/solid/useScrollableList.ts +149 -0
- package/src/cli/ui/hooks/solid/useSelection.ts +77 -0
- package/src/cli/ui/hooks/solid/useTerminalSize.ts +22 -0
- package/src/cli/ui/index.solid.ts +28 -0
- package/src/cli/ui/screens/solid/BranchListScreen.tsx +1153 -0
- package/src/cli/ui/screens/solid/ConfirmScreen.tsx +86 -0
- package/src/cli/ui/screens/solid/EnvironmentScreen.tsx +161 -0
- package/src/cli/ui/screens/solid/ErrorScreen.tsx +42 -0
- package/src/cli/ui/screens/solid/InputScreen.tsx +55 -0
- package/src/cli/ui/screens/solid/LoadingIndicator.tsx +77 -0
- package/src/cli/ui/screens/solid/LogDetailScreen.tsx +75 -0
- package/src/cli/ui/screens/solid/LogScreen.tsx +504 -0
- package/src/cli/ui/screens/solid/ProfileEnvScreen.tsx +196 -0
- package/src/cli/ui/screens/solid/ProfileScreen.tsx +98 -0
- package/src/cli/ui/screens/solid/SelectorScreen.tsx +181 -0
- package/src/cli/ui/screens/solid/SettingsScreen.tsx +52 -0
- package/src/cli/ui/screens/solid/WorktreeCreateScreen.tsx +136 -0
- package/src/cli/ui/screens/solid/WorktreeDeleteScreen.tsx +40 -0
- package/src/cli/ui/stores/appStore.ts +208 -0
- package/src/cli/ui/stores/branchStore.ts +357 -0
- package/src/cli/ui/stores/index.ts +31 -0
- package/src/cli/ui/stores/uiStore.ts +226 -0
- package/src/cli/ui/types.ts +21 -3
- package/src/cli/ui/utils/__tests__/branchFormatter.test.ts +227 -0
- package/src/cli/ui/utils/branchFormatter.ts +43 -222
- package/src/cli/ui/utils/continueSession.ts +133 -2
- package/src/cli/ui/utils/modelOptions.test.ts +1 -1
- package/src/cli/ui/utils/versionCache.ts +93 -0
- package/src/cli/ui/utils/versionFetcher.ts +120 -0
- package/src/codex.ts +138 -39
- package/src/config/__tests__/saveSession.test.ts +143 -0
- package/src/config/builtin-coding-agents.ts +4 -4
- package/src/config/index.ts +14 -0
- package/src/gemini.ts +107 -46
- package/src/index.test.ts +25 -19
- package/src/index.ts +202 -143
- package/src/launcher.ts +66 -6
- package/src/logging/agentOutput.ts +216 -0
- package/src/logging/formatter.ts +23 -4
- package/src/logging/logger.ts +34 -10
- package/src/logging/reader.ts +117 -0
- package/src/opentui/index.solid.ts +1 -0
- package/src/repositories/worktree.repository.ts +8 -0
- package/src/services/__tests__/BatchMergeService.test.ts +83 -67
- package/src/services/__tests__/WorktreeOrchestrator.test.ts +8 -7
- package/src/services/codingAgentResolver.ts +30 -4
- package/src/services/dependency-installer.ts +2 -9
- package/src/types/api.ts +3 -0
- package/src/types/coding-agent.ts +85 -0
- package/src/types/tools.ts +19 -0
- package/src/utils/__tests__/npmRegistry.test.ts +250 -0
- package/src/utils/__tests__/prompt.test.ts +4 -5
- package/src/utils/coding-agent-colors.ts +165 -0
- package/src/utils/command.ts +1 -1
- package/src/utils/error-utils.ts +133 -0
- package/src/utils/npmRegistry.ts +249 -0
- package/src/utils/prompt.ts +1 -1
- package/src/utils/session/common.ts +28 -0
- package/src/utils/session/parsers/claude.ts +79 -29
- package/src/utils/session/parsers/codex.ts +50 -18
- package/src/utils/session/parsers/gemini.ts +46 -5
- package/src/utils/session/parsers/opencode.ts +46 -5
- package/src/utils/session/types.ts +4 -0
- package/src/utils/terminal.ts +24 -0
- package/src/utils.test.ts +1 -1
- package/src/utils.ts +37 -4
- package/src/web/client/src/components/CodingAgentLaunchModal.tsx +12 -21
- package/src/web/client/src/components/branch-detail/BranchInfoCards.tsx +16 -1
- package/src/web/client/src/components/branch-detail/SessionHistoryTable.tsx +7 -1
- package/src/web/client/src/components/branch-detail/ToolLauncher.tsx +11 -6
- package/src/web/client/src/lib/coding-agent-colors.ts +149 -0
- package/src/web/client/src/pages/BranchDetailPage.tsx +11 -11
- package/src/web/server/pty/manager.ts +139 -0
- package/src/web/server/routes/sessions.ts +6 -0
- package/src/web/server/services/branches.ts +11 -8
- package/src/web/server/services/worktrees.ts +2 -2
- package/src/worktree.ts +386 -114
- package/dist/cli/ui/components/App.d.ts +0 -25
- package/dist/cli/ui/components/App.d.ts.map +0 -1
- package/dist/cli/ui/components/App.js +0 -1006
- package/dist/cli/ui/components/App.js.map +0 -1
- package/dist/cli/ui/components/common/Confirm.d.ts +0 -13
- package/dist/cli/ui/components/common/Confirm.d.ts.map +0 -1
- package/dist/cli/ui/components/common/Confirm.js +0 -20
- package/dist/cli/ui/components/common/Confirm.js.map +0 -1
- package/dist/cli/ui/components/common/ErrorBoundary.d.ts +0 -23
- package/dist/cli/ui/components/common/ErrorBoundary.d.ts.map +0 -1
- package/dist/cli/ui/components/common/ErrorBoundary.js +0 -37
- package/dist/cli/ui/components/common/ErrorBoundary.js.map +0 -1
- package/dist/cli/ui/components/common/Input.d.ts +0 -19
- package/dist/cli/ui/components/common/Input.d.ts.map +0 -1
- package/dist/cli/ui/components/common/Input.js +0 -22
- package/dist/cli/ui/components/common/Input.js.map +0 -1
- package/dist/cli/ui/components/common/LoadingIndicator.d.ts +0 -19
- package/dist/cli/ui/components/common/LoadingIndicator.d.ts.map +0 -1
- package/dist/cli/ui/components/common/LoadingIndicator.js +0 -61
- package/dist/cli/ui/components/common/LoadingIndicator.js.map +0 -1
- package/dist/cli/ui/components/common/Select.d.ts +0 -38
- package/dist/cli/ui/components/common/Select.d.ts.map +0 -1
- package/dist/cli/ui/components/common/Select.js +0 -151
- package/dist/cli/ui/components/common/Select.js.map +0 -1
- package/dist/cli/ui/components/common/SpinnerIcon.d.ts +0 -20
- package/dist/cli/ui/components/common/SpinnerIcon.d.ts.map +0 -1
- package/dist/cli/ui/components/common/SpinnerIcon.js +0 -61
- package/dist/cli/ui/components/common/SpinnerIcon.js.map +0 -1
- package/dist/cli/ui/components/parts/Footer.d.ts +0 -15
- package/dist/cli/ui/components/parts/Footer.d.ts.map +0 -1
- package/dist/cli/ui/components/parts/Footer.js +0 -20
- package/dist/cli/ui/components/parts/Footer.js.map +0 -1
- package/dist/cli/ui/components/parts/Header.d.ts.map +0 -1
- package/dist/cli/ui/components/parts/Header.js +0 -24
- package/dist/cli/ui/components/parts/Header.js.map +0 -1
- package/dist/cli/ui/components/parts/MergeStatusList.d.ts +0 -13
- package/dist/cli/ui/components/parts/MergeStatusList.d.ts.map +0 -1
- package/dist/cli/ui/components/parts/MergeStatusList.js +0 -52
- package/dist/cli/ui/components/parts/MergeStatusList.js.map +0 -1
- package/dist/cli/ui/components/parts/ProgressBar.d.ts +0 -13
- package/dist/cli/ui/components/parts/ProgressBar.d.ts.map +0 -1
- package/dist/cli/ui/components/parts/ProgressBar.js +0 -53
- package/dist/cli/ui/components/parts/ProgressBar.js.map +0 -1
- package/dist/cli/ui/components/parts/ScrollableList.d.ts +0 -12
- package/dist/cli/ui/components/parts/ScrollableList.d.ts.map +0 -1
- package/dist/cli/ui/components/parts/ScrollableList.js +0 -11
- package/dist/cli/ui/components/parts/ScrollableList.js.map +0 -1
- package/dist/cli/ui/components/parts/Stats.d.ts +0 -10
- package/dist/cli/ui/components/parts/Stats.d.ts.map +0 -1
- package/dist/cli/ui/components/parts/Stats.js +0 -55
- package/dist/cli/ui/components/parts/Stats.js.map +0 -1
- package/dist/cli/ui/components/screens/BatchMergeProgressScreen.d.ts +0 -17
- package/dist/cli/ui/components/screens/BatchMergeProgressScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/BatchMergeProgressScreen.js +0 -42
- package/dist/cli/ui/components/screens/BatchMergeProgressScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/BatchMergeResultScreen.d.ts +0 -17
- package/dist/cli/ui/components/screens/BatchMergeResultScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/BatchMergeResultScreen.js +0 -72
- package/dist/cli/ui/components/screens/BatchMergeResultScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/BranchCreatorScreen.d.ts +0 -18
- package/dist/cli/ui/components/screens/BranchCreatorScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/BranchCreatorScreen.js +0 -151
- package/dist/cli/ui/components/screens/BranchCreatorScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/BranchListScreen.d.ts +0 -60
- package/dist/cli/ui/components/screens/BranchListScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/BranchListScreen.js +0 -476
- package/dist/cli/ui/components/screens/BranchListScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/BranchQuickStartScreen.d.ts +0 -30
- package/dist/cli/ui/components/screens/BranchQuickStartScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/BranchQuickStartScreen.js +0 -148
- package/dist/cli/ui/components/screens/BranchQuickStartScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/CodingAgentSelectorScreen.d.ts +0 -27
- package/dist/cli/ui/components/screens/CodingAgentSelectorScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/CodingAgentSelectorScreen.js +0 -93
- package/dist/cli/ui/components/screens/CodingAgentSelectorScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/EnvironmentProfileScreen.d.ts +0 -19
- package/dist/cli/ui/components/screens/EnvironmentProfileScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/EnvironmentProfileScreen.js +0 -577
- package/dist/cli/ui/components/screens/EnvironmentProfileScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.d.ts +0 -45
- package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.js +0 -95
- package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/LogDatePickerScreen.d.ts +0 -10
- package/dist/cli/ui/components/screens/LogDatePickerScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/LogDatePickerScreen.js +0 -44
- package/dist/cli/ui/components/screens/LogDatePickerScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/LogDetailScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/LogDetailScreen.js +0 -34
- package/dist/cli/ui/components/screens/LogDetailScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/LogListScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/LogListScreen.js +0 -107
- package/dist/cli/ui/components/screens/LogListScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/ModelSelectorScreen.d.ts +0 -24
- package/dist/cli/ui/components/screens/ModelSelectorScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/ModelSelectorScreen.js +0 -197
- package/dist/cli/ui/components/screens/ModelSelectorScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/PRCleanupScreen.d.ts +0 -29
- package/dist/cli/ui/components/screens/PRCleanupScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/PRCleanupScreen.js +0 -92
- package/dist/cli/ui/components/screens/PRCleanupScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/SessionSelectorScreen.d.ts +0 -31
- package/dist/cli/ui/components/screens/SessionSelectorScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/SessionSelectorScreen.js +0 -67
- package/dist/cli/ui/components/screens/SessionSelectorScreen.js.map +0 -1
- package/dist/cli/ui/hooks/useAppInput.d.ts +0 -21
- package/dist/cli/ui/hooks/useAppInput.d.ts.map +0 -1
- package/dist/cli/ui/hooks/useAppInput.js +0 -138
- package/dist/cli/ui/hooks/useAppInput.js.map +0 -1
- package/dist/cli/ui/hooks/useBatchMerge.d.ts +0 -17
- package/dist/cli/ui/hooks/useBatchMerge.d.ts.map +0 -1
- package/dist/cli/ui/hooks/useBatchMerge.js +0 -77
- package/dist/cli/ui/hooks/useBatchMerge.js.map +0 -1
- package/dist/cli/ui/hooks/useGitData.d.ts +0 -21
- package/dist/cli/ui/hooks/useGitData.d.ts.map +0 -1
- package/dist/cli/ui/hooks/useGitData.js +0 -229
- package/dist/cli/ui/hooks/useGitData.js.map +0 -1
- package/dist/cli/ui/hooks/useProfiles.d.ts +0 -41
- package/dist/cli/ui/hooks/useProfiles.d.ts.map +0 -1
- package/dist/cli/ui/hooks/useProfiles.js +0 -136
- package/dist/cli/ui/hooks/useProfiles.js.map +0 -1
- package/dist/cli/ui/hooks/useScreenState.d.ts +0 -12
- package/dist/cli/ui/hooks/useScreenState.d.ts.map +0 -1
- package/dist/cli/ui/hooks/useScreenState.js +0 -30
- package/dist/cli/ui/hooks/useScreenState.js.map +0 -1
- package/dist/cli/ui/hooks/useTerminalSize.d.ts +0 -9
- package/dist/cli/ui/hooks/useTerminalSize.d.ts.map +0 -1
- package/dist/cli/ui/hooks/useTerminalSize.js +0 -24
- package/dist/cli/ui/hooks/useTerminalSize.js.map +0 -1
- package/dist/cli/ui/hooks/useToolStatus.d.ts +0 -30
- package/dist/cli/ui/hooks/useToolStatus.d.ts.map +0 -1
- package/dist/cli/ui/hooks/useToolStatus.js +0 -49
- package/dist/cli/ui/hooks/useToolStatus.js.map +0 -1
- package/dist/cli/ui/screens/BranchActionSelectorScreen.d.ts +0 -24
- package/dist/cli/ui/screens/BranchActionSelectorScreen.d.ts.map +0 -1
- package/dist/cli/ui/screens/BranchActionSelectorScreen.js +0 -65
- package/dist/cli/ui/screens/BranchActionSelectorScreen.js.map +0 -1
- package/dist/client/assets/index-LNPtOrn3.js +0 -78
- package/src/cli/ui/__tests__/SKIPPED_TESTS.md +0 -119
- package/src/cli/ui/__tests__/acceptance/branchList.acceptance.test.tsx.skip +0 -239
- package/src/cli/ui/__tests__/acceptance/navigation.acceptance.test.tsx +0 -225
- package/src/cli/ui/__tests__/acceptance/realtimeUpdate.acceptance.test.tsx.skip +0 -219
- package/src/cli/ui/__tests__/components/App.protected-branch.test.tsx +0 -212
- package/src/cli/ui/__tests__/components/App.shortcuts.test.tsx +0 -440
- package/src/cli/ui/__tests__/components/App.test.tsx +0 -365
- package/src/cli/ui/__tests__/components/ModelSelectorScreen.initial.test.tsx +0 -91
- package/src/cli/ui/__tests__/components/common/Confirm.test.tsx +0 -80
- package/src/cli/ui/__tests__/components/common/ErrorBoundary.test.tsx +0 -104
- package/src/cli/ui/__tests__/components/common/Input.test.tsx +0 -100
- package/src/cli/ui/__tests__/components/common/LoadingIndicator.test.tsx +0 -148
- package/src/cli/ui/__tests__/components/common/Select.memo.test.tsx +0 -255
- package/src/cli/ui/__tests__/components/common/Select.test.tsx +0 -335
- package/src/cli/ui/__tests__/components/parts/Footer.test.tsx +0 -65
- package/src/cli/ui/__tests__/components/parts/Header.test.tsx +0 -55
- package/src/cli/ui/__tests__/components/parts/ScrollableList.test.tsx +0 -69
- package/src/cli/ui/__tests__/components/parts/Stats.test.tsx +0 -148
- package/src/cli/ui/__tests__/components/screens/BranchCreatorScreen.test.tsx +0 -253
- package/src/cli/ui/__tests__/components/screens/BranchListScreen.test.tsx +0 -1070
- package/src/cli/ui/__tests__/components/screens/BranchQuickStartScreen.test.tsx +0 -142
- package/src/cli/ui/__tests__/components/screens/CodingAgentSelectorScreen.test.tsx +0 -174
- package/src/cli/ui/__tests__/components/screens/ExecutionModeSelectorScreen.test.tsx +0 -182
- package/src/cli/ui/__tests__/components/screens/LogDetailScreen.test.tsx +0 -57
- package/src/cli/ui/__tests__/components/screens/LogListScreen.test.tsx +0 -102
- package/src/cli/ui/__tests__/components/screens/PRCleanupScreen.test.tsx +0 -216
- package/src/cli/ui/__tests__/components/screens/SessionSelectorScreen.test.tsx +0 -147
- package/src/cli/ui/__tests__/hooks/useGitData.nonblocking.test.tsx +0 -206
- package/src/cli/ui/__tests__/hooks/useGitData.test.ts +0 -197
- package/src/cli/ui/__tests__/hooks/useGitData.test.ts.skip +0 -228
- package/src/cli/ui/__tests__/hooks/useScreenState.test.ts +0 -147
- package/src/cli/ui/__tests__/hooks/useTerminalSize.test.ts +0 -99
- package/src/cli/ui/__tests__/integration/branchList.test.tsx.skip +0 -253
- package/src/cli/ui/__tests__/integration/edgeCases.test.tsx +0 -436
- package/src/cli/ui/__tests__/integration/navigation.test.tsx +0 -514
- package/src/cli/ui/__tests__/integration/realtimeUpdate.test.tsx +0 -509
- package/src/cli/ui/__tests__/integration/realtimeUpdate.test.tsx.skip +0 -216
- package/src/cli/ui/__tests__/performance/branchList.performance.test.tsx +0 -193
- package/src/cli/ui/__tests__/performance/useMemoOptimization.test.tsx +0 -234
- package/src/cli/ui/components/App.tsx +0 -1478
- package/src/cli/ui/components/common/Confirm.tsx +0 -44
- package/src/cli/ui/components/common/ErrorBoundary.tsx +0 -60
- package/src/cli/ui/components/common/Input.tsx +0 -58
- package/src/cli/ui/components/common/LoadingIndicator.tsx +0 -98
- package/src/cli/ui/components/common/Select.tsx +0 -247
- package/src/cli/ui/components/common/SpinnerIcon.tsx +0 -86
- package/src/cli/ui/components/parts/Footer.tsx +0 -41
- package/src/cli/ui/components/parts/Header.test.tsx +0 -75
- package/src/cli/ui/components/parts/MergeStatusList.tsx +0 -75
- package/src/cli/ui/components/parts/ProgressBar.tsx +0 -73
- package/src/cli/ui/components/parts/Stats.tsx +0 -88
- package/src/cli/ui/components/screens/BatchMergeProgressScreen.tsx +0 -74
- package/src/cli/ui/components/screens/BatchMergeResultScreen.tsx +0 -108
- package/src/cli/ui/components/screens/BranchCreatorScreen.tsx +0 -242
- package/src/cli/ui/components/screens/BranchListScreen.tsx +0 -744
- package/src/cli/ui/components/screens/BranchQuickStartScreen.tsx +0 -244
- package/src/cli/ui/components/screens/CodingAgentSelectorScreen.tsx +0 -159
- package/src/cli/ui/components/screens/EnvironmentProfileScreen.tsx +0 -928
- package/src/cli/ui/components/screens/ExecutionModeSelectorScreen.tsx +0 -176
- package/src/cli/ui/components/screens/LogDatePickerScreen.tsx +0 -83
- package/src/cli/ui/components/screens/LogDetailScreen.tsx +0 -67
- package/src/cli/ui/components/screens/LogListScreen.tsx +0 -192
- package/src/cli/ui/components/screens/ModelSelectorScreen.tsx +0 -320
- package/src/cli/ui/components/screens/PRCleanupScreen.tsx +0 -171
- package/src/cli/ui/components/screens/SessionSelectorScreen.tsx +0 -135
- package/src/cli/ui/hooks/useAppInput.ts +0 -172
- package/src/cli/ui/hooks/useBatchMerge.ts +0 -96
- package/src/cli/ui/hooks/useGitData.ts +0 -347
- package/src/cli/ui/hooks/useProfiles.ts +0 -211
- package/src/cli/ui/hooks/useScreenState.ts +0 -44
- package/src/cli/ui/hooks/useTerminalSize.ts +0 -33
- package/src/cli/ui/hooks/useToolStatus.ts +0 -68
- package/src/cli/ui/screens/BranchActionSelectorScreen.tsx +0 -111
- package/src/cli/ui/screens/__tests__/BranchActionSelectorScreen.test.tsx +0 -264
|
@@ -17,7 +17,7 @@ export const CLAUDE_CODE_TOOL: CodingAgent = {
|
|
|
17
17
|
id: "claude-code",
|
|
18
18
|
displayName: "Claude Code",
|
|
19
19
|
type: "bunx",
|
|
20
|
-
command: "@anthropic-ai/claude-code
|
|
20
|
+
command: "@anthropic-ai/claude-code",
|
|
21
21
|
modeArgs: {
|
|
22
22
|
normal: [],
|
|
23
23
|
continue: ["-c"],
|
|
@@ -36,7 +36,7 @@ export const CODEX_CLI_TOOL: CodingAgent = {
|
|
|
36
36
|
id: "codex-cli",
|
|
37
37
|
displayName: "Codex",
|
|
38
38
|
type: "bunx",
|
|
39
|
-
command: "@openai/codex
|
|
39
|
+
command: "@openai/codex",
|
|
40
40
|
defaultArgs: Array.from(CODEX_DEFAULT_ARGS),
|
|
41
41
|
modeArgs: {
|
|
42
42
|
normal: [],
|
|
@@ -52,7 +52,7 @@ export const GEMINI_CLI_TOOL: CodingAgent = {
|
|
|
52
52
|
id: "gemini-cli",
|
|
53
53
|
displayName: "Gemini",
|
|
54
54
|
type: "bunx",
|
|
55
|
-
command: "@google/gemini-cli
|
|
55
|
+
command: "@google/gemini-cli",
|
|
56
56
|
modeArgs: {
|
|
57
57
|
normal: [],
|
|
58
58
|
continue: ["-r", "latest"],
|
|
@@ -68,7 +68,7 @@ export const OPENCODE_TOOL: CodingAgent = {
|
|
|
68
68
|
id: "opencode",
|
|
69
69
|
displayName: "OpenCode",
|
|
70
70
|
type: "bunx",
|
|
71
|
-
command: "opencode-ai
|
|
71
|
+
command: "opencode-ai",
|
|
72
72
|
modeArgs: {
|
|
73
73
|
normal: [],
|
|
74
74
|
continue: ["-c"],
|
package/src/config/index.ts
CHANGED
|
@@ -22,6 +22,7 @@ export interface SessionData {
|
|
|
22
22
|
mode?: "normal" | "continue" | "resume";
|
|
23
23
|
model?: string | null;
|
|
24
24
|
toolLabel?: string | null;
|
|
25
|
+
toolVersion?: string | null;
|
|
25
26
|
history?: ToolSessionEntry[];
|
|
26
27
|
}
|
|
27
28
|
|
|
@@ -35,6 +36,7 @@ export interface ToolSessionEntry {
|
|
|
35
36
|
model?: string | null;
|
|
36
37
|
reasoningLevel?: string | null;
|
|
37
38
|
skipPermissions?: boolean | null;
|
|
39
|
+
toolVersion?: string | null;
|
|
38
40
|
timestamp: number;
|
|
39
41
|
}
|
|
40
42
|
|
|
@@ -46,6 +48,14 @@ const DEFAULT_CONFIG: AppConfig = {
|
|
|
46
48
|
worktreeNamingPattern: "{repo}-{branch}",
|
|
47
49
|
};
|
|
48
50
|
|
|
51
|
+
function normalizeToolVersion(version?: string | null): string {
|
|
52
|
+
if (!version) {
|
|
53
|
+
return "latest";
|
|
54
|
+
}
|
|
55
|
+
const trimmed = version.trim();
|
|
56
|
+
return trimmed.length > 0 ? trimmed : "latest";
|
|
57
|
+
}
|
|
58
|
+
|
|
49
59
|
/**
|
|
50
60
|
* 設定ファイルを読み込む
|
|
51
61
|
*/
|
|
@@ -119,6 +129,7 @@ export async function saveSession(
|
|
|
119
129
|
try {
|
|
120
130
|
const sessionPath = getSessionFilePath(sessionData.repositoryRoot);
|
|
121
131
|
const sessionDir = path.dirname(sessionPath);
|
|
132
|
+
const resolvedToolVersion = normalizeToolVersion(sessionData.toolVersion);
|
|
122
133
|
|
|
123
134
|
// ディレクトリを作成
|
|
124
135
|
await mkdir(sessionDir, { recursive: true });
|
|
@@ -152,6 +163,7 @@ export async function saveSession(
|
|
|
152
163
|
model: sessionData.model ?? null,
|
|
153
164
|
reasoningLevel: sessionData.reasoningLevel ?? null,
|
|
154
165
|
skipPermissions: sessionData.skipPermissions ?? false,
|
|
166
|
+
toolVersion: resolvedToolVersion,
|
|
155
167
|
timestamp: sessionData.timestamp,
|
|
156
168
|
};
|
|
157
169
|
existingHistory = [...existingHistory, entry].slice(-100); // keep latest 100
|
|
@@ -163,6 +175,7 @@ export async function saveSession(
|
|
|
163
175
|
lastSessionId: sessionData.lastSessionId ?? null,
|
|
164
176
|
reasoningLevel: sessionData.reasoningLevel ?? null,
|
|
165
177
|
skipPermissions: sessionData.skipPermissions ?? false,
|
|
178
|
+
toolVersion: resolvedToolVersion,
|
|
166
179
|
};
|
|
167
180
|
|
|
168
181
|
await writeFile(sessionPath, JSON.stringify(payload, null, 2), "utf-8");
|
|
@@ -277,6 +290,7 @@ export async function getLastToolUsageMap(
|
|
|
277
290
|
worktreePath: parsed.lastWorktreePath,
|
|
278
291
|
toolId: parsed.lastUsedTool ?? "unknown",
|
|
279
292
|
toolLabel: parsed.toolLabel ?? parsed.lastUsedTool ?? "Custom",
|
|
293
|
+
sessionId: parsed.lastSessionId ?? null,
|
|
280
294
|
mode: parsed.mode ?? null,
|
|
281
295
|
model: parsed.model ?? null,
|
|
282
296
|
reasoningLevel: parsed.reasoningLevel ?? null,
|
package/src/gemini.ts
CHANGED
|
@@ -5,11 +5,16 @@ import {
|
|
|
5
5
|
createChildStdio,
|
|
6
6
|
getTerminalStreams,
|
|
7
7
|
resetTerminalModes,
|
|
8
|
+
writeTerminalLine,
|
|
8
9
|
} from "./utils/terminal.js";
|
|
9
10
|
import { findCommand } from "./utils/command.js";
|
|
10
11
|
import { findLatestGeminiSessionId } from "./utils/session.js";
|
|
12
|
+
import {
|
|
13
|
+
runAgentWithPty,
|
|
14
|
+
shouldCaptureAgentOutput,
|
|
15
|
+
} from "./logging/agentOutput.js";
|
|
11
16
|
|
|
12
|
-
const GEMINI_CLI_PACKAGE = "@google/gemini-cli
|
|
17
|
+
const GEMINI_CLI_PACKAGE = "@google/gemini-cli";
|
|
13
18
|
|
|
14
19
|
/**
|
|
15
20
|
* Error wrapper used by `launchGeminiCLI` to preserve the original failure
|
|
@@ -44,6 +49,8 @@ export async function launchGeminiCLI(
|
|
|
44
49
|
envOverrides?: Record<string, string>;
|
|
45
50
|
model?: string;
|
|
46
51
|
sessionId?: string | null;
|
|
52
|
+
branch?: string | null;
|
|
53
|
+
version?: string | null;
|
|
47
54
|
} = {},
|
|
48
55
|
): Promise<{ sessionId?: string | null }> {
|
|
49
56
|
const terminal = getTerminalStreams();
|
|
@@ -54,14 +61,14 @@ export async function launchGeminiCLI(
|
|
|
54
61
|
throw new Error(`Worktree path does not exist: ${worktreePath}`);
|
|
55
62
|
}
|
|
56
63
|
|
|
57
|
-
|
|
58
|
-
|
|
64
|
+
writeTerminalLine(chalk.blue("🚀 Launching Gemini CLI..."));
|
|
65
|
+
writeTerminalLine(chalk.gray(` Working directory: ${worktreePath}`));
|
|
59
66
|
|
|
60
67
|
const args: string[] = [];
|
|
61
68
|
|
|
62
69
|
if (options.model) {
|
|
63
70
|
args.push("--model", options.model);
|
|
64
|
-
|
|
71
|
+
writeTerminalLine(chalk.green(` 🎯 Model: ${options.model}`));
|
|
65
72
|
}
|
|
66
73
|
|
|
67
74
|
// Handle execution mode
|
|
@@ -109,31 +116,35 @@ export async function launchGeminiCLI(
|
|
|
109
116
|
switch (options.mode) {
|
|
110
117
|
case "continue":
|
|
111
118
|
if (resumeSessionId) {
|
|
112
|
-
|
|
119
|
+
writeTerminalLine(
|
|
113
120
|
chalk.cyan(
|
|
114
121
|
` ⏭️ Continuing specific session: ${resumeSessionId}`,
|
|
115
122
|
),
|
|
116
123
|
);
|
|
117
124
|
} else {
|
|
118
|
-
|
|
125
|
+
writeTerminalLine(
|
|
126
|
+
chalk.cyan(" ⏭️ Continuing most recent session"),
|
|
127
|
+
);
|
|
119
128
|
}
|
|
120
129
|
break;
|
|
121
130
|
case "resume":
|
|
122
131
|
if (resumeSessionId) {
|
|
123
|
-
|
|
132
|
+
writeTerminalLine(
|
|
133
|
+
chalk.cyan(` 🔄 Resuming session: ${resumeSessionId}`),
|
|
134
|
+
);
|
|
124
135
|
} else {
|
|
125
|
-
|
|
136
|
+
writeTerminalLine(chalk.cyan(" 🔄 Resuming session (latest)"));
|
|
126
137
|
}
|
|
127
138
|
break;
|
|
128
139
|
case "normal":
|
|
129
140
|
default:
|
|
130
|
-
|
|
141
|
+
writeTerminalLine(chalk.green(" ✨ Starting new session"));
|
|
131
142
|
break;
|
|
132
143
|
}
|
|
133
144
|
|
|
134
145
|
// Handle skip permissions (YOLO mode)
|
|
135
146
|
if (options.skipPermissions) {
|
|
136
|
-
|
|
147
|
+
writeTerminalLine(
|
|
137
148
|
chalk.yellow(" ⚠️ Auto-approving all actions (YOLO mode)"),
|
|
138
149
|
);
|
|
139
150
|
}
|
|
@@ -148,8 +159,8 @@ export async function launchGeminiCLI(
|
|
|
148
159
|
(entry): entry is [string, string] => typeof entry[1] === "string",
|
|
149
160
|
),
|
|
150
161
|
);
|
|
151
|
-
|
|
152
|
-
const childStdio = createChildStdio();
|
|
162
|
+
const captureOutput = shouldCaptureAgentOutput(baseEnv);
|
|
163
|
+
const childStdio = captureOutput ? null : createChildStdio();
|
|
153
164
|
|
|
154
165
|
// Auto-detect locally installed gemini command
|
|
155
166
|
const geminiLookup = await findCommand("gemini");
|
|
@@ -158,6 +169,27 @@ export async function launchGeminiCLI(
|
|
|
158
169
|
// Session ID is determined via file-based detection after exit.
|
|
159
170
|
let capturedSessionId: string | null = null;
|
|
160
171
|
|
|
172
|
+
// Determine execution strategy based on version selection
|
|
173
|
+
// FR-063b: "installed" option only appears when local command exists
|
|
174
|
+
const requestedVersion = options.version ?? "latest";
|
|
175
|
+
let selectedVersion = requestedVersion;
|
|
176
|
+
|
|
177
|
+
if (requestedVersion === "installed" && !geminiLookup.path) {
|
|
178
|
+
writeTerminalLine(
|
|
179
|
+
chalk.yellow(
|
|
180
|
+
" ⚠️ Installed gemini command not found. Falling back to latest.",
|
|
181
|
+
),
|
|
182
|
+
);
|
|
183
|
+
selectedVersion = "latest";
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// Log version information (FR-072)
|
|
187
|
+
if (selectedVersion === "installed") {
|
|
188
|
+
writeTerminalLine(chalk.green(` 📦 Version: installed`));
|
|
189
|
+
} else {
|
|
190
|
+
writeTerminalLine(chalk.green(` 📦 Version: @${selectedVersion}`));
|
|
191
|
+
}
|
|
192
|
+
|
|
161
193
|
const runGemini = async (runArgs: string[]): Promise<void> => {
|
|
162
194
|
const execChild = async (child: Promise<unknown>) => {
|
|
163
195
|
try {
|
|
@@ -171,8 +203,35 @@ export async function launchGeminiCLI(
|
|
|
171
203
|
throw execError;
|
|
172
204
|
}
|
|
173
205
|
};
|
|
206
|
+
// Treat SIGHUP (1), SIGINT (2), SIGTERM (15) as normal exit signals
|
|
207
|
+
// SIGHUP can occur when the PTY closes, SIGINT/SIGTERM are user interrupts
|
|
208
|
+
const isNormalExitSignal = (signal?: number | null) =>
|
|
209
|
+
signal === 1 || signal === 2 || signal === 15;
|
|
174
210
|
|
|
175
211
|
const run = async (cmd: string, args: string[]) => {
|
|
212
|
+
if (captureOutput) {
|
|
213
|
+
const result = await runAgentWithPty({
|
|
214
|
+
command: cmd,
|
|
215
|
+
args,
|
|
216
|
+
cwd: worktreePath,
|
|
217
|
+
env: baseEnv,
|
|
218
|
+
agentId: "gemini-cli",
|
|
219
|
+
});
|
|
220
|
+
if (isNormalExitSignal(result.signal)) {
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
if (result.exitCode !== null && result.exitCode !== 0) {
|
|
224
|
+
throw new Error(
|
|
225
|
+
`Gemini CLI exited with code ${result.exitCode ?? "unknown"}`,
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
if (!childStdio) {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
|
|
176
235
|
const child = execa(cmd, args, {
|
|
177
236
|
cwd: worktreePath,
|
|
178
237
|
stdin: childStdio.stdin,
|
|
@@ -183,30 +242,19 @@ export async function launchGeminiCLI(
|
|
|
183
242
|
await execChild(child);
|
|
184
243
|
};
|
|
185
244
|
|
|
186
|
-
if (
|
|
187
|
-
// Use
|
|
188
|
-
|
|
245
|
+
if (selectedVersion === "installed" && geminiLookup.path) {
|
|
246
|
+
// FR-066: Use locally installed command when "installed" is selected
|
|
247
|
+
// FR-063b guarantees local command exists when this option is shown
|
|
248
|
+
writeTerminalLine(
|
|
189
249
|
chalk.green(" ✨ Using locally installed gemini command"),
|
|
190
250
|
);
|
|
191
251
|
return await run(geminiLookup.path, runArgs);
|
|
192
252
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
" 💡 Recommended: Install Gemini CLI globally for faster startup",
|
|
199
|
-
),
|
|
200
|
-
);
|
|
201
|
-
console.log(chalk.yellow(" npm install -g @google/gemini-cli"));
|
|
202
|
-
console.log("");
|
|
203
|
-
const shouldSkipDelay =
|
|
204
|
-
typeof process !== "undefined" &&
|
|
205
|
-
(process.env?.NODE_ENV === "test" || Boolean(process.env?.VITEST));
|
|
206
|
-
if (!shouldSkipDelay) {
|
|
207
|
-
await new Promise((resolve) => setTimeout(resolve, 2000));
|
|
208
|
-
}
|
|
209
|
-
return await run("bunx", [GEMINI_CLI_PACKAGE, ...runArgs]);
|
|
253
|
+
|
|
254
|
+
// FR-067, FR-068: Use bunx with version suffix for latest/specific versions
|
|
255
|
+
const packageWithVersion = `${GEMINI_CLI_PACKAGE}@${selectedVersion}`;
|
|
256
|
+
writeTerminalLine(chalk.cyan(` 🔄 Using bunx ${packageWithVersion}`));
|
|
257
|
+
return await run("bunx", [packageWithVersion, ...runArgs]);
|
|
210
258
|
};
|
|
211
259
|
|
|
212
260
|
let fellBackToLatest = false;
|
|
@@ -220,7 +268,7 @@ export async function launchGeminiCLI(
|
|
|
220
268
|
resumeSessionId;
|
|
221
269
|
if (shouldRetry) {
|
|
222
270
|
fellBackToLatest = true;
|
|
223
|
-
|
|
271
|
+
writeTerminalLine(
|
|
224
272
|
chalk.yellow(
|
|
225
273
|
` ⚠️ Failed to resume session ${resumeSessionId}. Retrying with latest session...`,
|
|
226
274
|
),
|
|
@@ -231,7 +279,7 @@ export async function launchGeminiCLI(
|
|
|
231
279
|
}
|
|
232
280
|
}
|
|
233
281
|
} finally {
|
|
234
|
-
childStdio
|
|
282
|
+
childStdio?.cleanup();
|
|
235
283
|
}
|
|
236
284
|
|
|
237
285
|
const explicitResumeSucceeded = usedExplicitSessionId && !fellBackToLatest;
|
|
@@ -247,6 +295,10 @@ export async function launchGeminiCLI(
|
|
|
247
295
|
capturedSessionId =
|
|
248
296
|
(await findLatestGeminiSessionId(worktreePath, {
|
|
249
297
|
cwd: worktreePath,
|
|
298
|
+
branch: options.branch ?? null,
|
|
299
|
+
worktrees: options.branch
|
|
300
|
+
? [{ path: worktreePath, branch: options.branch }]
|
|
301
|
+
: null,
|
|
250
302
|
})) ?? null;
|
|
251
303
|
} catch {
|
|
252
304
|
capturedSessionId = null;
|
|
@@ -254,12 +306,12 @@ export async function launchGeminiCLI(
|
|
|
254
306
|
}
|
|
255
307
|
|
|
256
308
|
if (capturedSessionId) {
|
|
257
|
-
|
|
258
|
-
|
|
309
|
+
writeTerminalLine(chalk.cyan(`\n 🆔 Session ID: ${capturedSessionId}`));
|
|
310
|
+
writeTerminalLine(
|
|
259
311
|
chalk.gray(` Resume command: gemini --resume ${capturedSessionId}`),
|
|
260
312
|
);
|
|
261
313
|
} else {
|
|
262
|
-
|
|
314
|
+
writeTerminalLine(
|
|
263
315
|
chalk.yellow(
|
|
264
316
|
"\n ℹ️ Could not determine Gemini session ID automatically.",
|
|
265
317
|
),
|
|
@@ -288,30 +340,38 @@ export async function launchGeminiCLI(
|
|
|
288
340
|
}
|
|
289
341
|
|
|
290
342
|
if (process.platform === "win32") {
|
|
291
|
-
|
|
343
|
+
writeTerminalLine(
|
|
344
|
+
chalk.red("\n💡 Windows troubleshooting tips:"),
|
|
345
|
+
"stderr",
|
|
346
|
+
);
|
|
292
347
|
if (hasLocalGemini) {
|
|
293
|
-
|
|
348
|
+
writeTerminalLine(
|
|
294
349
|
chalk.yellow(
|
|
295
350
|
" 1. Confirm that Gemini CLI is installed and the 'gemini' command is on PATH",
|
|
296
351
|
),
|
|
352
|
+
"stderr",
|
|
297
353
|
);
|
|
298
|
-
|
|
354
|
+
writeTerminalLine(
|
|
299
355
|
chalk.yellow(' 2. Run "gemini --version" to verify the setup'),
|
|
356
|
+
"stderr",
|
|
300
357
|
);
|
|
301
358
|
} else {
|
|
302
|
-
|
|
359
|
+
writeTerminalLine(
|
|
303
360
|
chalk.yellow(
|
|
304
361
|
" 1. Confirm that Bun is installed and bunx is available",
|
|
305
362
|
),
|
|
363
|
+
"stderr",
|
|
306
364
|
);
|
|
307
|
-
|
|
365
|
+
writeTerminalLine(
|
|
308
366
|
chalk.yellow(
|
|
309
367
|
' 2. Run "bunx @google/gemini-cli@latest -- --version" to verify the setup',
|
|
310
368
|
),
|
|
369
|
+
"stderr",
|
|
311
370
|
);
|
|
312
371
|
}
|
|
313
|
-
|
|
372
|
+
writeTerminalLine(
|
|
314
373
|
chalk.yellow(" 3. Restart your terminal or IDE to refresh PATH"),
|
|
374
|
+
"stderr",
|
|
315
375
|
);
|
|
316
376
|
}
|
|
317
377
|
|
|
@@ -327,16 +387,17 @@ export async function launchGeminiCLI(
|
|
|
327
387
|
*/
|
|
328
388
|
export async function isGeminiCLIAvailable(): Promise<boolean> {
|
|
329
389
|
try {
|
|
330
|
-
await execa("bunx", [GEMINI_CLI_PACKAGE
|
|
390
|
+
await execa("bunx", [`${GEMINI_CLI_PACKAGE}@latest`, "--version"]);
|
|
331
391
|
return true;
|
|
332
392
|
} catch (error: unknown) {
|
|
333
393
|
const err = error as NodeJS.ErrnoException;
|
|
334
394
|
if (err.code === "ENOENT") {
|
|
335
|
-
|
|
336
|
-
|
|
395
|
+
writeTerminalLine(chalk.yellow("\n⚠️ bunx command not found"), "stderr");
|
|
396
|
+
writeTerminalLine(
|
|
337
397
|
chalk.gray(
|
|
338
398
|
" Install Bun and confirm that bunx is available before continuing",
|
|
339
399
|
),
|
|
400
|
+
"stderr",
|
|
340
401
|
);
|
|
341
402
|
}
|
|
342
403
|
return false;
|
package/src/index.test.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { describe, it, expect,
|
|
1
|
+
import { describe, it, expect, spyOn, beforeEach, afterEach } from "bun:test";
|
|
2
|
+
import { getPackageVersion } from "./utils";
|
|
2
3
|
import * as utils from "./utils";
|
|
3
4
|
|
|
4
5
|
// showVersion関数のテスト(TDD Green phase)
|
|
@@ -6,18 +7,18 @@ import * as utils from "./utils";
|
|
|
6
7
|
// そのため、main()関数経由でテストするか、関数をexportする必要がある
|
|
7
8
|
|
|
8
9
|
describe("showVersion via CLI args", () => {
|
|
9
|
-
let consoleLogSpy: ReturnType<typeof
|
|
10
|
-
let consoleErrorSpy: ReturnType<typeof
|
|
11
|
-
let processExitSpy: ReturnType<typeof
|
|
10
|
+
let consoleLogSpy: ReturnType<typeof spyOn>;
|
|
11
|
+
let consoleErrorSpy: ReturnType<typeof spyOn>;
|
|
12
|
+
let processExitSpy: ReturnType<typeof spyOn>;
|
|
12
13
|
let originalArgv: string[];
|
|
13
14
|
|
|
14
15
|
beforeEach(() => {
|
|
15
16
|
// console.log, console.error, process.exitをモック
|
|
16
|
-
consoleLogSpy =
|
|
17
|
-
consoleErrorSpy =
|
|
18
|
-
processExitSpy =
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
consoleLogSpy = spyOn(console, "log").mockImplementation(() => {});
|
|
18
|
+
consoleErrorSpy = spyOn(console, "error").mockImplementation(() => {});
|
|
19
|
+
processExitSpy = spyOn(process, "exit").mockImplementation(
|
|
20
|
+
(() => {}) as () => never,
|
|
21
|
+
);
|
|
21
22
|
|
|
22
23
|
// 元のprocess.argvを保存
|
|
23
24
|
originalArgv = [...process.argv];
|
|
@@ -28,7 +29,6 @@ describe("showVersion via CLI args", () => {
|
|
|
28
29
|
consoleLogSpy.mockRestore();
|
|
29
30
|
consoleErrorSpy.mockRestore();
|
|
30
31
|
processExitSpy.mockRestore();
|
|
31
|
-
|
|
32
32
|
// process.argvを復元
|
|
33
33
|
process.argv = originalArgv;
|
|
34
34
|
});
|
|
@@ -37,32 +37,34 @@ describe("showVersion via CLI args", () => {
|
|
|
37
37
|
// Arrange: CLIフラグを設定
|
|
38
38
|
process.argv = ["node", "index.js", "--version"];
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
const expectedVersion = await getPackageVersion();
|
|
41
|
+
if (!expectedVersion) {
|
|
42
|
+
throw new Error("Failed to resolve package version for test.");
|
|
43
|
+
}
|
|
43
44
|
|
|
44
45
|
// Act: main()を呼び出す
|
|
45
46
|
const { main } = await import("./index");
|
|
46
47
|
await main();
|
|
47
48
|
|
|
48
49
|
// Assert: 標準出力にバージョンが表示されることを期待
|
|
49
|
-
expect(consoleLogSpy).toHaveBeenCalledWith(
|
|
50
|
+
expect(consoleLogSpy).toHaveBeenCalledWith(expectedVersion);
|
|
50
51
|
}, 30000);
|
|
51
52
|
|
|
52
53
|
it("正常系: -vフラグでバージョンを表示する", async () => {
|
|
53
54
|
// Arrange: CLIフラグを設定
|
|
54
55
|
process.argv = ["node", "index.js", "-v"];
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
const expectedVersion = await getPackageVersion();
|
|
58
|
+
if (!expectedVersion) {
|
|
59
|
+
throw new Error("Failed to resolve package version for test.");
|
|
60
|
+
}
|
|
59
61
|
|
|
60
62
|
// Act: main()を呼び出す
|
|
61
63
|
const { main } = await import("./index");
|
|
62
64
|
await main();
|
|
63
65
|
|
|
64
66
|
// Assert: 標準出力にバージョンが表示されることを期待
|
|
65
|
-
expect(consoleLogSpy).toHaveBeenCalledWith(
|
|
67
|
+
expect(consoleLogSpy).toHaveBeenCalledWith(expectedVersion);
|
|
66
68
|
}, 30000);
|
|
67
69
|
|
|
68
70
|
// Note: This test is skipped due to module caching issues in CI environment
|
|
@@ -72,7 +74,10 @@ describe("showVersion via CLI args", () => {
|
|
|
72
74
|
process.argv = ["node", "index.js", "--version"];
|
|
73
75
|
|
|
74
76
|
// getPackageVersion()をモックしてnullを返す
|
|
75
|
-
|
|
77
|
+
const getPackageVersionSpy = spyOn(
|
|
78
|
+
utils,
|
|
79
|
+
"getPackageVersion",
|
|
80
|
+
).mockResolvedValue(null);
|
|
76
81
|
|
|
77
82
|
// Act: main()を呼び出す
|
|
78
83
|
const { main } = await import("./index");
|
|
@@ -83,5 +88,6 @@ describe("showVersion via CLI args", () => {
|
|
|
83
88
|
expect.stringContaining("Error"),
|
|
84
89
|
);
|
|
85
90
|
expect(processExitSpy).toHaveBeenCalledWith(1);
|
|
91
|
+
getPackageVersionSpy.mockRestore();
|
|
86
92
|
});
|
|
87
93
|
});
|