storymode-cli 1.3.3 → 1.3.4
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/package.json +1 -1
- package/src/cli.mjs +4 -2
package/package.json
CHANGED
package/src/cli.mjs
CHANGED
|
@@ -245,14 +245,16 @@ export async function run(args) {
|
|
|
245
245
|
const reactiveFlag = reactive ? ' --reactive' : '';
|
|
246
246
|
const noAiFlag = noAi ? ' --no-ai' : '';
|
|
247
247
|
const modelFlag = model ? ` --model=${model}` : '';
|
|
248
|
-
const companionCmd = `STORYMODE_COMPANION=1 npx storymode-cli play ${id} --size=${size}${sextantFlag}${reactiveFlag}${noAiFlag}${modelFlag}`;
|
|
248
|
+
const companionCmd = `STORYMODE_COMPANION=1 npx --yes storymode-cli play ${id} --size=${size}${sextantFlag}${reactiveFlag}${noAiFlag}${modelFlag}`;
|
|
249
249
|
|
|
250
250
|
// iTerm2 (not in tmux): use native split to keep HD working.
|
|
251
251
|
// iTerm2 inline images can't be cleared through tmux passthrough,
|
|
252
252
|
// so we avoid tmux entirely and use AppleScript to split the pane.
|
|
253
253
|
if (renderMode.protocol === 'iterm2' && !renderMode.inTmux) {
|
|
254
254
|
try {
|
|
255
|
-
|
|
255
|
+
// Wrap command so errors stay visible (iTerm2 closes pane on exit)
|
|
256
|
+
const wrappedCmd = `${companionCmd} || { echo ""; echo " Companion crashed. Press enter to close."; read; }`;
|
|
257
|
+
const escapedCmd = wrappedCmd.replace(/"/g, '\\"');
|
|
256
258
|
execSync(`osascript -e '
|
|
257
259
|
tell application "iTerm2"
|
|
258
260
|
tell current session of current tab of current window
|