@akiojin/gwt 4.8.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 (172) hide show
  1. package/README.ja.md +58 -34
  2. package/README.md +19 -35
  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/BranchListScreen.d.ts.map +1 -1
  8. package/dist/cli/ui/components/screens/BranchListScreen.js +3 -1
  9. package/dist/cli/ui/components/screens/BranchListScreen.js.map +1 -1
  10. package/dist/cli/ui/components/screens/CodingAgentSelectorScreen.d.ts +27 -0
  11. package/dist/cli/ui/components/screens/CodingAgentSelectorScreen.d.ts.map +1 -0
  12. package/dist/cli/ui/components/screens/{AIToolSelectorScreen.js → CodingAgentSelectorScreen.js} +35 -35
  13. package/dist/cli/ui/components/screens/CodingAgentSelectorScreen.js.map +1 -0
  14. package/dist/cli/ui/components/screens/ModelSelectorScreen.d.ts +2 -2
  15. package/dist/cli/ui/components/screens/ModelSelectorScreen.d.ts.map +1 -1
  16. package/dist/cli/ui/components/screens/ModelSelectorScreen.js.map +1 -1
  17. package/dist/cli/ui/types.d.ts +2 -2
  18. package/dist/cli/ui/types.d.ts.map +1 -1
  19. package/dist/cli/ui/utils/modelOptions.d.ts +4 -4
  20. package/dist/cli/ui/utils/modelOptions.d.ts.map +1 -1
  21. package/dist/cli/ui/utils/modelOptions.js.map +1 -1
  22. package/dist/client/assets/{index-PqK9jkug.js → index-LNPtOrn3.js} +17 -17
  23. package/dist/client/index.html +1 -1
  24. package/dist/config/builtin-coding-agents.d.ts +23 -0
  25. package/dist/config/builtin-coding-agents.d.ts.map +1 -0
  26. package/dist/config/{builtin-tools.js → builtin-coding-agents.js} +6 -6
  27. package/dist/config/builtin-coding-agents.js.map +1 -0
  28. package/dist/config/index.d.ts.map +1 -1
  29. package/dist/config/index.js +3 -7
  30. package/dist/config/index.js.map +1 -1
  31. package/dist/config/profiles.d.ts +2 -2
  32. package/dist/config/profiles.d.ts.map +1 -1
  33. package/dist/config/profiles.js +4 -7
  34. package/dist/config/profiles.js.map +1 -1
  35. package/dist/config/tools.d.ts +17 -17
  36. package/dist/config/tools.d.ts.map +1 -1
  37. package/dist/config/tools.js +84 -121
  38. package/dist/config/tools.js.map +1 -1
  39. package/dist/index.js +19 -19
  40. package/dist/index.js.map +1 -1
  41. package/dist/launcher.d.ts +8 -8
  42. package/dist/launcher.d.ts.map +1 -1
  43. package/dist/launcher.js +32 -28
  44. package/dist/launcher.js.map +1 -1
  45. package/dist/services/codingAgentCommandResolver.d.ts +10 -0
  46. package/dist/services/codingAgentCommandResolver.d.ts.map +1 -0
  47. package/dist/services/{customToolResolver.js → codingAgentCommandResolver.js} +25 -20
  48. package/dist/services/codingAgentCommandResolver.js.map +1 -0
  49. package/dist/services/{aiToolResolver.d.ts → codingAgentResolver.d.ts} +6 -6
  50. package/dist/services/codingAgentResolver.d.ts.map +1 -0
  51. package/dist/services/{aiToolResolver.js → codingAgentResolver.js} +23 -23
  52. package/dist/services/codingAgentResolver.js.map +1 -0
  53. package/dist/shared/{aiToolConstants.d.ts → codingAgentConstants.d.ts} +2 -2
  54. package/dist/shared/codingAgentConstants.d.ts.map +1 -0
  55. package/dist/shared/{aiToolConstants.js → codingAgentConstants.js} +2 -2
  56. package/dist/shared/codingAgentConstants.js.map +1 -0
  57. package/dist/types/api.d.ts +12 -12
  58. package/dist/types/api.d.ts.map +1 -1
  59. package/dist/types/tools.d.ts +30 -30
  60. package/dist/types/tools.d.ts.map +1 -1
  61. package/dist/types/tools.js +1 -1
  62. package/dist/utils/command.d.ts +11 -0
  63. package/dist/utils/command.d.ts.map +1 -1
  64. package/dist/utils/command.js +33 -0
  65. package/dist/utils/command.js.map +1 -1
  66. package/dist/web/client/src/components/CodingAgentLaunchModal.d.ts +9 -0
  67. package/dist/web/client/src/components/CodingAgentLaunchModal.d.ts.map +1 -0
  68. package/dist/web/client/src/components/{AIToolLaunchModal.js → CodingAgentLaunchModal.js} +58 -58
  69. package/dist/web/client/src/components/CodingAgentLaunchModal.js.map +1 -0
  70. package/dist/web/client/src/components/CustomCodingAgentForm.d.ts +23 -0
  71. package/dist/web/client/src/components/CustomCodingAgentForm.d.ts.map +1 -0
  72. package/dist/web/client/src/components/{CustomToolForm.js → CustomCodingAgentForm.js} +5 -5
  73. package/dist/web/client/src/components/CustomCodingAgentForm.js.map +1 -0
  74. package/dist/web/client/src/components/CustomCodingAgentList.d.ts +10 -0
  75. package/dist/web/client/src/components/CustomCodingAgentList.d.ts.map +1 -0
  76. package/dist/web/client/src/components/{CustomToolList.js → CustomCodingAgentList.js} +17 -17
  77. package/dist/web/client/src/components/CustomCodingAgentList.js.map +1 -0
  78. package/dist/web/client/src/components/branch-detail/SessionHistoryTable.d.ts +2 -2
  79. package/dist/web/client/src/components/branch-detail/SessionHistoryTable.d.ts.map +1 -1
  80. package/dist/web/client/src/components/branch-detail/SessionHistoryTable.js +6 -6
  81. package/dist/web/client/src/components/branch-detail/SessionHistoryTable.js.map +1 -1
  82. package/dist/web/client/src/components/branch-detail/ToolLauncher.d.ts +2 -2
  83. package/dist/web/client/src/components/branch-detail/ToolLauncher.d.ts.map +1 -1
  84. package/dist/web/client/src/components/branch-detail/ToolLauncher.js +5 -5
  85. package/dist/web/client/src/components/branch-detail/ToolLauncher.js.map +1 -1
  86. package/dist/web/client/src/hooks/useSessions.d.ts +4 -4
  87. package/dist/web/client/src/hooks/useSessions.d.ts.map +1 -1
  88. package/dist/web/client/src/hooks/useSessions.js.map +1 -1
  89. package/dist/web/client/src/lib/api.d.ts +5 -5
  90. package/dist/web/client/src/lib/api.d.ts.map +1 -1
  91. package/dist/web/client/src/lib/api.js +1 -1
  92. package/dist/web/client/src/lib/api.js.map +1 -1
  93. package/dist/web/client/src/pages/BranchDetailPage.js +24 -24
  94. package/dist/web/client/src/pages/BranchDetailPage.js.map +1 -1
  95. package/dist/web/client/src/pages/ConfigManagementPage.d.ts.map +1 -1
  96. package/dist/web/client/src/pages/ConfigManagementPage.js +15 -15
  97. package/dist/web/client/src/pages/ConfigManagementPage.js.map +1 -1
  98. package/dist/web/client/src/pages/ConfigPage.d.ts.map +1 -1
  99. package/dist/web/client/src/pages/ConfigPage.js +44 -40
  100. package/dist/web/client/src/pages/ConfigPage.js.map +1 -1
  101. package/dist/web/server/env/importer.d.ts.map +1 -1
  102. package/dist/web/server/env/importer.js +3 -3
  103. package/dist/web/server/env/importer.js.map +1 -1
  104. package/dist/web/server/pty/manager.d.ts +6 -6
  105. package/dist/web/server/pty/manager.d.ts.map +1 -1
  106. package/dist/web/server/pty/manager.js +11 -11
  107. package/dist/web/server/pty/manager.js.map +1 -1
  108. package/dist/web/server/routes/config.d.ts.map +1 -1
  109. package/dist/web/server/routes/config.js +34 -34
  110. package/dist/web/server/routes/config.js.map +1 -1
  111. package/dist/web/server/routes/sessions.d.ts +1 -1
  112. package/dist/web/server/routes/sessions.d.ts.map +1 -1
  113. package/dist/web/server/routes/sessions.js +20 -20
  114. package/dist/web/server/routes/sessions.js.map +1 -1
  115. package/package.json +2 -2
  116. package/src/cli/ui/__tests__/components/screens/{AIToolSelectorScreen.test.tsx → CodingAgentSelectorScreen.test.tsx} +38 -38
  117. package/src/cli/ui/components/App.tsx +22 -20
  118. package/src/cli/ui/components/screens/BranchListScreen.tsx +4 -2
  119. package/src/cli/ui/components/screens/CodingAgentSelectorScreen.tsx +159 -0
  120. package/src/cli/ui/components/screens/ModelSelectorScreen.tsx +6 -2
  121. package/src/cli/ui/types.ts +2 -2
  122. package/src/cli/ui/utils/modelOptions.ts +6 -4
  123. package/src/config/{builtin-tools.ts → builtin-coding-agents.ts} +9 -9
  124. package/src/config/index.ts +3 -7
  125. package/src/config/profiles.ts +4 -7
  126. package/src/config/tools.ts +107 -148
  127. package/src/index.ts +19 -19
  128. package/src/launcher.ts +38 -31
  129. package/src/services/{customToolResolver.ts → codingAgentCommandResolver.ts} +33 -28
  130. package/src/services/{aiToolResolver.ts → codingAgentResolver.ts} +28 -28
  131. package/src/shared/{aiToolConstants.ts → codingAgentConstants.ts} +1 -1
  132. package/src/types/api.ts +12 -12
  133. package/src/types/tools.ts +30 -30
  134. package/src/utils/command.ts +37 -0
  135. package/src/web/client/src/components/{AIToolLaunchModal.tsx → CodingAgentLaunchModal.tsx} +74 -70
  136. package/src/web/client/src/components/{CustomToolForm.tsx → CustomCodingAgentForm.tsx} +14 -14
  137. package/src/web/client/src/components/{CustomToolList.tsx → CustomCodingAgentList.tsx} +26 -26
  138. package/src/web/client/src/components/branch-detail/SessionHistoryTable.tsx +7 -7
  139. package/src/web/client/src/components/branch-detail/ToolLauncher.tsx +9 -9
  140. package/src/web/client/src/hooks/useSessions.ts +5 -5
  141. package/src/web/client/src/lib/api.ts +8 -8
  142. package/src/web/client/src/pages/BranchDetailPage.tsx +26 -26
  143. package/src/web/client/src/pages/ConfigManagementPage.tsx +32 -24
  144. package/src/web/client/src/pages/ConfigPage.tsx +57 -51
  145. package/src/web/server/env/importer.ts +6 -3
  146. package/src/web/server/pty/manager.ts +20 -20
  147. package/src/web/server/routes/config.ts +45 -39
  148. package/src/web/server/routes/sessions.ts +29 -26
  149. package/dist/cli/ui/components/screens/AIToolSelectorScreen.d.ts +0 -27
  150. package/dist/cli/ui/components/screens/AIToolSelectorScreen.d.ts.map +0 -1
  151. package/dist/cli/ui/components/screens/AIToolSelectorScreen.js.map +0 -1
  152. package/dist/config/builtin-tools.d.ts +0 -23
  153. package/dist/config/builtin-tools.d.ts.map +0 -1
  154. package/dist/config/builtin-tools.js.map +0 -1
  155. package/dist/services/aiToolResolver.d.ts.map +0 -1
  156. package/dist/services/aiToolResolver.js.map +0 -1
  157. package/dist/services/customToolResolver.d.ts +0 -10
  158. package/dist/services/customToolResolver.d.ts.map +0 -1
  159. package/dist/services/customToolResolver.js.map +0 -1
  160. package/dist/shared/aiToolConstants.d.ts.map +0 -1
  161. package/dist/shared/aiToolConstants.js.map +0 -1
  162. package/dist/web/client/src/components/AIToolLaunchModal.d.ts +0 -9
  163. package/dist/web/client/src/components/AIToolLaunchModal.d.ts.map +0 -1
  164. package/dist/web/client/src/components/AIToolLaunchModal.js.map +0 -1
  165. package/dist/web/client/src/components/CustomToolForm.d.ts +0 -23
  166. package/dist/web/client/src/components/CustomToolForm.d.ts.map +0 -1
  167. package/dist/web/client/src/components/CustomToolForm.js.map +0 -1
  168. package/dist/web/client/src/components/CustomToolList.d.ts +0 -10
  169. package/dist/web/client/src/components/CustomToolList.d.ts.map +0 -1
  170. package/dist/web/client/src/components/CustomToolList.js.map +0 -1
  171. package/src/cli/ui/components/screens/AIToolSelectorScreen.tsx +0 -153
  172. package/src/index.ts.backup +0 -1543
@@ -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>
@@ -1,15 +1,15 @@
1
1
  import React, { useEffect, useMemo, useState } from "react";
2
2
  import { Link } from "react-router-dom";
3
3
  import type {
4
- CustomAITool,
4
+ ApiCodingAgent,
5
5
  EnvironmentVariable,
6
6
  } from "../../../../types/api.js";
7
7
  import { useConfig, useUpdateConfig } from "../hooks/useConfig";
8
- import { CustomToolList } from "../components/CustomToolList";
8
+ import { CustomCodingAgentList } from "../components/CustomCodingAgentList";
9
9
  import {
10
- CustomToolForm,
11
- type CustomToolFormValue,
12
- } from "../components/CustomToolForm";
10
+ CustomCodingAgentForm,
11
+ type CustomCodingAgentFormValue,
12
+ } from "../components/CustomCodingAgentForm";
13
13
  import {
14
14
  EnvironmentEditor,
15
15
  type EnvEntry,
@@ -31,8 +31,8 @@ const ENV_VALUE_MAX = 500;
31
31
  export function ConfigPage() {
32
32
  const { data, isLoading, error } = useConfig();
33
33
  const updateConfig = useUpdateConfig();
34
- const [tools, setTools] = useState<CustomAITool[]>([]);
35
- const [editingTool, setEditingTool] = useState<CustomAITool | undefined>(
34
+ const [agents, setAgents] = useState<ApiCodingAgent[]>([]);
35
+ const [editingAgent, setEditingAgent] = useState<ApiCodingAgent | undefined>(
36
36
  undefined,
37
37
  );
38
38
  const [banner, setBanner] = useState<BannerState | null>(null);
@@ -40,36 +40,36 @@ export function ConfigPage() {
40
40
  const [envEntries, setEnvEntries] = useState<EnvEntry[]>([]);
41
41
 
42
42
  useEffect(() => {
43
- if (data?.tools) setTools(data.tools);
43
+ if (data?.codingAgents) setAgents(data.codingAgents);
44
44
  if (data) setEnvEntries(entriesFromVariables(data.env));
45
45
  }, [data]);
46
46
 
47
- const sortedTools = useMemo(() => {
48
- return [...tools].sort((a, b) =>
47
+ const sortedAgents = useMemo(() => {
48
+ return [...agents].sort((a, b) =>
49
49
  a.displayName.localeCompare(b.displayName, "ja"),
50
50
  );
51
- }, [tools]);
51
+ }, [agents]);
52
52
 
53
- const handleEdit = (tool: CustomAITool) => {
54
- setEditingTool(tool);
53
+ const handleEdit = (agent: ApiCodingAgent) => {
54
+ setEditingAgent(agent);
55
55
  setIsCreating(false);
56
56
  };
57
57
 
58
- const handleDelete = (tool: CustomAITool) => {
59
- if (!window.confirm(`${tool.displayName} を削除しますか?`)) return;
60
- const next = tools.filter((t) => t.id !== tool.id);
61
- persistConfig(next, envEntries, `${tool.displayName} を削除しました。`);
58
+ const handleDelete = (agent: ApiCodingAgent) => {
59
+ if (!window.confirm(`${agent.displayName} を削除しますか?`)) return;
60
+ const next = agents.filter((a) => a.id !== agent.id);
61
+ persistConfig(next, envEntries, `${agent.displayName} を削除しました。`);
62
62
  };
63
63
 
64
64
  const handleCreate = () => {
65
- setEditingTool(undefined);
65
+ setEditingAgent(undefined);
66
66
  setIsCreating(true);
67
67
  };
68
68
 
69
- const handleFormSubmit = (value: CustomToolFormValue) => {
69
+ const handleFormSubmit = (value: CustomCodingAgentFormValue) => {
70
70
  const now = new Date().toISOString();
71
- const existing = tools.find((tool) => tool.id === value.id);
72
- const nextTool: CustomAITool = {
71
+ const existing = agents.find((agent) => agent.id === value.id);
72
+ const nextAgent: ApiCodingAgent = {
73
73
  id: value.id,
74
74
  displayName: value.displayName,
75
75
  icon: value.icon ?? null,
@@ -89,21 +89,21 @@ export function ConfigPage() {
89
89
  };
90
90
 
91
91
  const nextList = existing
92
- ? tools.map((tool) => (tool.id === nextTool.id ? nextTool : tool))
93
- : [...tools, nextTool];
92
+ ? agents.map((agent) => (agent.id === nextAgent.id ? nextAgent : agent))
93
+ : [...agents, nextAgent];
94
94
 
95
95
  persistConfig(
96
96
  nextList,
97
97
  envEntries,
98
- `${nextTool.displayName} を保存しました。`,
98
+ `${nextAgent.displayName} を保存しました。`,
99
99
  );
100
100
  };
101
101
 
102
102
  const persistConfig = (
103
- nextTools: CustomAITool[],
103
+ nextAgents: ApiCodingAgent[],
104
104
  nextEnvEntries: EnvEntry[],
105
105
  successMessage: string,
106
- options?: { resetToolForm?: boolean },
106
+ options?: { resetForm?: boolean },
107
107
  ) => {
108
108
  let envPayload: EnvironmentVariable[];
109
109
  try {
@@ -116,13 +116,17 @@ export function ConfigPage() {
116
116
 
117
117
  const nextVersion = data?.version ?? "1.0.0";
118
118
  updateConfig
119
- .mutateAsync({ version: nextVersion, tools: nextTools, env: envPayload })
119
+ .mutateAsync({
120
+ version: nextVersion,
121
+ codingAgents: nextAgents,
122
+ env: envPayload,
123
+ })
120
124
  .then((response) => {
121
- setTools(response.tools);
125
+ setAgents(response.codingAgents);
122
126
  setEnvEntries(entriesFromVariables(response.env));
123
127
  setBanner({ type: "success", message: successMessage });
124
- if (options?.resetToolForm ?? true) {
125
- setEditingTool(undefined);
128
+ if (options?.resetForm ?? true) {
129
+ setEditingAgent(undefined);
126
130
  setIsCreating(false);
127
131
  }
128
132
  })
@@ -154,15 +158,15 @@ export function ConfigPage() {
154
158
  const handleEnvRemove = (id: string) =>
155
159
  setEnvEntries((prev) => prev.filter((e) => e.id !== id));
156
160
  const handleEnvSave = () =>
157
- persistConfig(tools, envEntries, "環境変数を保存しました。", {
158
- resetToolForm: false,
161
+ persistConfig(agents, envEntries, "環境変数を保存しました。", {
162
+ resetForm: false,
159
163
  });
160
164
  const handleCancel = () => {
161
- setEditingTool(undefined);
165
+ setEditingAgent(undefined);
162
166
  setIsCreating(false);
163
167
  };
164
168
 
165
- const activeFormTool = isCreating ? undefined : editingTool;
169
+ const activeFormAgent = isCreating ? undefined : editingAgent;
166
170
 
167
171
  // Loading state
168
172
  if (isLoading) {
@@ -170,7 +174,7 @@ export function ConfigPage() {
170
174
  <div className="min-h-screen bg-background">
171
175
  <PageHeader
172
176
  eyebrow="CONFIGURATION"
173
- title="カスタムAIツール設定"
177
+ title="Custom Coding Agent"
174
178
  subtitle="読み込み中..."
175
179
  />
176
180
  <main className="mx-auto max-w-7xl px-6 py-8">
@@ -207,15 +211,15 @@ export function ConfigPage() {
207
211
  <div className="min-h-screen bg-background">
208
212
  <PageHeader
209
213
  eyebrow="CONFIGURATION"
210
- title="カスタムAIツール設定"
211
- subtitle="tools.json を編集して、独自のAIツールをCLI / Web UI 両方から利用できます。"
214
+ title="Custom Coding Agent"
215
+ subtitle="tools.json を編集して、独自の Coding Agent を CLI / Web UI 両方から利用できます。"
212
216
  >
213
217
  <div className="mt-4 flex flex-wrap gap-2">
214
218
  <Button variant="ghost" size="sm" asChild>
215
219
  <Link to="/">← ブランチ一覧</Link>
216
220
  </Button>
217
221
  <Button variant="secondary" onClick={handleCreate}>
218
- カスタムツールを追加
222
+ Coding Agent を追加
219
223
  </Button>
220
224
  </div>
221
225
  </PageHeader>
@@ -251,8 +255,8 @@ export function ConfigPage() {
251
255
  </p>
252
256
  <h3 className="mt-1 text-lg font-semibold">共有環境変数</h3>
253
257
  <p className="mt-2 text-sm text-muted-foreground">
254
- Web UI で起動する AI
255
- ツールはここに定義された環境変数を自動的に引き継ぎます。
258
+ Web UI で起動する Coding Agent
259
+ はここに定義された環境変数を自動的に引き継ぎます。
256
260
  </p>
257
261
  </CardHeader>
258
262
  <CardContent>
@@ -267,33 +271,35 @@ export function ConfigPage() {
267
271
  </CardContent>
268
272
  </Card>
269
273
 
270
- {/* Tool List */}
274
+ {/* Coding Agent List */}
271
275
  <Card>
272
276
  <CardHeader className="pb-3">
273
277
  <p className="text-xs font-medium uppercase tracking-wider text-muted-foreground">
274
- Registered Tools
278
+ Registered Coding Agents
275
279
  </p>
276
- <h3 className="mt-1 text-lg font-semibold">登録済みツール</h3>
280
+ <h3 className="mt-1 text-lg font-semibold">
281
+ 登録済み Coding Agent
282
+ </h3>
277
283
  <p className="mt-2 text-sm text-muted-foreground">
278
- CLI と Web UI は同じ設定を参照します。更新すると
279
- ~/.claude-worktree/tools.json に保存されます。
284
+ CLI と Web UI は同じ設定を参照します。更新すると ~/.gwt/tools.json
285
+ に保存されます。
280
286
  </p>
281
287
  </CardHeader>
282
288
  <CardContent>
283
- <CustomToolList
284
- tools={sortedTools}
289
+ <CustomCodingAgentList
290
+ agents={sortedAgents}
285
291
  onEdit={handleEdit}
286
292
  onDelete={handleDelete}
287
293
  />
288
294
  </CardContent>
289
295
  </Card>
290
296
 
291
- {/* Tool Form */}
292
- {(isCreating || editingTool) && (
297
+ {/* Coding Agent Form */}
298
+ {(isCreating || editingAgent) && (
293
299
  <Card>
294
300
  <CardContent className="pt-6">
295
- <CustomToolForm
296
- {...(activeFormTool ? { initialValue: activeFormTool } : {})}
301
+ <CustomCodingAgentForm
302
+ {...(activeFormAgent ? { initialValue: activeFormAgent } : {})}
297
303
  onSubmit={handleFormSubmit}
298
304
  onCancel={handleCancel}
299
305
  isSaving={updateConfig.isPending}
@@ -1,4 +1,7 @@
1
- import { loadToolsConfig, saveToolsConfig } from "../../../config/tools.js";
1
+ import {
2
+ loadCodingAgentsConfig,
3
+ saveCodingAgentsConfig,
4
+ } from "../../../config/tools.js";
2
5
  import { recordEnvHistory } from "../../../config/env-history.js";
3
6
  import type { EnvironmentHistoryEntry } from "../../../types/api.js";
4
7
  import { createLogger } from "../../../logging/logger.js";
@@ -18,7 +21,7 @@ const IMPORTABLE_KEYS = [
18
21
  const importedKeySet = new Set<string>();
19
22
 
20
23
  export async function importOsEnvIntoSharedConfig(): Promise<string[]> {
21
- const config = await loadToolsConfig();
24
+ const config = await loadCodingAgentsConfig();
22
25
  const sharedEnv = { ...(config.env ?? {}) };
23
26
  const importedKeys: string[] = [];
24
27
 
@@ -36,7 +39,7 @@ export async function importOsEnvIntoSharedConfig(): Promise<string[]> {
36
39
  return [];
37
40
  }
38
41
 
39
- await saveToolsConfig({
42
+ await saveCodingAgentsConfig({
40
43
  ...config,
41
44
  env: sharedEnv,
42
45
  });