storyforge 0.4.0 → 0.4.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.
- package/dist/index.js +21 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1079,9 +1079,22 @@ Return ONLY the complete updated TSX. No markdown fences, no explanation.`;
|
|
|
1079
1079
|
openBrowser(webUrl);
|
|
1080
1080
|
}
|
|
1081
1081
|
const aiMethods = [];
|
|
1082
|
+
let scriptGenModel = null;
|
|
1082
1083
|
try {
|
|
1083
1084
|
execSync("which claude", { stdio: "ignore" });
|
|
1084
|
-
|
|
1085
|
+
const candidates = ["claude-opus-4-7", "claude-sonnet-4-6"];
|
|
1086
|
+
for (const model of candidates) {
|
|
1087
|
+
try {
|
|
1088
|
+
execSync(
|
|
1089
|
+
`echo "ping" | claude -p --model ${model} --no-session-persistence`,
|
|
1090
|
+
{ stdio: "ignore", timeout: 3e4 }
|
|
1091
|
+
);
|
|
1092
|
+
scriptGenModel = model;
|
|
1093
|
+
break;
|
|
1094
|
+
} catch {
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
aiMethods.push(`Claude CLI \u2192 ${scriptGenModel ?? "claude-sonnet-4-6 (default)"}`);
|
|
1085
1098
|
} catch {
|
|
1086
1099
|
}
|
|
1087
1100
|
try {
|
|
@@ -1089,8 +1102,8 @@ Return ONLY the complete updated TSX. No markdown fences, no explanation.`;
|
|
|
1089
1102
|
aiMethods.push("Codex CLI \u2192 gpt-5.4");
|
|
1090
1103
|
} catch {
|
|
1091
1104
|
}
|
|
1092
|
-
if (process.env.ANTHROPIC_API_KEY) aiMethods.push("Anthropic API \u2192 claude-sonnet-4-
|
|
1093
|
-
if (process.env.OPENAI_API_KEY) aiMethods.push("OpenAI API \u2192 gpt-
|
|
1105
|
+
if (process.env.ANTHROPIC_API_KEY) aiMethods.push("Anthropic API \u2192 claude-sonnet-4-5");
|
|
1106
|
+
if (process.env.OPENAI_API_KEY) aiMethods.push("OpenAI API \u2192 gpt-4o");
|
|
1094
1107
|
console.log("");
|
|
1095
1108
|
if (aiMethods.length > 0) {
|
|
1096
1109
|
console.log(" AI edit chain (tried in order):");
|
|
@@ -1101,6 +1114,11 @@ Return ONLY the complete updated TSX. No markdown fences, no explanation.`;
|
|
|
1101
1114
|
console.log(" Install Codex CLI: npm install -g @openai/codex");
|
|
1102
1115
|
console.log(" Or set ANTHROPIC_API_KEY / OPENAI_API_KEY in your shell");
|
|
1103
1116
|
}
|
|
1117
|
+
if (scriptGenModel) {
|
|
1118
|
+
console.log("");
|
|
1119
|
+
console.log(` Script generation \u2192 ${scriptGenModel}`);
|
|
1120
|
+
console.log(` POST http://localhost:${port}/api/script-gen`);
|
|
1121
|
+
}
|
|
1104
1122
|
console.log("");
|
|
1105
1123
|
console.log(" Ctrl+C to stop");
|
|
1106
1124
|
console.log("");
|