@akiojin/gwt 2.3.0 ā 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +5 -3
- package/README.md +5 -3
- package/dist/claude.d.ts +1 -0
- package/dist/claude.d.ts.map +1 -1
- package/dist/claude.js +6 -3
- package/dist/claude.js.map +1 -1
- package/dist/cli/ui/components/App.d.ts +3 -1
- package/dist/cli/ui/components/App.d.ts.map +1 -1
- package/dist/cli/ui/components/App.js +40 -2
- package/dist/cli/ui/components/App.js.map +1 -1
- package/dist/cli/ui/components/screens/AIToolSelectorScreen.d.ts +1 -1
- package/dist/cli/ui/components/screens/AIToolSelectorScreen.d.ts.map +1 -1
- package/dist/cli/ui/components/screens/AIToolSelectorScreen.js.map +1 -1
- package/dist/cli/ui/components/screens/ModelSelectorScreen.d.ts +18 -0
- package/dist/cli/ui/components/screens/ModelSelectorScreen.d.ts.map +1 -0
- package/dist/cli/ui/components/screens/ModelSelectorScreen.js +201 -0
- package/dist/cli/ui/components/screens/ModelSelectorScreen.js.map +1 -0
- package/dist/cli/ui/types.d.ts +11 -1
- package/dist/cli/ui/types.d.ts.map +1 -1
- package/dist/cli/ui/utils/modelOptions.d.ts +6 -0
- package/dist/cli/ui/utils/modelOptions.d.ts.map +1 -0
- package/dist/cli/ui/utils/modelOptions.js +111 -0
- package/dist/cli/ui/utils/modelOptions.js.map +1 -0
- package/dist/codex.d.ts +6 -0
- package/dist/codex.d.ts.map +1 -1
- package/dist/codex.js +11 -4
- package/dist/codex.js.map +1 -1
- package/dist/gemini.d.ts +1 -0
- package/dist/gemini.d.ts.map +1 -1
- package/dist/gemini.js +6 -3
- package/dist/gemini.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -11
- package/dist/index.js.map +1 -1
- package/dist/qwen.d.ts +1 -0
- package/dist/qwen.d.ts.map +1 -1
- package/dist/qwen.js +6 -3
- package/dist/qwen.js.map +1 -1
- package/package.json +1 -1
- package/src/claude.ts +8 -3
- package/src/cli/ui/__tests__/components/ModelSelectorScreen.initial.test.tsx +81 -0
- package/src/cli/ui/__tests__/components/common/LoadingIndicator.test.tsx +28 -14
- package/src/cli/ui/components/App.tsx +74 -4
- package/src/cli/ui/components/screens/AIToolSelectorScreen.tsx +1 -2
- package/src/cli/ui/components/screens/ModelSelectorScreen.tsx +320 -0
- package/src/cli/ui/types.ts +13 -0
- package/src/cli/ui/utils/modelOptions.test.ts +36 -0
- package/src/cli/ui/utils/modelOptions.ts +122 -0
- package/src/codex.ts +23 -4
- package/src/gemini.ts +8 -3
- package/src/index.ts +60 -10
- package/src/qwen.ts +8 -3
package/src/index.ts
CHANGED
|
@@ -10,7 +10,11 @@ import {
|
|
|
10
10
|
GitError,
|
|
11
11
|
} from "./git.js";
|
|
12
12
|
import { launchClaudeCode } from "./claude.js";
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
launchCodexCLI,
|
|
15
|
+
CodexError,
|
|
16
|
+
type CodexReasoningEffort,
|
|
17
|
+
} from "./codex.js";
|
|
14
18
|
import { launchGeminiCLI, GeminiError } from "./gemini.js";
|
|
15
19
|
import { launchQwenCLI, QwenError } from "./qwen.js";
|
|
16
20
|
import {
|
|
@@ -292,11 +296,17 @@ export async function handleAIToolWorkflow(
|
|
|
292
296
|
tool,
|
|
293
297
|
mode,
|
|
294
298
|
skipPermissions,
|
|
299
|
+
model,
|
|
300
|
+
inferenceLevel,
|
|
295
301
|
} = selectionResult;
|
|
296
302
|
|
|
297
303
|
const branchLabel = displayName ?? branch;
|
|
304
|
+
const modelInfo =
|
|
305
|
+
model || inferenceLevel
|
|
306
|
+
? `, model=${model ?? "default"}${inferenceLevel ? `/${inferenceLevel}` : ""}`
|
|
307
|
+
: "";
|
|
298
308
|
printInfo(
|
|
299
|
-
`Selected: ${branchLabel} with ${tool} (${mode} mode, skipPermissions: ${skipPermissions})`,
|
|
309
|
+
`Selected: ${branchLabel} with ${tool} (${mode} mode${modelInfo}, skipPermissions: ${skipPermissions})`,
|
|
300
310
|
);
|
|
301
311
|
|
|
302
312
|
try {
|
|
@@ -528,7 +538,12 @@ export async function handleAIToolWorkflow(
|
|
|
528
538
|
// Builtin tools use their dedicated launch functions
|
|
529
539
|
// Custom tools use the generic launchCustomAITool function
|
|
530
540
|
if (tool === "claude-code") {
|
|
531
|
-
|
|
541
|
+
const launchOptions: {
|
|
542
|
+
mode?: "normal" | "continue" | "resume";
|
|
543
|
+
skipPermissions?: boolean;
|
|
544
|
+
envOverrides?: Record<string, string>;
|
|
545
|
+
model?: string;
|
|
546
|
+
} = {
|
|
532
547
|
mode:
|
|
533
548
|
mode === "resume"
|
|
534
549
|
? "resume"
|
|
@@ -537,9 +552,19 @@ export async function handleAIToolWorkflow(
|
|
|
537
552
|
: "normal",
|
|
538
553
|
skipPermissions,
|
|
539
554
|
envOverrides: sharedEnv,
|
|
540
|
-
}
|
|
555
|
+
};
|
|
556
|
+
if (model) {
|
|
557
|
+
launchOptions.model = model;
|
|
558
|
+
}
|
|
559
|
+
await launchClaudeCode(worktreePath, launchOptions);
|
|
541
560
|
} else if (tool === "codex-cli") {
|
|
542
|
-
|
|
561
|
+
const launchOptions: {
|
|
562
|
+
mode?: "normal" | "continue" | "resume";
|
|
563
|
+
bypassApprovals?: boolean;
|
|
564
|
+
envOverrides?: Record<string, string>;
|
|
565
|
+
model?: string;
|
|
566
|
+
reasoningEffort?: CodexReasoningEffort;
|
|
567
|
+
} = {
|
|
543
568
|
mode:
|
|
544
569
|
mode === "resume"
|
|
545
570
|
? "resume"
|
|
@@ -548,9 +573,21 @@ export async function handleAIToolWorkflow(
|
|
|
548
573
|
: "normal",
|
|
549
574
|
bypassApprovals: skipPermissions,
|
|
550
575
|
envOverrides: sharedEnv,
|
|
551
|
-
}
|
|
576
|
+
};
|
|
577
|
+
if (model) {
|
|
578
|
+
launchOptions.model = model;
|
|
579
|
+
}
|
|
580
|
+
if (inferenceLevel) {
|
|
581
|
+
launchOptions.reasoningEffort = inferenceLevel as CodexReasoningEffort;
|
|
582
|
+
}
|
|
583
|
+
await launchCodexCLI(worktreePath, launchOptions);
|
|
552
584
|
} else if (tool === "gemini-cli") {
|
|
553
|
-
|
|
585
|
+
const launchOptions: {
|
|
586
|
+
mode?: "normal" | "continue" | "resume";
|
|
587
|
+
skipPermissions?: boolean;
|
|
588
|
+
envOverrides?: Record<string, string>;
|
|
589
|
+
model?: string;
|
|
590
|
+
} = {
|
|
554
591
|
mode:
|
|
555
592
|
mode === "resume"
|
|
556
593
|
? "resume"
|
|
@@ -559,9 +596,18 @@ export async function handleAIToolWorkflow(
|
|
|
559
596
|
: "normal",
|
|
560
597
|
skipPermissions,
|
|
561
598
|
envOverrides: sharedEnv,
|
|
562
|
-
}
|
|
599
|
+
};
|
|
600
|
+
if (model) {
|
|
601
|
+
launchOptions.model = model;
|
|
602
|
+
}
|
|
603
|
+
await launchGeminiCLI(worktreePath, launchOptions);
|
|
563
604
|
} else if (tool === "qwen-cli") {
|
|
564
|
-
|
|
605
|
+
const launchOptions: {
|
|
606
|
+
mode?: "normal" | "continue" | "resume";
|
|
607
|
+
skipPermissions?: boolean;
|
|
608
|
+
envOverrides?: Record<string, string>;
|
|
609
|
+
model?: string;
|
|
610
|
+
} = {
|
|
565
611
|
mode:
|
|
566
612
|
mode === "resume"
|
|
567
613
|
? "resume"
|
|
@@ -570,7 +616,11 @@ export async function handleAIToolWorkflow(
|
|
|
570
616
|
: "normal",
|
|
571
617
|
skipPermissions,
|
|
572
618
|
envOverrides: sharedEnv,
|
|
573
|
-
}
|
|
619
|
+
};
|
|
620
|
+
if (model) {
|
|
621
|
+
launchOptions.model = model;
|
|
622
|
+
}
|
|
623
|
+
await launchQwenCLI(worktreePath, launchOptions);
|
|
574
624
|
} else {
|
|
575
625
|
// Custom tool
|
|
576
626
|
printInfo(`Launching custom tool: ${toolConfig.displayName}`);
|
package/src/qwen.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { execa } from "execa";
|
|
2
2
|
import chalk from "chalk";
|
|
3
|
-
import { platform } from "os";
|
|
4
3
|
import { existsSync } from "fs";
|
|
5
4
|
import { createChildStdio, getTerminalStreams } from "./utils/terminal.js";
|
|
6
5
|
|
|
@@ -23,6 +22,7 @@ export async function launchQwenCLI(
|
|
|
23
22
|
mode?: "normal" | "continue" | "resume";
|
|
24
23
|
extraArgs?: string[];
|
|
25
24
|
envOverrides?: Record<string, string>;
|
|
25
|
+
model?: string;
|
|
26
26
|
} = {},
|
|
27
27
|
): Promise<void> {
|
|
28
28
|
const terminal = getTerminalStreams();
|
|
@@ -38,6 +38,11 @@ export async function launchQwenCLI(
|
|
|
38
38
|
|
|
39
39
|
const args: string[] = ["--checkpointing"];
|
|
40
40
|
|
|
41
|
+
if (options.model) {
|
|
42
|
+
args.push("--model", options.model);
|
|
43
|
+
console.log(chalk.green(` šÆ Model: ${options.model}`));
|
|
44
|
+
}
|
|
45
|
+
|
|
41
46
|
// Handle execution mode
|
|
42
47
|
// Note: Qwen CLI doesn't have explicit continue/resume CLI options at startup.
|
|
43
48
|
// Session management is done via /chat commands during interactive sessions.
|
|
@@ -141,7 +146,7 @@ export async function launchQwenCLI(
|
|
|
141
146
|
errorMessage = `Failed to launch Qwen CLI: ${error.message || "Unknown error"}`;
|
|
142
147
|
}
|
|
143
148
|
|
|
144
|
-
if (platform
|
|
149
|
+
if (process.platform === "win32") {
|
|
145
150
|
console.error(chalk.red("\nš” Windows troubleshooting tips:"));
|
|
146
151
|
if (hasLocalQwen) {
|
|
147
152
|
console.error(
|
|
@@ -181,7 +186,7 @@ export async function launchQwenCLI(
|
|
|
181
186
|
*/
|
|
182
187
|
async function isQwenCommandAvailable(): Promise<boolean> {
|
|
183
188
|
try {
|
|
184
|
-
const command = platform
|
|
189
|
+
const command = process.platform === "win32" ? "where" : "which";
|
|
185
190
|
await execa(command, ["qwen"], { shell: true });
|
|
186
191
|
return true;
|
|
187
192
|
} catch {
|