@akiojin/gwt 4.12.1 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +173 -203
- package/README.md +170 -212
- package/bin/gwt +0 -0
- package/bin/gwt.js +42 -33
- package/package.json +20 -107
- package/scripts/postinstall.js +152 -0
- package/dist/claude-history.d.ts +0 -60
- package/dist/claude-history.d.ts.map +0 -1
- package/dist/claude-history.js +0 -606
- package/dist/claude-history.js.map +0 -1
- package/dist/claude.d.ts +0 -42
- package/dist/claude.d.ts.map +0 -1
- package/dist/claude.js +0 -429
- package/dist/claude.js.map +0 -1
- package/dist/cli/ui/App.solid.d.ts +0 -29
- package/dist/cli/ui/App.solid.d.ts.map +0 -1
- package/dist/cli/ui/App.solid.js +0 -1427
- package/dist/cli/ui/App.solid.js.map +0 -1
- package/dist/cli/ui/components/solid/Footer.d.ts +0 -10
- package/dist/cli/ui/components/solid/Footer.d.ts.map +0 -1
- package/dist/cli/ui/components/solid/Footer.js +0 -10
- package/dist/cli/ui/components/solid/Footer.js.map +0 -1
- package/dist/cli/ui/components/solid/Header.d.ts +0 -32
- package/dist/cli/ui/components/solid/Header.d.ts.map +0 -1
- package/dist/cli/ui/components/solid/Header.js +0 -13
- package/dist/cli/ui/components/solid/Header.js.map +0 -1
- package/dist/cli/ui/components/solid/HelpOverlay.d.ts +0 -8
- package/dist/cli/ui/components/solid/HelpOverlay.d.ts.map +0 -1
- package/dist/cli/ui/components/solid/HelpOverlay.js +0 -118
- package/dist/cli/ui/components/solid/HelpOverlay.js.map +0 -1
- package/dist/cli/ui/components/solid/QuickStartStep.d.ts +0 -17
- package/dist/cli/ui/components/solid/QuickStartStep.d.ts.map +0 -1
- package/dist/cli/ui/components/solid/QuickStartStep.js +0 -152
- package/dist/cli/ui/components/solid/QuickStartStep.js.map +0 -1
- package/dist/cli/ui/components/solid/SelectInput.d.ts +0 -22
- package/dist/cli/ui/components/solid/SelectInput.d.ts.map +0 -1
- package/dist/cli/ui/components/solid/SelectInput.js +0 -45
- package/dist/cli/ui/components/solid/SelectInput.js.map +0 -1
- package/dist/cli/ui/components/solid/TextInput.d.ts +0 -12
- package/dist/cli/ui/components/solid/TextInput.d.ts.map +0 -1
- package/dist/cli/ui/components/solid/TextInput.js +0 -9
- package/dist/cli/ui/components/solid/TextInput.js.map +0 -1
- package/dist/cli/ui/components/solid/WizardController.d.ts +0 -34
- package/dist/cli/ui/components/solid/WizardController.d.ts.map +0 -1
- package/dist/cli/ui/components/solid/WizardController.js +0 -269
- package/dist/cli/ui/components/solid/WizardController.js.map +0 -1
- package/dist/cli/ui/components/solid/WizardPopup.d.ts +0 -26
- package/dist/cli/ui/components/solid/WizardPopup.d.ts.map +0 -1
- package/dist/cli/ui/components/solid/WizardPopup.js +0 -68
- package/dist/cli/ui/components/solid/WizardPopup.js.map +0 -1
- package/dist/cli/ui/components/solid/WizardSteps.d.ts +0 -57
- package/dist/cli/ui/components/solid/WizardSteps.d.ts.map +0 -1
- package/dist/cli/ui/components/solid/WizardSteps.js +0 -442
- package/dist/cli/ui/components/solid/WizardSteps.js.map +0 -1
- package/dist/cli/ui/core/index.d.ts +0 -12
- package/dist/cli/ui/core/index.d.ts.map +0 -1
- package/dist/cli/ui/core/index.js +0 -15
- package/dist/cli/ui/core/index.js.map +0 -1
- package/dist/cli/ui/core/keybindings.d.ts +0 -106
- package/dist/cli/ui/core/keybindings.d.ts.map +0 -1
- package/dist/cli/ui/core/keybindings.js +0 -270
- package/dist/cli/ui/core/keybindings.js.map +0 -1
- package/dist/cli/ui/core/theme.d.ts +0 -123
- package/dist/cli/ui/core/theme.d.ts.map +0 -1
- package/dist/cli/ui/core/theme.js +0 -191
- package/dist/cli/ui/core/theme.js.map +0 -1
- package/dist/cli/ui/core/types.d.ts +0 -156
- package/dist/cli/ui/core/types.d.ts.map +0 -1
- package/dist/cli/ui/core/types.js +0 -10
- package/dist/cli/ui/core/types.js.map +0 -1
- package/dist/cli/ui/hooks/solid/useScrollableList.d.ts +0 -26
- package/dist/cli/ui/hooks/solid/useScrollableList.d.ts.map +0 -1
- package/dist/cli/ui/hooks/solid/useScrollableList.js +0 -89
- package/dist/cli/ui/hooks/solid/useScrollableList.js.map +0 -1
- package/dist/cli/ui/hooks/solid/useTerminalSize.d.ts +0 -10
- package/dist/cli/ui/hooks/solid/useTerminalSize.d.ts.map +0 -1
- package/dist/cli/ui/hooks/solid/useTerminalSize.js +0 -16
- package/dist/cli/ui/hooks/solid/useTerminalSize.js.map +0 -1
- package/dist/cli/ui/index.solid.d.ts +0 -5
- package/dist/cli/ui/index.solid.d.ts.map +0 -1
- package/dist/cli/ui/index.solid.js +0 -21
- package/dist/cli/ui/index.solid.js.map +0 -1
- package/dist/cli/ui/screens/solid/BranchListScreen.d.ts +0 -53
- package/dist/cli/ui/screens/solid/BranchListScreen.d.ts.map +0 -1
- package/dist/cli/ui/screens/solid/BranchListScreen.js +0 -829
- package/dist/cli/ui/screens/solid/BranchListScreen.js.map +0 -1
- package/dist/cli/ui/screens/solid/ConfirmScreen.d.ts +0 -11
- package/dist/cli/ui/screens/solid/ConfirmScreen.d.ts.map +0 -1
- package/dist/cli/ui/screens/solid/ConfirmScreen.js +0 -45
- package/dist/cli/ui/screens/solid/ConfirmScreen.js.map +0 -1
- package/dist/cli/ui/screens/solid/EnvironmentScreen.d.ts +0 -14
- package/dist/cli/ui/screens/solid/EnvironmentScreen.d.ts.map +0 -1
- package/dist/cli/ui/screens/solid/EnvironmentScreen.js +0 -90
- package/dist/cli/ui/screens/solid/EnvironmentScreen.js.map +0 -1
- package/dist/cli/ui/screens/solid/ErrorScreen.d.ts +0 -8
- package/dist/cli/ui/screens/solid/ErrorScreen.d.ts.map +0 -1
- package/dist/cli/ui/screens/solid/ErrorScreen.js +0 -18
- package/dist/cli/ui/screens/solid/ErrorScreen.js.map +0 -1
- package/dist/cli/ui/screens/solid/InputScreen.d.ts +0 -13
- package/dist/cli/ui/screens/solid/InputScreen.d.ts.map +0 -1
- package/dist/cli/ui/screens/solid/InputScreen.js +0 -17
- package/dist/cli/ui/screens/solid/InputScreen.js.map +0 -1
- package/dist/cli/ui/screens/solid/LoadingIndicator.d.ts +0 -9
- package/dist/cli/ui/screens/solid/LoadingIndicator.d.ts.map +0 -1
- package/dist/cli/ui/screens/solid/LoadingIndicator.js +0 -43
- package/dist/cli/ui/screens/solid/LoadingIndicator.js.map +0 -1
- package/dist/cli/ui/screens/solid/LogDetailScreen.d.ts +0 -14
- package/dist/cli/ui/screens/solid/LogDetailScreen.d.ts.map +0 -1
- package/dist/cli/ui/screens/solid/LogDetailScreen.js +0 -34
- package/dist/cli/ui/screens/solid/LogDetailScreen.js.map +0 -1
- package/dist/cli/ui/screens/solid/LogScreen.d.ts +0 -25
- package/dist/cli/ui/screens/solid/LogScreen.d.ts.map +0 -1
- package/dist/cli/ui/screens/solid/LogScreen.js +0 -333
- package/dist/cli/ui/screens/solid/LogScreen.js.map +0 -1
- package/dist/cli/ui/screens/solid/ProfileEnvScreen.d.ts +0 -17
- package/dist/cli/ui/screens/solid/ProfileEnvScreen.d.ts.map +0 -1
- package/dist/cli/ui/screens/solid/ProfileEnvScreen.js +0 -115
- package/dist/cli/ui/screens/solid/ProfileEnvScreen.js.map +0 -1
- package/dist/cli/ui/screens/solid/ProfileScreen.d.ts +0 -17
- package/dist/cli/ui/screens/solid/ProfileScreen.d.ts.map +0 -1
- package/dist/cli/ui/screens/solid/ProfileScreen.js +0 -50
- package/dist/cli/ui/screens/solid/ProfileScreen.js.map +0 -1
- package/dist/cli/ui/screens/solid/SelectorScreen.d.ts +0 -20
- package/dist/cli/ui/screens/solid/SelectorScreen.d.ts.map +0 -1
- package/dist/cli/ui/screens/solid/SelectorScreen.js +0 -98
- package/dist/cli/ui/screens/solid/SelectorScreen.js.map +0 -1
- package/dist/cli/ui/screens/solid/WorktreeCreateScreen.d.ts +0 -13
- package/dist/cli/ui/screens/solid/WorktreeCreateScreen.d.ts.map +0 -1
- package/dist/cli/ui/screens/solid/WorktreeCreateScreen.js +0 -59
- package/dist/cli/ui/screens/solid/WorktreeCreateScreen.js.map +0 -1
- package/dist/cli/ui/stores/appStore.d.ts +0 -143
- package/dist/cli/ui/stores/appStore.d.ts.map +0 -1
- package/dist/cli/ui/stores/appStore.js +0 -158
- package/dist/cli/ui/stores/appStore.js.map +0 -1
- package/dist/cli/ui/stores/branchStore.d.ts +0 -159
- package/dist/cli/ui/stores/branchStore.d.ts.map +0 -1
- package/dist/cli/ui/stores/branchStore.js +0 -275
- package/dist/cli/ui/stores/branchStore.js.map +0 -1
- package/dist/cli/ui/stores/index.d.ts +0 -11
- package/dist/cli/ui/stores/index.d.ts.map +0 -1
- package/dist/cli/ui/stores/index.js +0 -14
- package/dist/cli/ui/stores/index.js.map +0 -1
- package/dist/cli/ui/stores/uiStore.d.ts +0 -146
- package/dist/cli/ui/stores/uiStore.d.ts.map +0 -1
- package/dist/cli/ui/stores/uiStore.js +0 -166
- package/dist/cli/ui/stores/uiStore.js.map +0 -1
- package/dist/cli/ui/types.d.ts +0 -293
- package/dist/cli/ui/types.d.ts.map +0 -1
- package/dist/cli/ui/types.js +0 -2
- package/dist/cli/ui/types.js.map +0 -1
- package/dist/cli/ui/utils/baseBranch.d.ts +0 -4
- package/dist/cli/ui/utils/baseBranch.d.ts.map +0 -1
- package/dist/cli/ui/utils/baseBranch.js +0 -17
- package/dist/cli/ui/utils/baseBranch.js.map +0 -1
- package/dist/cli/ui/utils/branchFormatter.d.ts +0 -19
- package/dist/cli/ui/utils/branchFormatter.d.ts.map +0 -1
- package/dist/cli/ui/utils/branchFormatter.js +0 -199
- package/dist/cli/ui/utils/branchFormatter.js.map +0 -1
- package/dist/cli/ui/utils/clipboard.d.ts +0 -7
- package/dist/cli/ui/utils/clipboard.d.ts.map +0 -1
- package/dist/cli/ui/utils/clipboard.js +0 -21
- package/dist/cli/ui/utils/clipboard.js.map +0 -1
- package/dist/cli/ui/utils/continueSession.d.ts +0 -36
- package/dist/cli/ui/utils/continueSession.d.ts.map +0 -1
- package/dist/cli/ui/utils/continueSession.js +0 -155
- package/dist/cli/ui/utils/continueSession.js.map +0 -1
- package/dist/cli/ui/utils/installedVersionCache.d.ts +0 -33
- package/dist/cli/ui/utils/installedVersionCache.d.ts.map +0 -1
- package/dist/cli/ui/utils/installedVersionCache.js +0 -59
- package/dist/cli/ui/utils/installedVersionCache.js.map +0 -1
- package/dist/cli/ui/utils/modelOptions.d.ts +0 -10
- package/dist/cli/ui/utils/modelOptions.d.ts.map +0 -1
- package/dist/cli/ui/utils/modelOptions.js +0 -155
- package/dist/cli/ui/utils/modelOptions.js.map +0 -1
- package/dist/cli/ui/utils/statisticsCalculator.d.ts +0 -9
- package/dist/cli/ui/utils/statisticsCalculator.d.ts.map +0 -1
- package/dist/cli/ui/utils/statisticsCalculator.js +0 -37
- package/dist/cli/ui/utils/statisticsCalculator.js.map +0 -1
- package/dist/cli/ui/utils/versionCache.d.ts +0 -37
- package/dist/cli/ui/utils/versionCache.d.ts.map +0 -1
- package/dist/cli/ui/utils/versionCache.js +0 -70
- package/dist/cli/ui/utils/versionCache.js.map +0 -1
- package/dist/cli/ui/utils/versionFetcher.d.ts +0 -41
- package/dist/cli/ui/utils/versionFetcher.d.ts.map +0 -1
- package/dist/cli/ui/utils/versionFetcher.js +0 -89
- package/dist/cli/ui/utils/versionFetcher.js.map +0 -1
- package/dist/client/assets/index-BbfV7Wuj.css +0 -1
- package/dist/client/assets/index-CoAyq5x1.js +0 -78
- package/dist/client/index.html +0 -13
- package/dist/codex.d.ts +0 -55
- package/dist/codex.d.ts.map +0 -1
- package/dist/codex.js +0 -329
- package/dist/codex.js.map +0 -1
- package/dist/config/builtin-coding-agents.d.ts +0 -27
- package/dist/config/builtin-coding-agents.d.ts.map +0 -1
- package/dist/config/builtin-coding-agents.js +0 -78
- package/dist/config/builtin-coding-agents.js.map +0 -1
- package/dist/config/constants.d.ts +0 -76
- package/dist/config/constants.d.ts.map +0 -1
- package/dist/config/constants.js +0 -92
- package/dist/config/constants.js.map +0 -1
- package/dist/config/env-history.d.ts +0 -4
- package/dist/config/env-history.d.ts.map +0 -1
- package/dist/config/env-history.js +0 -34
- package/dist/config/env-history.js.map +0 -1
- package/dist/config/index.d.ts +0 -51
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -225
- package/dist/config/index.js.map +0 -1
- package/dist/config/profiles.d.ts +0 -94
- package/dist/config/profiles.d.ts.map +0 -1
- package/dist/config/profiles.js +0 -284
- package/dist/config/profiles.js.map +0 -1
- package/dist/config/shared-env.d.ts +0 -41
- package/dist/config/shared-env.d.ts.map +0 -1
- package/dist/config/shared-env.js +0 -114
- package/dist/config/shared-env.js.map +0 -1
- package/dist/config/tools.d.ts +0 -50
- package/dist/config/tools.d.ts.map +0 -1
- package/dist/config/tools.js +0 -239
- package/dist/config/tools.js.map +0 -1
- package/dist/gemini.d.ts +0 -35
- package/dist/gemini.d.ts.map +0 -1
- package/dist/gemini.js +0 -299
- package/dist/gemini.js.map +0 -1
- package/dist/git.d.ts +0 -154
- package/dist/git.d.ts.map +0 -1
- package/dist/git.js +0 -1012
- package/dist/git.js.map +0 -1
- package/dist/github.d.ts +0 -14
- package/dist/github.d.ts.map +0 -1
- package/dist/github.js +0 -123
- package/dist/github.js.map +0 -1
- package/dist/index.d.ts +0 -16
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -782
- package/dist/index.js.map +0 -1
- package/dist/launcher.d.ts +0 -30
- package/dist/launcher.d.ts.map +0 -1
- package/dist/launcher.js +0 -185
- package/dist/launcher.js.map +0 -1
- package/dist/logging/agentOutput.d.ts +0 -21
- package/dist/logging/agentOutput.d.ts.map +0 -1
- package/dist/logging/agentOutput.js +0 -164
- package/dist/logging/agentOutput.js.map +0 -1
- package/dist/logging/formatter.d.ts +0 -15
- package/dist/logging/formatter.d.ts.map +0 -1
- package/dist/logging/formatter.js +0 -95
- package/dist/logging/formatter.js.map +0 -1
- package/dist/logging/logger.d.ts +0 -24
- package/dist/logging/logger.d.ts.map +0 -1
- package/dist/logging/logger.js +0 -79
- package/dist/logging/logger.js.map +0 -1
- package/dist/logging/reader.d.ts +0 -34
- package/dist/logging/reader.d.ts.map +0 -1
- package/dist/logging/reader.js +0 -178
- package/dist/logging/reader.js.map +0 -1
- package/dist/logging/rotation.d.ts +0 -6
- package/dist/logging/rotation.d.ts.map +0 -1
- package/dist/logging/rotation.js +0 -26
- package/dist/logging/rotation.js.map +0 -1
- package/dist/opentui/highlights-eq9cgrbb.scm +0 -604
- package/dist/opentui/highlights-ghv9g403.scm +0 -205
- package/dist/opentui/highlights-hk7bwhj4.scm +0 -284
- package/dist/opentui/highlights-r812a2qc.scm +0 -150
- package/dist/opentui/highlights-x6tmsnaa.scm +0 -115
- package/dist/opentui/index.solid.d.ts +0 -2
- package/dist/opentui/index.solid.d.ts.map +0 -1
- package/dist/opentui/index.solid.js +0 -53721
- package/dist/opentui/index.solid.js.map +0 -1
- package/dist/opentui/injections-73j83es3.scm +0 -27
- 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/git.repository.d.ts +0 -38
- package/dist/repositories/git.repository.d.ts.map +0 -1
- package/dist/repositories/git.repository.js +0 -117
- package/dist/repositories/git.repository.js.map +0 -1
- package/dist/repositories/github.repository.d.ts +0 -16
- package/dist/repositories/github.repository.d.ts.map +0 -1
- package/dist/repositories/github.repository.js +0 -61
- package/dist/repositories/github.repository.js.map +0 -1
- package/dist/repositories/worktree.repository.d.ts +0 -19
- package/dist/repositories/worktree.repository.d.ts.map +0 -1
- package/dist/repositories/worktree.repository.js +0 -64
- package/dist/repositories/worktree.repository.js.map +0 -1
- package/dist/services/BatchMergeService.d.ts +0 -45
- package/dist/services/BatchMergeService.d.ts.map +0 -1
- package/dist/services/BatchMergeService.js +0 -197
- package/dist/services/BatchMergeService.js.map +0 -1
- package/dist/services/WorktreeOrchestrator.d.ts +0 -37
- package/dist/services/WorktreeOrchestrator.d.ts.map +0 -1
- package/dist/services/WorktreeOrchestrator.js +0 -74
- package/dist/services/WorktreeOrchestrator.js.map +0 -1
- package/dist/services/codingAgentCommandResolver.d.ts +0 -10
- package/dist/services/codingAgentCommandResolver.d.ts.map +0 -1
- package/dist/services/codingAgentCommandResolver.js +0 -81
- package/dist/services/codingAgentCommandResolver.js.map +0 -1
- package/dist/services/codingAgentResolver.d.ts +0 -43
- package/dist/services/codingAgentResolver.d.ts.map +0 -1
- package/dist/services/codingAgentResolver.js +0 -269
- package/dist/services/codingAgentResolver.js.map +0 -1
- package/dist/services/dependency-installer.d.ts +0 -26
- package/dist/services/dependency-installer.d.ts.map +0 -1
- package/dist/services/dependency-installer.js +0 -134
- package/dist/services/dependency-installer.js.map +0 -1
- package/dist/services/git.service.d.ts +0 -27
- package/dist/services/git.service.d.ts.map +0 -1
- package/dist/services/git.service.js +0 -97
- package/dist/services/git.service.js.map +0 -1
- package/dist/services/github.service.d.ts +0 -14
- package/dist/services/github.service.d.ts.map +0 -1
- package/dist/services/github.service.js +0 -52
- package/dist/services/github.service.js.map +0 -1
- package/dist/services/worktree.service.d.ts +0 -20
- package/dist/services/worktree.service.d.ts.map +0 -1
- package/dist/services/worktree.service.js +0 -52
- package/dist/services/worktree.service.js.map +0 -1
- package/dist/shared/codingAgentConstants.d.ts +0 -12
- package/dist/shared/codingAgentConstants.d.ts.map +0 -1
- package/dist/shared/codingAgentConstants.js +0 -95
- package/dist/shared/codingAgentConstants.js.map +0 -1
- package/dist/types/api.d.ts +0 -225
- package/dist/types/api.d.ts.map +0 -1
- package/dist/types/api.js +0 -8
- package/dist/types/api.js.map +0 -1
- package/dist/types/coding-agent.d.ts +0 -62
- package/dist/types/coding-agent.d.ts.map +0 -1
- package/dist/types/coding-agent.js +0 -29
- package/dist/types/coding-agent.js.map +0 -1
- package/dist/types/profiles.d.ts +0 -54
- package/dist/types/profiles.d.ts.map +0 -1
- package/dist/types/profiles.js +0 -33
- package/dist/types/profiles.js.map +0 -1
- package/dist/types/tools.d.ts +0 -230
- package/dist/types/tools.d.ts.map +0 -1
- package/dist/types/tools.js +0 -8
- package/dist/types/tools.js.map +0 -1
- package/dist/utils/bun-runtime.d.ts +0 -12
- package/dist/utils/bun-runtime.d.ts.map +0 -1
- package/dist/utils/bun-runtime.js +0 -13
- package/dist/utils/bun-runtime.js.map +0 -1
- package/dist/utils/coding-agent-colors.d.ts +0 -88
- package/dist/utils/coding-agent-colors.d.ts.map +0 -1
- package/dist/utils/coding-agent-colors.js +0 -137
- package/dist/utils/coding-agent-colors.js.map +0 -1
- package/dist/utils/command.d.ts +0 -62
- package/dist/utils/command.d.ts.map +0 -1
- package/dist/utils/command.js +0 -186
- package/dist/utils/command.js.map +0 -1
- package/dist/utils/error-utils.d.ts +0 -27
- package/dist/utils/error-utils.d.ts.map +0 -1
- package/dist/utils/error-utils.js +0 -98
- package/dist/utils/error-utils.js.map +0 -1
- package/dist/utils/npmRegistry.d.ts +0 -61
- package/dist/utils/npmRegistry.d.ts.map +0 -1
- package/dist/utils/npmRegistry.js +0 -180
- package/dist/utils/npmRegistry.js.map +0 -1
- package/dist/utils/prompt.d.ts +0 -18
- package/dist/utils/prompt.d.ts.map +0 -1
- package/dist/utils/prompt.js +0 -107
- package/dist/utils/prompt.js.map +0 -1
- package/dist/utils/session/common.d.ts +0 -108
- package/dist/utils/session/common.d.ts.map +0 -1
- package/dist/utils/session/common.js +0 -439
- package/dist/utils/session/common.js.map +0 -1
- package/dist/utils/session/index.d.ts +0 -16
- package/dist/utils/session/index.d.ts.map +0 -1
- package/dist/utils/session/index.js +0 -20
- package/dist/utils/session/index.js.map +0 -1
- package/dist/utils/session/parsers/claude.d.ts +0 -62
- package/dist/utils/session/parsers/claude.d.ts.map +0 -1
- package/dist/utils/session/parsers/claude.js +0 -224
- package/dist/utils/session/parsers/claude.js.map +0 -1
- package/dist/utils/session/parsers/codex.d.ts +0 -37
- package/dist/utils/session/parsers/codex.d.ts.map +0 -1
- package/dist/utils/session/parsers/codex.js +0 -139
- package/dist/utils/session/parsers/codex.js.map +0 -1
- package/dist/utils/session/parsers/gemini.d.ts +0 -22
- package/dist/utils/session/parsers/gemini.d.ts.map +0 -1
- package/dist/utils/session/parsers/gemini.js +0 -118
- package/dist/utils/session/parsers/gemini.js.map +0 -1
- package/dist/utils/session/parsers/index.d.ts +0 -8
- package/dist/utils/session/parsers/index.d.ts.map +0 -1
- package/dist/utils/session/parsers/index.js +0 -12
- package/dist/utils/session/parsers/index.js.map +0 -1
- package/dist/utils/session/parsers/opencode.d.ts +0 -23
- package/dist/utils/session/parsers/opencode.d.ts.map +0 -1
- package/dist/utils/session/parsers/opencode.js +0 -126
- package/dist/utils/session/parsers/opencode.js.map +0 -1
- package/dist/utils/session/types.d.ts +0 -49
- package/dist/utils/session/types.d.ts.map +0 -1
- package/dist/utils/session/types.js +0 -5
- package/dist/utils/session/types.js.map +0 -1
- package/dist/utils/session.d.ts +0 -16
- package/dist/utils/session.d.ts.map +0 -1
- package/dist/utils/session.js +0 -16
- package/dist/utils/session.js.map +0 -1
- package/dist/utils/spinner.d.ts +0 -6
- package/dist/utils/spinner.d.ts.map +0 -1
- package/dist/utils/spinner.js +0 -47
- package/dist/utils/spinner.js.map +0 -1
- package/dist/utils/terminal.d.ts +0 -64
- package/dist/utils/terminal.d.ts.map +0 -1
- package/dist/utils/terminal.js +0 -270
- package/dist/utils/terminal.js.map +0 -1
- package/dist/utils/webui.d.ts +0 -8
- package/dist/utils/webui.d.ts.map +0 -1
- package/dist/utils/webui.js +0 -35
- package/dist/utils/webui.js.map +0 -1
- package/dist/utils.d.ts +0 -18
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js +0 -79
- package/dist/utils.js.map +0 -1
- package/dist/web/client/src/components/BranchGraph.d.ts +0 -13
- package/dist/web/client/src/components/BranchGraph.d.ts.map +0 -1
- package/dist/web/client/src/components/BranchGraph.js +0 -49
- package/dist/web/client/src/components/BranchGraph.js.map +0 -1
- package/dist/web/client/src/components/CodingAgentLaunchModal.d.ts +0 -9
- package/dist/web/client/src/components/CodingAgentLaunchModal.d.ts.map +0 -1
- package/dist/web/client/src/components/CodingAgentLaunchModal.js +0 -354
- package/dist/web/client/src/components/CodingAgentLaunchModal.js.map +0 -1
- package/dist/web/client/src/components/CustomCodingAgentForm.d.ts +0 -23
- package/dist/web/client/src/components/CustomCodingAgentForm.d.ts.map +0 -1
- package/dist/web/client/src/components/CustomCodingAgentForm.js +0 -209
- package/dist/web/client/src/components/CustomCodingAgentForm.js.map +0 -1
- package/dist/web/client/src/components/CustomCodingAgentList.d.ts +0 -10
- package/dist/web/client/src/components/CustomCodingAgentList.d.ts.map +0 -1
- package/dist/web/client/src/components/CustomCodingAgentList.js +0 -57
- package/dist/web/client/src/components/CustomCodingAgentList.js.map +0 -1
- package/dist/web/client/src/components/EnvEditor.d.ts +0 -20
- package/dist/web/client/src/components/EnvEditor.d.ts.map +0 -1
- package/dist/web/client/src/components/EnvEditor.js +0 -75
- package/dist/web/client/src/components/EnvEditor.js.map +0 -1
- package/dist/web/client/src/components/EnvironmentEditor.d.ts +0 -17
- package/dist/web/client/src/components/EnvironmentEditor.d.ts.map +0 -1
- package/dist/web/client/src/components/EnvironmentEditor.js +0 -22
- package/dist/web/client/src/components/EnvironmentEditor.js.map +0 -1
- package/dist/web/client/src/components/Terminal.d.ts +0 -15
- package/dist/web/client/src/components/Terminal.d.ts.map +0 -1
- package/dist/web/client/src/components/Terminal.js +0 -119
- package/dist/web/client/src/components/Terminal.js.map +0 -1
- package/dist/web/client/src/components/branch-detail/BranchInfoCards.d.ts +0 -10
- package/dist/web/client/src/components/branch-detail/BranchInfoCards.d.ts.map +0 -1
- package/dist/web/client/src/components/branch-detail/BranchInfoCards.js +0 -107
- package/dist/web/client/src/components/branch-detail/BranchInfoCards.js.map +0 -1
- package/dist/web/client/src/components/branch-detail/SessionHistoryTable.d.ts +0 -22
- package/dist/web/client/src/components/branch-detail/SessionHistoryTable.d.ts.map +0 -1
- package/dist/web/client/src/components/branch-detail/SessionHistoryTable.js +0 -80
- package/dist/web/client/src/components/branch-detail/SessionHistoryTable.js.map +0 -1
- package/dist/web/client/src/components/branch-detail/TerminalPanel.d.ts +0 -11
- package/dist/web/client/src/components/branch-detail/TerminalPanel.d.ts.map +0 -1
- package/dist/web/client/src/components/branch-detail/TerminalPanel.js +0 -32
- package/dist/web/client/src/components/branch-detail/TerminalPanel.js.map +0 -1
- package/dist/web/client/src/components/branch-detail/ToolLauncher.d.ts +0 -40
- package/dist/web/client/src/components/branch-detail/ToolLauncher.d.ts.map +0 -1
- package/dist/web/client/src/components/branch-detail/ToolLauncher.js +0 -147
- package/dist/web/client/src/components/branch-detail/ToolLauncher.js.map +0 -1
- package/dist/web/client/src/components/branch-detail/index.d.ts +0 -5
- package/dist/web/client/src/components/branch-detail/index.d.ts.map +0 -1
- package/dist/web/client/src/components/branch-detail/index.js +0 -5
- package/dist/web/client/src/components/branch-detail/index.js.map +0 -1
- package/dist/web/client/src/components/common/BranchCard.d.ts +0 -17
- package/dist/web/client/src/components/common/BranchCard.d.ts.map +0 -1
- package/dist/web/client/src/components/common/BranchCard.js +0 -36
- package/dist/web/client/src/components/common/BranchCard.js.map +0 -1
- package/dist/web/client/src/components/common/MetricCard.d.ts +0 -10
- package/dist/web/client/src/components/common/MetricCard.d.ts.map +0 -1
- package/dist/web/client/src/components/common/MetricCard.js +0 -10
- package/dist/web/client/src/components/common/MetricCard.js.map +0 -1
- package/dist/web/client/src/components/common/PageHeader.d.ts +0 -12
- package/dist/web/client/src/components/common/PageHeader.d.ts.map +0 -1
- package/dist/web/client/src/components/common/PageHeader.js +0 -14
- package/dist/web/client/src/components/common/PageHeader.js.map +0 -1
- package/dist/web/client/src/components/common/SearchInput.d.ts +0 -14
- package/dist/web/client/src/components/common/SearchInput.d.ts.map +0 -1
- package/dist/web/client/src/components/common/SearchInput.js +0 -15
- package/dist/web/client/src/components/common/SearchInput.js.map +0 -1
- package/dist/web/client/src/components/common/StatusBadge.d.ts +0 -10
- package/dist/web/client/src/components/common/StatusBadge.d.ts.map +0 -1
- package/dist/web/client/src/components/common/StatusBadge.js +0 -15
- package/dist/web/client/src/components/common/StatusBadge.js.map +0 -1
- package/dist/web/client/src/components/common/index.d.ts +0 -6
- package/dist/web/client/src/components/common/index.d.ts.map +0 -1
- package/dist/web/client/src/components/common/index.js +0 -6
- package/dist/web/client/src/components/common/index.js.map +0 -1
- package/dist/web/client/src/components/graph/BranchDetailPanel.d.ts +0 -15
- package/dist/web/client/src/components/graph/BranchDetailPanel.d.ts.map +0 -1
- package/dist/web/client/src/components/graph/BranchDetailPanel.js +0 -57
- package/dist/web/client/src/components/graph/BranchDetailPanel.js.map +0 -1
- package/dist/web/client/src/components/graph/BranchNode.d.ts +0 -13
- package/dist/web/client/src/components/graph/BranchNode.d.ts.map +0 -1
- package/dist/web/client/src/components/graph/BranchNode.js +0 -103
- package/dist/web/client/src/components/graph/BranchNode.js.map +0 -1
- package/dist/web/client/src/components/graph/ClusterNode.d.ts +0 -13
- package/dist/web/client/src/components/graph/ClusterNode.d.ts.map +0 -1
- package/dist/web/client/src/components/graph/ClusterNode.js +0 -109
- package/dist/web/client/src/components/graph/ClusterNode.js.map +0 -1
- package/dist/web/client/src/components/graph/SynapticCanvas.d.ts +0 -17
- package/dist/web/client/src/components/graph/SynapticCanvas.d.ts.map +0 -1
- package/dist/web/client/src/components/graph/SynapticCanvas.js +0 -94
- package/dist/web/client/src/components/graph/SynapticCanvas.js.map +0 -1
- package/dist/web/client/src/components/graph/SynapticEdge.d.ts +0 -13
- package/dist/web/client/src/components/graph/SynapticEdge.d.ts.map +0 -1
- package/dist/web/client/src/components/graph/SynapticEdge.js +0 -113
- package/dist/web/client/src/components/graph/SynapticEdge.js.map +0 -1
- package/dist/web/client/src/components/graph/graphUtils.d.ts +0 -67
- package/dist/web/client/src/components/graph/graphUtils.d.ts.map +0 -1
- package/dist/web/client/src/components/graph/graphUtils.js +0 -175
- package/dist/web/client/src/components/graph/graphUtils.js.map +0 -1
- package/dist/web/client/src/components/graph/index.d.ts +0 -10
- package/dist/web/client/src/components/graph/index.d.ts.map +0 -1
- package/dist/web/client/src/components/graph/index.js +0 -10
- package/dist/web/client/src/components/graph/index.js.map +0 -1
- package/dist/web/client/src/components/ui/alert.d.ts +0 -9
- package/dist/web/client/src/components/ui/alert.d.ts.map +0 -1
- package/dist/web/client/src/components/ui/alert.js +0 -25
- package/dist/web/client/src/components/ui/alert.js.map +0 -1
- package/dist/web/client/src/components/ui/badge.d.ts +0 -10
- package/dist/web/client/src/components/ui/badge.d.ts.map +0 -1
- package/dist/web/client/src/components/ui/badge.js +0 -25
- package/dist/web/client/src/components/ui/badge.js.map +0 -1
- package/dist/web/client/src/components/ui/button.d.ts +0 -12
- package/dist/web/client/src/components/ui/button.d.ts.map +0 -1
- package/dist/web/client/src/components/ui/button.js +0 -33
- package/dist/web/client/src/components/ui/button.js.map +0 -1
- package/dist/web/client/src/components/ui/card.d.ts +0 -9
- package/dist/web/client/src/components/ui/card.d.ts.map +0 -1
- package/dist/web/client/src/components/ui/card.js +0 -16
- package/dist/web/client/src/components/ui/card.js.map +0 -1
- package/dist/web/client/src/components/ui/index.d.ts +0 -8
- package/dist/web/client/src/components/ui/index.d.ts.map +0 -1
- package/dist/web/client/src/components/ui/index.js +0 -8
- package/dist/web/client/src/components/ui/index.js.map +0 -1
- package/dist/web/client/src/components/ui/input.d.ts +0 -4
- package/dist/web/client/src/components/ui/input.d.ts.map +0 -1
- package/dist/web/client/src/components/ui/input.js +0 -8
- package/dist/web/client/src/components/ui/input.js.map +0 -1
- package/dist/web/client/src/components/ui/select.d.ts +0 -14
- package/dist/web/client/src/components/ui/select.d.ts.map +0 -1
- package/dist/web/client/src/components/ui/select.js +0 -39
- package/dist/web/client/src/components/ui/select.js.map +0 -1
- package/dist/web/client/src/components/ui/table.d.ts +0 -11
- package/dist/web/client/src/components/ui/table.d.ts.map +0 -1
- package/dist/web/client/src/components/ui/table.js +0 -21
- package/dist/web/client/src/components/ui/table.js.map +0 -1
- package/dist/web/client/src/hooks/useBranches.d.ts +0 -16
- package/dist/web/client/src/hooks/useBranches.d.ts.map +0 -1
- package/dist/web/client/src/hooks/useBranches.js +0 -35
- package/dist/web/client/src/hooks/useBranches.js.map +0 -1
- package/dist/web/client/src/hooks/useConfig.d.ts +0 -13
- package/dist/web/client/src/hooks/useConfig.d.ts.map +0 -1
- package/dist/web/client/src/hooks/useConfig.js +0 -27
- package/dist/web/client/src/hooks/useConfig.js.map +0 -1
- package/dist/web/client/src/hooks/useSessions.d.ts +0 -21
- package/dist/web/client/src/hooks/useSessions.d.ts.map +0 -1
- package/dist/web/client/src/hooks/useSessions.js +0 -54
- package/dist/web/client/src/hooks/useSessions.js.map +0 -1
- package/dist/web/client/src/hooks/useWorktrees.d.ts +0 -17
- package/dist/web/client/src/hooks/useWorktrees.d.ts.map +0 -1
- package/dist/web/client/src/hooks/useWorktrees.js +0 -41
- package/dist/web/client/src/hooks/useWorktrees.js.map +0 -1
- package/dist/web/client/src/lib/api.d.ts +0 -82
- package/dist/web/client/src/lib/api.d.ts.map +0 -1
- package/dist/web/client/src/lib/api.js +0 -147
- package/dist/web/client/src/lib/api.js.map +0 -1
- package/dist/web/client/src/lib/coding-agent-colors.d.ts +0 -86
- package/dist/web/client/src/lib/coding-agent-colors.d.ts.map +0 -1
- package/dist/web/client/src/lib/coding-agent-colors.js +0 -135
- package/dist/web/client/src/lib/coding-agent-colors.js.map +0 -1
- package/dist/web/client/src/lib/utils.d.ts +0 -7
- package/dist/web/client/src/lib/utils.d.ts.map +0 -1
- package/dist/web/client/src/lib/utils.js +0 -10
- package/dist/web/client/src/lib/utils.js.map +0 -1
- package/dist/web/client/src/lib/websocket.d.ts +0 -59
- package/dist/web/client/src/lib/websocket.d.ts.map +0 -1
- package/dist/web/client/src/lib/websocket.js +0 -182
- package/dist/web/client/src/lib/websocket.js.map +0 -1
- package/dist/web/client/src/main.d.ts +0 -2
- package/dist/web/client/src/main.d.ts.map +0 -1
- package/dist/web/client/src/main.js +0 -23
- package/dist/web/client/src/main.js.map +0 -1
- package/dist/web/client/src/pages/BranchDetailPage.d.ts +0 -3
- package/dist/web/client/src/pages/BranchDetailPage.d.ts.map +0 -1
- package/dist/web/client/src/pages/BranchDetailPage.js +0 -365
- package/dist/web/client/src/pages/BranchDetailPage.js.map +0 -1
- package/dist/web/client/src/pages/BranchListPage.d.ts +0 -3
- package/dist/web/client/src/pages/BranchListPage.d.ts.map +0 -1
- package/dist/web/client/src/pages/BranchListPage.js +0 -118
- package/dist/web/client/src/pages/BranchListPage.js.map +0 -1
- package/dist/web/client/src/pages/ConfigManagementPage.d.ts +0 -3
- package/dist/web/client/src/pages/ConfigManagementPage.d.ts.map +0 -1
- package/dist/web/client/src/pages/ConfigManagementPage.js +0 -132
- package/dist/web/client/src/pages/ConfigManagementPage.js.map +0 -1
- package/dist/web/client/src/pages/ConfigPage.d.ts +0 -3
- package/dist/web/client/src/pages/ConfigPage.d.ts.map +0 -1
- package/dist/web/client/src/pages/ConfigPage.js +0 -220
- package/dist/web/client/src/pages/ConfigPage.js.map +0 -1
- package/dist/web/client/src/router.d.ts +0 -9
- package/dist/web/client/src/router.d.ts.map +0 -1
- package/dist/web/client/src/router.js +0 -27
- package/dist/web/client/src/router.js.map +0 -1
- package/dist/web/client/vite.config.d.ts +0 -3
- package/dist/web/client/vite.config.d.ts.map +0 -1
- package/dist/web/client/vite.config.js +0 -28
- package/dist/web/client/vite.config.js.map +0 -1
- package/dist/web/server/env/importer.d.ts +0 -3
- package/dist/web/server/env/importer.d.ts.map +0 -1
- package/dist/web/server/env/importer.js +0 -51
- package/dist/web/server/env/importer.js.map +0 -1
- package/dist/web/server/index.d.ts +0 -33
- package/dist/web/server/index.d.ts.map +0 -1
- package/dist/web/server/index.js +0 -102
- package/dist/web/server/index.js.map +0 -1
- package/dist/web/server/pty/manager.d.ts +0 -54
- package/dist/web/server/pty/manager.d.ts.map +0 -1
- package/dist/web/server/pty/manager.js +0 -303
- package/dist/web/server/pty/manager.js.map +0 -1
- package/dist/web/server/routes/branches.d.ts +0 -11
- package/dist/web/server/routes/branches.d.ts.map +0 -1
- package/dist/web/server/routes/branches.js +0 -97
- package/dist/web/server/routes/branches.js.map +0 -1
- package/dist/web/server/routes/config.d.ts +0 -6
- package/dist/web/server/routes/config.d.ts.map +0 -1
- package/dist/web/server/routes/config.js +0 -162
- package/dist/web/server/routes/config.js.map +0 -1
- package/dist/web/server/routes/index.d.ts +0 -13
- package/dist/web/server/routes/index.d.ts.map +0 -1
- package/dist/web/server/routes/index.js +0 -29
- package/dist/web/server/routes/index.js.map +0 -1
- package/dist/web/server/routes/sessions.d.ts +0 -12
- package/dist/web/server/routes/sessions.d.ts.map +0 -1
- package/dist/web/server/routes/sessions.js +0 -176
- package/dist/web/server/routes/sessions.js.map +0 -1
- package/dist/web/server/routes/worktrees.d.ts +0 -11
- package/dist/web/server/routes/worktrees.d.ts.map +0 -1
- package/dist/web/server/routes/worktrees.js +0 -80
- package/dist/web/server/routes/worktrees.js.map +0 -1
- package/dist/web/server/services/branches.d.ts +0 -17
- package/dist/web/server/services/branches.d.ts.map +0 -1
- package/dist/web/server/services/branches.js +0 -275
- package/dist/web/server/services/branches.js.map +0 -1
- package/dist/web/server/services/worktrees.d.ts +0 -24
- package/dist/web/server/services/worktrees.d.ts.map +0 -1
- package/dist/web/server/services/worktrees.js +0 -66
- package/dist/web/server/services/worktrees.js.map +0 -1
- package/dist/web/server/tray.d.ts +0 -25
- package/dist/web/server/tray.d.ts.map +0 -1
- package/dist/web/server/tray.js +0 -116
- package/dist/web/server/tray.js.map +0 -1
- package/dist/web/server/types.d.ts +0 -4
- package/dist/web/server/types.d.ts.map +0 -1
- package/dist/web/server/types.js +0 -2
- package/dist/web/server/types.js.map +0 -1
- package/dist/web/server/websocket/handler.d.ts +0 -57
- package/dist/web/server/websocket/handler.d.ts.map +0 -1
- package/dist/web/server/websocket/handler.js +0 -220
- package/dist/web/server/websocket/handler.js.map +0 -1
- package/dist/worktree.d.ts +0 -117
- package/dist/worktree.d.ts.map +0 -1
- package/dist/worktree.js +0 -788
- package/dist/worktree.js.map +0 -1
- package/src/claude-history.ts +0 -717
- package/src/claude.ts +0 -557
- package/src/cli/ui/App.solid.tsx +0 -2145
- package/src/cli/ui/__tests__/solid/AppSolid.cleanup.test.tsx +0 -1175
- package/src/cli/ui/__tests__/solid/BranchListScreen.test.tsx +0 -343
- package/src/cli/ui/__tests__/solid/ConfirmScreen.test.tsx +0 -77
- package/src/cli/ui/__tests__/solid/LogScreen.test.tsx +0 -351
- package/src/cli/ui/__tests__/solid/components/QuickStartStep.test.tsx +0 -308
- package/src/cli/ui/__tests__/solid/components/WizardController.test.tsx +0 -71
- package/src/cli/ui/__tests__/solid/components/WizardPopup.test.tsx +0 -231
- package/src/cli/ui/__tests__/solid/components/WizardSteps.test.tsx +0 -331
- package/src/cli/ui/__tests__/utils/branchFormatter.test.ts +0 -702
- package/src/cli/ui/__tests__/utils/clipboard.test.ts +0 -65
- package/src/cli/ui/__tests__/utils/statisticsCalculator.test.ts +0 -243
- package/src/cli/ui/components/solid/Footer.tsx +0 -36
- package/src/cli/ui/components/solid/Header.tsx +0 -67
- package/src/cli/ui/components/solid/HelpOverlay.tsx +0 -194
- package/src/cli/ui/components/solid/QuickStartStep.tsx +0 -209
- package/src/cli/ui/components/solid/ScrollableList.tsx +0 -23
- package/src/cli/ui/components/solid/SearchInput.tsx +0 -42
- package/src/cli/ui/components/solid/SelectInput.tsx +0 -88
- package/src/cli/ui/components/solid/Stats.tsx +0 -92
- package/src/cli/ui/components/solid/TextInput.tsx +0 -49
- package/src/cli/ui/components/solid/WizardController.tsx +0 -457
- package/src/cli/ui/components/solid/WizardPopup.tsx +0 -135
- package/src/cli/ui/components/solid/WizardSteps.tsx +0 -781
- package/src/cli/ui/core/index.ts +0 -17
- package/src/cli/ui/core/keybindings.ts +0 -367
- package/src/cli/ui/core/theme.ts +0 -266
- package/src/cli/ui/core/types.ts +0 -235
- package/src/cli/ui/hooks/solid/useAsyncOperation.ts +0 -78
- package/src/cli/ui/hooks/solid/useFilter.ts +0 -86
- package/src/cli/ui/hooks/solid/useGitOperations.ts +0 -81
- package/src/cli/ui/hooks/solid/useKeyHandler.ts +0 -103
- package/src/cli/ui/hooks/solid/useScrollableList.ts +0 -149
- package/src/cli/ui/hooks/solid/useSelection.ts +0 -77
- package/src/cli/ui/hooks/solid/useTerminalSize.ts +0 -22
- package/src/cli/ui/index.solid.ts +0 -28
- package/src/cli/ui/screens/solid/BranchListScreen.tsx +0 -1153
- package/src/cli/ui/screens/solid/ConfirmScreen.tsx +0 -86
- package/src/cli/ui/screens/solid/EnvironmentScreen.tsx +0 -161
- package/src/cli/ui/screens/solid/ErrorScreen.tsx +0 -42
- package/src/cli/ui/screens/solid/InputScreen.tsx +0 -55
- package/src/cli/ui/screens/solid/LoadingIndicator.tsx +0 -77
- package/src/cli/ui/screens/solid/LogDetailScreen.tsx +0 -75
- package/src/cli/ui/screens/solid/LogScreen.tsx +0 -504
- package/src/cli/ui/screens/solid/ProfileEnvScreen.tsx +0 -196
- package/src/cli/ui/screens/solid/ProfileScreen.tsx +0 -98
- package/src/cli/ui/screens/solid/SelectorScreen.tsx +0 -181
- package/src/cli/ui/screens/solid/SettingsScreen.tsx +0 -52
- package/src/cli/ui/screens/solid/WorktreeCreateScreen.tsx +0 -136
- package/src/cli/ui/screens/solid/WorktreeDeleteScreen.tsx +0 -40
- package/src/cli/ui/stores/appStore.ts +0 -208
- package/src/cli/ui/stores/branchStore.ts +0 -357
- package/src/cli/ui/stores/index.ts +0 -31
- package/src/cli/ui/stores/uiStore.ts +0 -226
- package/src/cli/ui/types.ts +0 -371
- package/src/cli/ui/utils/__tests__/branchFormatter.test.ts +0 -227
- package/src/cli/ui/utils/__tests__/installedVersionCache.test.ts +0 -46
- package/src/cli/ui/utils/baseBranch.ts +0 -34
- package/src/cli/ui/utils/branchFormatter.ts +0 -222
- package/src/cli/ui/utils/clipboard.ts +0 -31
- package/src/cli/ui/utils/continueSession.ts +0 -231
- package/src/cli/ui/utils/installedVersionCache.ts +0 -84
- package/src/cli/ui/utils/modelOptions.test.ts +0 -98
- package/src/cli/ui/utils/modelOptions.ts +0 -169
- package/src/cli/ui/utils/statisticsCalculator.ts +0 -44
- package/src/cli/ui/utils/versionCache.ts +0 -93
- package/src/cli/ui/utils/versionFetcher.ts +0 -120
- package/src/codex.ts +0 -445
- package/src/config/__tests__/saveSession.test.ts +0 -143
- package/src/config/builtin-coding-agents.ts +0 -87
- package/src/config/constants.ts +0 -102
- package/src/config/env-history.ts +0 -45
- package/src/config/index.ts +0 -311
- package/src/config/profiles.ts +0 -359
- package/src/config/shared-env.ts +0 -139
- package/src/config/tools.ts +0 -319
- package/src/gemini.ts +0 -405
- package/src/git.ts +0 -1263
- package/src/github.ts +0 -158
- package/src/index.test.ts +0 -93
- package/src/index.ts +0 -1024
- package/src/launcher.ts +0 -235
- package/src/logging/agentOutput.ts +0 -216
- package/src/logging/formatter.ts +0 -125
- package/src/logging/logger.ts +0 -106
- package/src/logging/reader.ts +0 -240
- package/src/logging/rotation.ts +0 -25
- package/src/opentui/index.solid.ts +0 -1
- package/src/repositories/git.repository.ts +0 -129
- package/src/repositories/github.repository.ts +0 -83
- package/src/repositories/worktree.repository.ts +0 -77
- package/src/services/BatchMergeService.ts +0 -251
- package/src/services/WorktreeOrchestrator.ts +0 -115
- package/src/services/__tests__/BatchMergeService.test.ts +0 -534
- package/src/services/__tests__/WorktreeOrchestrator.test.ts +0 -259
- package/src/services/codingAgentCommandResolver.ts +0 -118
- package/src/services/codingAgentResolver.ts +0 -375
- package/src/services/dependency-installer.ts +0 -192
- package/src/services/git.service.ts +0 -115
- package/src/services/github.service.ts +0 -61
- package/src/services/worktree.service.ts +0 -66
- package/src/shared/codingAgentConstants.ts +0 -103
- package/src/trayicon.d.ts +0 -30
- package/src/types/api.ts +0 -256
- package/src/types/coding-agent.ts +0 -85
- package/src/types/profiles.ts +0 -64
- package/src/types/tools.ts +0 -269
- package/src/utils/__tests__/npmRegistry.test.ts +0 -250
- package/src/utils/__tests__/prompt.test.ts +0 -125
- package/src/utils/bun-runtime.ts +0 -29
- package/src/utils/coding-agent-colors.ts +0 -165
- package/src/utils/command.ts +0 -234
- package/src/utils/error-utils.ts +0 -133
- package/src/utils/npmRegistry.ts +0 -249
- package/src/utils/prompt.ts +0 -149
- package/src/utils/session/common.ts +0 -474
- package/src/utils/session/index.ts +0 -50
- package/src/utils/session/parsers/claude.ts +0 -283
- package/src/utils/session/parsers/codex.ts +0 -166
- package/src/utils/session/parsers/gemini.ts +0 -135
- package/src/utils/session/parsers/index.ts +0 -31
- package/src/utils/session/parsers/opencode.ts +0 -151
- package/src/utils/session/types.ts +0 -51
- package/src/utils/session.ts +0 -16
- package/src/utils/spinner.ts +0 -54
- package/src/utils/terminal.ts +0 -327
- package/src/utils/webui.ts +0 -43
- package/src/utils.test.ts +0 -43
- package/src/utils.ts +0 -93
- package/src/web/client/components.json +0 -21
- package/src/web/client/index.html +0 -12
- package/src/web/client/src/components/BranchGraph.tsx +0 -95
- package/src/web/client/src/components/CodingAgentLaunchModal.tsx +0 -570
- package/src/web/client/src/components/CustomCodingAgentForm.tsx +0 -386
- package/src/web/client/src/components/CustomCodingAgentList.tsx +0 -119
- package/src/web/client/src/components/EnvEditor.tsx +0 -188
- package/src/web/client/src/components/EnvironmentEditor.tsx +0 -97
- package/src/web/client/src/components/Terminal.tsx +0 -145
- package/src/web/client/src/components/branch-detail/BranchInfoCards.tsx +0 -193
- package/src/web/client/src/components/branch-detail/SessionHistoryTable.tsx +0 -187
- package/src/web/client/src/components/branch-detail/TerminalPanel.tsx +0 -92
- package/src/web/client/src/components/branch-detail/ToolLauncher.tsx +0 -332
- package/src/web/client/src/components/branch-detail/index.ts +0 -4
- package/src/web/client/src/components/common/BranchCard.tsx +0 -117
- package/src/web/client/src/components/common/MetricCard.tsx +0 -22
- package/src/web/client/src/components/common/PageHeader.tsx +0 -44
- package/src/web/client/src/components/common/SearchInput.tsx +0 -40
- package/src/web/client/src/components/common/StatusBadge.tsx +0 -37
- package/src/web/client/src/components/common/index.ts +0 -5
- package/src/web/client/src/components/graph/BranchDetailPanel.tsx +0 -152
- package/src/web/client/src/components/graph/BranchNode.tsx +0 -200
- package/src/web/client/src/components/graph/ClusterNode.tsx +0 -211
- package/src/web/client/src/components/graph/SynapticCanvas.tsx +0 -171
- package/src/web/client/src/components/graph/SynapticEdge.tsx +0 -311
- package/src/web/client/src/components/graph/graphUtils.ts +0 -265
- package/src/web/client/src/components/graph/index.ts +0 -10
- package/src/web/client/src/components/ui/alert.tsx +0 -63
- package/src/web/client/src/components/ui/badge.tsx +0 -44
- package/src/web/client/src/components/ui/button.tsx +0 -57
- package/src/web/client/src/components/ui/card.tsx +0 -82
- package/src/web/client/src/components/ui/index.ts +0 -32
- package/src/web/client/src/components/ui/input.tsx +0 -21
- package/src/web/client/src/components/ui/select.tsx +0 -156
- package/src/web/client/src/components/ui/table.tsx +0 -119
- package/src/web/client/src/hooks/useBranches.ts +0 -41
- package/src/web/client/src/hooks/useConfig.ts +0 -31
- package/src/web/client/src/hooks/useSessions.ts +0 -68
- package/src/web/client/src/hooks/useWorktrees.ts +0 -47
- package/src/web/client/src/index.css +0 -349
- package/src/web/client/src/lib/api.ts +0 -184
- package/src/web/client/src/lib/coding-agent-colors.ts +0 -149
- package/src/web/client/src/lib/utils.ts +0 -10
- package/src/web/client/src/lib/websocket.ts +0 -222
- package/src/web/client/src/main.tsx +0 -29
- package/src/web/client/src/pages/BranchDetailPage.tsx +0 -555
- package/src/web/client/src/pages/BranchListPage.tsx +0 -242
- package/src/web/client/src/pages/ConfigManagementPage.tsx +0 -248
- package/src/web/client/src/pages/ConfigPage.tsx +0 -368
- package/src/web/client/src/router.tsx +0 -27
- package/src/web/client/vite.config.ts +0 -28
- package/src/web/server/env/importer.ts +0 -62
- package/src/web/server/index.ts +0 -143
- package/src/web/server/pty/manager.ts +0 -443
- package/src/web/server/routes/branches.ts +0 -126
- package/src/web/server/routes/config.ts +0 -226
- package/src/web/server/routes/index.ts +0 -37
- package/src/web/server/routes/sessions.ts +0 -252
- package/src/web/server/routes/worktrees.ts +0 -108
- package/src/web/server/services/branches.ts +0 -387
- package/src/web/server/services/worktrees.ts +0 -93
- package/src/web/server/tray.ts +0 -136
- package/src/web/server/types.ts +0 -14
- package/src/web/server/websocket/handler.ts +0 -299
- package/src/worktree.ts +0 -1109
package/dist/index.js
DELETED
|
@@ -1,782 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
import { isGitRepository, getRepositoryRoot, branchExists, fetchAllRemotes, pullFastForward, getBranchDivergenceStatuses, hasUncommittedChanges, hasUnpushedCommits, getUncommittedChangesCount, getUnpushedCommitsCount, } from "./git.js";
|
|
5
|
-
import { launchClaudeCode } from "./claude.js";
|
|
6
|
-
import { launchCodexCLI } from "./codex.js";
|
|
7
|
-
import { launchGeminiCLI } from "./gemini.js";
|
|
8
|
-
import { WorktreeOrchestrator, } from "./services/WorktreeOrchestrator.js";
|
|
9
|
-
import chalk from "chalk";
|
|
10
|
-
import { isProtectedBranchName, switchToProtectedBranch, resolveWorktreePathForBranch, listAllWorktrees, repairWorktreePath, } from "./worktree.js";
|
|
11
|
-
import { getTerminalStreams, resetTerminalModes, waitForUserAcknowledgement, writeTerminalLine, } from "./utils/terminal.js";
|
|
12
|
-
import { createLogger } from "./logging/logger.js";
|
|
13
|
-
import { getCodingAgentById, getSharedEnvironment } from "./config/tools.js";
|
|
14
|
-
import { launchCodingAgent } from "./launcher.js";
|
|
15
|
-
import { saveSession, loadSession } from "./config/index.js";
|
|
16
|
-
import { findLatestCodexSession, findLatestClaudeSession, findLatestGeminiSession, } from "./utils/session.js";
|
|
17
|
-
import { getPackageVersion, setupExitHandlers, registerExitCleanup, clearExitCleanup, } from "./utils.js";
|
|
18
|
-
import { findLatestClaudeSessionId } from "./utils/session.js";
|
|
19
|
-
import { resolveContinueSessionId } from "./cli/ui/utils/continueSession.js";
|
|
20
|
-
import { normalizeModelId } from "./cli/ui/utils/modelOptions.js";
|
|
21
|
-
import { installDependenciesForWorktree, DependencyInstallError, } from "./services/dependency-installer.js";
|
|
22
|
-
import { isGitRelatedError, isRecoverableError } from "./utils/error-utils.js";
|
|
23
|
-
const ERROR_PROMPT = chalk.yellow("Review the error details, then press Enter to continue.");
|
|
24
|
-
const SUCCESS_PROMPT = chalk.green("Press Enter to return to main menu...");
|
|
25
|
-
const POST_SESSION_DELAY_MS = 500;
|
|
26
|
-
// Category: cli
|
|
27
|
-
const appLogger = createLogger({ category: "cli" });
|
|
28
|
-
async function waitForErrorAcknowledgement() {
|
|
29
|
-
await waitForUserAcknowledgement(ERROR_PROMPT);
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Simple print functions (replacing legacy UI display functions)
|
|
33
|
-
*/
|
|
34
|
-
function printError(message) {
|
|
35
|
-
writeTerminalLine(chalk.red(`❌ ${message}`), "stderr");
|
|
36
|
-
appLogger.error({ message });
|
|
37
|
-
}
|
|
38
|
-
function printInfo(message) {
|
|
39
|
-
writeTerminalLine(chalk.blue(`ℹ️ ${message}`));
|
|
40
|
-
appLogger.info({ message });
|
|
41
|
-
}
|
|
42
|
-
function printWarning(message) {
|
|
43
|
-
writeTerminalLine(chalk.yellow(`⚠️ ${message}`), "stderr");
|
|
44
|
-
appLogger.warn({ message });
|
|
45
|
-
}
|
|
46
|
-
// Note: isGitRelatedError and isRecoverableError are now imported from ./utils/error-utils.js
|
|
47
|
-
async function runGitStep(description, step) {
|
|
48
|
-
try {
|
|
49
|
-
const value = await step();
|
|
50
|
-
return { ok: true, value };
|
|
51
|
-
}
|
|
52
|
-
catch (error) {
|
|
53
|
-
if (isGitRelatedError(error)) {
|
|
54
|
-
const details = error instanceof Error ? error.message : String(error);
|
|
55
|
-
printWarning(`Git operation failed (${description}). Error: ${details}`);
|
|
56
|
-
await waitForErrorAcknowledgement();
|
|
57
|
-
return { ok: false };
|
|
58
|
-
}
|
|
59
|
-
throw error;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
async function runDependencyInstallStep(description, step) {
|
|
63
|
-
try {
|
|
64
|
-
const value = await step();
|
|
65
|
-
return { ok: true, value };
|
|
66
|
-
}
|
|
67
|
-
catch (error) {
|
|
68
|
-
if (error instanceof DependencyInstallError) {
|
|
69
|
-
const details = error.message ?? "";
|
|
70
|
-
// 依存インストールが失敗してもワークフロー自体は継続させる
|
|
71
|
-
printError(`Failed to complete ${description}. ${details}`);
|
|
72
|
-
await waitForErrorAcknowledgement();
|
|
73
|
-
const fallbackResult = {
|
|
74
|
-
skipped: true,
|
|
75
|
-
manager: null,
|
|
76
|
-
lockfile: null,
|
|
77
|
-
reason: "unknown-error",
|
|
78
|
-
message: details,
|
|
79
|
-
};
|
|
80
|
-
return { ok: true, value: fallbackResult };
|
|
81
|
-
}
|
|
82
|
-
throw error;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
function showHelp() {
|
|
86
|
-
console.log(`
|
|
87
|
-
Worktree Manager
|
|
88
|
-
|
|
89
|
-
Usage: gwt [command] [options]
|
|
90
|
-
|
|
91
|
-
Commands:
|
|
92
|
-
serve Start Web UI server (http://localhost:3001)
|
|
93
|
-
|
|
94
|
-
Options:
|
|
95
|
-
-h, --help Show this help message
|
|
96
|
-
-v, --version Show version information
|
|
97
|
-
|
|
98
|
-
Description:
|
|
99
|
-
Interactive Git worktree manager with AI tool selection (Claude Code / Codex CLI) and graphical branch selection.
|
|
100
|
-
Launch without additional options to open the interactive CLI menu.
|
|
101
|
-
Use 'gwt serve' to start the Web UI server for browser-based management.
|
|
102
|
-
`);
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Display application version
|
|
106
|
-
* Reads version from package.json and outputs to stdout
|
|
107
|
-
* Exits with code 1 if version cannot be retrieved
|
|
108
|
-
*/
|
|
109
|
-
async function showVersion() {
|
|
110
|
-
const version = await getPackageVersion();
|
|
111
|
-
if (version) {
|
|
112
|
-
console.log(version);
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
console.error("Error: Unable to retrieve version information");
|
|
116
|
-
await waitForErrorAcknowledgement();
|
|
117
|
-
process.exit(1);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Performs terminal cleanup when exiting.
|
|
122
|
-
*/
|
|
123
|
-
function performTerminalCleanup() {
|
|
124
|
-
const terminal = getTerminalStreams();
|
|
125
|
-
terminal.exitRawMode();
|
|
126
|
-
resetTerminalModes(terminal.stdout);
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Main function for OpenTUI UI
|
|
130
|
-
* Returns SelectionResult if user made selections, undefined if user quit
|
|
131
|
-
*/
|
|
132
|
-
async function mainSolidUI() {
|
|
133
|
-
if (!("Bun" in globalThis)) {
|
|
134
|
-
throw new Error("OpenTUI requires the Bun runtime. Run with Bun (e.g. bunx @akiojin/gwt@latest).");
|
|
135
|
-
}
|
|
136
|
-
const { renderSolidApp } = await import("./opentui/index.solid.js");
|
|
137
|
-
const terminal = getTerminalStreams();
|
|
138
|
-
// Register cleanup for signal handlers
|
|
139
|
-
registerExitCleanup(performTerminalCleanup);
|
|
140
|
-
let selectionResult;
|
|
141
|
-
// マウスキャプチャを有効にしてSelection APIで選択終了時にクリップボードへコピー
|
|
142
|
-
const useMouse = true;
|
|
143
|
-
const enableMouseMovement = false;
|
|
144
|
-
const altScreenPreference = process.env.GWT_UI_ALT_SCREEN?.trim().toLowerCase();
|
|
145
|
-
// Ink.js版ではalternate screenを使用していなかったため、デフォルトをfalseに
|
|
146
|
-
// alternate screenを使用するとコーディングエージェント起動/終了ログが見えなくなる
|
|
147
|
-
const useAlternateScreen = altScreenPreference === "true" || altScreenPreference === "1";
|
|
148
|
-
if (typeof terminal.stdin.resume === "function") {
|
|
149
|
-
terminal.stdin.resume();
|
|
150
|
-
}
|
|
151
|
-
if (typeof terminal.stdin.setRawMode === "function") {
|
|
152
|
-
try {
|
|
153
|
-
terminal.stdin.setRawMode(true);
|
|
154
|
-
}
|
|
155
|
-
catch {
|
|
156
|
-
// Ignore raw mode errors and let OpenTUI handle setup.
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
try {
|
|
160
|
-
await renderSolidApp({
|
|
161
|
-
onExit: (result) => {
|
|
162
|
-
selectionResult = result;
|
|
163
|
-
},
|
|
164
|
-
}, {
|
|
165
|
-
stdin: terminal.stdin,
|
|
166
|
-
stdout: terminal.stdout,
|
|
167
|
-
exitOnCtrlC: true,
|
|
168
|
-
useAlternateScreen,
|
|
169
|
-
useMouse,
|
|
170
|
-
enableMouseMovement,
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
finally {
|
|
174
|
-
performTerminalCleanup();
|
|
175
|
-
if (typeof terminal.stdin.pause === "function") {
|
|
176
|
-
terminal.stdin.pause();
|
|
177
|
-
}
|
|
178
|
-
terminal.stdin.removeAllListeners?.("data");
|
|
179
|
-
terminal.stdin.removeAllListeners?.("keypress");
|
|
180
|
-
terminal.stdin.removeAllListeners?.("readable");
|
|
181
|
-
clearExitCleanup();
|
|
182
|
-
}
|
|
183
|
-
return selectionResult;
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Handle AI tool workflow
|
|
187
|
-
*/
|
|
188
|
-
export async function handleAIToolWorkflow(selectionResult) {
|
|
189
|
-
const { branch, displayName, branchType, remoteBranch, baseBranch, isNewBranch, tool, mode, skipPermissions, model, inferenceLevel, sessionId: selectedSessionId, toolVersion, } = selectionResult;
|
|
190
|
-
const branchLabel = displayName ?? branch;
|
|
191
|
-
const normalizedModel = normalizeModelId(tool, model ?? null);
|
|
192
|
-
const modelInfo = normalizedModel || inferenceLevel
|
|
193
|
-
? `, model=${normalizedModel ?? "default"}${inferenceLevel ? `/${inferenceLevel}` : ""}`
|
|
194
|
-
: "";
|
|
195
|
-
printInfo(`Selected: ${branchLabel} with ${tool} (${mode} mode${modelInfo}, skipPermissions: ${skipPermissions})`);
|
|
196
|
-
try {
|
|
197
|
-
// Get repository root
|
|
198
|
-
const repoRootResult = await runGitStep("retrieve repository root", () => getRepositoryRoot());
|
|
199
|
-
if (!repoRootResult.ok) {
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
const repoRoot = repoRootResult.value;
|
|
203
|
-
// Determine ensure options (local vs remote branch)
|
|
204
|
-
const ensureOptions = {};
|
|
205
|
-
if (isNewBranch) {
|
|
206
|
-
ensureOptions.isNewBranch = true;
|
|
207
|
-
if (baseBranch) {
|
|
208
|
-
ensureOptions.baseBranch = baseBranch;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
if (branchType === "remote" && !isNewBranch) {
|
|
212
|
-
const remoteRef = remoteBranch ?? branch;
|
|
213
|
-
const localExists = await branchExists(branch);
|
|
214
|
-
ensureOptions.baseBranch = remoteRef;
|
|
215
|
-
ensureOptions.isNewBranch = !localExists;
|
|
216
|
-
}
|
|
217
|
-
let existingWorktreeResolution = await resolveWorktreePathForBranch(branch);
|
|
218
|
-
let existingWorktree = existingWorktreeResolution.path;
|
|
219
|
-
// mismatch検出時に自動修復を試みる (FR-009〜FR-013)
|
|
220
|
-
if (!existingWorktree && existingWorktreeResolution.mismatch) {
|
|
221
|
-
const actualBranch = existingWorktreeResolution.mismatch.actualBranch ?? "unknown";
|
|
222
|
-
printWarning(`Worktree mismatch detected: ${existingWorktreeResolution.mismatch.path} is checked out to '${actualBranch}'. Attempting to repair...`);
|
|
223
|
-
// 共通修復関数を使用してパス修復を試みる
|
|
224
|
-
const repairResult = await repairWorktreePath(branch, existingWorktreeResolution.mismatch.path, repoRoot);
|
|
225
|
-
if (repairResult.repaired) {
|
|
226
|
-
// FR-012: 修復成功時のメッセージ
|
|
227
|
-
printInfo(`Worktree path repaired: ${repairResult.newPath}`);
|
|
228
|
-
// 修復後に再度解決を試みる
|
|
229
|
-
existingWorktreeResolution = await resolveWorktreePathForBranch(branch);
|
|
230
|
-
existingWorktree = existingWorktreeResolution.path;
|
|
231
|
-
}
|
|
232
|
-
else if (repairResult.removed) {
|
|
233
|
-
// FR-013: メタデータ削除成功時のメッセージ
|
|
234
|
-
printInfo(`Stale worktree metadata removed. Creating new worktree...`);
|
|
235
|
-
}
|
|
236
|
-
else {
|
|
237
|
-
printWarning(`Failed to repair worktree for '${branch}'.`);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
const isProtectedBranch = isProtectedBranchName(branch) ||
|
|
241
|
-
(remoteBranch ? isProtectedBranchName(remoteBranch) : false);
|
|
242
|
-
let protectedCheckoutResult = "none";
|
|
243
|
-
if (isProtectedBranch) {
|
|
244
|
-
const protectedRemoteRef = remoteBranch ??
|
|
245
|
-
(branchType === "remote" ? (displayName ?? branch) : null);
|
|
246
|
-
const switchResult = await runGitStep(`check out protected branch '${branch}'`, () => switchToProtectedBranch({
|
|
247
|
-
branchName: branch,
|
|
248
|
-
repoRoot,
|
|
249
|
-
remoteRef: protectedRemoteRef ?? null,
|
|
250
|
-
}));
|
|
251
|
-
if (!switchResult.ok) {
|
|
252
|
-
return;
|
|
253
|
-
}
|
|
254
|
-
protectedCheckoutResult = switchResult.value;
|
|
255
|
-
ensureOptions.isNewBranch = false;
|
|
256
|
-
}
|
|
257
|
-
const willCreateWorktree = !existingWorktree && !isProtectedBranch;
|
|
258
|
-
const orchestrator = new WorktreeOrchestrator();
|
|
259
|
-
// Ensure worktree exists (using orchestrator)
|
|
260
|
-
if (willCreateWorktree) {
|
|
261
|
-
const targetLabel = ensureOptions.isNewBranch
|
|
262
|
-
? `base ${ensureOptions.baseBranch ?? branch}`
|
|
263
|
-
: `branch ${branch}`;
|
|
264
|
-
printInfo(`Creating worktree for ${targetLabel}. Progress indicator running...`);
|
|
265
|
-
}
|
|
266
|
-
const worktreeResult = await runGitStep(`prepare worktree (${branch})`, () => orchestrator.ensureWorktree(branch, repoRoot, ensureOptions));
|
|
267
|
-
if (!worktreeResult.ok) {
|
|
268
|
-
return;
|
|
269
|
-
}
|
|
270
|
-
const worktreePath = worktreeResult.value;
|
|
271
|
-
if (isProtectedBranch) {
|
|
272
|
-
if (protectedCheckoutResult === "remote" && remoteBranch) {
|
|
273
|
-
printInfo(`Created local tracking branch '${branch}' from ${remoteBranch} in repository root.`);
|
|
274
|
-
}
|
|
275
|
-
else if (protectedCheckoutResult === "local") {
|
|
276
|
-
printInfo(`Checked out protected branch '${branch}' in repository root.`);
|
|
277
|
-
}
|
|
278
|
-
else {
|
|
279
|
-
printInfo(`Using repository root for protected branch '${branch}'.`);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
else if (existingWorktree) {
|
|
283
|
-
printInfo(`Reusing existing worktree: ${existingWorktree}`);
|
|
284
|
-
}
|
|
285
|
-
else if (ensureOptions.isNewBranch) {
|
|
286
|
-
const base = ensureOptions.baseBranch ?? "";
|
|
287
|
-
printInfo(`Created new worktree from ${base}: ${worktreePath}`);
|
|
288
|
-
}
|
|
289
|
-
else if (willCreateWorktree) {
|
|
290
|
-
printInfo(`Created worktree: ${worktreePath}`);
|
|
291
|
-
}
|
|
292
|
-
printInfo(`Worktree ready: ${worktreePath}`);
|
|
293
|
-
const dependencyResult = await runDependencyInstallStep(`dependency installation (${branch})`, () => installDependenciesForWorktree(worktreePath));
|
|
294
|
-
if (!dependencyResult.ok) {
|
|
295
|
-
return;
|
|
296
|
-
}
|
|
297
|
-
const dependencyStatus = dependencyResult.value;
|
|
298
|
-
if (dependencyStatus.skipped) {
|
|
299
|
-
let warningMessage;
|
|
300
|
-
switch (dependencyStatus.reason) {
|
|
301
|
-
case "missing-lockfile":
|
|
302
|
-
warningMessage =
|
|
303
|
-
"Skipping automatic install because no lockfiles (bun.lock / pnpm-lock.yaml / package-lock.json) or package.json could be found. Run the appropriate package-manager install command manually if needed.";
|
|
304
|
-
break;
|
|
305
|
-
case "missing-binary":
|
|
306
|
-
warningMessage = `Package manager '${dependencyStatus.manager ?? "unknown"}' is not available in this environment; skipping automatic install.`;
|
|
307
|
-
break;
|
|
308
|
-
case "install-failed":
|
|
309
|
-
warningMessage = `Dependency installation failed via ${dependencyStatus.manager ?? "unknown"}. Continuing without reinstall.`;
|
|
310
|
-
break;
|
|
311
|
-
case "lockfile-access-error":
|
|
312
|
-
warningMessage =
|
|
313
|
-
"Unable to read dependency lockfiles due to a filesystem error. Continuing without reinstall.";
|
|
314
|
-
break;
|
|
315
|
-
default:
|
|
316
|
-
warningMessage =
|
|
317
|
-
"Skipping automatic dependency install due to an unexpected error. Continuing without reinstall.";
|
|
318
|
-
}
|
|
319
|
-
if (dependencyStatus.message) {
|
|
320
|
-
warningMessage = `${warningMessage}\nDetails: ${dependencyStatus.message}`;
|
|
321
|
-
}
|
|
322
|
-
printWarning(warningMessage);
|
|
323
|
-
}
|
|
324
|
-
else {
|
|
325
|
-
printInfo(`Dependencies synced via ${dependencyStatus.manager}.`);
|
|
326
|
-
}
|
|
327
|
-
// Update remotes and attempt fast-forward pull
|
|
328
|
-
const fetchResult = await runGitStep("fetch remotes", () => fetchAllRemotes({ cwd: repoRoot }));
|
|
329
|
-
if (!fetchResult.ok) {
|
|
330
|
-
return;
|
|
331
|
-
}
|
|
332
|
-
let fastForwardError = null;
|
|
333
|
-
try {
|
|
334
|
-
await pullFastForward(worktreePath);
|
|
335
|
-
printInfo(`Fast-forward pull finished for ${branch}.`);
|
|
336
|
-
}
|
|
337
|
-
catch (error) {
|
|
338
|
-
fastForwardError =
|
|
339
|
-
error instanceof Error ? error : new Error(String(error));
|
|
340
|
-
printWarning(`Fast-forward pull failed for ${branch}. Checking for divergence before continuing...`);
|
|
341
|
-
}
|
|
342
|
-
const divergenceBranches = new Set();
|
|
343
|
-
const sanitizeBranchName = (value) => {
|
|
344
|
-
if (!value)
|
|
345
|
-
return null;
|
|
346
|
-
return value.replace(/^origin\//, "");
|
|
347
|
-
};
|
|
348
|
-
const sanitizedBranch = sanitizeBranchName(branch);
|
|
349
|
-
if (sanitizedBranch) {
|
|
350
|
-
divergenceBranches.add(sanitizedBranch);
|
|
351
|
-
}
|
|
352
|
-
const sanitizedRemoteBranch = sanitizeBranchName(remoteBranch);
|
|
353
|
-
if (sanitizedRemoteBranch) {
|
|
354
|
-
divergenceBranches.add(sanitizedRemoteBranch);
|
|
355
|
-
}
|
|
356
|
-
let divergenceStatuses = [];
|
|
357
|
-
try {
|
|
358
|
-
divergenceStatuses = await getBranchDivergenceStatuses({
|
|
359
|
-
cwd: repoRoot,
|
|
360
|
-
branches: Array.from(divergenceBranches),
|
|
361
|
-
});
|
|
362
|
-
}
|
|
363
|
-
catch (error) {
|
|
364
|
-
const details = error instanceof Error ? error.message : String(error);
|
|
365
|
-
printWarning(`Failed to check branch divergence. Error: ${details}. Continuing without blocking.`);
|
|
366
|
-
divergenceStatuses = [];
|
|
367
|
-
}
|
|
368
|
-
const divergedBranches = divergenceStatuses.filter((status) => status.remoteAhead > 0 && status.localAhead > 0);
|
|
369
|
-
if (divergedBranches.length > 0) {
|
|
370
|
-
printWarning("Potential merge conflicts detected when pulling the following local branches:");
|
|
371
|
-
divergedBranches.forEach(({ branch: divergedBranch, remoteAhead, localAhead }) => {
|
|
372
|
-
const highlight = divergedBranch === branch ? " (selected branch)" : "";
|
|
373
|
-
writeTerminalLine(chalk.yellow(` • ${divergedBranch}${highlight} remote:+${remoteAhead} local:+${localAhead}`), "stderr");
|
|
374
|
-
});
|
|
375
|
-
printWarning("Resolve these divergences (e.g., rebase or merge) to avoid conflicts. Continuing without blocking.");
|
|
376
|
-
}
|
|
377
|
-
else if (fastForwardError) {
|
|
378
|
-
printWarning(`Fast-forward pull could not complete (${fastForwardError.message}). Continuing without blocking.`);
|
|
379
|
-
}
|
|
380
|
-
// Get coding agent definition and shared environment overrides
|
|
381
|
-
const [agentConfig, sharedEnv] = await Promise.all([
|
|
382
|
-
getCodingAgentById(tool),
|
|
383
|
-
getSharedEnvironment(),
|
|
384
|
-
]);
|
|
385
|
-
if (!agentConfig) {
|
|
386
|
-
throw new Error(`Coding agent not found: ${tool}`);
|
|
387
|
-
}
|
|
388
|
-
// Save selection immediately (including history) so "last agent" is reflected
|
|
389
|
-
// even if the agent is interrupted or killed mid-run (e.g., Ctrl+C).
|
|
390
|
-
// FR-042: Record timestamp to session history immediately on agent start.
|
|
391
|
-
await saveSession({
|
|
392
|
-
lastWorktreePath: worktreePath,
|
|
393
|
-
lastBranch: branch,
|
|
394
|
-
lastUsedTool: tool,
|
|
395
|
-
toolLabel: agentConfig.displayName ?? tool,
|
|
396
|
-
mode,
|
|
397
|
-
model: normalizedModel ?? null,
|
|
398
|
-
reasoningLevel: inferenceLevel ?? null,
|
|
399
|
-
skipPermissions: skipPermissions ?? null,
|
|
400
|
-
toolVersion: toolVersion ?? null,
|
|
401
|
-
timestamp: Date.now(),
|
|
402
|
-
repositoryRoot: repoRoot,
|
|
403
|
-
});
|
|
404
|
-
// Lookup saved session ID for Continue (auto attach)
|
|
405
|
-
let resumeSessionId = selectedSessionId && selectedSessionId.length > 0
|
|
406
|
-
? selectedSessionId
|
|
407
|
-
: null;
|
|
408
|
-
if (mode === "continue") {
|
|
409
|
-
const existingSession = await loadSession(repoRoot);
|
|
410
|
-
const history = existingSession?.history ?? [];
|
|
411
|
-
resumeSessionId =
|
|
412
|
-
resumeSessionId ??
|
|
413
|
-
(await resolveContinueSessionId({
|
|
414
|
-
history,
|
|
415
|
-
sessionData: existingSession,
|
|
416
|
-
branch,
|
|
417
|
-
toolId: tool,
|
|
418
|
-
repoRoot,
|
|
419
|
-
}));
|
|
420
|
-
if (!resumeSessionId) {
|
|
421
|
-
printWarning("No saved session ID found for this branch/tool. Falling back to tool default.");
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
const launchStartedAt = Date.now();
|
|
425
|
-
// FR-043: Start periodic timestamp update timer (30 seconds interval)
|
|
426
|
-
// This ensures the latest activity time is updated even if the tool is force-killed
|
|
427
|
-
const SESSION_UPDATE_INTERVAL_MS = 30_000;
|
|
428
|
-
const updateTimer = setInterval(async () => {
|
|
429
|
-
try {
|
|
430
|
-
await saveSession({
|
|
431
|
-
lastWorktreePath: worktreePath,
|
|
432
|
-
lastBranch: branch,
|
|
433
|
-
lastUsedTool: tool,
|
|
434
|
-
toolLabel: agentConfig.displayName ?? tool,
|
|
435
|
-
mode,
|
|
436
|
-
model: normalizedModel ?? null,
|
|
437
|
-
reasoningLevel: inferenceLevel ?? null,
|
|
438
|
-
skipPermissions: skipPermissions ?? null,
|
|
439
|
-
toolVersion: toolVersion ?? null,
|
|
440
|
-
timestamp: Date.now(),
|
|
441
|
-
repositoryRoot: repoRoot,
|
|
442
|
-
}, { skipHistory: true });
|
|
443
|
-
}
|
|
444
|
-
catch {
|
|
445
|
-
// Ignore errors during periodic update
|
|
446
|
-
}
|
|
447
|
-
}, SESSION_UPDATE_INTERVAL_MS);
|
|
448
|
-
// Launch selected coding agent
|
|
449
|
-
// Builtin agents use their dedicated launch functions
|
|
450
|
-
// Custom agents use the generic launchCodingAgent function
|
|
451
|
-
let launchResult;
|
|
452
|
-
try {
|
|
453
|
-
if (tool === "claude-code") {
|
|
454
|
-
const launchOptions = {
|
|
455
|
-
mode: mode === "resume"
|
|
456
|
-
? "resume"
|
|
457
|
-
: mode === "continue"
|
|
458
|
-
? "continue"
|
|
459
|
-
: "normal",
|
|
460
|
-
skipPermissions,
|
|
461
|
-
envOverrides: sharedEnv,
|
|
462
|
-
sessionId: resumeSessionId,
|
|
463
|
-
chrome: true,
|
|
464
|
-
branch,
|
|
465
|
-
version: toolVersion ?? null,
|
|
466
|
-
};
|
|
467
|
-
if (normalizedModel) {
|
|
468
|
-
launchOptions.model = normalizedModel;
|
|
469
|
-
}
|
|
470
|
-
launchResult = await launchClaudeCode(worktreePath, launchOptions);
|
|
471
|
-
}
|
|
472
|
-
else if (tool === "codex-cli") {
|
|
473
|
-
const launchOptions = {
|
|
474
|
-
mode: mode === "resume"
|
|
475
|
-
? "resume"
|
|
476
|
-
: mode === "continue"
|
|
477
|
-
? "continue"
|
|
478
|
-
: "normal",
|
|
479
|
-
bypassApprovals: skipPermissions,
|
|
480
|
-
envOverrides: sharedEnv,
|
|
481
|
-
sessionId: resumeSessionId,
|
|
482
|
-
branch,
|
|
483
|
-
version: toolVersion ?? null,
|
|
484
|
-
};
|
|
485
|
-
if (normalizedModel) {
|
|
486
|
-
launchOptions.model = normalizedModel;
|
|
487
|
-
}
|
|
488
|
-
if (inferenceLevel) {
|
|
489
|
-
launchOptions.reasoningEffort =
|
|
490
|
-
inferenceLevel;
|
|
491
|
-
}
|
|
492
|
-
launchResult = await launchCodexCLI(worktreePath, launchOptions);
|
|
493
|
-
}
|
|
494
|
-
else if (tool === "gemini-cli") {
|
|
495
|
-
const launchOptions = {
|
|
496
|
-
mode: mode === "resume"
|
|
497
|
-
? "resume"
|
|
498
|
-
: mode === "continue"
|
|
499
|
-
? "continue"
|
|
500
|
-
: "normal",
|
|
501
|
-
skipPermissions,
|
|
502
|
-
envOverrides: sharedEnv,
|
|
503
|
-
sessionId: resumeSessionId,
|
|
504
|
-
branch,
|
|
505
|
-
version: toolVersion ?? null,
|
|
506
|
-
};
|
|
507
|
-
if (normalizedModel) {
|
|
508
|
-
launchOptions.model = normalizedModel;
|
|
509
|
-
}
|
|
510
|
-
launchResult = await launchGeminiCLI(worktreePath, launchOptions);
|
|
511
|
-
}
|
|
512
|
-
else {
|
|
513
|
-
// Custom coding agent (including OpenCode)
|
|
514
|
-
printInfo(`Launching custom agent: ${agentConfig.displayName}`);
|
|
515
|
-
const customLaunchOptions = {
|
|
516
|
-
mode: mode === "resume"
|
|
517
|
-
? "resume"
|
|
518
|
-
: mode === "continue"
|
|
519
|
-
? "continue"
|
|
520
|
-
: "normal",
|
|
521
|
-
skipPermissions,
|
|
522
|
-
cwd: worktreePath,
|
|
523
|
-
sharedEnv,
|
|
524
|
-
};
|
|
525
|
-
if (tool === "opencode" && normalizedModel) {
|
|
526
|
-
customLaunchOptions.extraArgs = ["-m", normalizedModel];
|
|
527
|
-
}
|
|
528
|
-
if (toolVersion) {
|
|
529
|
-
customLaunchOptions.version = toolVersion;
|
|
530
|
-
}
|
|
531
|
-
launchResult = await launchCodingAgent(agentConfig, customLaunchOptions);
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
finally {
|
|
535
|
-
// FR-043: Clear the periodic timestamp update timer
|
|
536
|
-
clearInterval(updateTimer);
|
|
537
|
-
}
|
|
538
|
-
// Persist session with captured session ID (if any)
|
|
539
|
-
let finalSessionId = launchResult?.sessionId ??
|
|
540
|
-
resumeSessionId ??
|
|
541
|
-
null;
|
|
542
|
-
let resolvedWorktrees = null;
|
|
543
|
-
if (branch) {
|
|
544
|
-
try {
|
|
545
|
-
const allWorktrees = await listAllWorktrees();
|
|
546
|
-
resolvedWorktrees = allWorktrees
|
|
547
|
-
.filter((entry) => entry?.path && entry?.branch)
|
|
548
|
-
.map((entry) => ({ path: entry.path, branch: entry.branch }));
|
|
549
|
-
}
|
|
550
|
-
catch {
|
|
551
|
-
resolvedWorktrees = null;
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
const worktreeLookupOptions = resolvedWorktrees && resolvedWorktrees.length > 0
|
|
555
|
-
? { worktrees: resolvedWorktrees }
|
|
556
|
-
: {};
|
|
557
|
-
if (!finalSessionId && tool === "claude-code") {
|
|
558
|
-
try {
|
|
559
|
-
finalSessionId =
|
|
560
|
-
(await findLatestClaudeSessionId(worktreePath, {
|
|
561
|
-
branch,
|
|
562
|
-
...worktreeLookupOptions,
|
|
563
|
-
})) ?? null;
|
|
564
|
-
}
|
|
565
|
-
catch {
|
|
566
|
-
finalSessionId = null;
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
const finishedAt = Date.now();
|
|
570
|
-
if (!finalSessionId && tool === "codex-cli") {
|
|
571
|
-
try {
|
|
572
|
-
const latest = await findLatestCodexSession({
|
|
573
|
-
since: launchStartedAt - 60_000,
|
|
574
|
-
until: finishedAt + 60_000,
|
|
575
|
-
preferClosestTo: finishedAt,
|
|
576
|
-
windowMs: 60 * 60 * 1000,
|
|
577
|
-
cwd: worktreePath,
|
|
578
|
-
branch,
|
|
579
|
-
...worktreeLookupOptions,
|
|
580
|
-
});
|
|
581
|
-
if (latest) {
|
|
582
|
-
finalSessionId = latest.id;
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
catch {
|
|
586
|
-
// ignore fallback failure
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
else if (!finalSessionId && tool === "claude-code") {
|
|
590
|
-
try {
|
|
591
|
-
const latestClaude = await findLatestClaudeSession(worktreePath, {
|
|
592
|
-
since: launchStartedAt - 60_000,
|
|
593
|
-
until: finishedAt + 60_000,
|
|
594
|
-
preferClosestTo: finishedAt,
|
|
595
|
-
windowMs: 60 * 60 * 1000,
|
|
596
|
-
branch,
|
|
597
|
-
...worktreeLookupOptions,
|
|
598
|
-
});
|
|
599
|
-
if (latestClaude) {
|
|
600
|
-
finalSessionId = latestClaude.id;
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
catch {
|
|
604
|
-
// ignore
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
else if (!finalSessionId && tool === "gemini-cli") {
|
|
608
|
-
try {
|
|
609
|
-
const latestGemini = await findLatestGeminiSession({
|
|
610
|
-
since: launchStartedAt - 60_000,
|
|
611
|
-
until: finishedAt + 60_000,
|
|
612
|
-
preferClosestTo: finishedAt,
|
|
613
|
-
windowMs: 60 * 60 * 1000,
|
|
614
|
-
cwd: worktreePath,
|
|
615
|
-
branch,
|
|
616
|
-
...worktreeLookupOptions,
|
|
617
|
-
});
|
|
618
|
-
if (latestGemini) {
|
|
619
|
-
finalSessionId = latestGemini.id;
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
catch {
|
|
623
|
-
// ignore
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
await saveSession({
|
|
627
|
-
lastWorktreePath: worktreePath,
|
|
628
|
-
lastBranch: branch,
|
|
629
|
-
lastUsedTool: tool,
|
|
630
|
-
toolLabel: agentConfig.displayName ?? tool,
|
|
631
|
-
mode,
|
|
632
|
-
model: normalizedModel ?? null,
|
|
633
|
-
reasoningLevel: inferenceLevel ?? null,
|
|
634
|
-
skipPermissions: skipPermissions ?? null,
|
|
635
|
-
toolVersion: toolVersion ?? null,
|
|
636
|
-
timestamp: Date.now(),
|
|
637
|
-
repositoryRoot: repoRoot,
|
|
638
|
-
lastSessionId: finalSessionId,
|
|
639
|
-
});
|
|
640
|
-
try {
|
|
641
|
-
const [hasUncommitted, hasUnpushed] = await Promise.all([
|
|
642
|
-
hasUncommittedChanges(worktreePath),
|
|
643
|
-
hasUnpushedCommits(worktreePath, branch),
|
|
644
|
-
]);
|
|
645
|
-
if (hasUncommitted) {
|
|
646
|
-
const uncommittedCount = await getUncommittedChangesCount(worktreePath);
|
|
647
|
-
const countLabel = uncommittedCount > 0
|
|
648
|
-
? ` (${uncommittedCount} ${uncommittedCount === 1 ? "change" : "changes"})`
|
|
649
|
-
: "";
|
|
650
|
-
printWarning(`Uncommitted changes detected${countLabel}.`);
|
|
651
|
-
}
|
|
652
|
-
if (hasUnpushed) {
|
|
653
|
-
const unpushedCount = await getUnpushedCommitsCount(worktreePath, branch);
|
|
654
|
-
const countLabel = unpushedCount > 0
|
|
655
|
-
? ` (${unpushedCount} ${unpushedCount === 1 ? "commit" : "commits"})`
|
|
656
|
-
: "";
|
|
657
|
-
printWarning(`Unpushed commits detected${countLabel}.`);
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
catch (error) {
|
|
661
|
-
const details = error instanceof Error ? error.message : String(error);
|
|
662
|
-
printWarning(`Failed to check git status after session: ${details}`);
|
|
663
|
-
}
|
|
664
|
-
// Small buffer before returning to branch list to avoid abrupt screen swap
|
|
665
|
-
await new Promise((resolve) => setTimeout(resolve, POST_SESSION_DELAY_MS));
|
|
666
|
-
printInfo("Session completed successfully.");
|
|
667
|
-
await waitForUserAcknowledgement(SUCCESS_PROMPT);
|
|
668
|
-
return;
|
|
669
|
-
}
|
|
670
|
-
catch (error) {
|
|
671
|
-
// Handle recoverable errors (Git, Worktree, Codex errors)
|
|
672
|
-
if (isRecoverableError(error)) {
|
|
673
|
-
const details = error instanceof Error ? error.message : String(error);
|
|
674
|
-
printError(`Error during workflow: ${details}`);
|
|
675
|
-
await waitForErrorAcknowledgement();
|
|
676
|
-
return;
|
|
677
|
-
}
|
|
678
|
-
// Re-throw non-recoverable errors
|
|
679
|
-
throw error;
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
function resolveUIHandler() {
|
|
683
|
-
return mainSolidUI;
|
|
684
|
-
}
|
|
685
|
-
function logLoopError(error, context) {
|
|
686
|
-
const label = context === "ui" ? "UI" : "workflow";
|
|
687
|
-
if (error instanceof Error) {
|
|
688
|
-
printError(`${label} error: ${error.message}`);
|
|
689
|
-
}
|
|
690
|
-
else {
|
|
691
|
-
printError(`${label} error: ${String(error)}`);
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
export async function runInteractiveLoop(uiHandler = resolveUIHandler(), workflowHandler = handleAIToolWorkflow) {
|
|
695
|
-
// Main loop: UI → Coding Agent → back to UI
|
|
696
|
-
while (true) {
|
|
697
|
-
let selectionResult;
|
|
698
|
-
try {
|
|
699
|
-
selectionResult = await uiHandler();
|
|
700
|
-
}
|
|
701
|
-
catch (error) {
|
|
702
|
-
logLoopError(error, "ui");
|
|
703
|
-
await waitForErrorAcknowledgement();
|
|
704
|
-
continue;
|
|
705
|
-
}
|
|
706
|
-
if (!selectionResult) {
|
|
707
|
-
// User quit (pressed q without making selections)
|
|
708
|
-
printInfo("Goodbye!");
|
|
709
|
-
break;
|
|
710
|
-
}
|
|
711
|
-
try {
|
|
712
|
-
await workflowHandler(selectionResult);
|
|
713
|
-
}
|
|
714
|
-
catch (error) {
|
|
715
|
-
logLoopError(error, "workflow");
|
|
716
|
-
await waitForErrorAcknowledgement();
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
/**
|
|
721
|
-
* Main entry point
|
|
722
|
-
*/
|
|
723
|
-
export async function main() {
|
|
724
|
-
// Setup global signal handlers for clean exit
|
|
725
|
-
setupExitHandlers();
|
|
726
|
-
// Parse command line arguments
|
|
727
|
-
const args = process.argv.slice(2);
|
|
728
|
-
const showVersionFlag = args.includes("-v") || args.includes("--version");
|
|
729
|
-
const showHelpFlag = args.includes("-h") || args.includes("--help");
|
|
730
|
-
const serveCommand = args.includes("serve");
|
|
731
|
-
// Version flag has higher priority than help
|
|
732
|
-
if (showVersionFlag) {
|
|
733
|
-
await showVersion();
|
|
734
|
-
return;
|
|
735
|
-
}
|
|
736
|
-
if (showHelpFlag) {
|
|
737
|
-
showHelp();
|
|
738
|
-
return;
|
|
739
|
-
}
|
|
740
|
-
// Start Web UI server if 'serve' command is provided
|
|
741
|
-
if (serveCommand) {
|
|
742
|
-
const { startWebServer } = await import("./web/server/index.js");
|
|
743
|
-
await startWebServer();
|
|
744
|
-
return;
|
|
745
|
-
}
|
|
746
|
-
// Check if current directory is a Git repository
|
|
747
|
-
if (!(await isGitRepository())) {
|
|
748
|
-
printError(`Current directory is not a Git repository: ${process.cwd()}`);
|
|
749
|
-
printInfo("Please run this command from within a Git repository or worktree directory.");
|
|
750
|
-
// Docker環境でよくある問題: safe.directory設定
|
|
751
|
-
printInfo("\\nIf you're running in Docker, you may need to configure Git safe.directory:");
|
|
752
|
-
printInfo(" git config --global --add safe.directory '*'");
|
|
753
|
-
printInfo("\\nOr run with DEBUG=1 for more information:");
|
|
754
|
-
printInfo(" DEBUG=1 bun run start");
|
|
755
|
-
await waitForErrorAcknowledgement();
|
|
756
|
-
process.exit(1);
|
|
757
|
-
}
|
|
758
|
-
await runInteractiveLoop();
|
|
759
|
-
// Ensure clean exit with code 0
|
|
760
|
-
process.exit(0);
|
|
761
|
-
}
|
|
762
|
-
export function isEntryPoint(metaUrl, argv1) {
|
|
763
|
-
if (!argv1) {
|
|
764
|
-
return false;
|
|
765
|
-
}
|
|
766
|
-
try {
|
|
767
|
-
return fileURLToPath(metaUrl) === path.resolve(argv1);
|
|
768
|
-
}
|
|
769
|
-
catch {
|
|
770
|
-
return false;
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
// Run the application if this module is executed directly
|
|
774
|
-
if (isEntryPoint(import.meta.url, process.argv[1])) {
|
|
775
|
-
main().catch(async (error) => {
|
|
776
|
-
const details = error instanceof Error ? (error.stack ?? error.message) : String(error);
|
|
777
|
-
writeTerminalLine(`Fatal error: ${details}`, "stderr");
|
|
778
|
-
await waitForErrorAcknowledgement();
|
|
779
|
-
process.exit(1);
|
|
780
|
-
});
|
|
781
|
-
}
|
|
782
|
-
//# sourceMappingURL=index.js.map
|