cc-viewer 1.9.25 → 1.9.27
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/README.md +1 -1
- package/dist/assets/App-CjP88gbM.css +1 -0
- package/dist/assets/App-DeuNbYot.js +2 -0
- package/dist/assets/ArchivePreview-DRwjOwOc.js +1 -0
- package/dist/assets/AudioPreview-7zCADwCz.css +1 -0
- package/dist/assets/AudioPreview-hnMiz980.js +1 -0
- package/dist/assets/{MdxEditorPanel-BiKPuJGb.js → MdxEditorPanel-Di-yxiIj.js} +1 -1
- package/dist/assets/Mobile-BwguMJt2.js +1 -0
- package/dist/assets/ProxyStatsModal-DufxSZfL.js +1 -0
- package/dist/assets/SubtitlePreview-BGW9y2LI.css +1 -0
- package/dist/assets/SubtitlePreview-Bpp84c8m.js +1 -0
- package/dist/assets/{_baseUniq-h4hafO2D.js → _baseUniq-9PjtCZvX.js} +1 -1
- package/dist/assets/{arc-CN5nAVn-.js → arc-C7i0W-3s.js} +1 -1
- package/dist/assets/{architectureDiagram-Q4EWVU46-NTnIUsWP.js → architectureDiagram-Q4EWVU46-B0-9CMiF.js} +1 -1
- package/dist/assets/{blockDiagram-DXYQGD6D-BPFMPOwn.js → blockDiagram-DXYQGD6D-v3Zg9ooQ.js} +1 -1
- package/dist/assets/{c4Diagram-AHTNJAMY-CAPyXRVj.js → c4Diagram-AHTNJAMY-BngN_7qF.js} +1 -1
- package/dist/assets/{channel-BULnUStk.js → channel-IbZhDvnM.js} +1 -1
- package/dist/assets/{chunk-4BX2VUAB-BeSOU8fB.js → chunk-4BX2VUAB-8cHviTVA.js} +1 -1
- package/dist/assets/{chunk-4TB4RGXK-BVCrVLA0.js → chunk-4TB4RGXK-C3CP4doN.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-D0XHzdzo.js → chunk-55IACEB6-FUVA-xfN.js} +1 -1
- package/dist/assets/{chunk-EDXVE4YY-DizHN_m_.js → chunk-EDXVE4YY-BL4ddY7-.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-3r0oXmep.js → chunk-FMBD7UC4-fgqPq6Tx.js} +1 -1
- package/dist/assets/{chunk-OYMX7WX6-C701FNEA.js → chunk-OYMX7WX6-BGnPcd9h.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-KAdMyJai.js → chunk-QZHKN3VN-Cs6WjmqO.js} +1 -1
- package/dist/assets/{chunk-YZCP3GAM-Cn2gaRZ3.js → chunk-YZCP3GAM-qq4Q4j7H.js} +1 -1
- package/dist/assets/classDiagram-6PBFFD2Q-Bszndikj.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-Bszndikj.js +1 -0
- package/dist/assets/clone-MC_fW61A.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-URab8isi.js → cose-bilkent-S5V4N54A-D-uK3RSk.js} +1 -1
- package/dist/assets/{dagre-KV5264BT-Cq24tJ6h.js → dagre-KV5264BT-BulmeCnQ.js} +1 -1
- package/dist/assets/{diagram-5BDNPKRD-D4KEpJ0T.js → diagram-5BDNPKRD-DI7Q04yx.js} +1 -1
- package/dist/assets/{diagram-G4DWMVQ6-DZLa6S7S.js → diagram-G4DWMVQ6-B7zYIZac.js} +1 -1
- package/dist/assets/{diagram-MMDJMWI5-BBhsOBKy.js → diagram-MMDJMWI5-D_f5k-GJ.js} +1 -1
- package/dist/assets/{diagram-TYMM5635-ClWpYbD-.js → diagram-TYMM5635-DQ-vW7nJ.js} +1 -1
- package/dist/assets/{erDiagram-SMLLAGMA-5RXRgGvh.js → erDiagram-SMLLAGMA-BgubHrDi.js} +1 -1
- package/dist/assets/{flowDiagram-DWJPFMVM-DXiHDbOU.js → flowDiagram-DWJPFMVM-fPYA9wmX.js} +1 -1
- package/dist/assets/{ganttDiagram-T4ZO3ILL-Db5oVw9h.js → ganttDiagram-T4ZO3ILL-hNsatnIF.js} +1 -1
- package/dist/assets/{gitGraphDiagram-UUTBAWPF-CCPK1X9H.js → gitGraphDiagram-UUTBAWPF-1GijxkLh.js} +1 -1
- package/dist/assets/{graph-DNxO4J9w.js → graph-sNq_HPra.js} +1 -1
- package/dist/assets/index-12XyZVeK.js +2 -0
- package/dist/assets/{index-DaP3fzs1.js → index-BnWh6jkG.js} +1 -1
- package/dist/assets/{index-Bc_IaWe7.js → index-CmwhODrM.js} +1 -1
- package/dist/assets/{index-Do02L044.js → index-D6mBgqj7.js} +1 -1
- package/dist/assets/{index-CXW8X8EW.js → index-DggrqRzx.js} +1 -1
- package/dist/assets/{index-HLRCpKmY.js → index-DiVw76Ih.js} +1 -1
- package/dist/assets/{index-DDo6Z3Ov.js → index-ijWns1Ex.js} +1 -1
- package/dist/assets/{index-DR_FOzBM.js → index-ng96S3Hy.js} +1 -1
- package/dist/assets/{infoDiagram-42DDH7IO-CzPZsFEc.js → infoDiagram-42DDH7IO-C9HYi6HU.js} +1 -1
- package/dist/assets/{ishikawaDiagram-UXIWVN3A-eEVseuO_.js → ishikawaDiagram-UXIWVN3A-D3Ae6xRc.js} +1 -1
- package/dist/assets/{journeyDiagram-VCZTEJTY-CmMKnKhj.js → journeyDiagram-VCZTEJTY-BMPDBa6W.js} +1 -1
- package/dist/assets/{jszip.min-JnHXMwa-.js → jszip.min-D6JfNfcl.js} +1 -1
- package/dist/assets/{kanban-definition-6JOO6SKY-CZMggR3M.js → kanban-definition-6JOO6SKY-BXEtzhr-.js} +1 -1
- package/dist/assets/{layout-DVqRDfNO.js → layout-CbMMhBh2.js} +1 -1
- package/dist/assets/{linear-BHB3KNeC.js → linear-DivVFiS7.js} +1 -1
- package/dist/assets/{mermaid.core-DOjmjAg3.js → mermaid.core-Dq-d8oPN.js} +2 -2
- package/dist/assets/{min-DxJCEK6c.js → min-CXI1r_lz.js} +1 -1
- package/dist/assets/{mindmap-definition-QFDTVHPH-B6W3RjCJ.js → mindmap-definition-QFDTVHPH-CONBMUxc.js} +1 -1
- package/dist/assets/{pieDiagram-DEJITSTG-BRNQVuFX.js → pieDiagram-DEJITSTG-C0rsPXdi.js} +1 -1
- package/dist/assets/{quadrantDiagram-34T5L4WZ-CUCnCkJJ.js → quadrantDiagram-34T5L4WZ-DA2PNu4u.js} +1 -1
- package/dist/assets/{requirementDiagram-MS252O5E-Ds-5hLni.js → requirementDiagram-MS252O5E-DjsBvm40.js} +1 -1
- package/dist/assets/{sankeyDiagram-XADWPNL6-Cxi30RZc.js → sankeyDiagram-XADWPNL6-Drl_Kmzt.js} +1 -1
- package/dist/assets/{seqResourceLoaders-DH-Nl0yh.css → seqResourceLoaders-BBXSyj3E.css} +1 -1
- package/dist/assets/seqResourceLoaders-_ZNxD6sZ.js +2 -0
- package/dist/assets/{sequenceDiagram-FGHM5R23-C6CukZv8.js → sequenceDiagram-FGHM5R23-Dcz5NXKY.js} +1 -1
- package/dist/assets/{stateDiagram-FHFEXIEX-iPJCU2Ja.js → stateDiagram-FHFEXIEX-7P3czdgX.js} +1 -1
- package/dist/assets/{stateDiagram-v2-QKLJ7IA2-DMFhwtNH.js → stateDiagram-v2-QKLJ7IA2-C3xgfAOE.js} +1 -1
- package/dist/assets/{timeline-definition-GMOUNBTQ-Dqd-tCUs.js → timeline-definition-GMOUNBTQ-BVe-eF-9.js} +1 -1
- package/dist/assets/util-DUb-88OI.js +1 -0
- package/dist/assets/{vendor-antd-D1L_UwKJ.js → vendor-antd-VJVAjRBJ.js} +1 -1
- package/dist/assets/{vendor-codemirror-DOZOjrWx.js → vendor-codemirror-D2yaEhu3.js} +1 -1
- package/dist/assets/{vendor-mdxeditor-8ZUcYZ6G.js → vendor-mdxeditor-DKI8QSRd.js} +2 -2
- package/dist/assets/{vendor-qrcode-Pw_LHfBZ.js → vendor-qrcode-CDB9Y_Vp.js} +1 -1
- package/dist/assets/{vendor-virtuoso-AhfR22q5.js → vendor-virtuoso-DEFa9UCG.js} +1 -1
- package/dist/assets/{vennDiagram-DHZGUBPP-CrOJisSD.js → vennDiagram-DHZGUBPP-C8KL2OR8.js} +1 -1
- package/dist/assets/{wardley-RL74JXVD-By8Ltw9G.js → wardley-RL74JXVD-Dm4mxyoW.js} +1 -1
- package/dist/assets/{wardleyDiagram-NUSXRM2D-5SnzlvF9.js → wardleyDiagram-NUSXRM2D-BoA34gDh.js} +1 -1
- package/dist/assets/{xychartDiagram-5P7HB3ND-CJ4uNjoK.js → xychartDiagram-5P7HB3ND-66ynIBzj.js} +1 -1
- package/dist/index.html +4 -4
- package/package.json +1 -1
- package/server/lib/approval-policy.js +5 -2
- package/server/lib/ask/perm-bridge.js +4 -0
- package/server/lib/ask/perm-request-bridge.js +1 -1
- package/server/lib/audio-stream.js +267 -0
- package/server/lib/auto-approve.js +26 -5
- package/server/lib/sdk-manager.js +19 -10
- package/server/lib/terminal-ws-ping.js +42 -0
- package/server/proxy.js +16 -9
- package/server/routes/ask-perm.js +17 -13
- package/server/routes/files-content.js +65 -0
- package/server/server.js +76 -8
- package/dist/assets/App-BUIwNK3C.js +0 -2
- package/dist/assets/App-C5xq-7nS.css +0 -1
- package/dist/assets/ArchivePreview-BuFE-N7z.js +0 -1
- package/dist/assets/Mobile-D2UvqCIN.js +0 -1
- package/dist/assets/ProxyStatsModal-CBdBgS9_.js +0 -1
- package/dist/assets/classDiagram-6PBFFD2Q-7MJg98xK.js +0 -1
- package/dist/assets/classDiagram-v2-HSJHXN6E-7MJg98xK.js +0 -1
- package/dist/assets/clone-Bddq99Xt.js +0 -1
- package/dist/assets/index-ev1Hmm1O.js +0 -2
- package/dist/assets/seqResourceLoaders-B8ZIXCeg.js +0 -2
package/server/server.js
CHANGED
|
@@ -10,6 +10,7 @@ import { promisify } from 'node:util';
|
|
|
10
10
|
import { Worker } from 'node:worker_threads';
|
|
11
11
|
import { isPathContained } from './lib/file-api.js';
|
|
12
12
|
import { sseWrite, isWireV3Enabled } from './lib/wire-compress.js';
|
|
13
|
+
import { attachTerminalWsPing } from './lib/terminal-ws-ping.js';
|
|
13
14
|
import { setEntry as askStoreSetEntry, deleteEntry as askStoreDeleteEntry, pruneStale as askStorePruneStale, markAnswered as askStoreMarkAnswered, markCancelled as askStoreMarkCancelled, loadAskStore as askStoreLoad } from './lib/ask/ask-store.js';
|
|
14
15
|
import { ASK_TIMEOUT_MS, ASK_WAITER_REAP_INTERVAL_MS, ASK_WAITER_LIVENESS_MS } from './lib/ask/ask-constants.js';
|
|
15
16
|
import { reapDeadAskWaiters, sweepOrphanedDiskAsks } from './lib/ask/ask-reaper.js';
|
|
@@ -513,9 +514,27 @@ setProxyStatsListener(notifyProxyStats);
|
|
|
513
514
|
// terminal WS — decides whether the slow request maps to a live session worth
|
|
514
515
|
// surfacing. The frame carries the request's own cwd/instanceKey and is routed
|
|
515
516
|
// through broadcastWsMessage, so only viewers of that workspace/instance see it.
|
|
517
|
+
const _pendingSlowUpstreams = new Map(); // requestId → the last user-visible slow frame
|
|
518
|
+
|
|
519
|
+
function _replaySlowUpstreams(ws) {
|
|
520
|
+
if (!isSdkMode || !ws || ws.readyState !== 1) return;
|
|
521
|
+
const now = Date.now();
|
|
522
|
+
for (const frame of _pendingSlowUpstreams.values()) {
|
|
523
|
+
const project = projectKeyForCwd(frame.cwd);
|
|
524
|
+
// The initial connection may precede client view hydration. In that case
|
|
525
|
+
// replay only the bound workspace, never every background workspace.
|
|
526
|
+
const viewProject = ws._ccvViewProject || _projectName;
|
|
527
|
+
if (viewProject && project !== viewProject) continue;
|
|
528
|
+
if (ws._ccvViewInstance && frame.instanceKey !== ws._ccvViewInstance) continue;
|
|
529
|
+
try {
|
|
530
|
+
ws.send(JSON.stringify({ ...frame, waitingMs: now - frame.startedAt, ts: now }));
|
|
531
|
+
} catch (err) { reportSwallowed('server.slow-upstream-replay', err); }
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
516
535
|
setSlowUpstreamListener(({ type, requestId, cwd, instanceKey, waitingMs, model } = {}) => {
|
|
517
536
|
try {
|
|
518
|
-
if (!isSdkMode || !_sdkListSessions
|
|
537
|
+
if (!isSdkMode || !_sdkListSessions) return;
|
|
519
538
|
// Match the session by the request's real cwd (and instance when present),
|
|
520
539
|
// not the process-wide bound project — concurrent workspaces would otherwise
|
|
521
540
|
// cross-attribute the advisory. No live session → the slow request is not
|
|
@@ -531,6 +550,7 @@ setSlowUpstreamListener(({ type, requestId, cwd, instanceKey, waitingMs, model }
|
|
|
531
550
|
? (sessions.find(s => s.instanceKey === instanceKey) || null)
|
|
532
551
|
: (sessions.find(s => cwd && s.cwd === cwd) || null);
|
|
533
552
|
if (type === 'resolved') {
|
|
553
|
+
if (requestId) _pendingSlowUpstreams.delete(requestId);
|
|
534
554
|
// The waited-on request settled — tell the UI to dismiss the toast. A
|
|
535
555
|
// request can settle AFTER its session closed (review P2-2): the session
|
|
536
556
|
// lookup then misses and the dismiss would be silently dropped, leaving a
|
|
@@ -545,10 +565,13 @@ setSlowUpstreamListener(({ type, requestId, cwd, instanceKey, waitingMs, model }
|
|
|
545
565
|
return;
|
|
546
566
|
}
|
|
547
567
|
if (!sess) return;
|
|
548
|
-
|
|
568
|
+
const frame = {
|
|
549
569
|
type: 'sdk-slow-upstream', cwd: sess.cwd, project: projectKeyForCwd(sess.cwd),
|
|
550
|
-
instanceKey: sess.instanceKey || null, requestId: requestId || null, waitingMs, model: model || null,
|
|
551
|
-
|
|
570
|
+
instanceKey: sess.instanceKey || null, requestId: requestId || null, waitingMs, model: model || null,
|
|
571
|
+
startedAt: Date.now() - Math.max(0, Number(waitingMs) || 0), ts: Date.now(),
|
|
572
|
+
};
|
|
573
|
+
if (frame.requestId) _pendingSlowUpstreams.set(frame.requestId, frame);
|
|
574
|
+
broadcastWsMessage(frame);
|
|
552
575
|
} catch (err) { reportSwallowed('server.slow-upstream-listener', err); }
|
|
553
576
|
});
|
|
554
577
|
|
|
@@ -2253,6 +2276,12 @@ async function setupTerminalWebSocket(httpServer) {
|
|
|
2253
2276
|
});
|
|
2254
2277
|
|
|
2255
2278
|
wss.on('connection', (ws) => {
|
|
2279
|
+
// Per-connection app-level ping (extracted for tests — see attachTerminalWsPing):
|
|
2280
|
+
// send-only on purpose; a dead connection is skipped (readyState gate) and the
|
|
2281
|
+
// client-side watchdog owns close+reconnect, keeping the historical broadcast
|
|
2282
|
+
// semantics (skip non-OPEN, heal on reconnect) unchanged.
|
|
2283
|
+
attachTerminalWsPing(ws);
|
|
2284
|
+
|
|
2256
2285
|
// 发送当前 PTY 状态
|
|
2257
2286
|
const state = getPtyState();
|
|
2258
2287
|
ws.send(JSON.stringify({ type: 'state', ...state }));
|
|
@@ -2297,8 +2326,9 @@ async function setupTerminalWebSocket(httpServer) {
|
|
|
2297
2326
|
ws.send(JSON.stringify({
|
|
2298
2327
|
type: 'perm-hook-pending', id, toolName: entry.toolName, input: entry.input,
|
|
2299
2328
|
autoApproveAt: entry.autoCancelled ? null : (entry.auto?.autoApproveAt ?? null),
|
|
2300
|
-
// 0 = server says OFF (fork-off / npm publish floor
|
|
2301
|
-
//
|
|
2329
|
+
// 0 = server says OFF (fork-off / npm publish floor — the floor applies at
|
|
2330
|
+
// every tier except full auto-approve -2): never let a reconnecting client
|
|
2331
|
+
// fall back to its local pref and re-arm a countdown the server disabled.
|
|
2302
2332
|
autoApproveSeconds: entry.auto?.seconds ?? 0,
|
|
2303
2333
|
autoCancelled: entry.autoCancelled === true,
|
|
2304
2334
|
}));
|
|
@@ -2371,6 +2401,8 @@ async function setupTerminalWebSocket(httpServer) {
|
|
|
2371
2401
|
// ask 类带 startedAt/timeoutMs —— 与 ask-hook replay 同款剩余时间重算。
|
|
2372
2402
|
if (isSdkMode) replaySdkPendingApprovals();
|
|
2373
2403
|
|
|
2404
|
+
_replaySlowUpstreams(ws);
|
|
2405
|
+
|
|
2374
2406
|
// Replay sdk-init snapshot so a refreshed/reconnected page restores slash-command
|
|
2375
2407
|
// surface and model info without waiting for the next session.
|
|
2376
2408
|
if (isSdkMode && _sdkGetInitSnapshot) {
|
|
@@ -2615,6 +2647,8 @@ async function setupTerminalWebSocket(httpServer) {
|
|
|
2615
2647
|
// The replay helpers already filter by the just-stamped view project+instance,
|
|
2616
2648
|
// and the frontend dedupes by id, so a full replay never double-opens a modal.)
|
|
2617
2649
|
replaySdkPendingApprovals();
|
|
2650
|
+
// Restore requests that were still waiting when this view disconnected.
|
|
2651
|
+
_replaySlowUpstreams(ws);
|
|
2618
2652
|
// Re-announce the just-viewed workspace's turn state so the spinner / Stop
|
|
2619
2653
|
// button reflects it immediately (otherwise a long-running turn shows idle
|
|
2620
2654
|
// until the next state change or heartbeat).
|
|
@@ -3972,6 +4006,16 @@ async function _doStop() {
|
|
|
3972
4006
|
}
|
|
3973
4007
|
// Tear down terminal WSS so stop/start cycles never leak a second listener on the same HTTP server.
|
|
3974
4008
|
if (terminalWss) {
|
|
4009
|
+
// A noServer WebSocketServer's close() does NOT terminate existing upgraded
|
|
4010
|
+
// connections — it only stops accepting new ones. Left alive, a zombie
|
|
4011
|
+
// connection keeps receiving the 25s ping, so the client watchdog never
|
|
4012
|
+
// judges it half-open and never reconnects to the fresh server (the exact
|
|
4013
|
+
// freeze this keepalive was added to fix). Terminate first (mirror
|
|
4014
|
+
// streamMux.close()), which fires each socket's close event and clears its
|
|
4015
|
+
// ping interval.
|
|
4016
|
+
for (const c of terminalWss.clients) {
|
|
4017
|
+
try { c.terminate(); } catch { /* already gone */ }
|
|
4018
|
+
}
|
|
3975
4019
|
terminalWss.close();
|
|
3976
4020
|
terminalWss = null;
|
|
3977
4021
|
}
|
|
@@ -4022,6 +4066,28 @@ async function _doStop() {
|
|
|
4022
4066
|
// are intentionally no pushSdkEntry/setSdkStreamingState shortcuts anymore.
|
|
4023
4067
|
|
|
4024
4068
|
/** Broadcast a message to all terminal WS clients (for SDK canUseTool). */
|
|
4069
|
+
// Approval TERMINAL frames: id-addressed "this pending is over" events. Every client handler
|
|
4070
|
+
// clears ONLY the pending whose id matches (an unmatched id is a no-op), so cross-workspace
|
|
4071
|
+
// delivery adds no state. Routing these through view-narrowing turns a display-scoping
|
|
4072
|
+
// optimization into a correctness dependency: a connection stamp that diverges from the frame's
|
|
4073
|
+
// cwd/instanceKey at fire time silently drops the ONLY close signal — the server-side pending
|
|
4074
|
+
// entry is already deleted, so no reconnect replay can recover it and the modal hangs forever.
|
|
4075
|
+
// Precedents that already deliver these globally: PTY hook frames (routes/ask-perm.js),
|
|
4076
|
+
// _broadcastApprovalCloses, and the client-answer relays (server.js:2888+, 2931+, 3123+).
|
|
4077
|
+
// `ask-hook-cancelled` is deliberately EXCLUDED (it flushes a user message parked behind the
|
|
4078
|
+
// ask). *-auto-cancel and pending/state frames stay narrowed.
|
|
4079
|
+
const ID_ADDRESSED_APPROVAL_CLEARS = new Set([
|
|
4080
|
+
'sdk-plan-resolved', 'sdk-ask-resolved', 'perm-hook-resolved',
|
|
4081
|
+
'sdk-ask-timeout', 'perm-hook-timeout',
|
|
4082
|
+
'ask-hook-resolved', 'ask-hook-timeout', // future-proof: currently direct-sent
|
|
4083
|
+
]);
|
|
4084
|
+
function isIdAddressedApprovalClear(msg) {
|
|
4085
|
+
return !!msg && typeof msg === 'object'
|
|
4086
|
+
&& typeof msg.type === 'string'
|
|
4087
|
+
&& ID_ADDRESSED_APPROVAL_CLEARS.has(msg.type)
|
|
4088
|
+
&& msg.id != null; // raw check: a no-id legacy perm-hook-timeout clears ALL — must stay scoped
|
|
4089
|
+
}
|
|
4090
|
+
|
|
4025
4091
|
export function broadcastWsMessage(msg) { if (terminalWss) {
|
|
4026
4092
|
// SDK multi-session (2026-10-12): a cwd-tagged frame belongs to one workspace's session.
|
|
4027
4093
|
// Route it only to clients viewing that workspace (or the bound view with no ?project=),
|
|
@@ -4042,11 +4108,13 @@ export function broadcastWsMessage(msg) { if (terminalWss) {
|
|
|
4042
4108
|
// killing the surviving twin viewer's spinner and queue bubbles). Untagged/cwd-only
|
|
4043
4109
|
// frames keep the historical project-level behavior.
|
|
4044
4110
|
const frameInstance = (msg && typeof msg === 'object' && typeof msg.instanceKey === 'string' && msg.instanceKey) ? msg.instanceKey : null;
|
|
4111
|
+
// Id-addressed approval terminal frames bypass the narrowing (see the block above).
|
|
4112
|
+
const clearAcrossViews = isIdAddressedApprovalClear(msg);
|
|
4045
4113
|
const str = typeof msg === 'string' ? msg : JSON.stringify(msg);
|
|
4046
4114
|
terminalWss.clients.forEach((c) => {
|
|
4047
4115
|
if (c.readyState !== 1) return;
|
|
4048
|
-
if (frameProj && c._ccvViewProject && c._ccvViewProject !== frameProj) return; // other workspace's frame
|
|
4049
|
-
if (frameInstance && c._ccvViewInstance && c._ccvViewInstance !== frameInstance) return; // other instance of the same project
|
|
4116
|
+
if (!clearAcrossViews && frameProj && c._ccvViewProject && c._ccvViewProject !== frameProj) return; // other workspace's frame
|
|
4117
|
+
if (!clearAcrossViews && frameInstance && c._ccvViewInstance && c._ccvViewInstance !== frameInstance) return; // other instance of the same project
|
|
4050
4118
|
try { c.send(str); } catch {}
|
|
4051
4119
|
});
|
|
4052
4120
|
}
|