cc-viewer 1.4.19 → 1.4.21
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/cli.js +8 -2
- package/dist/assets/{index-LxuWMLD-.js → index-DVJLme9U.js} +136 -135
- package/dist/assets/{index-k2L1uWUr.css → index-Daywpj0d.css} +1 -1
- package/dist/index.html +2 -2
- package/findcc.js +6 -1
- package/i18n.js +21 -1
- package/{plugin-loader.js → lib/plugin-loader.js} +1 -1
- package/{updater.js → lib/updater.js} +2 -2
- package/package.json +3 -4
- package/proxy.js +7 -2
- package/server.js +145 -6
- /package/{stats-worker.js → lib/stats-worker.js} +0 -0
package/cli.js
CHANGED
|
@@ -275,7 +275,13 @@ async function runCliMode(extraClaudeArgs = [], cwd) {
|
|
|
275
275
|
|
|
276
276
|
// 3. 启动 PTY 中的 claude
|
|
277
277
|
const { spawnClaude, killPty } = await import('./pty-manager.js');
|
|
278
|
-
|
|
278
|
+
try {
|
|
279
|
+
await spawnClaude(proxyPort, workingDir, extraClaudeArgs);
|
|
280
|
+
} catch (err) {
|
|
281
|
+
console.error('[CC Viewer] Failed to spawn Claude:', err.message);
|
|
282
|
+
serverMod.stopViewer();
|
|
283
|
+
process.exit(1);
|
|
284
|
+
}
|
|
279
285
|
|
|
280
286
|
// 4. 自动打开浏览器
|
|
281
287
|
const url = `http://127.0.0.1:${port}`;
|
|
@@ -407,7 +413,7 @@ if (isCliMode || isDangerousMode) {
|
|
|
407
413
|
} else {
|
|
408
414
|
console.log(t('cli.uninstall.hookFail', { error: shellResult.error }));
|
|
409
415
|
}
|
|
410
|
-
|
|
416
|
+
console.log(t('cli.uninstall.reloadShell'));
|
|
411
417
|
console.log(t('cli.uninstall.done'));
|
|
412
418
|
process.exit(0);
|
|
413
419
|
} else {
|