@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/cli/ui/App.solid.js
DELETED
|
@@ -1,1427 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "@opentui/solid/jsx-runtime";
|
|
2
|
-
/** @jsxImportSource @opentui/solid */
|
|
3
|
-
import { useKeyboard, useRenderer } from "@opentui/solid";
|
|
4
|
-
import { batch, createEffect, createMemo, createSignal, onCleanup, onMount, } from "solid-js";
|
|
5
|
-
import { BranchListScreen } from "./screens/solid/BranchListScreen.js";
|
|
6
|
-
import { HelpOverlay } from "./components/solid/HelpOverlay.js";
|
|
7
|
-
import { WizardController, } from "./components/solid/WizardController.js";
|
|
8
|
-
import { SelectorScreen, } from "./screens/solid/SelectorScreen.js";
|
|
9
|
-
import { LogScreen } from "./screens/solid/LogScreen.js";
|
|
10
|
-
import { LogDetailScreen } from "./screens/solid/LogDetailScreen.js";
|
|
11
|
-
import { ErrorScreen } from "./screens/solid/ErrorScreen.js";
|
|
12
|
-
import { LoadingIndicatorScreen } from "./screens/solid/LoadingIndicator.js";
|
|
13
|
-
import { WorktreeCreateScreen } from "./screens/solid/WorktreeCreateScreen.js";
|
|
14
|
-
import { InputScreen } from "./screens/solid/InputScreen.js";
|
|
15
|
-
import { ConfirmScreen } from "./screens/solid/ConfirmScreen.js";
|
|
16
|
-
import { useTerminalSize } from "./hooks/solid/useTerminalSize.js";
|
|
17
|
-
import { EnvironmentScreen } from "./screens/solid/EnvironmentScreen.js";
|
|
18
|
-
import { ProfileScreen } from "./screens/solid/ProfileScreen.js";
|
|
19
|
-
import { ProfileEnvScreen } from "./screens/solid/ProfileEnvScreen.js";
|
|
20
|
-
import { calculateStatistics } from "./utils/statisticsCalculator.js";
|
|
21
|
-
import { formatBranchItems } from "./utils/branchFormatter.js";
|
|
22
|
-
import { createLogger } from "../../logging/logger.js";
|
|
23
|
-
const logger = createLogger({ category: "app" });
|
|
24
|
-
import { getDefaultInferenceForModel, getDefaultModelOption, normalizeModelId, } from "./utils/modelOptions.js";
|
|
25
|
-
import { resolveBaseBranchLabel, resolveBaseBranchRef, } from "./utils/baseBranch.js";
|
|
26
|
-
import { getAllBranches, getCurrentBranch, getLocalBranches, getRepositoryRoot, deleteBranch, fetchAllRemotes, } from "../../git.js";
|
|
27
|
-
import { isProtectedBranchName, getCleanupStatus, listAdditionalWorktrees, removeWorktree, repairWorktrees, } from "../../worktree.js";
|
|
28
|
-
import { getConfig, getLastToolUsageMap, loadSession, } from "../../config/index.js";
|
|
29
|
-
import { findLatestBranchSessionsByTool, refreshQuickStartEntries, } from "./utils/continueSession.js";
|
|
30
|
-
import { getAllCodingAgents } from "../../config/tools.js";
|
|
31
|
-
import { clearLogFiles, getTodayLogDate, readLogLinesForDate, resolveLogTarget, selectLogTargetByRecency, } from "../../logging/reader.js";
|
|
32
|
-
import { parseLogLines } from "../../logging/formatter.js";
|
|
33
|
-
import { copyToClipboard } from "./utils/clipboard.js";
|
|
34
|
-
import { getPackageVersion } from "../../utils.js";
|
|
35
|
-
import { createProfile, deleteProfile, loadProfiles, setActiveProfile, updateProfile, } from "../../config/profiles.js";
|
|
36
|
-
import { isValidProfileName, } from "../../types/profiles.js";
|
|
37
|
-
import { BRANCH_PREFIXES } from "../../config/constants.js";
|
|
38
|
-
import { prefetchAgentVersions } from "./utils/versionCache.js";
|
|
39
|
-
import { prefetchInstalledVersions } from "./utils/installedVersionCache.js";
|
|
40
|
-
import { getBunxAgentIds } from "./utils/versionFetcher.js";
|
|
41
|
-
const UNSAFE_SELECTION_MESSAGE = "Unsafe branch selected. Select anyway?";
|
|
42
|
-
const SAFETY_PENDING_MESSAGE = "Safety check in progress. Select anyway?";
|
|
43
|
-
const DEFAULT_SCREEN = "branch-list";
|
|
44
|
-
const buildStats = (branches) => calculateStatistics(branches);
|
|
45
|
-
const applyCleanupStatus = (items, statusByBranch) => items.map((branch) => {
|
|
46
|
-
const status = statusByBranch.get(branch.name);
|
|
47
|
-
if (!status) {
|
|
48
|
-
return { ...branch, safeToCleanup: false, isUnmerged: false };
|
|
49
|
-
}
|
|
50
|
-
const safeToCleanup = status.hasUpstream && status.reasons.includes("no-diff-with-base");
|
|
51
|
-
const isUnmerged = status.hasUpstream && status.hasUniqueCommits;
|
|
52
|
-
const worktree = branch.worktree
|
|
53
|
-
? {
|
|
54
|
-
...branch.worktree,
|
|
55
|
-
...(status.hasUncommittedChanges !== undefined
|
|
56
|
-
? { hasUncommittedChanges: status.hasUncommittedChanges }
|
|
57
|
-
: {}),
|
|
58
|
-
}
|
|
59
|
-
: undefined;
|
|
60
|
-
const base = {
|
|
61
|
-
...branch,
|
|
62
|
-
safeToCleanup,
|
|
63
|
-
isUnmerged,
|
|
64
|
-
hasUnpushedCommits: status.hasUnpushedCommits,
|
|
65
|
-
};
|
|
66
|
-
return worktree ? { ...base, worktree } : base;
|
|
67
|
-
});
|
|
68
|
-
const buildCleanupSafetyPending = (items) => {
|
|
69
|
-
const pending = new Set();
|
|
70
|
-
for (const branch of items) {
|
|
71
|
-
if (branch.type === "remote") {
|
|
72
|
-
continue;
|
|
73
|
-
}
|
|
74
|
-
if (branch.worktree) {
|
|
75
|
-
pending.add(branch.name);
|
|
76
|
-
continue;
|
|
77
|
-
}
|
|
78
|
-
if (isProtectedBranchName(branch.name)) {
|
|
79
|
-
continue;
|
|
80
|
-
}
|
|
81
|
-
pending.add(branch.name);
|
|
82
|
-
}
|
|
83
|
-
return pending;
|
|
84
|
-
};
|
|
85
|
-
const toLocalBranchName = (name) => {
|
|
86
|
-
const segments = name.split("/");
|
|
87
|
-
if (segments.length <= 1) {
|
|
88
|
-
return name;
|
|
89
|
-
}
|
|
90
|
-
return segments.slice(1).join("/");
|
|
91
|
-
};
|
|
92
|
-
const toSelectedBranchState = (branch) => {
|
|
93
|
-
const isRemote = branch.type === "remote";
|
|
94
|
-
const baseName = isRemote ? toLocalBranchName(branch.name) : branch.name;
|
|
95
|
-
return {
|
|
96
|
-
name: baseName,
|
|
97
|
-
displayName: branch.name,
|
|
98
|
-
branchType: branch.type,
|
|
99
|
-
branchCategory: branch.branchType,
|
|
100
|
-
worktreePath: branch.worktree?.path ?? null,
|
|
101
|
-
...(isRemote ? { remoteBranch: branch.name } : {}),
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
export function AppSolid(props) {
|
|
105
|
-
const renderer = useRenderer();
|
|
106
|
-
const terminal = useTerminalSize();
|
|
107
|
-
let hasExited = false;
|
|
108
|
-
const exitApp = (result) => {
|
|
109
|
-
if (hasExited)
|
|
110
|
-
return;
|
|
111
|
-
hasExited = true;
|
|
112
|
-
props.onExit?.(result);
|
|
113
|
-
renderer.destroy();
|
|
114
|
-
};
|
|
115
|
-
const [currentScreen, setCurrentScreen] = createSignal(props.initialScreen ?? DEFAULT_SCREEN);
|
|
116
|
-
const [screenStack, setScreenStack] = createSignal([]);
|
|
117
|
-
const [helpVisible, setHelpVisible] = createSignal(false);
|
|
118
|
-
const [wizardVisible, setWizardVisible] = createSignal(false);
|
|
119
|
-
const [branchItems, setBranchItems] = createSignal(props.branches ?? []);
|
|
120
|
-
const [stats, setStats] = createSignal(props.stats ?? buildStats(props.branches ?? []));
|
|
121
|
-
const [loading, setLoading] = createSignal(!props.branches);
|
|
122
|
-
const [error, setError] = createSignal(null);
|
|
123
|
-
// ブランチ一覧のカーソル位置(グローバル管理で再マウント時もリセットされない)
|
|
124
|
-
const [branchCursorPosition, setBranchCursorPosition] = createSignal(0);
|
|
125
|
-
const [toolItems, setToolItems] = createSignal([]);
|
|
126
|
-
const [toolError, setToolError] = createSignal(null);
|
|
127
|
-
const [version, setVersion] = createSignal(props.version ?? null);
|
|
128
|
-
const workingDirectory = createMemo(() => props.workingDirectory ?? process.cwd());
|
|
129
|
-
const [selectedBranch, setSelectedBranch] = createSignal(null);
|
|
130
|
-
const [selectedTool, setSelectedTool] = createSignal(null);
|
|
131
|
-
const [selectedMode, setSelectedMode] = createSignal("normal");
|
|
132
|
-
const [selectedBranches, setSelectedBranches] = createSignal([]);
|
|
133
|
-
const [unsafeSelectionConfirmVisible, setUnsafeSelectionConfirmVisible] = createSignal(false);
|
|
134
|
-
const [unsafeConfirmInputLocked, setUnsafeConfirmInputLocked] = createSignal(false);
|
|
135
|
-
const [unsafeSelectionTarget, setUnsafeSelectionTarget] = createSignal(null);
|
|
136
|
-
const [unsafeSelectionMessage, setUnsafeSelectionMessage] = createSignal(UNSAFE_SELECTION_MESSAGE);
|
|
137
|
-
const [branchFooterMessage, setBranchFooterMessage] = createSignal(null);
|
|
138
|
-
const [branchInputLocked, setBranchInputLocked] = createSignal(false);
|
|
139
|
-
const [cleanupIndicators, setCleanupIndicators] = createSignal({});
|
|
140
|
-
const [cleanupStatusByBranch, setCleanupStatusByBranch] = createSignal(new Map());
|
|
141
|
-
const [cleanupSafetyLoading, setCleanupSafetyLoading] = createSignal(false);
|
|
142
|
-
const [cleanupSafetyPending, setCleanupSafetyPending] = createSignal(new Set());
|
|
143
|
-
const [isNewBranch, setIsNewBranch] = createSignal(false);
|
|
144
|
-
const [newBranchBaseRef, setNewBranchBaseRef] = createSignal(null);
|
|
145
|
-
const [creationSource, setCreationSource] = createSignal(null);
|
|
146
|
-
const [createBranchName, setCreateBranchName] = createSignal("", {
|
|
147
|
-
equals: false,
|
|
148
|
-
});
|
|
149
|
-
const [suppressCreateKey, setSuppressCreateKey] = createSignal(null);
|
|
150
|
-
const [defaultBaseBranch, setDefaultBaseBranch] = createSignal("main");
|
|
151
|
-
const suppressBranchInputOnce = () => {
|
|
152
|
-
setUnsafeConfirmInputLocked(true);
|
|
153
|
-
queueMicrotask(() => {
|
|
154
|
-
setUnsafeConfirmInputLocked(false);
|
|
155
|
-
});
|
|
156
|
-
};
|
|
157
|
-
const unsafeConfirmBoxWidth = createMemo(() => {
|
|
158
|
-
const columns = terminal().columns || 80;
|
|
159
|
-
return Math.max(1, Math.floor(columns * 0.6));
|
|
160
|
-
});
|
|
161
|
-
const unsafeConfirmContentWidth = createMemo(() => Math.max(0, unsafeConfirmBoxWidth() - 4));
|
|
162
|
-
// セッション履歴(最終使用エージェントなど)
|
|
163
|
-
const [sessionHistory, setSessionHistory] = createSignal([]);
|
|
164
|
-
const [quickStartHistory, setQuickStartHistory] = createSignal([]);
|
|
165
|
-
// 選択中ブランチの履歴をフィルタリング
|
|
166
|
-
const historyForBranch = createMemo(() => {
|
|
167
|
-
const history = sessionHistory();
|
|
168
|
-
const branch = selectedBranch();
|
|
169
|
-
if (!branch)
|
|
170
|
-
return [];
|
|
171
|
-
return findLatestBranchSessionsByTool(history, branch.name, branch.worktreePath ?? null);
|
|
172
|
-
});
|
|
173
|
-
createEffect(() => {
|
|
174
|
-
setQuickStartHistory(historyForBranch());
|
|
175
|
-
});
|
|
176
|
-
createEffect(() => {
|
|
177
|
-
const branch = selectedBranch();
|
|
178
|
-
const baseHistory = historyForBranch();
|
|
179
|
-
if (!wizardVisible() || !branch || baseHistory.length === 0) {
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
const worktreePath = branch.worktreePath ?? null;
|
|
183
|
-
if (!worktreePath) {
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
const branchName = branch.name;
|
|
187
|
-
void (async () => {
|
|
188
|
-
const refreshed = await refreshQuickStartEntries(baseHistory, {
|
|
189
|
-
branch: branchName,
|
|
190
|
-
worktreePath,
|
|
191
|
-
});
|
|
192
|
-
if (selectedBranch()?.name !== branchName) {
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
setQuickStartHistory(refreshed);
|
|
196
|
-
})();
|
|
197
|
-
});
|
|
198
|
-
const [logEntries, setLogEntries] = createSignal([]);
|
|
199
|
-
const [logLoading, setLogLoading] = createSignal(false);
|
|
200
|
-
const [logError, setLogError] = createSignal(null);
|
|
201
|
-
const [logSelectedEntry, setLogSelectedEntry] = createSignal(null);
|
|
202
|
-
const [logSelectedDate, setLogSelectedDate] = createSignal(getTodayLogDate());
|
|
203
|
-
const [logNotification, setLogNotification] = createSignal(null);
|
|
204
|
-
const [logTailEnabled, setLogTailEnabled] = createSignal(false);
|
|
205
|
-
const [logTargetBranch, setLogTargetBranch] = createSignal(null);
|
|
206
|
-
const [profileItems, setProfileItems] = createSignal([]);
|
|
207
|
-
const [activeProfile, setActiveProfileName] = createSignal(null);
|
|
208
|
-
const [profileError, setProfileError] = createSignal(null);
|
|
209
|
-
const [profilesConfig, setProfilesConfig] = createSignal(null);
|
|
210
|
-
const [profileActionError, setProfileActionError] = createSignal(null);
|
|
211
|
-
const [profileActionHint, setProfileActionHint] = createSignal(null);
|
|
212
|
-
const [selectedProfileName, setSelectedProfileName] = createSignal(null);
|
|
213
|
-
const [profileInputValue, setProfileInputValue] = createSignal("", {
|
|
214
|
-
equals: false,
|
|
215
|
-
});
|
|
216
|
-
const [profileInputMode, setProfileInputMode] = createSignal("create-profile");
|
|
217
|
-
const [profileInputSuppressKey, setProfileInputSuppressKey] = createSignal(null);
|
|
218
|
-
const [profileEnvKey, setProfileEnvKey] = createSignal(null);
|
|
219
|
-
const [profileConfirmMode, setProfileConfirmMode] = createSignal("delete-profile");
|
|
220
|
-
const [logEffectiveTarget, setLogEffectiveTarget] = createSignal(null);
|
|
221
|
-
const logPrimaryTarget = createMemo(() => resolveLogTarget(logTargetBranch(), workingDirectory()));
|
|
222
|
-
const logFallbackTarget = createMemo(() => resolveLogTarget(null, workingDirectory()));
|
|
223
|
-
const logActiveTarget = createMemo(() => logEffectiveTarget() ?? logPrimaryTarget());
|
|
224
|
-
const logBranchLabel = createMemo(() => logTargetBranch()?.label ?? null);
|
|
225
|
-
const logSourceLabel = createMemo(() => {
|
|
226
|
-
const target = logActiveTarget();
|
|
227
|
-
if (!target.sourcePath) {
|
|
228
|
-
return "(none)";
|
|
229
|
-
}
|
|
230
|
-
if (target.reason === "current-working-directory" ||
|
|
231
|
-
target.reason === "working-directory") {
|
|
232
|
-
return `${target.sourcePath} (cwd)`;
|
|
233
|
-
}
|
|
234
|
-
if (target.reason === "working-directory-fallback") {
|
|
235
|
-
return `${target.sourcePath} (cwd fallback)`;
|
|
236
|
-
}
|
|
237
|
-
if (target.reason === "worktree-inaccessible") {
|
|
238
|
-
return `${target.sourcePath} (inaccessible)`;
|
|
239
|
-
}
|
|
240
|
-
return target.sourcePath;
|
|
241
|
-
});
|
|
242
|
-
createEffect(() => {
|
|
243
|
-
logPrimaryTarget();
|
|
244
|
-
setLogEffectiveTarget(null);
|
|
245
|
-
});
|
|
246
|
-
const selectedProfileConfig = createMemo(() => {
|
|
247
|
-
const name = selectedProfileName();
|
|
248
|
-
const config = profilesConfig();
|
|
249
|
-
if (!name || !config?.profiles?.[name]) {
|
|
250
|
-
return null;
|
|
251
|
-
}
|
|
252
|
-
return { name, profile: config.profiles[name] };
|
|
253
|
-
});
|
|
254
|
-
const profileEnvVariables = createMemo(() => {
|
|
255
|
-
const entry = selectedProfileConfig();
|
|
256
|
-
if (!entry) {
|
|
257
|
-
return [];
|
|
258
|
-
}
|
|
259
|
-
return Object.entries(entry.profile.env ?? {})
|
|
260
|
-
.map(([key, value]) => ({ key, value }))
|
|
261
|
-
.sort((a, b) => a.key.localeCompare(b.key));
|
|
262
|
-
});
|
|
263
|
-
const osEnvVariables = createMemo(() => Object.entries(process.env)
|
|
264
|
-
.filter(([, value]) => typeof value === "string")
|
|
265
|
-
.map(([key, value]) => ({ key, value: String(value) }))
|
|
266
|
-
.sort((a, b) => a.key.localeCompare(b.key)));
|
|
267
|
-
let cleanupSafetyRequestId = 0;
|
|
268
|
-
const refreshCleanupSafety = async () => {
|
|
269
|
-
const requestId = ++cleanupSafetyRequestId;
|
|
270
|
-
const pendingBranches = buildCleanupSafetyPending(branchItems());
|
|
271
|
-
setCleanupSafetyPending(pendingBranches);
|
|
272
|
-
setCleanupSafetyLoading(pendingBranches.size > 0);
|
|
273
|
-
const statusByBranch = new Map();
|
|
274
|
-
const applyProgress = (status) => {
|
|
275
|
-
if (requestId !== cleanupSafetyRequestId) {
|
|
276
|
-
return;
|
|
277
|
-
}
|
|
278
|
-
statusByBranch.set(status.branch, status);
|
|
279
|
-
batch(() => {
|
|
280
|
-
setCleanupStatusByBranch(new Map(statusByBranch));
|
|
281
|
-
setBranchItems((items) => applyCleanupStatus(items, statusByBranch));
|
|
282
|
-
setCleanupSafetyPending((prev) => {
|
|
283
|
-
if (!prev.has(status.branch)) {
|
|
284
|
-
return prev;
|
|
285
|
-
}
|
|
286
|
-
const next = new Set(prev);
|
|
287
|
-
next.delete(status.branch);
|
|
288
|
-
return next;
|
|
289
|
-
});
|
|
290
|
-
});
|
|
291
|
-
};
|
|
292
|
-
try {
|
|
293
|
-
const cleanupStatuses = await getCleanupStatus({
|
|
294
|
-
onProgress: applyProgress,
|
|
295
|
-
});
|
|
296
|
-
if (requestId !== cleanupSafetyRequestId) {
|
|
297
|
-
return;
|
|
298
|
-
}
|
|
299
|
-
if (cleanupStatuses.length > statusByBranch.size) {
|
|
300
|
-
cleanupStatuses.forEach((status) => {
|
|
301
|
-
if (!statusByBranch.has(status.branch)) {
|
|
302
|
-
applyProgress(status);
|
|
303
|
-
}
|
|
304
|
-
});
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
catch (err) {
|
|
308
|
-
if (requestId !== cleanupSafetyRequestId) {
|
|
309
|
-
return;
|
|
310
|
-
}
|
|
311
|
-
logger.warn({ err }, "Failed to refresh cleanup safety indicators");
|
|
312
|
-
const empty = new Map();
|
|
313
|
-
batch(() => {
|
|
314
|
-
setCleanupStatusByBranch(empty);
|
|
315
|
-
setBranchItems((items) => applyCleanupStatus(items, empty));
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
finally {
|
|
319
|
-
if (requestId === cleanupSafetyRequestId) {
|
|
320
|
-
setCleanupSafetyLoading(false);
|
|
321
|
-
setCleanupSafetyPending(new Set());
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
};
|
|
325
|
-
let logNotificationTimer = null;
|
|
326
|
-
let logTailTimer = null;
|
|
327
|
-
let branchFooterTimer = null;
|
|
328
|
-
const BRANCH_LOAD_TIMEOUT_MS = 3000;
|
|
329
|
-
const BRANCH_FULL_LOAD_TIMEOUT_MS = 8000;
|
|
330
|
-
const isHelpKey = (key) => {
|
|
331
|
-
if (key.ctrl || key.meta || key.super || key.hyper || key.option) {
|
|
332
|
-
return false;
|
|
333
|
-
}
|
|
334
|
-
return key.name === "h" || key.sequence === "h" || key.sequence === "?";
|
|
335
|
-
};
|
|
336
|
-
useKeyboard((key) => {
|
|
337
|
-
if (key.repeated) {
|
|
338
|
-
return;
|
|
339
|
-
}
|
|
340
|
-
if (helpVisible()) {
|
|
341
|
-
if (key.name === "escape" || isHelpKey(key)) {
|
|
342
|
-
setHelpVisible(false);
|
|
343
|
-
}
|
|
344
|
-
return;
|
|
345
|
-
}
|
|
346
|
-
if (isHelpKey(key)) {
|
|
347
|
-
setHelpVisible(true);
|
|
348
|
-
}
|
|
349
|
-
});
|
|
350
|
-
const navigateTo = (screen) => {
|
|
351
|
-
setScreenStack((prev) => [...prev, currentScreen()]);
|
|
352
|
-
setCurrentScreen(screen);
|
|
353
|
-
};
|
|
354
|
-
const goBack = () => {
|
|
355
|
-
const stack = screenStack();
|
|
356
|
-
if (stack.length === 0) {
|
|
357
|
-
return;
|
|
358
|
-
}
|
|
359
|
-
const previous = stack[stack.length - 1] ?? DEFAULT_SCREEN;
|
|
360
|
-
setScreenStack(stack.slice(0, -1));
|
|
361
|
-
// branch-list に戻る場合は選択状態をリセット
|
|
362
|
-
if (previous === "branch-list") {
|
|
363
|
-
setSelectedBranch(null);
|
|
364
|
-
setSelectedTool(null);
|
|
365
|
-
setSelectedMode("normal");
|
|
366
|
-
setIsNewBranch(false);
|
|
367
|
-
setNewBranchBaseRef(null);
|
|
368
|
-
setCreationSource(null);
|
|
369
|
-
}
|
|
370
|
-
setCurrentScreen(previous);
|
|
371
|
-
};
|
|
372
|
-
const openProfileError = (err, hint) => {
|
|
373
|
-
setProfileActionError(err instanceof Error ? err : new Error(String(err)));
|
|
374
|
-
setProfileActionHint(hint);
|
|
375
|
-
navigateTo("profile-error");
|
|
376
|
-
};
|
|
377
|
-
const showLogNotification = (message, tone) => {
|
|
378
|
-
setLogNotification({ message, tone });
|
|
379
|
-
if (logNotificationTimer) {
|
|
380
|
-
clearTimeout(logNotificationTimer);
|
|
381
|
-
}
|
|
382
|
-
logNotificationTimer = setTimeout(() => {
|
|
383
|
-
setLogNotification(null);
|
|
384
|
-
}, 2000);
|
|
385
|
-
};
|
|
386
|
-
const loadLogEntries = async (date) => {
|
|
387
|
-
const targetDate = date ?? getTodayLogDate();
|
|
388
|
-
setLogLoading(true);
|
|
389
|
-
setLogError(null);
|
|
390
|
-
try {
|
|
391
|
-
const primaryTarget = logPrimaryTarget();
|
|
392
|
-
const fallbackTarget = logFallbackTarget();
|
|
393
|
-
const target = await selectLogTargetByRecency(primaryTarget, fallbackTarget);
|
|
394
|
-
setLogEffectiveTarget(target);
|
|
395
|
-
if (!target.logDir) {
|
|
396
|
-
setLogEntries([]);
|
|
397
|
-
setLogSelectedDate(targetDate);
|
|
398
|
-
return;
|
|
399
|
-
}
|
|
400
|
-
const result = await readLogLinesForDate(target.logDir, targetDate);
|
|
401
|
-
if (!result) {
|
|
402
|
-
setLogEntries([]);
|
|
403
|
-
setLogSelectedDate(targetDate);
|
|
404
|
-
return;
|
|
405
|
-
}
|
|
406
|
-
setLogSelectedDate(result.date);
|
|
407
|
-
const parsed = parseLogLines(result.lines, { limit: 100 });
|
|
408
|
-
setLogEntries(parsed);
|
|
409
|
-
}
|
|
410
|
-
catch (err) {
|
|
411
|
-
setLogEntries([]);
|
|
412
|
-
setLogError(err instanceof Error ? err.message : "Failed to load logs");
|
|
413
|
-
}
|
|
414
|
-
finally {
|
|
415
|
-
setLogLoading(false);
|
|
416
|
-
}
|
|
417
|
-
};
|
|
418
|
-
const clearLogTailTimer = () => {
|
|
419
|
-
if (logTailTimer) {
|
|
420
|
-
clearInterval(logTailTimer);
|
|
421
|
-
logTailTimer = null;
|
|
422
|
-
}
|
|
423
|
-
};
|
|
424
|
-
const toggleLogTail = () => {
|
|
425
|
-
setLogTailEnabled((prev) => !prev);
|
|
426
|
-
};
|
|
427
|
-
const resetLogFiles = async () => {
|
|
428
|
-
const target = logActiveTarget();
|
|
429
|
-
if (!target.logDir) {
|
|
430
|
-
showLogNotification("No logs available.", "error");
|
|
431
|
-
return;
|
|
432
|
-
}
|
|
433
|
-
try {
|
|
434
|
-
const cleared = await clearLogFiles(target.logDir);
|
|
435
|
-
if (cleared === 0) {
|
|
436
|
-
showLogNotification("No logs to reset.", "error");
|
|
437
|
-
}
|
|
438
|
-
else {
|
|
439
|
-
showLogNotification("Logs cleared.", "success");
|
|
440
|
-
}
|
|
441
|
-
await loadLogEntries(logSelectedDate());
|
|
442
|
-
}
|
|
443
|
-
catch (err) {
|
|
444
|
-
logger.warn({ err }, "Failed to clear log files");
|
|
445
|
-
showLogNotification("Failed to reset logs.", "error");
|
|
446
|
-
}
|
|
447
|
-
};
|
|
448
|
-
const refreshBranches = async () => {
|
|
449
|
-
setLoading(true);
|
|
450
|
-
setError(null);
|
|
451
|
-
try {
|
|
452
|
-
const repoRoot = await getRepositoryRoot();
|
|
453
|
-
const worktreesPromise = listAdditionalWorktrees();
|
|
454
|
-
const localBranchesPromise = getLocalBranches(repoRoot);
|
|
455
|
-
const currentBranchPromise = getCurrentBranch(repoRoot);
|
|
456
|
-
const lastToolUsagePromise = getLastToolUsageMap(repoRoot);
|
|
457
|
-
const [localBranches, currentBranch, worktrees, lastToolUsageMap] = await Promise.all([
|
|
458
|
-
withTimeout(localBranchesPromise, BRANCH_LOAD_TIMEOUT_MS).catch(() => []),
|
|
459
|
-
withTimeout(currentBranchPromise, BRANCH_LOAD_TIMEOUT_MS).catch(() => null),
|
|
460
|
-
withTimeout(worktreesPromise, BRANCH_LOAD_TIMEOUT_MS).catch(() => []),
|
|
461
|
-
withTimeout(lastToolUsagePromise, BRANCH_LOAD_TIMEOUT_MS).catch(() => new Map()),
|
|
462
|
-
]);
|
|
463
|
-
if (currentBranch) {
|
|
464
|
-
localBranches.forEach((branch) => {
|
|
465
|
-
if (branch.name === currentBranch) {
|
|
466
|
-
branch.isCurrent = true;
|
|
467
|
-
}
|
|
468
|
-
});
|
|
469
|
-
}
|
|
470
|
-
const initial = buildBranchList(localBranches, worktrees, lastToolUsageMap);
|
|
471
|
-
const initialItems = applyCleanupStatus(initial.items, cleanupStatusByBranch());
|
|
472
|
-
setBranchItems(initialItems);
|
|
473
|
-
setStats(buildStats(initialItems));
|
|
474
|
-
void refreshCleanupSafety();
|
|
475
|
-
void (async () => {
|
|
476
|
-
// Fetch remote updates with --prune to remove stale tracking refs
|
|
477
|
-
await withTimeout(fetchAllRemotes({ cwd: repoRoot }), BRANCH_FULL_LOAD_TIMEOUT_MS).catch(() => {
|
|
478
|
-
// Ignore fetch errors (e.g., network issues)
|
|
479
|
-
});
|
|
480
|
-
const [branches, latestWorktrees] = await Promise.all([
|
|
481
|
-
withTimeout(getAllBranches(repoRoot), BRANCH_FULL_LOAD_TIMEOUT_MS).catch(() => localBranches),
|
|
482
|
-
withTimeout(listAdditionalWorktrees(), BRANCH_FULL_LOAD_TIMEOUT_MS).catch(() => worktrees),
|
|
483
|
-
]);
|
|
484
|
-
const full = buildBranchList(branches, latestWorktrees, lastToolUsageMap);
|
|
485
|
-
const fullItems = applyCleanupStatus(full.items, cleanupStatusByBranch());
|
|
486
|
-
setBranchItems(fullItems);
|
|
487
|
-
setStats(buildStats(fullItems));
|
|
488
|
-
})();
|
|
489
|
-
}
|
|
490
|
-
catch (err) {
|
|
491
|
-
setError(err instanceof Error ? err : new Error(String(err)));
|
|
492
|
-
}
|
|
493
|
-
finally {
|
|
494
|
-
setLoading(false);
|
|
495
|
-
}
|
|
496
|
-
};
|
|
497
|
-
const refreshProfiles = async () => {
|
|
498
|
-
try {
|
|
499
|
-
const config = await loadProfiles();
|
|
500
|
-
setProfilesConfig(config);
|
|
501
|
-
const items = Object.entries(config.profiles ?? {}).map(([name, profile]) => ({
|
|
502
|
-
name,
|
|
503
|
-
displayName: profile.displayName,
|
|
504
|
-
isActive: config.activeProfile === name,
|
|
505
|
-
}));
|
|
506
|
-
items.sort((a, b) => a.name.localeCompare(b.name));
|
|
507
|
-
setProfileItems(items);
|
|
508
|
-
setActiveProfileName(config.activeProfile ?? null);
|
|
509
|
-
setProfileError(null);
|
|
510
|
-
}
|
|
511
|
-
catch (err) {
|
|
512
|
-
setProfilesConfig(null);
|
|
513
|
-
setProfileItems([]);
|
|
514
|
-
setActiveProfileName(null);
|
|
515
|
-
setProfileError(err instanceof Error ? err : new Error(String(err)));
|
|
516
|
-
}
|
|
517
|
-
};
|
|
518
|
-
createEffect(() => {
|
|
519
|
-
if (props.branches) {
|
|
520
|
-
const statusByBranch = cleanupStatusByBranch();
|
|
521
|
-
const nextItems = applyCleanupStatus(props.branches, statusByBranch);
|
|
522
|
-
setBranchItems(nextItems);
|
|
523
|
-
setStats(props.stats ?? buildStats(nextItems));
|
|
524
|
-
setLoading(false);
|
|
525
|
-
}
|
|
526
|
-
});
|
|
527
|
-
onMount(() => {
|
|
528
|
-
if (!props.branches) {
|
|
529
|
-
void refreshBranches();
|
|
530
|
-
}
|
|
531
|
-
});
|
|
532
|
-
onMount(() => {
|
|
533
|
-
if (props.branches) {
|
|
534
|
-
void refreshCleanupSafety();
|
|
535
|
-
}
|
|
536
|
-
});
|
|
537
|
-
onMount(() => {
|
|
538
|
-
if (props.version === undefined) {
|
|
539
|
-
void getPackageVersion()
|
|
540
|
-
.then((value) => setVersion(value ?? null))
|
|
541
|
-
.catch(() => setVersion(null));
|
|
542
|
-
}
|
|
543
|
-
});
|
|
544
|
-
onMount(() => {
|
|
545
|
-
void refreshProfiles();
|
|
546
|
-
});
|
|
547
|
-
onMount(() => {
|
|
548
|
-
void getConfig()
|
|
549
|
-
.then((config) => setDefaultBaseBranch(config.defaultBaseBranch))
|
|
550
|
-
.catch(() => setDefaultBaseBranch("main"));
|
|
551
|
-
});
|
|
552
|
-
// セッション履歴をロード(最終使用エージェントなど)
|
|
553
|
-
onMount(() => {
|
|
554
|
-
void getRepositoryRoot()
|
|
555
|
-
.then((repoRoot) => loadSession(repoRoot))
|
|
556
|
-
.then((session) => {
|
|
557
|
-
if (session?.history) {
|
|
558
|
-
setSessionHistory(session.history);
|
|
559
|
-
}
|
|
560
|
-
})
|
|
561
|
-
.catch(() => setSessionHistory([]));
|
|
562
|
-
});
|
|
563
|
-
onMount(() => {
|
|
564
|
-
void getAllCodingAgents()
|
|
565
|
-
.then((agents) => {
|
|
566
|
-
setToolItems(agents.map((agent) => ({
|
|
567
|
-
label: agent.displayName,
|
|
568
|
-
value: agent.id,
|
|
569
|
-
})));
|
|
570
|
-
})
|
|
571
|
-
.catch((err) => {
|
|
572
|
-
setToolItems([]);
|
|
573
|
-
setToolError(err instanceof Error ? err : new Error(String(err)));
|
|
574
|
-
});
|
|
575
|
-
});
|
|
576
|
-
// FR-028: Prefetch npm versions for all bunx-type agents at startup (background)
|
|
577
|
-
onMount(() => {
|
|
578
|
-
const bunxAgentIds = getBunxAgentIds();
|
|
579
|
-
void prefetchAgentVersions(bunxAgentIds).catch(() => {
|
|
580
|
-
// Silently handle errors - cache will return null and UI will show "latest" only
|
|
581
|
-
});
|
|
582
|
-
// FR-017: Prefetch installed versions for all builtin agents at startup
|
|
583
|
-
void prefetchInstalledVersions(bunxAgentIds).catch(() => {
|
|
584
|
-
// Silently handle errors - cache will return null and UI won't show "installed"
|
|
585
|
-
});
|
|
586
|
-
});
|
|
587
|
-
createEffect(() => {
|
|
588
|
-
if (currentScreen() === "log-list") {
|
|
589
|
-
logPrimaryTarget();
|
|
590
|
-
void loadLogEntries(logSelectedDate());
|
|
591
|
-
}
|
|
592
|
-
});
|
|
593
|
-
createEffect(() => {
|
|
594
|
-
if (currentScreen() !== "log-list" || !logTailEnabled()) {
|
|
595
|
-
clearLogTailTimer();
|
|
596
|
-
return;
|
|
597
|
-
}
|
|
598
|
-
clearLogTailTimer();
|
|
599
|
-
logTailTimer = setInterval(() => {
|
|
600
|
-
void loadLogEntries(logSelectedDate());
|
|
601
|
-
}, 1500);
|
|
602
|
-
});
|
|
603
|
-
onCleanup(() => {
|
|
604
|
-
if (logNotificationTimer) {
|
|
605
|
-
clearTimeout(logNotificationTimer);
|
|
606
|
-
}
|
|
607
|
-
clearLogTailTimer();
|
|
608
|
-
if (branchFooterTimer) {
|
|
609
|
-
clearTimeout(branchFooterTimer);
|
|
610
|
-
}
|
|
611
|
-
});
|
|
612
|
-
const showBranchFooterMessage = (text, color, options) => {
|
|
613
|
-
if (branchFooterTimer) {
|
|
614
|
-
clearTimeout(branchFooterTimer);
|
|
615
|
-
branchFooterTimer = null;
|
|
616
|
-
}
|
|
617
|
-
setBranchFooterMessage({
|
|
618
|
-
text,
|
|
619
|
-
color,
|
|
620
|
-
...(options?.spinning ? { isSpinning: true } : {}),
|
|
621
|
-
});
|
|
622
|
-
const timeout = options?.timeoutMs ?? 2000;
|
|
623
|
-
if (timeout > 0) {
|
|
624
|
-
branchFooterTimer = setTimeout(() => {
|
|
625
|
-
setBranchFooterMessage(null);
|
|
626
|
-
}, timeout);
|
|
627
|
-
}
|
|
628
|
-
};
|
|
629
|
-
const setCleanupIndicator = (branchName, indicator) => {
|
|
630
|
-
setCleanupIndicators((prev) => {
|
|
631
|
-
const next = { ...prev };
|
|
632
|
-
if (indicator) {
|
|
633
|
-
next[branchName] = indicator;
|
|
634
|
-
}
|
|
635
|
-
else {
|
|
636
|
-
delete next[branchName];
|
|
637
|
-
}
|
|
638
|
-
return next;
|
|
639
|
-
});
|
|
640
|
-
};
|
|
641
|
-
const handleBranchSelect = (branch) => {
|
|
642
|
-
setSelectedBranch(toSelectedBranchState(branch));
|
|
643
|
-
setIsNewBranch(false);
|
|
644
|
-
setNewBranchBaseRef(null);
|
|
645
|
-
setCreationSource(null);
|
|
646
|
-
setSelectedTool(null);
|
|
647
|
-
setSelectedMode("normal");
|
|
648
|
-
// FR-044: ウィザードポップアップをレイヤー表示
|
|
649
|
-
setWizardVisible(true);
|
|
650
|
-
};
|
|
651
|
-
const handleQuickCreate = (branch) => {
|
|
652
|
-
// 選択中のブランチをベースにウィザードを開始
|
|
653
|
-
if (branch) {
|
|
654
|
-
setSelectedBranch(toSelectedBranchState(branch));
|
|
655
|
-
}
|
|
656
|
-
setCreationSource(branch ? toSelectedBranchState(branch) : null);
|
|
657
|
-
setCreateBranchName("");
|
|
658
|
-
setSuppressCreateKey("n");
|
|
659
|
-
// FR-044: ウィザードポップアップをレイヤー表示(アクション選択から開始)
|
|
660
|
-
setWizardVisible(true);
|
|
661
|
-
};
|
|
662
|
-
// FR-049: Escapeキーでウィザードをキャンセル
|
|
663
|
-
const handleWizardClose = () => {
|
|
664
|
-
setWizardVisible(false);
|
|
665
|
-
};
|
|
666
|
-
// ウィザード完了時の処理
|
|
667
|
-
const handleWizardComplete = (result) => {
|
|
668
|
-
setWizardVisible(false);
|
|
669
|
-
const branch = selectedBranch();
|
|
670
|
-
if (!branch) {
|
|
671
|
-
return;
|
|
672
|
-
}
|
|
673
|
-
// 新規ブランチ作成の場合、ブランチ名を設定
|
|
674
|
-
const isCreatingNew = result.isNewBranch ?? false;
|
|
675
|
-
const finalBranchName = result.branchName
|
|
676
|
-
? `${result.branchType ?? ""}${result.branchName}`
|
|
677
|
-
: branch.name;
|
|
678
|
-
// 新規作成時は選択中のブランチがベースとなる
|
|
679
|
-
const baseBranchRef = isCreatingNew ? branch.name : null;
|
|
680
|
-
const normalizedModel = normalizeModelId(result.tool, result.model);
|
|
681
|
-
exitApp({
|
|
682
|
-
branch: finalBranchName,
|
|
683
|
-
displayName: branch.displayName,
|
|
684
|
-
branchType: branch.branchType,
|
|
685
|
-
...(branch.remoteBranch ? { remoteBranch: branch.remoteBranch } : {}),
|
|
686
|
-
...(isCreatingNew
|
|
687
|
-
? {
|
|
688
|
-
isNewBranch: true,
|
|
689
|
-
...(baseBranchRef ? { baseBranch: baseBranchRef } : {}),
|
|
690
|
-
}
|
|
691
|
-
: {}),
|
|
692
|
-
tool: result.tool,
|
|
693
|
-
mode: result.mode,
|
|
694
|
-
skipPermissions: result.skipPermissions,
|
|
695
|
-
...(normalizedModel !== undefined ? { model: normalizedModel } : {}),
|
|
696
|
-
...(result.reasoningLevel !== undefined
|
|
697
|
-
? { inferenceLevel: result.reasoningLevel }
|
|
698
|
-
: {}),
|
|
699
|
-
...(result.toolVersion !== undefined
|
|
700
|
-
? { toolVersion: result.toolVersion }
|
|
701
|
-
: {}),
|
|
702
|
-
});
|
|
703
|
-
};
|
|
704
|
-
// FR-010: クイックスタートからのResume(前回設定で続きから)
|
|
705
|
-
const handleWizardResume = (entry) => {
|
|
706
|
-
if (!entry.sessionId) {
|
|
707
|
-
handleWizardStartNew(entry);
|
|
708
|
-
return;
|
|
709
|
-
}
|
|
710
|
-
setWizardVisible(false);
|
|
711
|
-
const branch = selectedBranch();
|
|
712
|
-
if (!branch) {
|
|
713
|
-
return;
|
|
714
|
-
}
|
|
715
|
-
const normalizedModel = normalizeModelId(entry.toolId, entry.model ?? undefined);
|
|
716
|
-
exitApp({
|
|
717
|
-
branch: branch.name,
|
|
718
|
-
displayName: branch.displayName,
|
|
719
|
-
branchType: branch.branchType,
|
|
720
|
-
...(branch.remoteBranch ? { remoteBranch: branch.remoteBranch } : {}),
|
|
721
|
-
tool: entry.toolId,
|
|
722
|
-
mode: "continue",
|
|
723
|
-
skipPermissions: entry.skipPermissions ?? false,
|
|
724
|
-
...(normalizedModel !== undefined ? { model: normalizedModel } : {}),
|
|
725
|
-
...(entry.reasoningLevel
|
|
726
|
-
? { inferenceLevel: entry.reasoningLevel }
|
|
727
|
-
: {}),
|
|
728
|
-
...(entry.sessionId ? { sessionId: entry.sessionId } : {}),
|
|
729
|
-
...(entry.toolVersion !== undefined
|
|
730
|
-
? { toolVersion: entry.toolVersion }
|
|
731
|
-
: {}),
|
|
732
|
-
});
|
|
733
|
-
};
|
|
734
|
-
// FR-010: クイックスタートからのStartNew(前回設定で新規)
|
|
735
|
-
const handleWizardStartNew = (entry) => {
|
|
736
|
-
setWizardVisible(false);
|
|
737
|
-
const branch = selectedBranch();
|
|
738
|
-
if (!branch) {
|
|
739
|
-
return;
|
|
740
|
-
}
|
|
741
|
-
const normalizedModel = normalizeModelId(entry.toolId, entry.model ?? undefined);
|
|
742
|
-
exitApp({
|
|
743
|
-
branch: branch.name,
|
|
744
|
-
displayName: branch.displayName,
|
|
745
|
-
branchType: branch.branchType,
|
|
746
|
-
...(branch.remoteBranch ? { remoteBranch: branch.remoteBranch } : {}),
|
|
747
|
-
tool: entry.toolId,
|
|
748
|
-
mode: "normal",
|
|
749
|
-
skipPermissions: entry.skipPermissions ?? false,
|
|
750
|
-
...(normalizedModel !== undefined ? { model: normalizedModel } : {}),
|
|
751
|
-
...(entry.reasoningLevel
|
|
752
|
-
? { inferenceLevel: entry.reasoningLevel }
|
|
753
|
-
: {}),
|
|
754
|
-
...(entry.toolVersion !== undefined
|
|
755
|
-
? { toolVersion: entry.toolVersion }
|
|
756
|
-
: {}),
|
|
757
|
-
});
|
|
758
|
-
};
|
|
759
|
-
const buildSkipNotice = (skip, unsafeLabel) => {
|
|
760
|
-
const parts = [];
|
|
761
|
-
if (skip.unsafe > 0) {
|
|
762
|
-
parts.push(`${skip.unsafe} ${unsafeLabel}`);
|
|
763
|
-
}
|
|
764
|
-
if (skip.protected > 0) {
|
|
765
|
-
parts.push(`${skip.protected} protected`);
|
|
766
|
-
}
|
|
767
|
-
if (skip.remote > 0) {
|
|
768
|
-
parts.push(`${skip.remote} remote-only`);
|
|
769
|
-
}
|
|
770
|
-
if (skip.current > 0) {
|
|
771
|
-
parts.push(`${skip.current} current`);
|
|
772
|
-
}
|
|
773
|
-
if (parts.length === 0) {
|
|
774
|
-
return null;
|
|
775
|
-
}
|
|
776
|
-
return `Skipped branches: ${parts.join(", ")}.`;
|
|
777
|
-
};
|
|
778
|
-
const handleCleanupCommand = async () => {
|
|
779
|
-
if (branchInputLocked()) {
|
|
780
|
-
return;
|
|
781
|
-
}
|
|
782
|
-
const selection = selectedBranches();
|
|
783
|
-
const hasSelection = selection.length > 0;
|
|
784
|
-
const skipCounts = {
|
|
785
|
-
unsafe: 0,
|
|
786
|
-
protected: 0,
|
|
787
|
-
remote: 0,
|
|
788
|
-
current: 0,
|
|
789
|
-
};
|
|
790
|
-
setBranchInputLocked(true);
|
|
791
|
-
setCleanupIndicators({});
|
|
792
|
-
showBranchFooterMessage(hasSelection
|
|
793
|
-
? "Preparing cleanup..."
|
|
794
|
-
: "Scanning for cleanup candidates...", "yellow", { spinning: true, timeoutMs: 0 });
|
|
795
|
-
try {
|
|
796
|
-
const tasks = [];
|
|
797
|
-
if (hasSelection) {
|
|
798
|
-
const branchMap = new Map(branchItems().map((branch) => [branch.name, branch]));
|
|
799
|
-
for (const branchName of selection) {
|
|
800
|
-
const branch = branchMap.get(branchName);
|
|
801
|
-
if (!branch) {
|
|
802
|
-
continue;
|
|
803
|
-
}
|
|
804
|
-
if (branch.type === "remote") {
|
|
805
|
-
skipCounts.remote += 1;
|
|
806
|
-
continue;
|
|
807
|
-
}
|
|
808
|
-
if (branch.isCurrent) {
|
|
809
|
-
skipCounts.current += 1;
|
|
810
|
-
continue;
|
|
811
|
-
}
|
|
812
|
-
const worktreePath = branch.worktree?.path ?? null;
|
|
813
|
-
const cleanupType = worktreePath
|
|
814
|
-
? "worktree-and-branch"
|
|
815
|
-
: "branch-only";
|
|
816
|
-
const baseTask = {
|
|
817
|
-
branch: branch.name,
|
|
818
|
-
worktreePath,
|
|
819
|
-
cleanupType,
|
|
820
|
-
};
|
|
821
|
-
const isAccessible = branch.worktree?.isAccessible;
|
|
822
|
-
tasks.push(isAccessible === undefined
|
|
823
|
-
? baseTask
|
|
824
|
-
: { ...baseTask, isAccessible });
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
else {
|
|
828
|
-
// FR-028: 選択が0件の場合は警告を表示して処理をスキップ
|
|
829
|
-
setBranchInputLocked(false);
|
|
830
|
-
showBranchFooterMessage("No branches selected.", "yellow");
|
|
831
|
-
return;
|
|
832
|
-
}
|
|
833
|
-
const skipNotice = buildSkipNotice(skipCounts, hasSelection
|
|
834
|
-
? "unsafe (uncommitted/unpushed, unmerged, or missing upstream)"
|
|
835
|
-
: "with uncommitted or unpushed changes");
|
|
836
|
-
if (tasks.length === 0) {
|
|
837
|
-
const baseMessage = hasSelection
|
|
838
|
-
? "No eligible branches selected for cleanup."
|
|
839
|
-
: "No cleanup candidates found.";
|
|
840
|
-
showBranchFooterMessage(skipNotice ? `${baseMessage} ${skipNotice}` : baseMessage, "yellow");
|
|
841
|
-
return;
|
|
842
|
-
}
|
|
843
|
-
setCleanupIndicators(() => {
|
|
844
|
-
const next = {};
|
|
845
|
-
tasks.forEach((task) => {
|
|
846
|
-
next[task.branch] = {
|
|
847
|
-
icon: "-",
|
|
848
|
-
isSpinning: true,
|
|
849
|
-
color: "yellow",
|
|
850
|
-
};
|
|
851
|
-
});
|
|
852
|
-
return next;
|
|
853
|
-
});
|
|
854
|
-
showBranchFooterMessage(`Cleaning up ${tasks.length} branch(es)...`, "yellow", { spinning: true, timeoutMs: 0 });
|
|
855
|
-
let successCount = 0;
|
|
856
|
-
let failedCount = 0;
|
|
857
|
-
for (const task of tasks) {
|
|
858
|
-
try {
|
|
859
|
-
if (task.cleanupType === "worktree-and-branch" && task.worktreePath) {
|
|
860
|
-
await removeWorktree(task.worktreePath, task.isAccessible === false);
|
|
861
|
-
}
|
|
862
|
-
await deleteBranch(task.branch, true);
|
|
863
|
-
setCleanupIndicator(task.branch, { icon: "v", color: "green" });
|
|
864
|
-
successCount += 1;
|
|
865
|
-
}
|
|
866
|
-
catch {
|
|
867
|
-
setCleanupIndicator(task.branch, { icon: "x", color: "red" });
|
|
868
|
-
failedCount += 1;
|
|
869
|
-
}
|
|
870
|
-
}
|
|
871
|
-
setSelectedBranches([]);
|
|
872
|
-
await refreshBranches();
|
|
873
|
-
const skippedTotal = skipCounts.unsafe +
|
|
874
|
-
skipCounts.protected +
|
|
875
|
-
skipCounts.remote +
|
|
876
|
-
skipCounts.current;
|
|
877
|
-
const summaryParts = [`${successCount} cleaned`];
|
|
878
|
-
if (failedCount > 0) {
|
|
879
|
-
summaryParts.push(`${failedCount} failed`);
|
|
880
|
-
}
|
|
881
|
-
if (skippedTotal > 0) {
|
|
882
|
-
summaryParts.push(`${skippedTotal} skipped`);
|
|
883
|
-
}
|
|
884
|
-
const summary = `Cleanup finished: ${summaryParts.join(", ")}.`;
|
|
885
|
-
const message = skipNotice ? `${summary} ${skipNotice}` : summary;
|
|
886
|
-
showBranchFooterMessage(message, failedCount > 0 ? "red" : "green");
|
|
887
|
-
}
|
|
888
|
-
catch (err) {
|
|
889
|
-
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
890
|
-
showBranchFooterMessage(`Cleanup failed: ${errorMessage}`, "red");
|
|
891
|
-
}
|
|
892
|
-
finally {
|
|
893
|
-
setBranchInputLocked(false);
|
|
894
|
-
}
|
|
895
|
-
};
|
|
896
|
-
const handleRepairWorktrees = async () => {
|
|
897
|
-
if (branchInputLocked()) {
|
|
898
|
-
return;
|
|
899
|
-
}
|
|
900
|
-
// FR-002/FR-007: 選択済みブランチのみを対象とする
|
|
901
|
-
const selection = selectedBranches();
|
|
902
|
-
if (selection.length === 0) {
|
|
903
|
-
showBranchFooterMessage("No branches selected.", "yellow");
|
|
904
|
-
return;
|
|
905
|
-
}
|
|
906
|
-
// 選択されたローカルブランチのうち、Worktreeを持つものを修復対象とする
|
|
907
|
-
const selectionSet = new Set(selection);
|
|
908
|
-
const targets = branchItems()
|
|
909
|
-
.filter((branch) => selectionSet.has(branch.name) &&
|
|
910
|
-
branch.type !== "remote" &&
|
|
911
|
-
branch.worktreeStatus !== undefined)
|
|
912
|
-
.map((branch) => branch.name);
|
|
913
|
-
if (targets.length === 0) {
|
|
914
|
-
showBranchFooterMessage("No worktrees to repair.", "yellow");
|
|
915
|
-
return;
|
|
916
|
-
}
|
|
917
|
-
setBranchInputLocked(true);
|
|
918
|
-
showBranchFooterMessage("Repairing worktrees...", "yellow", {
|
|
919
|
-
spinning: true,
|
|
920
|
-
timeoutMs: 0,
|
|
921
|
-
});
|
|
922
|
-
try {
|
|
923
|
-
const result = await repairWorktrees(targets);
|
|
924
|
-
await refreshBranches();
|
|
925
|
-
// エラー詳細をログに出力
|
|
926
|
-
if (result.failedCount > 0) {
|
|
927
|
-
logger.error({ failures: result.failures, targets }, "Worktree repair failed for some branches");
|
|
928
|
-
}
|
|
929
|
-
const message = result.failedCount > 0
|
|
930
|
-
? `Repair finished: ${result.repairedCount} repaired, ${result.failedCount} failed.`
|
|
931
|
-
: result.repairedCount > 0
|
|
932
|
-
? `Repaired ${result.repairedCount} worktree(s).`
|
|
933
|
-
: "No worktrees repaired.";
|
|
934
|
-
showBranchFooterMessage(message, result.failedCount > 0 ? "red" : "green");
|
|
935
|
-
}
|
|
936
|
-
catch (err) {
|
|
937
|
-
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
938
|
-
logger.error({ error: err, targets }, "Worktree repair threw an error");
|
|
939
|
-
showBranchFooterMessage(`Repair failed: ${errorMessage}`, "red");
|
|
940
|
-
}
|
|
941
|
-
finally {
|
|
942
|
-
setBranchInputLocked(false);
|
|
943
|
-
}
|
|
944
|
-
};
|
|
945
|
-
const openProfileCreate = () => {
|
|
946
|
-
setProfileInputMode("create-profile");
|
|
947
|
-
setProfileInputValue("");
|
|
948
|
-
setProfileEnvKey(null);
|
|
949
|
-
setProfileInputSuppressKey("n");
|
|
950
|
-
navigateTo("profile-input");
|
|
951
|
-
};
|
|
952
|
-
const openProfileDelete = (profile) => {
|
|
953
|
-
setSelectedProfileName(profile.name);
|
|
954
|
-
setProfileConfirmMode("delete-profile");
|
|
955
|
-
navigateTo("profile-confirm");
|
|
956
|
-
};
|
|
957
|
-
const openProfileEnv = (profile) => {
|
|
958
|
-
setSelectedProfileName(profile.name);
|
|
959
|
-
navigateTo("profile-env");
|
|
960
|
-
};
|
|
961
|
-
const openProfileEnvAdd = () => {
|
|
962
|
-
setProfileInputMode("add-env");
|
|
963
|
-
setProfileInputValue("");
|
|
964
|
-
setProfileEnvKey(null);
|
|
965
|
-
setProfileInputSuppressKey("a");
|
|
966
|
-
navigateTo("profile-input");
|
|
967
|
-
};
|
|
968
|
-
const openProfileEnvEdit = (variable) => {
|
|
969
|
-
setProfileInputMode("edit-env");
|
|
970
|
-
setProfileEnvKey(variable.key);
|
|
971
|
-
setProfileInputValue(variable.value);
|
|
972
|
-
setProfileInputSuppressKey("e");
|
|
973
|
-
navigateTo("profile-input");
|
|
974
|
-
};
|
|
975
|
-
const openProfileEnvDelete = (variable) => {
|
|
976
|
-
setProfileConfirmMode("delete-env");
|
|
977
|
-
setProfileEnvKey(variable.key);
|
|
978
|
-
navigateTo("profile-confirm");
|
|
979
|
-
};
|
|
980
|
-
const handleProfileInputChange = (value) => {
|
|
981
|
-
const suppressKey = profileInputSuppressKey();
|
|
982
|
-
if (suppressKey && profileInputValue() === "" && value === suppressKey) {
|
|
983
|
-
setProfileInputSuppressKey(null);
|
|
984
|
-
setProfileInputValue("");
|
|
985
|
-
return;
|
|
986
|
-
}
|
|
987
|
-
setProfileInputSuppressKey(null);
|
|
988
|
-
setProfileInputValue(value);
|
|
989
|
-
};
|
|
990
|
-
const submitProfileInput = async (value) => {
|
|
991
|
-
const mode = profileInputMode();
|
|
992
|
-
const trimmed = value.trim();
|
|
993
|
-
if (mode === "create-profile") {
|
|
994
|
-
if (!trimmed) {
|
|
995
|
-
openProfileError(new Error("Profile name is required."), "Invalid name.");
|
|
996
|
-
return;
|
|
997
|
-
}
|
|
998
|
-
if (!isValidProfileName(trimmed)) {
|
|
999
|
-
openProfileError(new Error(`Invalid profile name: "${trimmed}".`), "Profile names must use lowercase letters, numbers, and hyphens.");
|
|
1000
|
-
return;
|
|
1001
|
-
}
|
|
1002
|
-
try {
|
|
1003
|
-
await createProfile(trimmed, { displayName: trimmed, env: {} });
|
|
1004
|
-
await refreshProfiles();
|
|
1005
|
-
setSelectedProfileName(trimmed);
|
|
1006
|
-
setProfileInputValue("");
|
|
1007
|
-
setProfileInputSuppressKey(null);
|
|
1008
|
-
goBack();
|
|
1009
|
-
}
|
|
1010
|
-
catch (err) {
|
|
1011
|
-
openProfileError(err, "Unable to create profile.");
|
|
1012
|
-
}
|
|
1013
|
-
return;
|
|
1014
|
-
}
|
|
1015
|
-
const entry = selectedProfileConfig();
|
|
1016
|
-
if (!entry) {
|
|
1017
|
-
openProfileError(new Error("Profile not selected."), "Profile not found.");
|
|
1018
|
-
return;
|
|
1019
|
-
}
|
|
1020
|
-
if (mode === "add-env") {
|
|
1021
|
-
const separatorIndex = trimmed.indexOf("=");
|
|
1022
|
-
if (separatorIndex <= 0) {
|
|
1023
|
-
openProfileError(new Error("Environment variable must be in KEY=VALUE format."), "Invalid environment variable.");
|
|
1024
|
-
return;
|
|
1025
|
-
}
|
|
1026
|
-
const key = trimmed.slice(0, separatorIndex).trim();
|
|
1027
|
-
const valuePart = trimmed.slice(separatorIndex + 1);
|
|
1028
|
-
if (!key) {
|
|
1029
|
-
openProfileError(new Error("Environment variable key is required."), "Invalid environment variable.");
|
|
1030
|
-
return;
|
|
1031
|
-
}
|
|
1032
|
-
const nextEnv = { ...(entry.profile.env ?? {}) };
|
|
1033
|
-
nextEnv[key] = valuePart;
|
|
1034
|
-
try {
|
|
1035
|
-
await updateProfile(entry.name, { env: nextEnv });
|
|
1036
|
-
await refreshProfiles();
|
|
1037
|
-
setProfileInputValue("");
|
|
1038
|
-
setProfileInputSuppressKey(null);
|
|
1039
|
-
goBack();
|
|
1040
|
-
}
|
|
1041
|
-
catch (err) {
|
|
1042
|
-
openProfileError(err, "Unable to update profile.");
|
|
1043
|
-
}
|
|
1044
|
-
return;
|
|
1045
|
-
}
|
|
1046
|
-
if (mode === "edit-env") {
|
|
1047
|
-
const envKey = profileEnvKey();
|
|
1048
|
-
if (!envKey) {
|
|
1049
|
-
openProfileError(new Error("Environment variable not selected."), "Select a variable to edit.");
|
|
1050
|
-
return;
|
|
1051
|
-
}
|
|
1052
|
-
const nextEnv = { ...(entry.profile.env ?? {}) };
|
|
1053
|
-
nextEnv[envKey] = value;
|
|
1054
|
-
try {
|
|
1055
|
-
await updateProfile(entry.name, { env: nextEnv });
|
|
1056
|
-
await refreshProfiles();
|
|
1057
|
-
setProfileInputValue("");
|
|
1058
|
-
setProfileInputSuppressKey(null);
|
|
1059
|
-
goBack();
|
|
1060
|
-
}
|
|
1061
|
-
catch (err) {
|
|
1062
|
-
openProfileError(err, "Unable to update profile.");
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
};
|
|
1066
|
-
const confirmProfileAction = async (confirmed) => {
|
|
1067
|
-
if (!confirmed) {
|
|
1068
|
-
goBack();
|
|
1069
|
-
return;
|
|
1070
|
-
}
|
|
1071
|
-
const mode = profileConfirmMode();
|
|
1072
|
-
const entry = selectedProfileConfig();
|
|
1073
|
-
if (mode === "delete-profile") {
|
|
1074
|
-
const name = selectedProfileName();
|
|
1075
|
-
if (!name) {
|
|
1076
|
-
openProfileError(new Error("Profile not selected."), "Profile not found.");
|
|
1077
|
-
return;
|
|
1078
|
-
}
|
|
1079
|
-
try {
|
|
1080
|
-
await deleteProfile(name);
|
|
1081
|
-
await refreshProfiles();
|
|
1082
|
-
setProfileEnvKey(null);
|
|
1083
|
-
goBack();
|
|
1084
|
-
}
|
|
1085
|
-
catch (err) {
|
|
1086
|
-
openProfileError(err, "Unable to delete profile.");
|
|
1087
|
-
}
|
|
1088
|
-
return;
|
|
1089
|
-
}
|
|
1090
|
-
if (mode === "delete-env") {
|
|
1091
|
-
if (!entry) {
|
|
1092
|
-
openProfileError(new Error("Profile not selected."), "Profile not found.");
|
|
1093
|
-
return;
|
|
1094
|
-
}
|
|
1095
|
-
const envKey = profileEnvKey();
|
|
1096
|
-
if (!envKey) {
|
|
1097
|
-
openProfileError(new Error("Environment variable not selected."), "Select a variable to delete.");
|
|
1098
|
-
return;
|
|
1099
|
-
}
|
|
1100
|
-
const nextEnv = { ...(entry.profile.env ?? {}) };
|
|
1101
|
-
delete nextEnv[envKey];
|
|
1102
|
-
try {
|
|
1103
|
-
await updateProfile(entry.name, { env: nextEnv });
|
|
1104
|
-
await refreshProfiles();
|
|
1105
|
-
setProfileEnvKey(null);
|
|
1106
|
-
goBack();
|
|
1107
|
-
}
|
|
1108
|
-
catch (err) {
|
|
1109
|
-
openProfileError(err, "Unable to update profile.");
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
};
|
|
1113
|
-
const toggleSelectedBranch = (branchName) => {
|
|
1114
|
-
if (unsafeSelectionConfirmVisible()) {
|
|
1115
|
-
return;
|
|
1116
|
-
}
|
|
1117
|
-
const currentSelection = new Set(selectedBranches());
|
|
1118
|
-
if (currentSelection.has(branchName)) {
|
|
1119
|
-
currentSelection.delete(branchName);
|
|
1120
|
-
setSelectedBranches(Array.from(currentSelection));
|
|
1121
|
-
return;
|
|
1122
|
-
}
|
|
1123
|
-
const branch = branchItems().find((item) => item.name === branchName);
|
|
1124
|
-
const pending = cleanupSafetyPending();
|
|
1125
|
-
const hasSafetyPending = pending.has(branchName);
|
|
1126
|
-
const hasUncommitted = branch?.worktree?.hasUncommittedChanges === true;
|
|
1127
|
-
const hasUnpushed = branch?.hasUnpushedCommits === true;
|
|
1128
|
-
const isUnmerged = branch?.isUnmerged === true;
|
|
1129
|
-
const safeToCleanup = branch?.safeToCleanup === true;
|
|
1130
|
-
const isRemoteBranch = branch?.type === "remote";
|
|
1131
|
-
const isUnsafe = Boolean(branch) &&
|
|
1132
|
-
!isRemoteBranch &&
|
|
1133
|
-
!hasSafetyPending &&
|
|
1134
|
-
(hasUncommitted || hasUnpushed || isUnmerged || !safeToCleanup);
|
|
1135
|
-
if (branch && hasSafetyPending) {
|
|
1136
|
-
setUnsafeSelectionTarget(branch.name);
|
|
1137
|
-
setUnsafeSelectionMessage(SAFETY_PENDING_MESSAGE);
|
|
1138
|
-
setUnsafeSelectionConfirmVisible(true);
|
|
1139
|
-
return;
|
|
1140
|
-
}
|
|
1141
|
-
if (branch && isUnsafe) {
|
|
1142
|
-
setUnsafeSelectionTarget(branch.name);
|
|
1143
|
-
setUnsafeSelectionMessage(UNSAFE_SELECTION_MESSAGE);
|
|
1144
|
-
setUnsafeSelectionConfirmVisible(true);
|
|
1145
|
-
return;
|
|
1146
|
-
}
|
|
1147
|
-
currentSelection.add(branchName);
|
|
1148
|
-
setSelectedBranches(Array.from(currentSelection));
|
|
1149
|
-
};
|
|
1150
|
-
const confirmUnsafeSelection = (confirmed) => {
|
|
1151
|
-
suppressBranchInputOnce();
|
|
1152
|
-
const target = unsafeSelectionTarget();
|
|
1153
|
-
setUnsafeSelectionConfirmVisible(false);
|
|
1154
|
-
setUnsafeSelectionTarget(null);
|
|
1155
|
-
setUnsafeSelectionMessage(UNSAFE_SELECTION_MESSAGE);
|
|
1156
|
-
if (!confirmed || !target) {
|
|
1157
|
-
return;
|
|
1158
|
-
}
|
|
1159
|
-
setSelectedBranches((prev) => prev.includes(target) ? prev : [...prev, target]);
|
|
1160
|
-
};
|
|
1161
|
-
const handleToolSelect = (item) => {
|
|
1162
|
-
setSelectedTool(item.value);
|
|
1163
|
-
navigateTo("mode-select");
|
|
1164
|
-
};
|
|
1165
|
-
const handleModeSelect = (item) => {
|
|
1166
|
-
setSelectedMode(item.value);
|
|
1167
|
-
navigateTo("skip-permissions");
|
|
1168
|
-
};
|
|
1169
|
-
const finalizeSelection = (skipPermissions) => {
|
|
1170
|
-
const branch = selectedBranch();
|
|
1171
|
-
const tool = selectedTool();
|
|
1172
|
-
if (!branch || !tool) {
|
|
1173
|
-
return;
|
|
1174
|
-
}
|
|
1175
|
-
const defaultModel = getDefaultModelOption(tool);
|
|
1176
|
-
const resolvedModel = defaultModel?.id ?? null;
|
|
1177
|
-
const normalizedModel = normalizeModelId(tool, resolvedModel);
|
|
1178
|
-
const resolvedInference = getDefaultInferenceForModel(defaultModel);
|
|
1179
|
-
const baseRef = newBranchBaseRef();
|
|
1180
|
-
exitApp({
|
|
1181
|
-
branch: branch.name,
|
|
1182
|
-
displayName: branch.displayName,
|
|
1183
|
-
branchType: branch.branchType,
|
|
1184
|
-
...(branch.remoteBranch ? { remoteBranch: branch.remoteBranch } : {}),
|
|
1185
|
-
...(isNewBranch()
|
|
1186
|
-
? {
|
|
1187
|
-
isNewBranch: true,
|
|
1188
|
-
...(baseRef ? { baseBranch: baseRef } : {}),
|
|
1189
|
-
}
|
|
1190
|
-
: {}),
|
|
1191
|
-
tool,
|
|
1192
|
-
mode: selectedMode(),
|
|
1193
|
-
skipPermissions,
|
|
1194
|
-
...(normalizedModel !== undefined ? { model: normalizedModel } : {}),
|
|
1195
|
-
...(resolvedInference !== undefined
|
|
1196
|
-
? { inferenceLevel: resolvedInference }
|
|
1197
|
-
: {}),
|
|
1198
|
-
});
|
|
1199
|
-
};
|
|
1200
|
-
const renderCurrentScreen = () => {
|
|
1201
|
-
const screen = currentScreen();
|
|
1202
|
-
if (screen === "branch-list") {
|
|
1203
|
-
const cleanupUI = {
|
|
1204
|
-
indicators: cleanupIndicators(),
|
|
1205
|
-
footerMessage: branchFooterMessage(),
|
|
1206
|
-
inputLocked: branchInputLocked() || unsafeConfirmInputLocked(),
|
|
1207
|
-
safetyLoading: cleanupSafetyLoading(),
|
|
1208
|
-
safetyPendingBranches: cleanupSafetyPending(),
|
|
1209
|
-
};
|
|
1210
|
-
return (_jsx(BranchListScreen, { branches: branchItems(), stats: stats(), onSelect: handleBranchSelect, onQuit: () => exitApp(undefined), onCleanupCommand: handleCleanupCommand, onRefresh: refreshBranches, onRepairWorktrees: handleRepairWorktrees, loading: loading(), error: error(), loadingIndicatorDelay: props.loadingIndicatorDelay ?? 0, lastUpdated: stats().lastUpdated, version: version(), workingDirectory: workingDirectory(), activeProfile: activeProfile(), onOpenLogs: (branch) => {
|
|
1211
|
-
setLogTargetBranch(branch);
|
|
1212
|
-
setLogSelectedEntry(null);
|
|
1213
|
-
setLogSelectedDate(getTodayLogDate());
|
|
1214
|
-
setLogTailEnabled(false);
|
|
1215
|
-
navigateTo("log-list");
|
|
1216
|
-
}, onOpenProfiles: () => navigateTo("profile"), selectedBranches: selectedBranches(), onToggleSelect: toggleSelectedBranch, onCreateBranch: handleQuickCreate, cleanupUI: cleanupUI, helpVisible: helpVisible(), wizardVisible: wizardVisible(), confirmVisible: unsafeSelectionConfirmVisible(), cursorPosition: branchCursorPosition(), onCursorPositionChange: setBranchCursorPosition }));
|
|
1217
|
-
}
|
|
1218
|
-
if (screen === "tool-select") {
|
|
1219
|
-
if (toolError()) {
|
|
1220
|
-
return (_jsx(ErrorScreen, { error: toolError(), onBack: goBack, hint: "Unable to load available tools." }));
|
|
1221
|
-
}
|
|
1222
|
-
return (_jsx(SelectorScreen, { title: "Select tool", items: toolItems(), onSelect: handleToolSelect, onBack: goBack, helpVisible: helpVisible() }));
|
|
1223
|
-
}
|
|
1224
|
-
if (screen === "mode-select") {
|
|
1225
|
-
return (_jsx(SelectorScreen, { title: "Execution mode", items: [
|
|
1226
|
-
{ label: "Normal", value: "normal" },
|
|
1227
|
-
{ label: "Continue", value: "continue" },
|
|
1228
|
-
{ label: "Resume", value: "resume" },
|
|
1229
|
-
], onSelect: handleModeSelect, onBack: goBack, helpVisible: helpVisible() }));
|
|
1230
|
-
}
|
|
1231
|
-
if (screen === "skip-permissions") {
|
|
1232
|
-
return (_jsx(SelectorScreen, { title: "Skip permission prompts?", items: [
|
|
1233
|
-
{ label: "Yes", value: "true" },
|
|
1234
|
-
{ label: "No", value: "false" },
|
|
1235
|
-
], onSelect: (item) => finalizeSelection(item.value === "true"), onBack: goBack, helpVisible: helpVisible() }));
|
|
1236
|
-
}
|
|
1237
|
-
if (screen === "log-list") {
|
|
1238
|
-
return (_jsx(LogScreen, { entries: logEntries(), loading: logLoading(), error: logError(), onBack: goBack, onSelect: (entry) => {
|
|
1239
|
-
setLogSelectedEntry(entry);
|
|
1240
|
-
navigateTo("log-detail");
|
|
1241
|
-
}, onCopy: async (entry) => {
|
|
1242
|
-
try {
|
|
1243
|
-
await copyToClipboard(entry.json);
|
|
1244
|
-
showLogNotification("Copied to clipboard.", "success");
|
|
1245
|
-
}
|
|
1246
|
-
catch {
|
|
1247
|
-
showLogNotification("Failed to copy to clipboard.", "error");
|
|
1248
|
-
}
|
|
1249
|
-
}, onReload: () => void loadLogEntries(logSelectedDate()), onToggleTail: toggleLogTail, onReset: () => void resetLogFiles(), notification: logNotification(), version: version(), selectedDate: logSelectedDate(), branchLabel: logBranchLabel(), sourceLabel: logSourceLabel(), tailing: logTailEnabled(), helpVisible: helpVisible() }));
|
|
1250
|
-
}
|
|
1251
|
-
if (screen === "log-detail") {
|
|
1252
|
-
return (_jsx(LogDetailScreen, { entry: logSelectedEntry(), onBack: goBack, onCopy: async (entry) => {
|
|
1253
|
-
try {
|
|
1254
|
-
await copyToClipboard(entry.json);
|
|
1255
|
-
showLogNotification("Copied to clipboard.", "success");
|
|
1256
|
-
}
|
|
1257
|
-
catch {
|
|
1258
|
-
showLogNotification("Failed to copy to clipboard.", "error");
|
|
1259
|
-
}
|
|
1260
|
-
}, notification: logNotification(), version: version(), helpVisible: helpVisible() }));
|
|
1261
|
-
}
|
|
1262
|
-
if (screen === "profile") {
|
|
1263
|
-
if (profileError()) {
|
|
1264
|
-
return (_jsx(ErrorScreen, { error: profileError(), onBack: goBack, hint: "Unable to load profiles." }));
|
|
1265
|
-
}
|
|
1266
|
-
return (_jsx(ProfileScreen, { profiles: profileItems(), version: version(), helpVisible: helpVisible(), onCreate: openProfileCreate, onDelete: openProfileDelete, onEdit: openProfileEnv, onSelect: (profile) => {
|
|
1267
|
-
void setActiveProfile(profile.name)
|
|
1268
|
-
.then(() => {
|
|
1269
|
-
void refreshProfiles();
|
|
1270
|
-
})
|
|
1271
|
-
.catch((err) => {
|
|
1272
|
-
openProfileError(err, "Unable to set active profile.");
|
|
1273
|
-
});
|
|
1274
|
-
}, onBack: goBack }));
|
|
1275
|
-
}
|
|
1276
|
-
if (screen === "profile-env") {
|
|
1277
|
-
const entry = selectedProfileConfig();
|
|
1278
|
-
if (!entry) {
|
|
1279
|
-
return (_jsx(ErrorScreen, { error: "Profile not found.", onBack: goBack, hint: "Select a profile before editing." }));
|
|
1280
|
-
}
|
|
1281
|
-
return (_jsx(ProfileEnvScreen, { profileName: entry.name, variables: profileEnvVariables(), onAdd: openProfileEnvAdd, onEdit: openProfileEnvEdit, onDelete: openProfileEnvDelete, onViewOsEnv: () => navigateTo("profile-os-env"), onBack: goBack, version: version(), helpVisible: helpVisible() }));
|
|
1282
|
-
}
|
|
1283
|
-
if (screen === "profile-input") {
|
|
1284
|
-
const mode = profileInputMode();
|
|
1285
|
-
const envKey = profileEnvKey();
|
|
1286
|
-
const message = mode === "create-profile"
|
|
1287
|
-
? "New profile name"
|
|
1288
|
-
: mode === "add-env"
|
|
1289
|
-
? "Add environment variable"
|
|
1290
|
-
: `Edit value for ${envKey ?? "(unknown)"}`;
|
|
1291
|
-
const label = mode === "create-profile"
|
|
1292
|
-
? "Profile name"
|
|
1293
|
-
: mode === "add-env"
|
|
1294
|
-
? "KEY=VALUE"
|
|
1295
|
-
: "Value";
|
|
1296
|
-
const placeholder = mode === "create-profile"
|
|
1297
|
-
? "development"
|
|
1298
|
-
: mode === "add-env"
|
|
1299
|
-
? "MY_VAR=value"
|
|
1300
|
-
: undefined;
|
|
1301
|
-
return (_jsx(InputScreen, { message: message, value: profileInputValue(), onChange: handleProfileInputChange, onSubmit: (value) => void submitProfileInput(value), onCancel: () => {
|
|
1302
|
-
setProfileInputSuppressKey(null);
|
|
1303
|
-
goBack();
|
|
1304
|
-
}, label: label, ...(placeholder !== undefined ? { placeholder } : {}), width: 32, helpVisible: helpVisible() }));
|
|
1305
|
-
}
|
|
1306
|
-
if (screen === "profile-confirm") {
|
|
1307
|
-
const mode = profileConfirmMode();
|
|
1308
|
-
const profileName = selectedProfileName();
|
|
1309
|
-
const envKey = profileEnvKey();
|
|
1310
|
-
const message = mode === "delete-profile"
|
|
1311
|
-
? `Delete profile ${profileName ?? "(unknown)"}?`
|
|
1312
|
-
: `Delete ${envKey ?? "(unknown)"}?`;
|
|
1313
|
-
return (_jsx(ConfirmScreen, { message: message, onConfirm: (confirmed) => void confirmProfileAction(confirmed), defaultNo: true, helpVisible: helpVisible() }));
|
|
1314
|
-
}
|
|
1315
|
-
if (screen === "profile-os-env") {
|
|
1316
|
-
const highlightKeys = profileEnvVariables().map((variable) => variable.key);
|
|
1317
|
-
return (_jsx(EnvironmentScreen, { variables: osEnvVariables(), highlightKeys: highlightKeys, onBack: goBack, version: version(), helpVisible: helpVisible() }));
|
|
1318
|
-
}
|
|
1319
|
-
if (screen === "profile-error") {
|
|
1320
|
-
return (_jsx(ErrorScreen, { error: profileActionError() ?? "Profile error", onBack: () => {
|
|
1321
|
-
setProfileActionError(null);
|
|
1322
|
-
setProfileActionHint(null);
|
|
1323
|
-
goBack();
|
|
1324
|
-
}, ...(profileActionHint()
|
|
1325
|
-
? { hint: profileActionHint() }
|
|
1326
|
-
: {}), helpVisible: helpVisible() }));
|
|
1327
|
-
}
|
|
1328
|
-
if (screen === "worktree-create") {
|
|
1329
|
-
const baseBranchRef = resolveBaseBranchRef(creationSource(), null, () => defaultBaseBranch());
|
|
1330
|
-
const baseBranchLabel = resolveBaseBranchLabel(creationSource(), null, () => defaultBaseBranch());
|
|
1331
|
-
return (_jsx(WorktreeCreateScreen, { branchName: createBranchName(), baseBranch: baseBranchLabel, version: version(), helpVisible: helpVisible(), onChange: (value) => {
|
|
1332
|
-
const suppressKey = suppressCreateKey();
|
|
1333
|
-
if (suppressKey &&
|
|
1334
|
-
createBranchName() === "" &&
|
|
1335
|
-
value === suppressKey) {
|
|
1336
|
-
setSuppressCreateKey(null);
|
|
1337
|
-
setCreateBranchName("");
|
|
1338
|
-
return;
|
|
1339
|
-
}
|
|
1340
|
-
setSuppressCreateKey(null);
|
|
1341
|
-
setCreateBranchName(value);
|
|
1342
|
-
}, onSubmit: (value, branchType) => {
|
|
1343
|
-
const trimmed = value.trim();
|
|
1344
|
-
if (!trimmed) {
|
|
1345
|
-
return;
|
|
1346
|
-
}
|
|
1347
|
-
// Add prefix based on selected branch type
|
|
1348
|
-
const prefixKey = branchType.toUpperCase();
|
|
1349
|
-
const prefix = BRANCH_PREFIXES[prefixKey] ?? "";
|
|
1350
|
-
const fullBranchName = `${prefix}${trimmed}`;
|
|
1351
|
-
setSelectedBranch({
|
|
1352
|
-
name: fullBranchName,
|
|
1353
|
-
displayName: fullBranchName,
|
|
1354
|
-
branchType: "local",
|
|
1355
|
-
branchCategory: branchType,
|
|
1356
|
-
});
|
|
1357
|
-
setIsNewBranch(true);
|
|
1358
|
-
setNewBranchBaseRef(baseBranchRef);
|
|
1359
|
-
setSelectedTool(null);
|
|
1360
|
-
setSelectedMode("normal");
|
|
1361
|
-
setSuppressCreateKey(null);
|
|
1362
|
-
navigateTo("tool-select");
|
|
1363
|
-
}, onCancel: () => {
|
|
1364
|
-
setSuppressCreateKey(null);
|
|
1365
|
-
goBack();
|
|
1366
|
-
} }));
|
|
1367
|
-
}
|
|
1368
|
-
if (screen === "loading") {
|
|
1369
|
-
return (_jsx(LoadingIndicatorScreen, { message: "Loading...", delay: props.loadingIndicatorDelay ?? 0 }));
|
|
1370
|
-
}
|
|
1371
|
-
if (screen === "error") {
|
|
1372
|
-
return (_jsx(ErrorScreen, { error: error() ?? "Unknown error", helpVisible: helpVisible() }));
|
|
1373
|
-
}
|
|
1374
|
-
return (_jsx(ErrorScreen, { error: `Unknown screen: ${screen}`, onBack: goBack, helpVisible: helpVisible() }));
|
|
1375
|
-
};
|
|
1376
|
-
return (_jsxs(_Fragment, { children: [renderCurrentScreen(), unsafeSelectionConfirmVisible() && (_jsx("box", { position: "absolute", top: "30%", left: "20%", width: unsafeConfirmBoxWidth(), zIndex: 110, border: true, borderStyle: "single", borderColor: "yellow", backgroundColor: "black", padding: 1, children: _jsx(ConfirmScreen, { message: unsafeSelectionMessage(), onConfirm: confirmUnsafeSelection, yesLabel: "OK", noLabel: "Cancel", defaultNo: true, helpVisible: helpVisible(), width: unsafeConfirmContentWidth() }) })), _jsx(HelpOverlay, { visible: helpVisible(), context: currentScreen() }), _jsx(WizardController, { visible: wizardVisible(), selectedBranchName: selectedBranch()?.name ?? "", history: quickStartHistory(), onClose: handleWizardClose, onComplete: handleWizardComplete, onResume: handleWizardResume, onStartNew: handleWizardStartNew })] }));
|
|
1377
|
-
}
|
|
1378
|
-
const withTimeout = async (promise, timeoutMs) => new Promise((resolve, reject) => {
|
|
1379
|
-
const timer = setTimeout(() => {
|
|
1380
|
-
reject(new Error("timeout"));
|
|
1381
|
-
}, timeoutMs);
|
|
1382
|
-
promise
|
|
1383
|
-
.then((value) => {
|
|
1384
|
-
clearTimeout(timer);
|
|
1385
|
-
resolve(value);
|
|
1386
|
-
})
|
|
1387
|
-
.catch((err) => {
|
|
1388
|
-
clearTimeout(timer);
|
|
1389
|
-
reject(err);
|
|
1390
|
-
});
|
|
1391
|
-
});
|
|
1392
|
-
const buildBranchList = (branches, worktrees, lastToolUsageMap) => {
|
|
1393
|
-
const localBranchNames = new Set(branches.filter((branch) => branch.type === "local").map((b) => b.name));
|
|
1394
|
-
const filtered = branches.filter((branch) => {
|
|
1395
|
-
if (branch.type === "remote") {
|
|
1396
|
-
const remoteName = branch.name.replace(/^origin\//, "");
|
|
1397
|
-
return !localBranchNames.has(remoteName);
|
|
1398
|
-
}
|
|
1399
|
-
return true;
|
|
1400
|
-
});
|
|
1401
|
-
const worktreeMap = new Map();
|
|
1402
|
-
for (const worktree of worktrees) {
|
|
1403
|
-
worktreeMap.set(worktree.branch, {
|
|
1404
|
-
path: worktree.path,
|
|
1405
|
-
locked: worktree.locked ?? false,
|
|
1406
|
-
prunable: worktree.prunable ?? false,
|
|
1407
|
-
isAccessible: worktree.isAccessible ?? true,
|
|
1408
|
-
...(worktree.hasUncommittedChanges !== undefined
|
|
1409
|
-
? { hasUncommittedChanges: worktree.hasUncommittedChanges }
|
|
1410
|
-
: {}),
|
|
1411
|
-
});
|
|
1412
|
-
}
|
|
1413
|
-
const enriched = filtered.map((branch) => {
|
|
1414
|
-
const lastToolUsage = lastToolUsageMap?.get(branch.name);
|
|
1415
|
-
const baseBranch = lastToolUsage ? { ...branch, lastToolUsage } : branch;
|
|
1416
|
-
if (branch.type === "local") {
|
|
1417
|
-
const worktree = worktreeMap.get(branch.name);
|
|
1418
|
-
if (worktree) {
|
|
1419
|
-
return { ...baseBranch, worktree };
|
|
1420
|
-
}
|
|
1421
|
-
}
|
|
1422
|
-
return baseBranch;
|
|
1423
|
-
});
|
|
1424
|
-
const items = formatBranchItems(enriched, worktreeMap);
|
|
1425
|
-
return { items, worktreeMap };
|
|
1426
|
-
};
|
|
1427
|
-
//# sourceMappingURL=App.solid.js.map
|