cc-viewer 1.9.4 → 1.9.5
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 +5 -2
- package/dist/assets/App-Bj_-wfrB.js +2 -0
- package/dist/assets/{MdxEditorPanel-C8Cij93y.js → MdxEditorPanel-DD2IrRnW.js} +1 -1
- package/dist/assets/{Mobile-OKCVi8un.js → Mobile-BQBQkr2V.js} +1 -1
- package/dist/assets/{ProxyStatsModal-DGlngtM9.js → ProxyStatsModal-8VYl6n39.js} +1 -1
- package/dist/assets/{index-Clt4dw8Y.js → index-CloXv0sm.js} +2 -2
- package/dist/assets/seqResourceLoaders-M4XGblXm.js +2 -0
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/server/interceptor.js +165 -14
- package/server/lib/git-diff.js +14 -8
- package/server/lib/scope-router.js +68 -0
- package/server/lib/sdk-manager.js +4 -1
- package/server/lib/task-state.js +74 -34
- package/server/lib/turn-end-bridge.js +6 -1
- package/server/lib/v2/live-feed.js +7 -6
- package/server/lib/v2/view-router.js +48 -0
- package/server/lib/workflow-watcher.js +13 -6
- package/server/lib/ws-mux.js +473 -0
- package/server/pty-manager.js +53 -0
- package/server/routes/ask-perm.js +13 -8
- package/server/routes/events.js +180 -84
- package/server/routes/resume.js +17 -0
- package/server/routes/session-pin.js +12 -2
- package/server/routes/workflow-journal.js +5 -2
- package/server/routes/workspaces.js +7 -1
- package/server/server.js +335 -112
- package/dist/assets/App-DtBVNYE7.js +0 -2
- package/dist/assets/seqResourceLoaders-zlIVjapi.js +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Workspace routes (moved verbatim from server.js handleRequest).
|
|
2
2
|
import { existsSync, statSync } from 'node:fs';
|
|
3
3
|
import { basename } from 'node:path';
|
|
4
|
-
import { initForWorkspace, resetWorkspace, getLiveLogSource, markContinuedLaunch, markForkSession, markResumeSession, isContinuedLaunch } from '../interceptor.js';
|
|
4
|
+
import { initForWorkspace, resetWorkspace, getLiveLogSource, markContinuedLaunch, markForkSession, markResumeSession, isContinuedLaunch, clearScopeState } from '../interceptor.js';
|
|
5
5
|
import { LOG_DIR } from '../../findcc.js';
|
|
6
6
|
import { migrationStatus } from '../lib/v2/migrate-prompt.js';
|
|
7
7
|
import { reportSwallowed } from '@ccv/core/error-report';
|
|
@@ -219,6 +219,12 @@ function workspacesStop(req, res, parsedUrl, isLocal, deps) {
|
|
|
219
219
|
// 重置 interceptor 状态
|
|
220
220
|
resetWorkspace();
|
|
221
221
|
deps.setWorkspaceLaunched(false);
|
|
222
|
+
// Per-workspace: tear down every scope's streaming/turn buckets AND the
|
|
223
|
+
// server-side per-scope maps (session tags, streaming edges) — a PTY
|
|
224
|
+
// killed here fires no Stop POST, so without this the killed workspaces'
|
|
225
|
+
// buckets stay `active` forever and a stale session tag rejects the fresh
|
|
226
|
+
// session's first UserPromptSubmit on a same-name relaunch.
|
|
227
|
+
try { (deps.resetScopeRuntime ? deps.resetScopeRuntime() : clearScopeState()); } catch { /* best-effort */ }
|
|
222
228
|
|
|
223
229
|
// 通知所有 SSE 客户端
|
|
224
230
|
deps.clients.forEach(client => {
|