cc-viewer 1.6.123 → 1.6.124

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 (2) hide show
  1. package/package.json +1 -1
  2. package/pty-manager.js +10 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-viewer",
3
- "version": "1.6.123",
3
+ "version": "1.6.124",
4
4
  "description": "Claude Code Logger visualization management tool",
5
5
  "license": "MIT",
6
6
  "main": "server.js",
package/pty-manager.js CHANGED
@@ -184,6 +184,16 @@ export async function spawnClaude(proxyPort, cwd, extraArgs = [], claudePath = n
184
184
  flushBatch();
185
185
  lastExitCode = exitCode;
186
186
  ptyProcess = null;
187
+
188
+ // Auto-retry without -c/--continue if "No conversation found"
189
+ const hasContinue = extraArgs.includes('-c') || extraArgs.includes('--continue');
190
+ if (hasContinue && exitCode !== 0 && outputBuffer.includes('No conversation found')) {
191
+ console.error('[CC Viewer] -c failed (no conversation), retrying without -c');
192
+ const retryArgs = extraArgs.filter(a => a !== '-c' && a !== '--continue');
193
+ spawnClaude(proxyPort, cwd, retryArgs, claudePath, isNpmVersion, serverPort);
194
+ return;
195
+ }
196
+
187
197
  // 保留 lastWorkspacePath,不清除,用于 respawn
188
198
  currentWorkspacePath = null;
189
199
  for (const cb of exitListeners) {