@akiojin/gwt 4.0.0 → 4.1.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.
Files changed (161) hide show
  1. package/README.ja.md +0 -1
  2. package/README.md +0 -1
  3. package/dist/claude.d.ts +21 -0
  4. package/dist/claude.d.ts.map +1 -1
  5. package/dist/claude.js +73 -30
  6. package/dist/claude.js.map +1 -1
  7. package/dist/cli/ui/components/common/Select.d.ts +6 -0
  8. package/dist/cli/ui/components/common/Select.d.ts.map +1 -1
  9. package/dist/cli/ui/components/common/Select.js +3 -2
  10. package/dist/cli/ui/components/common/Select.js.map +1 -1
  11. package/dist/cli/ui/components/screens/AIToolSelectorScreen.d.ts +6 -0
  12. package/dist/cli/ui/components/screens/AIToolSelectorScreen.d.ts.map +1 -1
  13. package/dist/cli/ui/components/screens/AIToolSelectorScreen.js +3 -2
  14. package/dist/cli/ui/components/screens/AIToolSelectorScreen.js.map +1 -1
  15. package/dist/cli/ui/components/screens/BatchMergeProgressScreen.d.ts +3 -0
  16. package/dist/cli/ui/components/screens/BatchMergeProgressScreen.d.ts.map +1 -1
  17. package/dist/cli/ui/components/screens/BatchMergeProgressScreen.js +3 -2
  18. package/dist/cli/ui/components/screens/BatchMergeProgressScreen.js.map +1 -1
  19. package/dist/cli/ui/components/screens/BatchMergeResultScreen.d.ts +3 -0
  20. package/dist/cli/ui/components/screens/BatchMergeResultScreen.d.ts.map +1 -1
  21. package/dist/cli/ui/components/screens/BatchMergeResultScreen.js +3 -2
  22. package/dist/cli/ui/components/screens/BatchMergeResultScreen.js.map +1 -1
  23. package/dist/cli/ui/components/screens/BranchCreatorScreen.d.ts +3 -0
  24. package/dist/cli/ui/components/screens/BranchCreatorScreen.d.ts.map +1 -1
  25. package/dist/cli/ui/components/screens/BranchCreatorScreen.js +3 -2
  26. package/dist/cli/ui/components/screens/BranchCreatorScreen.js.map +1 -1
  27. package/dist/cli/ui/components/screens/BranchListScreen.d.ts +3 -0
  28. package/dist/cli/ui/components/screens/BranchListScreen.d.ts.map +1 -1
  29. package/dist/cli/ui/components/screens/BranchListScreen.js +3 -4
  30. package/dist/cli/ui/components/screens/BranchListScreen.js.map +1 -1
  31. package/dist/cli/ui/components/screens/BranchQuickStartScreen.d.ts +10 -1
  32. package/dist/cli/ui/components/screens/BranchQuickStartScreen.d.ts.map +1 -1
  33. package/dist/cli/ui/components/screens/BranchQuickStartScreen.js +7 -22
  34. package/dist/cli/ui/components/screens/BranchQuickStartScreen.js.map +1 -1
  35. package/dist/cli/ui/components/screens/EnvironmentProfileScreen.d.ts +3 -0
  36. package/dist/cli/ui/components/screens/EnvironmentProfileScreen.d.ts.map +1 -1
  37. package/dist/cli/ui/components/screens/EnvironmentProfileScreen.js +3 -2
  38. package/dist/cli/ui/components/screens/EnvironmentProfileScreen.js.map +1 -1
  39. package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.d.ts +15 -0
  40. package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.d.ts.map +1 -1
  41. package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.js +3 -2
  42. package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.js.map +1 -1
  43. package/dist/cli/ui/components/screens/ModelSelectorScreen.d.ts +6 -0
  44. package/dist/cli/ui/components/screens/ModelSelectorScreen.d.ts.map +1 -1
  45. package/dist/cli/ui/components/screens/ModelSelectorScreen.js +3 -2
  46. package/dist/cli/ui/components/screens/ModelSelectorScreen.js.map +1 -1
  47. package/dist/cli/ui/components/screens/PRCleanupScreen.d.ts +6 -0
  48. package/dist/cli/ui/components/screens/PRCleanupScreen.d.ts.map +1 -1
  49. package/dist/cli/ui/components/screens/PRCleanupScreen.js +3 -2
  50. package/dist/cli/ui/components/screens/PRCleanupScreen.js.map +1 -1
  51. package/dist/cli/ui/components/screens/SessionSelectorScreen.d.ts +6 -0
  52. package/dist/cli/ui/components/screens/SessionSelectorScreen.d.ts.map +1 -1
  53. package/dist/cli/ui/components/screens/SessionSelectorScreen.js +3 -2
  54. package/dist/cli/ui/components/screens/SessionSelectorScreen.js.map +1 -1
  55. package/dist/cli/ui/hooks/useAppInput.d.ts +20 -0
  56. package/dist/cli/ui/hooks/useAppInput.d.ts.map +1 -0
  57. package/dist/cli/ui/hooks/useAppInput.js +137 -0
  58. package/dist/cli/ui/hooks/useAppInput.js.map +1 -0
  59. package/dist/cli/ui/screens/BranchActionSelectorScreen.d.ts +3 -0
  60. package/dist/cli/ui/screens/BranchActionSelectorScreen.d.ts.map +1 -1
  61. package/dist/cli/ui/screens/BranchActionSelectorScreen.js +3 -2
  62. package/dist/cli/ui/screens/BranchActionSelectorScreen.js.map +1 -1
  63. package/dist/cli/ui/utils/branchFormatter.d.ts.map +1 -1
  64. package/dist/cli/ui/utils/branchFormatter.js +0 -2
  65. package/dist/cli/ui/utils/branchFormatter.js.map +1 -1
  66. package/dist/cli/ui/utils/modelOptions.d.ts.map +1 -1
  67. package/dist/cli/ui/utils/modelOptions.js +11 -18
  68. package/dist/cli/ui/utils/modelOptions.js.map +1 -1
  69. package/dist/client/assets/{index-f5D2XwDh.js → index-v8smkNOL.js} +16 -16
  70. package/dist/client/index.html +1 -1
  71. package/dist/codex.d.ts +33 -1
  72. package/dist/codex.d.ts.map +1 -1
  73. package/dist/codex.js +33 -2
  74. package/dist/codex.js.map +1 -1
  75. package/dist/config/builtin-tools.d.ts +1 -7
  76. package/dist/config/builtin-tools.d.ts.map +1 -1
  77. package/dist/config/builtin-tools.js +1 -20
  78. package/dist/config/builtin-tools.js.map +1 -1
  79. package/dist/config/tools.d.ts.map +1 -1
  80. package/dist/config/tools.js +1 -4
  81. package/dist/config/tools.js.map +1 -1
  82. package/dist/gemini.d.ts +17 -0
  83. package/dist/gemini.d.ts.map +1 -1
  84. package/dist/gemini.js +21 -21
  85. package/dist/gemini.js.map +1 -1
  86. package/dist/index.d.ts.map +1 -1
  87. package/dist/index.js +0 -5
  88. package/dist/index.js.map +1 -1
  89. package/dist/shared/aiToolConstants.d.ts +1 -1
  90. package/dist/shared/aiToolConstants.d.ts.map +1 -1
  91. package/dist/shared/aiToolConstants.js +1 -1
  92. package/dist/shared/aiToolConstants.js.map +1 -1
  93. package/dist/utils/command.d.ts +10 -0
  94. package/dist/utils/command.d.ts.map +1 -0
  95. package/dist/utils/command.js +25 -0
  96. package/dist/utils/command.js.map +1 -0
  97. package/dist/utils/session/index.d.ts +0 -2
  98. package/dist/utils/session/index.d.ts.map +1 -1
  99. package/dist/utils/session/index.js +0 -3
  100. package/dist/utils/session/index.js.map +1 -1
  101. package/dist/utils/session/parsers/index.d.ts +0 -1
  102. package/dist/utils/session/parsers/index.d.ts.map +1 -1
  103. package/dist/utils/session/parsers/index.js +0 -2
  104. package/dist/utils/session/parsers/index.js.map +1 -1
  105. package/dist/utils/session.d.ts +0 -1
  106. package/dist/utils/session.d.ts.map +1 -1
  107. package/dist/utils/session.js +0 -1
  108. package/dist/utils/session.js.map +1 -1
  109. package/dist/utils/terminal.d.ts +34 -0
  110. package/dist/utils/terminal.d.ts.map +1 -1
  111. package/dist/utils/terminal.js +51 -4
  112. package/dist/utils/terminal.js.map +1 -1
  113. package/dist/web/client/src/components/branch-detail/BranchInfoCards.d.ts.map +1 -1
  114. package/dist/web/client/src/components/branch-detail/BranchInfoCards.js +0 -2
  115. package/dist/web/client/src/components/branch-detail/BranchInfoCards.js.map +1 -1
  116. package/package.json +1 -1
  117. package/src/claude.ts +92 -34
  118. package/src/cli/ui/__tests__/components/App.protected-branch.test.tsx +3 -1
  119. package/src/cli/ui/__tests__/components/ModelSelectorScreen.initial.test.tsx +10 -8
  120. package/src/cli/ui/__tests__/components/screens/BranchQuickStartScreen.test.tsx +6 -6
  121. package/src/cli/ui/__tests__/utils/branchFormatter.test.ts +1 -1
  122. package/src/cli/ui/components/common/Select.tsx +9 -2
  123. package/src/cli/ui/components/screens/AIToolSelectorScreen.tsx +9 -2
  124. package/src/cli/ui/components/screens/BatchMergeProgressScreen.tsx +6 -2
  125. package/src/cli/ui/components/screens/BatchMergeResultScreen.tsx +6 -2
  126. package/src/cli/ui/components/screens/BranchCreatorScreen.tsx +6 -2
  127. package/src/cli/ui/components/screens/BranchListScreen.tsx +6 -4
  128. package/src/cli/ui/components/screens/BranchQuickStartScreen.tsx +17 -26
  129. package/src/cli/ui/components/screens/EnvironmentProfileScreen.tsx +6 -2
  130. package/src/cli/ui/components/screens/ExecutionModeSelectorScreen.tsx +18 -2
  131. package/src/cli/ui/components/screens/ModelSelectorScreen.tsx +9 -2
  132. package/src/cli/ui/components/screens/PRCleanupScreen.tsx +9 -2
  133. package/src/cli/ui/components/screens/SessionSelectorScreen.tsx +9 -2
  134. package/src/cli/ui/hooks/useAppInput.ts +171 -0
  135. package/src/cli/ui/screens/BranchActionSelectorScreen.tsx +6 -2
  136. package/src/cli/ui/screens/__tests__/BranchActionSelectorScreen.test.tsx +68 -1
  137. package/src/cli/ui/utils/branchFormatter.ts +0 -1
  138. package/src/cli/ui/utils/modelOptions.test.ts +16 -4
  139. package/src/cli/ui/utils/modelOptions.ts +12 -18
  140. package/src/codex.ts +41 -2
  141. package/src/config/builtin-tools.ts +1 -21
  142. package/src/config/tools.ts +1 -5
  143. package/src/gemini.ts +25 -21
  144. package/src/index.ts +0 -6
  145. package/src/shared/aiToolConstants.ts +1 -1
  146. package/src/utils/command.ts +26 -0
  147. package/src/utils/session/index.ts +0 -4
  148. package/src/utils/session/parsers/index.ts +0 -3
  149. package/src/utils/session.ts +0 -1
  150. package/src/utils/terminal.ts +65 -4
  151. package/src/web/client/src/components/branch-detail/BranchInfoCards.tsx +0 -1
  152. package/dist/qwen.d.ts +0 -16
  153. package/dist/qwen.d.ts.map +0 -1
  154. package/dist/qwen.js +0 -202
  155. package/dist/qwen.js.map +0 -1
  156. package/dist/utils/session/parsers/qwen.d.ts +0 -21
  157. package/dist/utils/session/parsers/qwen.d.ts.map +0 -1
  158. package/dist/utils/session/parsers/qwen.js +0 -36
  159. package/dist/utils/session/parsers/qwen.js.map +0 -1
  160. package/src/qwen.ts +0 -273
  161. package/src/utils/session/parsers/qwen.ts +0 -54
@@ -23,7 +23,7 @@ describe("BranchQuickStartScreen", () => {
23
23
  {
24
24
  toolId: "codex-cli",
25
25
  toolLabel: "Codex",
26
- model: "gpt-5.1-codex",
26
+ model: "gpt-5.2-codex",
27
27
  sessionId: "abc-123",
28
28
  inferenceLevel: "high",
29
29
  skipPermissions: true,
@@ -38,12 +38,12 @@ describe("BranchQuickStartScreen", () => {
38
38
  expect(titleMatches.length).toBeGreaterThan(0);
39
39
  expect(
40
40
  getByText(
41
- /Model: gpt-5.1-codex \/ Reasoning: High \/ Skip: Yes \/ ID: abc-123/,
41
+ /Model: gpt-5.2-codex \/ Reasoning: High \/ Skip: Yes \/ ID: abc-123/,
42
42
  ),
43
43
  ).toBeDefined();
44
44
  expect(queryAllByText(/ID: abc-123/)).toHaveLength(1);
45
45
  expect(
46
- getByText(/Model: gpt-5.1-codex \/ Reasoning: High \/ Skip: Yes$/),
46
+ getByText(/Model: gpt-5.2-codex \/ Reasoning: High \/ Skip: Yes$/),
47
47
  ).toBeDefined();
48
48
  });
49
49
 
@@ -90,7 +90,7 @@ describe("BranchQuickStartScreen", () => {
90
90
  {
91
91
  toolId: "codex-cli",
92
92
  toolLabel: "Codex",
93
- model: "gpt-5.1-codex",
93
+ model: "gpt-5.2-codex",
94
94
  sessionId: "abc-123",
95
95
  },
96
96
  ]}
@@ -110,7 +110,7 @@ describe("BranchQuickStartScreen", () => {
110
110
  {
111
111
  toolId: "codex-cli",
112
112
  toolLabel: "Codex",
113
- model: "gpt-5.1-codex",
113
+ model: "gpt-5.2-codex",
114
114
  sessionId: "codex-123",
115
115
  inferenceLevel: "high",
116
116
  skipPermissions: true,
@@ -131,7 +131,7 @@ describe("BranchQuickStartScreen", () => {
131
131
  expect(getAllByText(/\[Codex\]/i)).toHaveLength(2);
132
132
  expect(
133
133
  getByText(
134
- /Model: gpt-5.1-codex \/ Reasoning: High \/ Skip: Yes \/ ID: codex-123/,
134
+ /Model: gpt-5.2-codex \/ Reasoning: High \/ Skip: Yes \/ ID: codex-123/,
135
135
  ),
136
136
  ).toBeDefined();
137
137
  expect(getAllByText(/\[Claude\]/i)).toHaveLength(2);
@@ -58,7 +58,7 @@ describe("branchFormatter", () => {
58
58
  toolLabel: "Codex",
59
59
  mode: "normal",
60
60
  timestamp: Date.UTC(2025, 10, 26, 14, 3), // 2025-11-26 14:03 UTC
61
- model: "gpt-5.1-codex",
61
+ model: "gpt-5.2-codex",
62
62
  },
63
63
  };
64
64
 
@@ -1,11 +1,18 @@
1
1
  import React, { useEffect, useState } from "react";
2
- import { Box, Text, useInput, useStdout } from "ink";
2
+ import { Box, Text, useStdout } from "ink";
3
+ import { useAppInput } from "../../hooks/useAppInput.js";
3
4
 
5
+ /**
6
+ * Item descriptor for the `Select` component.
7
+ */
4
8
  export interface SelectItem {
5
9
  label: string;
6
10
  value: string;
7
11
  }
8
12
 
13
+ /**
14
+ * Props for the `Select` component.
15
+ */
9
16
  export interface SelectProps<T extends SelectItem = SelectItem> {
10
17
  items: T[];
11
18
  onSelect: (item: T) => void;
@@ -133,7 +140,7 @@ const SelectComponent = <T extends SelectItem = SelectItem>({
133
140
  }
134
141
  }, [items, limit]);
135
142
 
136
- useInput((input, key) => {
143
+ useAppInput((input, key) => {
137
144
  if (disabled) {
138
145
  return;
139
146
  }
@@ -1,19 +1,26 @@
1
1
  import React, { useState, useEffect } from "react";
2
- import { Box, Text, useInput } from "ink";
2
+ import { Box, Text } from "ink";
3
3
  import { Header } from "../parts/Header.js";
4
4
  import { Footer } from "../parts/Footer.js";
5
5
  import { Select } from "../common/Select.js";
6
+ import { useAppInput } from "../../hooks/useAppInput.js";
6
7
  import { useTerminalSize } from "../../hooks/useTerminalSize.js";
7
8
  import { getAllTools } from "../../../../config/tools.js";
8
9
  import type { AIToolConfig } from "../../../../types/tools.js";
9
10
  import type { AITool } from "../../types.js";
10
11
 
12
+ /**
13
+ * Renderable item for the AI tool selector list.
14
+ */
11
15
  export interface AIToolItem {
12
16
  label: string;
13
17
  value: AITool;
14
18
  description: string;
15
19
  }
16
20
 
21
+ /**
22
+ * Props for `AIToolSelectorScreen`.
23
+ */
17
24
  export interface AIToolSelectorScreenProps {
18
25
  onBack: () => void;
19
26
  onSelect: (tool: AITool) => void;
@@ -96,7 +103,7 @@ export function AIToolSelectorScreen({
96
103
 
97
104
  // Handle keyboard input
98
105
  // Note: Select component handles Enter and arrow keys
99
- useInput((input, key) => {
106
+ useAppInput((input, key) => {
100
107
  if (key.escape) {
101
108
  onBack();
102
109
  }
@@ -1,12 +1,16 @@
1
1
  import React from "react";
2
- import { Box, Text, useInput } from "ink";
2
+ import { Box, Text } from "ink";
3
3
  import { Header } from "../parts/Header.js";
4
4
  import { Footer } from "../parts/Footer.js";
5
5
  import { ProgressBar } from "../parts/ProgressBar.js";
6
6
  import { MergeStatusList } from "../parts/MergeStatusList.js";
7
+ import { useAppInput } from "../../hooks/useAppInput.js";
7
8
  import { useTerminalSize } from "../../hooks/useTerminalSize.js";
8
9
  import type { BatchMergeProgress, BranchMergeStatus } from "../../types.js";
9
10
 
11
+ /**
12
+ * Props for `BatchMergeProgressScreen`.
13
+ */
10
14
  export interface BatchMergeProgressScreenProps {
11
15
  progress: BatchMergeProgress;
12
16
  statuses: BranchMergeStatus[];
@@ -26,7 +30,7 @@ export function BatchMergeProgressScreen({
26
30
  const { rows } = useTerminalSize();
27
31
 
28
32
  // Handle keyboard input
29
- useInput((input, key) => {
33
+ useAppInput((input, key) => {
30
34
  if ((input === "q" || key.escape) && onCancel) {
31
35
  onCancel();
32
36
  }
@@ -1,11 +1,15 @@
1
1
  import React from "react";
2
- import { Box, Text, useInput } from "ink";
2
+ import { Box, Text } from "ink";
3
3
  import { Header } from "../parts/Header.js";
4
4
  import { Footer } from "../parts/Footer.js";
5
5
  import { MergeStatusList } from "../parts/MergeStatusList.js";
6
+ import { useAppInput } from "../../hooks/useAppInput.js";
6
7
  import { useTerminalSize } from "../../hooks/useTerminalSize.js";
7
8
  import type { BatchMergeResult } from "../../types.js";
8
9
 
10
+ /**
11
+ * Props for `BatchMergeResultScreen`.
12
+ */
9
13
  export interface BatchMergeResultScreenProps {
10
14
  result: BatchMergeResult;
11
15
  onBack?: () => void;
@@ -25,7 +29,7 @@ export function BatchMergeResultScreen({
25
29
  const { rows } = useTerminalSize();
26
30
 
27
31
  // Handle keyboard input
28
- useInput((input, key) => {
32
+ useAppInput((input, key) => {
29
33
  if (input === "q" && onQuit) {
30
34
  onQuit();
31
35
  } else if (key.escape && onBack) {
@@ -1,9 +1,10 @@
1
1
  import React, { useState, useCallback, useEffect, useRef } from "react";
2
- import { Box, Text, useInput } from "ink";
2
+ import { Box, Text } from "ink";
3
3
  import { Header } from "../parts/Header.js";
4
4
  import { Footer } from "../parts/Footer.js";
5
5
  import { Select } from "../common/Select.js";
6
6
  import { Input } from "../common/Input.js";
7
+ import { useAppInput } from "../../hooks/useAppInput.js";
7
8
  import { useTerminalSize } from "../../hooks/useTerminalSize.js";
8
9
  import { BRANCH_PREFIXES } from "../../../../config/constants.js";
9
10
 
@@ -12,6 +13,9 @@ type Step = "type-selection" | "name-input";
12
13
 
13
14
  const SPINNER_FRAMES = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧"];
14
15
 
16
+ /**
17
+ * Props for `BranchCreatorScreen`.
18
+ */
15
19
  export interface BranchCreatorScreenProps {
16
20
  onBack: () => void;
17
21
  onCreate: (branchName: string) => Promise<void>;
@@ -52,7 +56,7 @@ export function BranchCreatorScreen({
52
56
  const spinnerFrame = SPINNER_FRAMES[spinnerIndex] ?? SPINNER_FRAMES[0];
53
57
 
54
58
  // Handle keyboard input for back navigation
55
- useInput((input, key) => {
59
+ useAppInput((input, key) => {
56
60
  if (isCreating) {
57
61
  return;
58
62
  }
@@ -1,11 +1,12 @@
1
1
  import React, { useCallback, useState, useMemo, useEffect } from "react";
2
- import { Box, Text, useInput } from "ink";
2
+ import { Box, Text } from "ink";
3
3
  import { Header } from "../parts/Header.js";
4
4
  import { Stats } from "../parts/Stats.js";
5
5
  import { Footer } from "../parts/Footer.js";
6
6
  import { Select } from "../common/Select.js";
7
7
  import { Input } from "../common/Input.js";
8
8
  import { LoadingIndicator } from "../common/LoadingIndicator.js";
9
+ import { useAppInput } from "../../hooks/useAppInput.js";
9
10
  import { useTerminalSize } from "../../hooks/useTerminalSize.js";
10
11
  import type { BranchItem, Statistics } from "../../types.js";
11
12
  import stringWidth from "string-width";
@@ -77,6 +78,9 @@ interface CleanupUIState {
77
78
  inputLocked: boolean;
78
79
  }
79
80
 
81
+ /**
82
+ * Props for `BranchListScreen`.
83
+ */
80
84
  export interface BranchListScreenProps {
81
85
  branches: BranchItem[];
82
86
  stats: Statistics;
@@ -166,7 +170,7 @@ export function BranchListScreen({
166
170
  // Handle keyboard input
167
171
  // Note: Input component blocks specific keys (c/r/f) using blockKeys prop
168
172
  // This prevents shortcuts from triggering while typing in the filter
169
- useInput((input, key) => {
173
+ useAppInput((input, key) => {
170
174
  if (cleanupUI?.inputLocked) {
171
175
  return;
172
176
  }
@@ -326,8 +330,6 @@ export function BranchListScreen({
326
330
  return chalk.cyan(label);
327
331
  case "gemini-cli":
328
332
  return chalk.magenta(label);
329
- case "qwen-cli":
330
- return chalk.gray(label);
331
333
  default: {
332
334
  const trimmed = label.trim().toLowerCase();
333
335
  if (!toolId || trimmed === "unknown") {
@@ -1,16 +1,23 @@
1
1
  import React from "react";
2
- import { Box, Text, useInput } from "ink";
2
+ import { Box, Text } from "ink";
3
3
  import { Header } from "../parts/Header.js";
4
4
  import { Footer } from "../parts/Footer.js";
5
5
  import { Select, type SelectItem } from "../common/Select.js";
6
+ import { useAppInput } from "../../hooks/useAppInput.js";
6
7
  import { useTerminalSize } from "../../hooks/useTerminalSize.js";
7
8
 
9
+ /**
10
+ * Action returned by `BranchQuickStartScreen`.
11
+ */
8
12
  export type QuickStartAction = "reuse-continue" | "reuse-new" | "manual";
9
13
 
14
+ /**
15
+ * Previous tool/session configuration shown in the quick start list.
16
+ */
10
17
  export interface BranchQuickStartOption {
11
18
  toolId?: string | null;
12
19
  toolLabel: string;
13
- toolCategory?: "Codex" | "Claude" | "Gemini" | "Qwen" | "Other";
20
+ toolCategory?: "Codex" | "Claude" | "Gemini" | "Other";
14
21
  model?: string | null;
15
22
  sessionId?: string | null;
16
23
  inferenceLevel?: string | null;
@@ -32,10 +39,6 @@ const formatSkip = (skip?: boolean | null) =>
32
39
 
33
40
  const supportsReasoning = (toolId?: string | null) => toolId === "codex-cli";
34
41
 
35
- const UNSUPPORTED_TOOL_ID = "qwen-cli";
36
- const UNSUPPORTED_TOOL_MESSAGE = "Unsupported tool (Qwen CLI). ";
37
- const UNSUPPORTED_TOOL_CATEGORY_LABEL = "Qwen (unsupported)";
38
-
39
42
  const describe = (opt: BranchQuickStartOption, includeSessionId = true) => {
40
43
  const parts = [`Model: ${opt.model ?? "default"}`];
41
44
  if (supportsReasoning(opt.toolId)) {
@@ -58,6 +61,9 @@ type QuickStartItem = SelectItem & {
58
61
  categoryColor: "cyan" | "yellow" | "magenta" | "green" | "white";
59
62
  };
60
63
 
64
+ /**
65
+ * Props for `BranchQuickStartScreen`.
66
+ */
61
67
  export interface BranchQuickStartScreenProps {
62
68
  previousOptions: BranchQuickStartOption[];
63
69
  loading?: boolean;
@@ -82,7 +88,6 @@ export function BranchQuickStartScreen({
82
88
  "codex-cli": { label: "Codex", color: "cyan" },
83
89
  "claude-code": { label: "Claude", color: "yellow" },
84
90
  "gemini-cli": { label: "Gemini", color: "magenta" },
85
- "qwen-cli": { label: "Qwen", color: "green" },
86
91
  other: { label: "Other", color: "white" },
87
92
  } as const;
88
93
 
@@ -96,8 +101,6 @@ export function BranchQuickStartScreen({
96
101
  return CATEGORY_META["claude-code"];
97
102
  case "gemini-cli":
98
103
  return CATEGORY_META["gemini-cli"];
99
- case "qwen-cli":
100
- return CATEGORY_META["qwen-cli"];
101
104
  default:
102
105
  return CATEGORY_META.other;
103
106
  }
@@ -105,7 +108,7 @@ export function BranchQuickStartScreen({
105
108
 
106
109
  const items: QuickStartItem[] = previousOptions.length
107
110
  ? (() => {
108
- const order = ["Claude", "Codex", "Gemini", "Qwen", "Other"];
111
+ const order = ["Claude", "Codex", "Gemini", "Other"];
109
112
  const sorted = [...previousOptions].sort((a, b) => {
110
113
  const ca = resolveCategory(a.toolId).label;
111
114
  const cb = resolveCategory(b.toolId).label;
@@ -115,7 +118,6 @@ export function BranchQuickStartScreen({
115
118
  const flat: QuickStartItem[] = [];
116
119
  sorted.forEach((opt, idx) => {
117
120
  const cat = resolveCategory(opt.toolId);
118
- const isUnsupportedTool = opt.toolId === UNSUPPORTED_TOOL_ID;
119
121
  const prevCat =
120
122
  idx > 0 ? resolveCategory(sorted[idx - 1]?.toolId).label : null;
121
123
  const isNewCategory = prevCat !== cat.label;
@@ -126,10 +128,7 @@ export function BranchQuickStartScreen({
126
128
  value: `reuse-continue:${opt.toolId ?? "unknown"}:${idx}`,
127
129
  action: "reuse-continue",
128
130
  toolId: opt.toolId ?? null,
129
- description: isUnsupportedTool
130
- ? `${UNSUPPORTED_TOOL_MESSAGE}${describe(opt, true)}`
131
- : describe(opt, true),
132
- ...(isUnsupportedTool ? { disabled: true } : {}),
131
+ description: describe(opt, true),
133
132
  groupStart: isNewCategory && flat.length > 0,
134
133
  category: cat.label,
135
134
  categoryColor: cat.color,
@@ -139,10 +138,7 @@ export function BranchQuickStartScreen({
139
138
  value: `reuse-new:${opt.toolId ?? "unknown"}:${idx}`,
140
139
  action: "reuse-new",
141
140
  toolId: opt.toolId ?? null,
142
- description: isUnsupportedTool
143
- ? `${UNSUPPORTED_TOOL_MESSAGE}${describe(opt, false)}`
144
- : describe(opt, false),
145
- ...(isUnsupportedTool ? { disabled: true } : {}),
141
+ description: describe(opt, false),
146
142
  groupStart: false,
147
143
  category: cat.label,
148
144
  categoryColor: cat.color,
@@ -182,7 +178,7 @@ export function BranchQuickStartScreen({
182
178
  categoryColor: CATEGORY_META.other.color,
183
179
  });
184
180
 
185
- useInput((_, key) => {
181
+ useAppInput((_, key) => {
186
182
  if (key.escape) {
187
183
  onBack();
188
184
  }
@@ -209,11 +205,6 @@ export function BranchQuickStartScreen({
209
205
  onSelect(item.action, item.toolId ?? null);
210
206
  }}
211
207
  renderItem={(item: QuickStartItem, isSelected) => {
212
- const categoryLabel =
213
- item.toolId === UNSUPPORTED_TOOL_ID
214
- ? UNSUPPORTED_TOOL_CATEGORY_LABEL
215
- : item.category;
216
-
217
208
  return (
218
209
  <Box
219
210
  flexDirection="column"
@@ -223,7 +214,7 @@ export function BranchQuickStartScreen({
223
214
  >
224
215
  <Text>
225
216
  <Text color={item.categoryColor} inverse={isSelected}>
226
- {`[${categoryLabel}] `}
217
+ {`[${item.category}] `}
227
218
  </Text>
228
219
  <Text inverse={isSelected}>
229
220
  {item.label}
@@ -6,16 +6,20 @@
6
6
  */
7
7
 
8
8
  import React, { useState, useCallback, useMemo, useEffect } from "react";
9
- import { Box, Text, useInput } from "ink";
9
+ import { Box, Text } from "ink";
10
10
  import { Header } from "../parts/Header.js";
11
11
  import { Footer } from "../parts/Footer.js";
12
12
  import { Select } from "../common/Select.js";
13
13
  import { Input } from "../common/Input.js";
14
14
  import { Confirm } from "../common/Confirm.js";
15
+ import { useAppInput } from "../../hooks/useAppInput.js";
15
16
  import { useTerminalSize } from "../../hooks/useTerminalSize.js";
16
17
  import { useProfiles } from "../../hooks/useProfiles.js";
17
18
  import { isValidProfileName } from "../../../../types/profiles.js";
18
19
 
20
+ /**
21
+ * Props for `EnvironmentProfileScreen`.
22
+ */
19
23
  export interface EnvironmentProfileScreenProps {
20
24
  onBack: () => void;
21
25
  version?: string | null;
@@ -432,7 +436,7 @@ export function EnvironmentProfileScreen({
432
436
  );
433
437
 
434
438
  // キーボード入力ハンドリング
435
- useInput(
439
+ useAppInput(
436
440
  (input, key) => {
437
441
  // 入力モード時は他のキーハンドリングをスキップ
438
442
  if (
@@ -1,29 +1,45 @@
1
1
  import React, { useState } from "react";
2
- import { Box, Text, useInput } from "ink";
2
+ import { Box, Text } from "ink";
3
3
  import { Header } from "../parts/Header.js";
4
4
  import { Footer } from "../parts/Footer.js";
5
5
  import { Select } from "../common/Select.js";
6
+ import { useAppInput } from "../../hooks/useAppInput.js";
6
7
  import { useTerminalSize } from "../../hooks/useTerminalSize.js";
7
8
 
9
+ /**
10
+ * Supported execution modes for interactive tools.
11
+ */
8
12
  export type ExecutionMode = "normal" | "continue" | "resume";
9
13
 
14
+ /**
15
+ * Selectable execution mode item (step 1).
16
+ */
10
17
  export interface ExecutionModeItem {
11
18
  label: string;
12
19
  value: ExecutionMode;
13
20
  description: string;
14
21
  }
15
22
 
23
+ /**
24
+ * Selectable skip-permissions item (step 2).
25
+ */
16
26
  export interface SkipPermissionsItem {
17
27
  label: string;
18
28
  value: string; // "yes" or "no"
19
29
  description: string;
20
30
  }
21
31
 
32
+ /**
33
+ * Result returned by `ExecutionModeSelectorScreen`.
34
+ */
22
35
  export interface ExecutionModeResult {
23
36
  mode: ExecutionMode;
24
37
  skipPermissions: boolean;
25
38
  }
26
39
 
40
+ /**
41
+ * Props for `ExecutionModeSelectorScreen`.
42
+ */
27
43
  export interface ExecutionModeSelectorScreenProps {
28
44
  onBack: () => void;
29
45
  onSelect: (result: ExecutionModeResult) => void;
@@ -48,7 +64,7 @@ export function ExecutionModeSelectorScreen({
48
64
  const [selectedMode, setSelectedMode] = useState<ExecutionMode | null>(null);
49
65
 
50
66
  // Handle keyboard input
51
- useInput((input, key) => {
67
+ useAppInput((input, key) => {
52
68
  if (key.escape) {
53
69
  if (step === 2) {
54
70
  // Go back to step 1
@@ -1,8 +1,9 @@
1
1
  import React, { useEffect, useMemo, useState } from "react";
2
- import { Box, Text, useInput } from "ink";
2
+ import { Box, Text } from "ink";
3
3
  import { Header } from "../parts/Header.js";
4
4
  import { Footer } from "../parts/Footer.js";
5
5
  import { Select, type SelectItem } from "../common/Select.js";
6
+ import { useAppInput } from "../../hooks/useAppInput.js";
6
7
  import { useTerminalSize } from "../../hooks/useTerminalSize.js";
7
8
  import type { AITool, InferenceLevel, ModelOption } from "../../types.js";
8
9
  import {
@@ -12,6 +13,9 @@ import {
12
13
  getModelOptions,
13
14
  } from "../../utils/modelOptions.js";
14
15
 
16
+ /**
17
+ * Result returned by `ModelSelectorScreen`.
18
+ */
15
19
  export interface ModelSelectionResult {
16
20
  model: string | null;
17
21
  inferenceLevel?: InferenceLevel;
@@ -25,6 +29,9 @@ interface InferenceSelectItem extends SelectItem {
25
29
  hint?: string;
26
30
  }
27
31
 
32
+ /**
33
+ * Props for `ModelSelectorScreen`.
34
+ */
28
35
  export interface ModelSelectorScreenProps {
29
36
  tool: AITool;
30
37
  onBack: () => void;
@@ -158,7 +165,7 @@ export function ModelSelectorScreen({
158
165
  return index >= 0 ? index : 0;
159
166
  }, [initialSelection?.inferenceLevel, inferenceOptions, selectedModel]);
160
167
 
161
- useInput((_input, key) => {
168
+ useAppInput((_input, key) => {
162
169
  if (key.escape) {
163
170
  if (step === "inference") {
164
171
  setStep("model");
@@ -1,17 +1,24 @@
1
1
  import React from "react";
2
- import { Box, Text, useInput } from "ink";
2
+ import { Box, Text } from "ink";
3
3
  import { Header } from "../parts/Header.js";
4
4
  import { Footer } from "../parts/Footer.js";
5
5
  import { Select } from "../common/Select.js";
6
+ import { useAppInput } from "../../hooks/useAppInput.js";
6
7
  import { useTerminalSize } from "../../hooks/useTerminalSize.js";
7
8
  import type { CleanupTarget } from "../../types.js";
8
9
 
10
+ /**
11
+ * Renderable item for the cleanup target list.
12
+ */
9
13
  export interface PRItem {
10
14
  label: string;
11
15
  value: string;
12
16
  target: CleanupTarget;
13
17
  }
14
18
 
19
+ /**
20
+ * Props for `PRCleanupScreen`.
21
+ */
15
22
  export interface PRCleanupScreenProps {
16
23
  targets: CleanupTarget[];
17
24
  loading: boolean;
@@ -41,7 +48,7 @@ export function PRCleanupScreen({
41
48
 
42
49
  // Handle keyboard input
43
50
  // Note: Select component handles Enter and arrow keys
44
- useInput((input, key) => {
51
+ useAppInput((input, key) => {
45
52
  if (key.escape) {
46
53
  onBack();
47
54
  } else if (input === "r") {
@@ -1,16 +1,23 @@
1
1
  import React from "react";
2
- import { Box, Text, useInput } from "ink";
2
+ import { Box, Text } from "ink";
3
3
  import { Header } from "../parts/Header.js";
4
4
  import { Footer } from "../parts/Footer.js";
5
5
  import { Select } from "../common/Select.js";
6
+ import { useAppInput } from "../../hooks/useAppInput.js";
6
7
  import { useTerminalSize } from "../../hooks/useTerminalSize.js";
7
8
 
9
+ /**
10
+ * Renderable item for the session selector list.
11
+ */
8
12
  export interface SessionItem {
9
13
  label: string;
10
14
  value: string;
11
15
  secondary?: string;
12
16
  }
13
17
 
18
+ /**
19
+ * Props for `SessionSelectorScreen`.
20
+ */
14
21
  export interface SessionSelectorScreenProps {
15
22
  sessions: {
16
23
  sessionId: string;
@@ -41,7 +48,7 @@ export function SessionSelectorScreen({
41
48
 
42
49
  // Handle keyboard input
43
50
  // Note: Select component handles Enter and arrow keys
44
- useInput((input, key) => {
51
+ useAppInput((input, key) => {
45
52
  if (key.escape) {
46
53
  onBack();
47
54
  }