@akiojin/gwt 4.9.0 → 4.9.1

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 (153) hide show
  1. package/README.ja.md +58 -34
  2. package/README.md +18 -34
  3. package/dist/cli/ui/components/App.d.ts +2 -2
  4. package/dist/cli/ui/components/App.d.ts.map +1 -1
  5. package/dist/cli/ui/components/App.js +8 -8
  6. package/dist/cli/ui/components/App.js.map +1 -1
  7. package/dist/cli/ui/components/screens/CodingAgentSelectorScreen.d.ts +27 -0
  8. package/dist/cli/ui/components/screens/CodingAgentSelectorScreen.d.ts.map +1 -0
  9. package/dist/cli/ui/components/screens/{AIToolSelectorScreen.js → CodingAgentSelectorScreen.js} +35 -35
  10. package/dist/cli/ui/components/screens/CodingAgentSelectorScreen.js.map +1 -0
  11. package/dist/cli/ui/components/screens/ModelSelectorScreen.d.ts +2 -2
  12. package/dist/cli/ui/components/screens/ModelSelectorScreen.d.ts.map +1 -1
  13. package/dist/cli/ui/components/screens/ModelSelectorScreen.js.map +1 -1
  14. package/dist/cli/ui/types.d.ts +2 -2
  15. package/dist/cli/ui/types.d.ts.map +1 -1
  16. package/dist/cli/ui/utils/modelOptions.d.ts +4 -4
  17. package/dist/cli/ui/utils/modelOptions.d.ts.map +1 -1
  18. package/dist/cli/ui/utils/modelOptions.js.map +1 -1
  19. package/dist/client/assets/{index-PqK9jkug.js → index-LNPtOrn3.js} +17 -17
  20. package/dist/client/index.html +1 -1
  21. package/dist/config/builtin-coding-agents.d.ts +23 -0
  22. package/dist/config/builtin-coding-agents.d.ts.map +1 -0
  23. package/dist/config/{builtin-tools.js → builtin-coding-agents.js} +6 -6
  24. package/dist/config/builtin-coding-agents.js.map +1 -0
  25. package/dist/config/tools.d.ts +16 -16
  26. package/dist/config/tools.d.ts.map +1 -1
  27. package/dist/config/tools.js +81 -78
  28. package/dist/config/tools.js.map +1 -1
  29. package/dist/index.js +19 -19
  30. package/dist/index.js.map +1 -1
  31. package/dist/launcher.d.ts +8 -8
  32. package/dist/launcher.d.ts.map +1 -1
  33. package/dist/launcher.js +32 -28
  34. package/dist/launcher.js.map +1 -1
  35. package/dist/services/codingAgentCommandResolver.d.ts +10 -0
  36. package/dist/services/codingAgentCommandResolver.d.ts.map +1 -0
  37. package/dist/services/{customToolResolver.js → codingAgentCommandResolver.js} +25 -20
  38. package/dist/services/codingAgentCommandResolver.js.map +1 -0
  39. package/dist/services/{aiToolResolver.d.ts → codingAgentResolver.d.ts} +6 -6
  40. package/dist/services/codingAgentResolver.d.ts.map +1 -0
  41. package/dist/services/{aiToolResolver.js → codingAgentResolver.js} +23 -23
  42. package/dist/services/codingAgentResolver.js.map +1 -0
  43. package/dist/shared/{aiToolConstants.d.ts → codingAgentConstants.d.ts} +2 -2
  44. package/dist/shared/codingAgentConstants.d.ts.map +1 -0
  45. package/dist/shared/{aiToolConstants.js → codingAgentConstants.js} +2 -2
  46. package/dist/shared/codingAgentConstants.js.map +1 -0
  47. package/dist/types/api.d.ts +12 -12
  48. package/dist/types/api.d.ts.map +1 -1
  49. package/dist/types/tools.d.ts +30 -30
  50. package/dist/types/tools.d.ts.map +1 -1
  51. package/dist/types/tools.js +1 -1
  52. package/dist/web/client/src/components/CodingAgentLaunchModal.d.ts +9 -0
  53. package/dist/web/client/src/components/CodingAgentLaunchModal.d.ts.map +1 -0
  54. package/dist/web/client/src/components/{AIToolLaunchModal.js → CodingAgentLaunchModal.js} +58 -58
  55. package/dist/web/client/src/components/CodingAgentLaunchModal.js.map +1 -0
  56. package/dist/web/client/src/components/CustomCodingAgentForm.d.ts +23 -0
  57. package/dist/web/client/src/components/CustomCodingAgentForm.d.ts.map +1 -0
  58. package/dist/web/client/src/components/{CustomToolForm.js → CustomCodingAgentForm.js} +5 -5
  59. package/dist/web/client/src/components/CustomCodingAgentForm.js.map +1 -0
  60. package/dist/web/client/src/components/CustomCodingAgentList.d.ts +10 -0
  61. package/dist/web/client/src/components/CustomCodingAgentList.d.ts.map +1 -0
  62. package/dist/web/client/src/components/{CustomToolList.js → CustomCodingAgentList.js} +17 -17
  63. package/dist/web/client/src/components/CustomCodingAgentList.js.map +1 -0
  64. package/dist/web/client/src/components/branch-detail/SessionHistoryTable.d.ts +2 -2
  65. package/dist/web/client/src/components/branch-detail/SessionHistoryTable.d.ts.map +1 -1
  66. package/dist/web/client/src/components/branch-detail/SessionHistoryTable.js +6 -6
  67. package/dist/web/client/src/components/branch-detail/SessionHistoryTable.js.map +1 -1
  68. package/dist/web/client/src/components/branch-detail/ToolLauncher.d.ts +2 -2
  69. package/dist/web/client/src/components/branch-detail/ToolLauncher.d.ts.map +1 -1
  70. package/dist/web/client/src/components/branch-detail/ToolLauncher.js +5 -5
  71. package/dist/web/client/src/components/branch-detail/ToolLauncher.js.map +1 -1
  72. package/dist/web/client/src/hooks/useSessions.d.ts +4 -4
  73. package/dist/web/client/src/hooks/useSessions.d.ts.map +1 -1
  74. package/dist/web/client/src/hooks/useSessions.js.map +1 -1
  75. package/dist/web/client/src/lib/api.d.ts +5 -5
  76. package/dist/web/client/src/lib/api.d.ts.map +1 -1
  77. package/dist/web/client/src/lib/api.js +1 -1
  78. package/dist/web/client/src/lib/api.js.map +1 -1
  79. package/dist/web/client/src/pages/BranchDetailPage.js +24 -24
  80. package/dist/web/client/src/pages/BranchDetailPage.js.map +1 -1
  81. package/dist/web/client/src/pages/ConfigManagementPage.d.ts.map +1 -1
  82. package/dist/web/client/src/pages/ConfigManagementPage.js +15 -15
  83. package/dist/web/client/src/pages/ConfigManagementPage.js.map +1 -1
  84. package/dist/web/client/src/pages/ConfigPage.d.ts.map +1 -1
  85. package/dist/web/client/src/pages/ConfigPage.js +43 -39
  86. package/dist/web/client/src/pages/ConfigPage.js.map +1 -1
  87. package/dist/web/server/env/importer.d.ts.map +1 -1
  88. package/dist/web/server/env/importer.js +3 -3
  89. package/dist/web/server/env/importer.js.map +1 -1
  90. package/dist/web/server/pty/manager.d.ts +6 -6
  91. package/dist/web/server/pty/manager.d.ts.map +1 -1
  92. package/dist/web/server/pty/manager.js +11 -11
  93. package/dist/web/server/pty/manager.js.map +1 -1
  94. package/dist/web/server/routes/config.d.ts.map +1 -1
  95. package/dist/web/server/routes/config.js +34 -34
  96. package/dist/web/server/routes/config.js.map +1 -1
  97. package/dist/web/server/routes/sessions.d.ts +1 -1
  98. package/dist/web/server/routes/sessions.d.ts.map +1 -1
  99. package/dist/web/server/routes/sessions.js +20 -20
  100. package/dist/web/server/routes/sessions.js.map +1 -1
  101. package/package.json +2 -2
  102. package/src/cli/ui/__tests__/components/screens/{AIToolSelectorScreen.test.tsx → CodingAgentSelectorScreen.test.tsx} +38 -38
  103. package/src/cli/ui/components/App.tsx +22 -20
  104. package/src/cli/ui/components/screens/CodingAgentSelectorScreen.tsx +159 -0
  105. package/src/cli/ui/components/screens/ModelSelectorScreen.tsx +6 -2
  106. package/src/cli/ui/types.ts +2 -2
  107. package/src/cli/ui/utils/modelOptions.ts +6 -4
  108. package/src/config/{builtin-tools.ts → builtin-coding-agents.ts} +9 -9
  109. package/src/config/tools.ts +104 -92
  110. package/src/index.ts +19 -19
  111. package/src/launcher.ts +38 -31
  112. package/src/services/{customToolResolver.ts → codingAgentCommandResolver.ts} +33 -28
  113. package/src/services/{aiToolResolver.ts → codingAgentResolver.ts} +28 -28
  114. package/src/shared/{aiToolConstants.ts → codingAgentConstants.ts} +1 -1
  115. package/src/types/api.ts +12 -12
  116. package/src/types/tools.ts +30 -30
  117. package/src/web/client/src/components/{AIToolLaunchModal.tsx → CodingAgentLaunchModal.tsx} +74 -70
  118. package/src/web/client/src/components/{CustomToolForm.tsx → CustomCodingAgentForm.tsx} +14 -14
  119. package/src/web/client/src/components/{CustomToolList.tsx → CustomCodingAgentList.tsx} +26 -26
  120. package/src/web/client/src/components/branch-detail/SessionHistoryTable.tsx +7 -7
  121. package/src/web/client/src/components/branch-detail/ToolLauncher.tsx +9 -9
  122. package/src/web/client/src/hooks/useSessions.ts +5 -5
  123. package/src/web/client/src/lib/api.ts +8 -8
  124. package/src/web/client/src/pages/BranchDetailPage.tsx +26 -26
  125. package/src/web/client/src/pages/ConfigManagementPage.tsx +32 -24
  126. package/src/web/client/src/pages/ConfigPage.tsx +55 -49
  127. package/src/web/server/env/importer.ts +6 -3
  128. package/src/web/server/pty/manager.ts +20 -20
  129. package/src/web/server/routes/config.ts +45 -39
  130. package/src/web/server/routes/sessions.ts +29 -26
  131. package/dist/cli/ui/components/screens/AIToolSelectorScreen.d.ts +0 -27
  132. package/dist/cli/ui/components/screens/AIToolSelectorScreen.d.ts.map +0 -1
  133. package/dist/cli/ui/components/screens/AIToolSelectorScreen.js.map +0 -1
  134. package/dist/config/builtin-tools.d.ts +0 -23
  135. package/dist/config/builtin-tools.d.ts.map +0 -1
  136. package/dist/config/builtin-tools.js.map +0 -1
  137. package/dist/services/aiToolResolver.d.ts.map +0 -1
  138. package/dist/services/aiToolResolver.js.map +0 -1
  139. package/dist/services/customToolResolver.d.ts +0 -10
  140. package/dist/services/customToolResolver.d.ts.map +0 -1
  141. package/dist/services/customToolResolver.js.map +0 -1
  142. package/dist/shared/aiToolConstants.d.ts.map +0 -1
  143. package/dist/shared/aiToolConstants.js.map +0 -1
  144. package/dist/web/client/src/components/AIToolLaunchModal.d.ts +0 -9
  145. package/dist/web/client/src/components/AIToolLaunchModal.d.ts.map +0 -1
  146. package/dist/web/client/src/components/AIToolLaunchModal.js.map +0 -1
  147. package/dist/web/client/src/components/CustomToolForm.d.ts +0 -23
  148. package/dist/web/client/src/components/CustomToolForm.d.ts.map +0 -1
  149. package/dist/web/client/src/components/CustomToolForm.js.map +0 -1
  150. package/dist/web/client/src/components/CustomToolList.d.ts +0 -10
  151. package/dist/web/client/src/components/CustomToolList.d.ts.map +0 -1
  152. package/dist/web/client/src/components/CustomToolList.js.map +0 -1
  153. package/src/cli/ui/components/screens/AIToolSelectorScreen.tsx +0 -153
@@ -7,28 +7,28 @@ import {
7
7
  } from "@/components/ui/card";
8
8
  import { Button } from "@/components/ui/button";
9
9
  import { Badge } from "@/components/ui/badge";
10
- import type { CustomAITool } from "../../../../types/api.js";
10
+ import type { ApiCodingAgent } from "../../../../types/api.js";
11
11
 
12
- interface CustomToolListProps {
13
- tools: CustomAITool[];
14
- onEdit: (tool: CustomAITool) => void;
15
- onDelete: (tool: CustomAITool) => void;
12
+ interface CustomCodingAgentListProps {
13
+ agents: ApiCodingAgent[];
14
+ onEdit: (agent: ApiCodingAgent) => void;
15
+ onDelete: (agent: ApiCodingAgent) => void;
16
16
  }
17
17
 
18
- export function CustomToolList({
19
- tools,
18
+ export function CustomCodingAgentList({
19
+ agents,
20
20
  onEdit,
21
21
  onDelete,
22
- }: CustomToolListProps) {
23
- if (!tools.length) {
22
+ }: CustomCodingAgentListProps) {
23
+ if (!agents.length) {
24
24
  return (
25
25
  <Card className="border-dashed">
26
26
  <CardContent className="flex flex-col items-center justify-center py-12 text-center">
27
27
  <h3 className="text-lg font-semibold">
28
- カスタムツールが登録されていません
28
+ Custom Coding Agent が登録されていません
29
29
  </h3>
30
30
  <p className="mt-2 text-sm text-muted-foreground">
31
- 「カスタムツールを追加」から最初のツールを登録してください。
31
+ 「Coding Agent を追加」から最初のエージェントを登録してください。
32
32
  </p>
33
33
  </CardContent>
34
34
  </Card>
@@ -37,59 +37,59 @@ export function CustomToolList({
37
37
 
38
38
  return (
39
39
  <div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
40
- {tools.map((tool) => (
41
- <Card key={tool.id} className="flex flex-col">
40
+ {agents.map((agent) => (
41
+ <Card key={agent.id} className="flex flex-col">
42
42
  <CardHeader className="pb-3">
43
43
  <div className="flex items-start justify-between gap-2">
44
44
  <div className="min-w-0 flex-1">
45
45
  <p className="text-xs font-medium uppercase tracking-wider text-muted-foreground">
46
- ID: {tool.id}
46
+ ID: {agent.id}
47
47
  </p>
48
48
  <h3 className="mt-1 flex items-center gap-2 font-semibold">
49
- {tool.icon && <span>{tool.icon}</span>}
50
- <span className="truncate">{tool.displayName}</span>
49
+ {agent.icon && <span>{agent.icon}</span>}
50
+ <span className="truncate">{agent.displayName}</span>
51
51
  </h3>
52
52
  </div>
53
53
  <Badge variant="outline">
54
- {renderExecutionLabel(tool.executionType)}
54
+ {renderExecutionLabel(agent.executionType)}
55
55
  </Badge>
56
56
  </div>
57
57
  </CardHeader>
58
58
 
59
59
  <CardContent className="flex-1 space-y-3 pb-3">
60
60
  <p className="rounded bg-muted px-2 py-1 font-mono text-sm">
61
- {tool.command}
61
+ {agent.command}
62
62
  </p>
63
63
 
64
- {tool.description && (
64
+ {agent.description && (
65
65
  <p className="text-sm text-muted-foreground">
66
- {tool.description}
66
+ {agent.description}
67
67
  </p>
68
68
  )}
69
69
 
70
70
  <dl className="grid grid-cols-3 gap-2 text-xs">
71
71
  <div>
72
72
  <dt className="text-muted-foreground">normal</dt>
73
- <dd className="mt-0.5">{renderArgs(tool.modeArgs?.normal)}</dd>
73
+ <dd className="mt-0.5">{renderArgs(agent.modeArgs?.normal)}</dd>
74
74
  </div>
75
75
  <div>
76
76
  <dt className="text-muted-foreground">continue</dt>
77
77
  <dd className="mt-0.5">
78
- {renderArgs(tool.modeArgs?.continue)}
78
+ {renderArgs(agent.modeArgs?.continue)}
79
79
  </dd>
80
80
  </div>
81
81
  <div>
82
82
  <dt className="text-muted-foreground">resume</dt>
83
- <dd className="mt-0.5">{renderArgs(tool.modeArgs?.resume)}</dd>
83
+ <dd className="mt-0.5">{renderArgs(agent.modeArgs?.resume)}</dd>
84
84
  </div>
85
85
  </dl>
86
86
  </CardContent>
87
87
 
88
88
  <CardFooter className="flex gap-2 pt-0">
89
- <Button variant="secondary" size="sm" onClick={() => onEdit(tool)}>
89
+ <Button variant="secondary" size="sm" onClick={() => onEdit(agent)}>
90
90
  編集
91
91
  </Button>
92
- <Button variant="ghost" size="sm" onClick={() => onDelete(tool)}>
92
+ <Button variant="ghost" size="sm" onClick={() => onDelete(agent)}>
93
93
  削除
94
94
  </Button>
95
95
  </CardFooter>
@@ -99,7 +99,7 @@ export function CustomToolList({
99
99
  );
100
100
  }
101
101
 
102
- function renderExecutionLabel(type: CustomAITool["executionType"]) {
102
+ function renderExecutionLabel(type: ApiCodingAgent["executionType"]) {
103
103
  switch (type) {
104
104
  case "path":
105
105
  return "実行ファイル";
@@ -14,8 +14,8 @@ import {
14
14
  interface SessionInfo {
15
15
  sessionId: string;
16
16
  worktreePath: string;
17
- toolType: string;
18
- toolName?: string | null;
17
+ agentType: string;
18
+ agentName?: string | null;
19
19
  mode?: string;
20
20
  status: "pending" | "running" | "completed" | "failed";
21
21
  startedAt?: string;
@@ -62,9 +62,9 @@ function formatDate(value?: string | null): string {
62
62
  }
63
63
  }
64
64
 
65
- function toolLabel(toolType: string, toolName?: string | null): string {
66
- if (toolType === "custom") return toolName ?? "Custom";
67
- if (toolType === "codex-cli") return "Codex CLI";
65
+ function agentLabel(agentType: string, agentName?: string | null): string {
66
+ if (agentType === "custom") return agentName ?? "Custom";
67
+ if (agentType === "codex-cli") return "Codex CLI";
68
68
  return "Claude Code";
69
69
  }
70
70
 
@@ -93,7 +93,7 @@ export function SessionHistoryTable({
93
93
  )}
94
94
  </div>
95
95
  <p className="mt-2 text-sm text-muted-foreground">
96
- この Worktree に紐づいた AI セッション履歴です。CLI
96
+ この Worktree に紐づいた Coding Agent セッション履歴です。CLI
97
97
  からの起動分も共有されます。
98
98
  </p>
99
99
  </CardHeader>
@@ -132,7 +132,7 @@ export function SessionHistoryTable({
132
132
  </Badge>
133
133
  </TableCell>
134
134
  <TableCell className="font-medium">
135
- {toolLabel(session.toolType, session.toolName)}
135
+ {agentLabel(session.agentType, session.agentName)}
136
136
  </TableCell>
137
137
  <TableCell>
138
138
  <span className="text-muted-foreground">
@@ -13,14 +13,14 @@ import {
13
13
  SelectValue,
14
14
  } from "@/components/ui/select";
15
15
  import { cn } from "@/lib/utils";
16
- import type { CustomAITool, Branch } from "../../../../../types/api.js";
16
+ import type { ApiCodingAgent, Branch } from "../../../../../types/api.js";
17
17
 
18
18
  type ToolMode = "normal" | "continue" | "resume";
19
19
 
20
20
  export type SelectableTool =
21
21
  | { id: "claude-code"; label: string; target: "claude" }
22
22
  | { id: "codex-cli"; label: string; target: "codex" }
23
- | { id: string; label: string; target: "custom"; definition: CustomAITool };
23
+ | { id: string; label: string; target: "custom"; definition: ApiCodingAgent };
24
24
 
25
25
  interface ToolSummary {
26
26
  command: string;
@@ -139,13 +139,13 @@ export function ToolLauncher({
139
139
  <p className="text-xs font-medium uppercase tracking-wider text-muted-foreground">
140
140
  Tool Launcher
141
141
  </p>
142
- <h3 className="mt-1 text-lg font-semibold">AIツール起動</h3>
142
+ <h3 className="mt-1 text-lg font-semibold">Coding Agent</h3>
143
143
  </div>
144
144
  {configError && <Badge variant="warning">設定の取得に失敗</Badge>}
145
145
  </div>
146
146
  <p className="mt-2 text-sm text-muted-foreground">
147
- Web UI
148
- から直接AIツールを起動できます。設定したカスタムツールも一覧に表示されます。
147
+ Web UI から直接 Coding Agent
148
+ を起動できます。設定したカスタムエージェントも一覧に表示されます。
149
149
  </p>
150
150
  </CardHeader>
151
151
 
@@ -159,14 +159,14 @@ export function ToolLauncher({
159
159
  {/* Form Grid */}
160
160
  <div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
161
161
  <div className="space-y-2">
162
- <label className="text-sm font-medium">AIツール</label>
162
+ <label className="text-sm font-medium">Coding Agent</label>
163
163
  <Select
164
164
  value={selectedToolId}
165
165
  onValueChange={onToolChange}
166
166
  disabled={isConfigLoading ?? false}
167
167
  >
168
168
  <SelectTrigger>
169
- <SelectValue placeholder="ツールを選択" />
169
+ <SelectValue placeholder="Select Coding Agent" />
170
170
  </SelectTrigger>
171
171
  <SelectContent>
172
172
  {availableTools.map((tool) => (
@@ -232,8 +232,8 @@ export function ToolLauncher({
232
232
  <AlertDescription>
233
233
  <p>
234
234
  リモートに未取得の更新 ({branch.divergence?.behind ?? 0}{" "}
235
- commits)
236
- があるため、AIツールを起動する前に同期してください。
235
+ commits) があるため、Coding Agent
236
+ を起動する前に同期してください。
237
237
  </p>
238
238
  <p className="mt-1 text-xs text-muted-foreground">
239
239
  CLI の `git fetch --all` と `git pull --ff-only`
@@ -5,7 +5,7 @@
5
5
  import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
6
6
  import { sessionApi } from "../lib/api";
7
7
  import type {
8
- AIToolSession,
8
+ CodingAgentSession,
9
9
  StartSessionRequest,
10
10
  } from "../../../../types/api.js";
11
11
 
@@ -13,7 +13,7 @@ import type {
13
13
  * セッション一覧を取得
14
14
  */
15
15
  export function useSessions() {
16
- return useQuery<AIToolSession[]>({
16
+ return useQuery<CodingAgentSession[]>({
17
17
  queryKey: ["sessions"],
18
18
  queryFn: sessionApi.list,
19
19
  });
@@ -23,7 +23,7 @@ export function useSessions() {
23
23
  * 特定のセッション情報を取得
24
24
  */
25
25
  export function useSession(sessionId: string) {
26
- return useQuery<AIToolSession>({
26
+ return useQuery<CodingAgentSession>({
27
27
  queryKey: ["sessions", sessionId],
28
28
  queryFn: () => sessionApi.get(sessionId),
29
29
  enabled: !!sessionId,
@@ -38,8 +38,8 @@ export function useStartSession() {
38
38
 
39
39
  return useMutation({
40
40
  mutationFn: (request: StartSessionRequest) => sessionApi.start(request),
41
- onSuccess: (session: AIToolSession) => {
42
- queryClient.setQueryData<AIToolSession[] | undefined>(
41
+ onSuccess: (session: CodingAgentSession) => {
42
+ queryClient.setQueryData<CodingAgentSession[] | undefined>(
43
43
  ["sessions"],
44
44
  (existing) => {
45
45
  const next =
@@ -8,7 +8,7 @@
8
8
  import type {
9
9
  Branch,
10
10
  Worktree,
11
- AIToolSession,
11
+ CodingAgentSession,
12
12
  HealthResponse,
13
13
  CreateWorktreeRequest,
14
14
  StartSessionRequest,
@@ -137,15 +137,15 @@ export const sessionApi = {
137
137
  /**
138
138
  * すべてのセッション一覧を取得
139
139
  */
140
- list: async (): Promise<AIToolSession[]> => {
141
- return apiFetch<AIToolSession[]>(`${API_BASE}/sessions`);
140
+ list: async (): Promise<CodingAgentSession[]> => {
141
+ return apiFetch<CodingAgentSession[]>(`${API_BASE}/sessions`);
142
142
  },
143
143
 
144
144
  /**
145
145
  * 新しいセッションを開始
146
146
  */
147
- start: async (request: StartSessionRequest): Promise<AIToolSession> => {
148
- return apiFetch<AIToolSession>(`${API_BASE}/sessions`, {
147
+ start: async (request: StartSessionRequest): Promise<CodingAgentSession> => {
148
+ return apiFetch<CodingAgentSession>(`${API_BASE}/sessions`, {
149
149
  method: "POST",
150
150
  body: JSON.stringify(request),
151
151
  });
@@ -154,8 +154,8 @@ export const sessionApi = {
154
154
  /**
155
155
  * 特定のセッション情報を取得
156
156
  */
157
- get: async (sessionId: string): Promise<AIToolSession> => {
158
- return apiFetch<AIToolSession>(`${API_BASE}/sessions/${sessionId}`);
157
+ get: async (sessionId: string): Promise<CodingAgentSession> => {
158
+ return apiFetch<CodingAgentSession>(`${API_BASE}/sessions/${sessionId}`);
159
159
  },
160
160
 
161
161
  /**
@@ -173,7 +173,7 @@ export const sessionApi = {
173
173
  */
174
174
  export const configApi = {
175
175
  /**
176
- * カスタムAI Tool設定を取得
176
+ * カスタム Coding Agent 設定を取得
177
177
  */
178
178
  get: async (): Promise<ConfigPayload> => apiFetch(`${API_BASE}/config`),
179
179
  update: async (request: ConfigPayload): Promise<ConfigPayload> =>
@@ -22,7 +22,7 @@ import {
22
22
  } from "@/components/branch-detail";
23
23
  import type {
24
24
  Branch,
25
- CustomAITool,
25
+ ApiCodingAgent,
26
26
  LastToolUsage,
27
27
  } from "../../../../types/api.js";
28
28
 
@@ -88,22 +88,22 @@ export function BranchDetailPage() {
88
88
  };
89
89
  }, [isTerminalFullscreen]);
90
90
 
91
- // Available tools - must be before conditional returns
92
- const customTools: CustomAITool[] = config?.tools ?? [];
91
+ // Available coding agents - must be before conditional returns
92
+ const customAgents: ApiCodingAgent[] = config?.codingAgents ?? [];
93
93
  const availableTools: SelectableTool[] = useMemo(
94
94
  () => [
95
95
  { id: "claude-code", label: "Claude Code", target: "claude" },
96
96
  { id: "codex-cli", label: "Codex CLI", target: "codex" },
97
- ...customTools.map(
98
- (tool): SelectableTool => ({
99
- id: tool.id,
100
- label: tool.displayName,
97
+ ...customAgents.map(
98
+ (agent): SelectableTool => ({
99
+ id: agent.id,
100
+ label: agent.displayName,
101
101
  target: "custom" as const,
102
- definition: tool,
102
+ definition: agent,
103
103
  }),
104
104
  ),
105
105
  ],
106
- [customTools],
106
+ [customAgents],
107
107
  );
108
108
 
109
109
  // Ensure selected tool is valid - must be before conditional returns
@@ -135,13 +135,13 @@ export function BranchDetailPage() {
135
135
  branch: branch.name,
136
136
  worktreePath: branch.worktreePath ?? null,
137
137
  toolId:
138
- first.toolType === "custom"
139
- ? (first.toolName ?? "custom")
140
- : (first.toolType as LastToolUsage["toolId"]),
138
+ first.agentType === "custom"
139
+ ? (first.agentName ?? "custom")
140
+ : (first.agentType as LastToolUsage["toolId"]),
141
141
  toolLabel:
142
- first.toolType === "custom"
143
- ? (first.toolName ?? "Custom")
144
- : toolLabel(first.toolType),
142
+ first.agentType === "custom"
143
+ ? (first.agentName ?? "Custom")
144
+ : agentLabel(first.agentType),
145
145
  mode: first.mode ?? "normal",
146
146
  model: null,
147
147
  timestamp: first.startedAt ? Date.parse(first.startedAt) : Date.now(),
@@ -257,7 +257,7 @@ export function BranchDetailPage() {
257
257
  if (!selectedTool) {
258
258
  setBanner({
259
259
  type: "error",
260
- message: "起動するAIツールを選択してください",
260
+ message: "起動する Coding Agent を選択してください",
261
261
  });
262
262
  return;
263
263
  }
@@ -265,7 +265,7 @@ export function BranchDetailPage() {
265
265
  if (needsRemoteSync) {
266
266
  setBanner({
267
267
  type: "error",
268
- message: "リモートの更新を取り込むまでAIツールは起動できません。",
268
+ message: "リモートの更新を取り込むまで Coding Agent は起動できません。",
269
269
  });
270
270
  return;
271
271
  }
@@ -287,7 +287,7 @@ export function BranchDetailPage() {
287
287
 
288
288
  setIsStartingSession(true);
289
289
  try {
290
- const toolType: ToolType =
290
+ const agentType: ToolType =
291
291
  selectedTool.target === "codex"
292
292
  ? "codex-cli"
293
293
  : selectedTool.target === "custom"
@@ -298,10 +298,10 @@ export function BranchDetailPage() {
298
298
  .map((c) => c.trim())
299
299
  .filter(Boolean);
300
300
  const sessionRequest = {
301
- toolType,
302
- toolName: selectedTool.target === "custom" ? selectedTool.id : null,
301
+ agentType,
302
+ agentName: selectedTool.target === "custom" ? selectedTool.id : null,
303
303
  ...(selectedTool.target === "custom"
304
- ? { customToolId: selectedTool.id }
304
+ ? { customAgentId: selectedTool.id }
305
305
  : {}),
306
306
  mode: selectedMode,
307
307
  worktreePath: branch.worktreePath,
@@ -317,7 +317,7 @@ export function BranchDetailPage() {
317
317
  setIsTerminalFullscreen(false);
318
318
  setBanner({
319
319
  type: "info",
320
- message: `${toolLabel(toolType, selectedTool)} を起動しました。`,
320
+ message: `${agentLabel(agentType, selectedTool)} を起動しました。`,
321
321
  });
322
322
  } catch (err) {
323
323
  setBanner({
@@ -438,7 +438,7 @@ export function BranchDetailPage() {
438
438
  </Button>
439
439
  ) : (
440
440
  <Button variant="secondary" asChild>
441
- <Link to="/config">カスタムツール設定</Link>
441
+ <Link to="/config">Custom Coding Agent</Link>
442
442
  </Button>
443
443
  )}
444
444
  </div>
@@ -547,9 +547,9 @@ function formatError(error: unknown, fallback: string): string {
547
547
  return fallback;
548
548
  }
549
549
 
550
- function toolLabel(tool: string, selectedTool?: SelectableTool): string {
551
- if (tool === "custom" && selectedTool?.target === "custom")
550
+ function agentLabel(agentType: string, selectedTool?: SelectableTool): string {
551
+ if (agentType === "custom" && selectedTool?.target === "custom")
552
552
  return selectedTool.label;
553
- if (tool === "codex-cli") return "Codex CLI";
553
+ if (agentType === "codex-cli") return "Codex CLI";
554
554
  return "Claude Code";
555
555
  }
@@ -2,7 +2,7 @@ import React, { useEffect, useMemo, useState } from "react";
2
2
  import { Link } from "react-router-dom";
3
3
  import type {
4
4
  ConfigPayload,
5
- CustomAITool,
5
+ ApiCodingAgent,
6
6
  EnvironmentVariable,
7
7
  } from "../../../../types/api.js";
8
8
  import { useConfig, useUpdateConfig } from "../hooks/useConfig";
@@ -39,15 +39,17 @@ function buildPayload(
39
39
  sharedEnv: EnvRow[],
40
40
  toolState: ToolEnvState,
41
41
  ): ConfigPayload {
42
- const tools: CustomAITool[] = (base?.tools ?? []).map((tool) => ({
43
- ...tool,
44
- env: serializeRows(toolState[tool.id] ?? []),
45
- }));
42
+ const codingAgents: ApiCodingAgent[] = (base?.codingAgents ?? []).map(
43
+ (agent) => ({
44
+ ...agent,
45
+ env: serializeRows(toolState[agent.id] ?? []),
46
+ }),
47
+ );
46
48
 
47
49
  return {
48
50
  version: base?.version ?? "1.0.0",
49
51
  env: serializeRows(sharedEnv),
50
- tools,
52
+ codingAgents,
51
53
  };
52
54
  }
53
55
 
@@ -65,8 +67,8 @@ export function ConfigManagementPage() {
65
67
  if (!data) return;
66
68
  setSharedEnv(rowsFromVariables(data.env));
67
69
  const toolState: ToolEnvState = {};
68
- data.tools?.forEach((tool) => {
69
- toolState[tool.id] = rowsFromVariables(tool.env);
70
+ data.codingAgents?.forEach((agent) => {
71
+ toolState[agent.id] = rowsFromVariables(agent.env);
70
72
  });
71
73
  setToolEnv(toolState);
72
74
  }, [data]);
@@ -102,8 +104,11 @@ export function ConfigManagementPage() {
102
104
  if (serializedOriginalShared !== serializedCurrentShared) return true;
103
105
  if (!data) return false;
104
106
  const currentTool =
105
- data.tools?.map((tool) => serializeRows(toolEnv[tool.id] ?? [])) ?? [];
106
- const originalTool = data.tools?.map((tool) => tool.env ?? []) ?? [];
107
+ data.codingAgents?.map((agent) =>
108
+ serializeRows(toolEnv[agent.id] ?? []),
109
+ ) ?? [];
110
+ const originalTool =
111
+ data.codingAgents?.map((agent) => agent.env ?? []) ?? [];
107
112
  return JSON.stringify(currentTool) !== JSON.stringify(originalTool);
108
113
  }, [data, serializedOriginalShared, serializedCurrentShared, toolEnv]);
109
114
 
@@ -195,41 +200,44 @@ export function ConfigManagementPage() {
195
200
  <CardContent className="pt-6">
196
201
  <EnvEditor
197
202
  title="共通環境変数"
198
- description="全てのAIツールで共有される値。PAT やプロキシ設定などはこちらに入力してください。"
203
+ description="全ての Coding Agent で共有される値。PAT やプロキシ設定などはこちらに入力してください。"
199
204
  rows={sharedEnv}
200
205
  onChange={setSharedEnv}
201
206
  />
202
207
  </CardContent>
203
208
  </Card>
204
209
 
205
- {/* Tool-specific Environment Variables */}
210
+ {/* Agent-specific Environment Variables */}
206
211
  <Card>
207
212
  <CardHeader className="pb-3">
208
213
  <p className="text-xs font-medium uppercase tracking-wider text-muted-foreground">
209
- Tool-specific
214
+ Agent-specific
210
215
  </p>
211
- <h3 className="mt-1 text-lg font-semibold">ツール固有の環境変数</h3>
216
+ <h3 className="mt-1 text-lg font-semibold">
217
+ Coding Agent 固有の環境変数
218
+ </h3>
212
219
  <p className="mt-2 text-sm text-muted-foreground">
213
- 各ツール固有に上書きしたい値がある場合はこちらから設定します。
214
- 共通設定との競合がある場合はツール設定が優先されます。
220
+ 各 Coding Agent
221
+ 固有に上書きしたい値がある場合はこちらから設定します。
222
+ 共通設定との競合がある場合はエージェント設定が優先されます。
215
223
  </p>
216
224
  </CardHeader>
217
225
  <CardContent className="space-y-6">
218
- {data?.tools?.map((tool) => (
219
- <div key={tool.id} className="rounded-lg border p-4">
226
+ {data?.codingAgents?.map((agent) => (
227
+ <div key={agent.id} className="rounded-lg border p-4">
220
228
  <EnvEditor
221
- title={tool.displayName}
222
- description={`${tool.executionType} / ${tool.command}`}
223
- rows={toolEnv[tool.id] ?? []}
229
+ title={agent.displayName}
230
+ description={`${agent.executionType} / ${agent.command}`}
231
+ rows={toolEnv[agent.id] ?? []}
224
232
  onChange={(rows) =>
225
- setToolEnv((prev) => ({ ...prev, [tool.id]: rows }))
233
+ setToolEnv((prev) => ({ ...prev, [agent.id]: rows }))
226
234
  }
227
235
  />
228
236
  </div>
229
237
  ))}
230
- {!data?.tools?.length && (
238
+ {!data?.codingAgents?.length && (
231
239
  <p className="py-4 text-center text-sm text-muted-foreground">
232
- 登録されているツールがありません。
240
+ 登録されている Coding Agent がありません。
233
241
  </p>
234
242
  )}
235
243
  </CardContent>