cc-viewer 1.9.35 → 1.9.36
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 +352 -59
- package/dist/assets/{App-CjP88gbM.css → App-BJIeZQK0.css} +1 -1
- package/dist/assets/App-C_S65Ygt.js +2 -0
- package/dist/assets/{ArchivePreview-BSBVB9bY.js → ArchivePreview-ezRMkut5.js} +1 -1
- package/dist/assets/{AudioPreview-WxWptR0I.js → AudioPreview-MxQVazDj.js} +1 -1
- package/dist/assets/{MdxEditorPanel-Dq7kpPGA.js → MdxEditorPanel-CmG2jyvK.js} +1 -1
- package/dist/assets/{Mobile-DtdwYlSK.js → Mobile-BerOQqT4.js} +1 -1
- package/dist/assets/{ProxyStatsModal-BZPBbxOC.js → ProxyStatsModal-dqlP2r2c.js} +1 -1
- package/dist/assets/{SubtitlePreview-CN3-SniA.js → SubtitlePreview-CHRRgV95.js} +1 -1
- package/dist/assets/{index-OTFFui4C.js → index-DBmXRTLE.js} +2 -2
- package/dist/assets/seqResourceLoaders-BOVRL7Y-.js +2 -0
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/server/i18n.js +4 -0
- package/server/interceptor.js +61 -19
- package/server/lib/anthropic-auth-placeholder.js +147 -0
- package/server/lib/im/im-bridge-core.js +59 -14
- package/server/lib/im/im-permissions.js +48 -0
- package/server/lib/im/im-process-manager.js +6 -5
- package/server/lib/im-deny.js +4 -1
- package/server/lib/interceptor-core.js +51 -0
- package/server/lib/proxy-session-registry.js +156 -0
- package/server/lib/sdk-manager.js +92 -4
- package/server/lib/update-job.js +3 -3
- package/server/proxy.js +15 -7
- package/server/pty-manager.js +4 -29
- package/server/routes/preferences.js +108 -24
- package/server/routes/update.js +15 -2
- package/server/server.js +9 -6
- package/dist/assets/App-COZPgAGQ.js +0 -2
- package/dist/assets/seqResourceLoaders-BXk6JJEc.js +0 -2
|
@@ -3,8 +3,10 @@ import { existsSync, readFileSync, writeFileSync, mkdirSync, copyFileSync, unlin
|
|
|
3
3
|
import { join, dirname } from 'node:path';
|
|
4
4
|
import { homedir } from 'node:os';
|
|
5
5
|
import { LOG_DIR, setLogDir, getClaudeConfigDir, discoverClaudeExecutables, resolveExplicitClaudePath, CLAUDE_EXECUTABLE_PREF_KEY } from '../../findcc.js';
|
|
6
|
-
import { PROFILE_PATH, _defaultConfig, getActiveProfileId, getStoredRoles, isOfficialDefaultEndpoint, setActiveProfileForWorkspace, _loadProxyProfile, hydrateProfilesWithApiKeys, RETRY_CONFIG_PATH, _retryConfigState, _loadRetryConfigState } from '../interceptor.js';
|
|
6
|
+
import { PROFILE_PATH, _defaultConfig, getActiveProfileId, getStoredRoles, isOfficialDefaultEndpoint, setActiveProfileForWorkspace, _loadProxyProfile, getGlobalDefaultProfileId, hydrateProfilesWithApiKeys, RETRY_CONFIG_PATH, _retryConfigState, _loadRetryConfigState } from '../interceptor.js';
|
|
7
7
|
import { migrateProxyProfileList, isValidRoleValue, PROXY_ROLE_KEYS } from '../lib/interceptor-core.js';
|
|
8
|
+
import { getSessionProxy, setSessionProxyProfile, pruneSessionProxyProfiles } from '../lib/proxy-session-registry.js';
|
|
9
|
+
import { filterClientsByInstance } from '../lib/v2/view-router.js';
|
|
8
10
|
import { DEFAULT_RETRY_CONFIG, validateRetryConfig, resolveRetryConfig } from '../lib/proxy/proxy-retry.js';
|
|
9
11
|
import { discoverCcSwitchProviders, mergeImportedProfiles } from '../lib/ccswitch-import.js';
|
|
10
12
|
import { reportSwallowed } from '../lib/error-report.js';
|
|
@@ -319,6 +321,22 @@ function claudeSettingsPost(req, res, parsedUrl, isLocal, deps) {
|
|
|
319
321
|
});
|
|
320
322
|
}
|
|
321
323
|
|
|
324
|
+
// ── Per-session proxy binding helpers (GET /api/proxy-profiles?instanceKey=) ──────
|
|
325
|
+
// A binding counts as "session-scoped" only when its main is still resolvable: 'max'
|
|
326
|
+
// (explicit Default) or a profile id present in the served list. A dangling binding
|
|
327
|
+
// (profile deleted out from under it) falls back to the global view instead of
|
|
328
|
+
// surfacing an id the UI can't render.
|
|
329
|
+
function sessionScopedBindingPresent(binding, data) {
|
|
330
|
+
if (!binding || typeof binding.main !== 'string' || !binding.main) return false;
|
|
331
|
+
if (binding.main === 'max') return true;
|
|
332
|
+
const list = data && Array.isArray(data.profiles) ? data.profiles : [];
|
|
333
|
+
return list.some((p) => p && p.id === binding.main);
|
|
334
|
+
}
|
|
335
|
+
function sessionBindingActive(binding) { return binding.main; }
|
|
336
|
+
function sessionBindingRoles(binding) {
|
|
337
|
+
return { subagent: binding.roles?.subagent || 'follow', teammate: binding.roles?.teammate || 'follow' };
|
|
338
|
+
}
|
|
339
|
+
|
|
322
340
|
function proxyProfilesGet(req, res, parsedUrl, isLocal, deps) {
|
|
323
341
|
try {
|
|
324
342
|
let data = existsSync(PROFILE_PATH) ? JSON.parse(readFileSync(PROFILE_PATH, 'utf-8')) : deps.defaultProxyProfiles;
|
|
@@ -349,13 +367,24 @@ function proxyProfilesGet(req, res, parsedUrl, isLocal, deps) {
|
|
|
349
367
|
data = { ...data, profiles: hydrateProfilesWithApiKeys(data.profiles) };
|
|
350
368
|
}
|
|
351
369
|
// 用 interceptor.getActiveProfileId() 返回 effective active(workspace > profile.json.active > 'max')
|
|
352
|
-
|
|
370
|
+
// Per-session override: ?instanceKey= with an existing binding resolves that session's
|
|
371
|
+
// OWN main/roles (and marks sessionScoped) instead of the process-global value.
|
|
372
|
+
const globalActive = getGlobalDefaultProfileId();
|
|
373
|
+
const reqInstance = (() => {
|
|
374
|
+
const v = parsedUrl && parsedUrl.searchParams && typeof parsedUrl.searchParams.get === 'function'
|
|
375
|
+
? parsedUrl.searchParams.get('instanceKey') : null;
|
|
376
|
+
return (typeof v === 'string' && /^ccv-[0-9a-f]+$/.test(v)) ? v : null;
|
|
377
|
+
})();
|
|
378
|
+
const sessionBinding = reqInstance ? getSessionProxy(reqInstance) : undefined;
|
|
379
|
+
const sessionScoped = sessionScopedBindingPresent(sessionBinding, data);
|
|
380
|
+
const effectiveActive = sessionScoped ? sessionBindingActive(sessionBinding) : getActiveProfileId();
|
|
381
|
+
const effectiveRoles = sessionScoped ? sessionBindingRoles(sessionBinding) : getStoredRoles();
|
|
353
382
|
// 本机(127.0.0.1)= admin:下发明文 profile.apiKey 供本人在编辑表单(👁 折叠)里查阅/复制;已授权
|
|
354
383
|
// 的远程客户端只拿脱敏值(****+后4位)。保存时若回传脱敏值,POST 侧 isMasked() 会保留磁盘原值。
|
|
355
384
|
// 镜像 /api/auth/state 的密码、/api/dingtalk/status 的 appSecret 策略。
|
|
356
385
|
// roles 返回**存储值**(不做休眠调整):休眠只是请求侧不生效,若返回有效值,UI 缓存后
|
|
357
386
|
// 在下次无关 POST 回写会把休眠中的分配清掉。officialDefault 驱动 UI 隐藏角色分配区。
|
|
358
|
-
const full = { ...data, active: effectiveActive, roles:
|
|
387
|
+
const full = { ...data, active: effectiveActive, roles: effectiveRoles, officialDefault: isOfficialDefaultEndpoint(), globalActive, sessionScoped, ...(reqInstance ? { instanceKey: reqInstance } : {}) };
|
|
359
388
|
const payload = isLocal ? full : deps.maskProfiles(full);
|
|
360
389
|
// defaultConfig.apiKey 始终脱敏:它在列表里是常显文本(无 👁 折叠),且 Max/OAuth 默认配置的 key
|
|
361
390
|
// 可能是 OAuth token;只有可编辑 profile 的 key 才按 isLocal 明文下发。
|
|
@@ -371,7 +400,7 @@ function proxyProfilesGet(req, res, parsedUrl, isLocal, deps) {
|
|
|
371
400
|
function proxyProfilesPost(req, res, parsedUrl, isLocal, deps) {
|
|
372
401
|
let body = '';
|
|
373
402
|
req.on('data', chunk => { body += chunk; if (body.length > deps.MAX_POST_BODY) req.destroy(); });
|
|
374
|
-
req.on('end', () => {
|
|
403
|
+
req.on('end', async () => {
|
|
375
404
|
try {
|
|
376
405
|
const incoming = JSON.parse(body);
|
|
377
406
|
if (!incoming || typeof incoming !== 'object' || !Array.isArray(incoming.profiles)) {
|
|
@@ -379,10 +408,53 @@ function proxyProfilesPost(req, res, parsedUrl, isLocal, deps) {
|
|
|
379
408
|
res.end(JSON.stringify({ error: 'Invalid profile data: profiles must be an array' }));
|
|
380
409
|
return;
|
|
381
410
|
}
|
|
411
|
+
// active/roles 作用域:'session'(按 instanceKey 写会话映射,不落盘)/
|
|
412
|
+
// 'global'(设为全局默认 + workspace)/ 缺省(旧客户端 = 现状,workspace+全局回退)。
|
|
413
|
+
// 在读/校验阶段只确定 scope 与 instanceKey;active/roles 的具体校验在 sanitizedRoles
|
|
414
|
+
// 之后、落盘之前(见下),以便 roles-only 会话调用也有合法判定依据。
|
|
415
|
+
const scope = incoming.scope === 'session' || incoming.scope === 'global' ? incoming.scope : null;
|
|
416
|
+
const hasActive = typeof incoming.active === 'string' && incoming.active;
|
|
417
|
+
let sessionKey = (typeof incoming.instanceKey === 'string' && /^ccv-[0-9a-f]+$/.test(incoming.instanceKey)) ? incoming.instanceKey : null;
|
|
382
418
|
// 确保 max profile 始终存在
|
|
383
419
|
if (!incoming.profiles.some(p => p.id === 'max')) {
|
|
384
420
|
incoming.profiles = [{ id: 'max', name: 'Default' }, ...(incoming.profiles || [])];
|
|
385
421
|
}
|
|
422
|
+
// 角色分配校验:只认 subagent/teammate 两个 key(roles.main 之类的杂键直接丢弃);
|
|
423
|
+
// 值必须是 follow / max / 入参 profiles 里存在的 id(按将落盘的列表校验,而非旧文件),
|
|
424
|
+
// 非法值归 'follow'(宽容风格,不 400)。被删 profile 的悬空角色由读取时归 follow 兜底。
|
|
425
|
+
let sanitizedRoles;
|
|
426
|
+
if (incoming.roles && typeof incoming.roles === 'object' && !Array.isArray(incoming.roles)) {
|
|
427
|
+
const byId = new Map(incoming.profiles.map(p => [p.id, p]));
|
|
428
|
+
sanitizedRoles = {};
|
|
429
|
+
for (const k of PROXY_ROLE_KEYS) {
|
|
430
|
+
if (!(k in incoming.roles)) continue; // 未提交的 key 不进 patch → 合并时保留存储值
|
|
431
|
+
const v = incoming.roles[k];
|
|
432
|
+
// key 提交了但值非法(非字符串 / 悬空 id)→ 归 'follow'(显式纠正,不是保留)
|
|
433
|
+
sanitizedRoles[k] = (typeof v === 'string' && v && isValidRoleValue(v, byId)) ? v : 'follow';
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
// session 作用域的兜底寻址 + 校验。必须在落盘之前完成——被拒(400)的请求不得改写
|
|
437
|
+
// profile.json / vault。
|
|
438
|
+
if (scope === 'session' && !sessionKey) {
|
|
439
|
+
// Fallback: an older/again-loading frontend may legitimately lack the key on the
|
|
440
|
+
// bound view. Resolve the bound session's primary instance server-side (dynamic
|
|
441
|
+
// import — never eagerly load the Agent SDK in PTY mode) instead of silently
|
|
442
|
+
// degrading to a global write that wouldn't reach the (already-seeded) session.
|
|
443
|
+
try {
|
|
444
|
+
const boundCwd = process.env.CCV_PROJECT_DIR || process.cwd();
|
|
445
|
+
const sdk = await import('../lib/sdk-manager.js');
|
|
446
|
+
const resolved = sdk.resolveBoundPrimaryInstanceKey(boundCwd);
|
|
447
|
+
if (typeof resolved === 'string' && /^ccv-[0-9a-f]+$/.test(resolved)) sessionKey = resolved;
|
|
448
|
+
} catch (err) { reportSwallowed('proxy-profiles.resolve-session-key', err); }
|
|
449
|
+
}
|
|
450
|
+
if (scope === 'session') {
|
|
451
|
+
const byId = new Map(incoming.profiles.map(p => [p.id, p]));
|
|
452
|
+
if (!sessionKey || (hasActive && !isValidRoleValue(incoming.active, byId)) || (!hasActive && !sanitizedRoles)) {
|
|
453
|
+
res.writeHead(400, { 'Content-Type': 'application/json' });
|
|
454
|
+
res.end(JSON.stringify({ error: 'Invalid instanceKey/profile for session scope' }));
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
386
458
|
// Only the profiles list is written to profile.json; `active` is no longer persisted here
|
|
387
459
|
// (avoids cross-process clobbering). The existing file's `active` field is preserved so an
|
|
388
460
|
// older ccv or a hand editor can still fall back to it. Read-merge-write INSIDE the lock
|
|
@@ -398,34 +470,46 @@ function proxyProfilesPost(req, res, parsedUrl, isLocal, deps) {
|
|
|
398
470
|
existing.profiles = strippedProfiles;
|
|
399
471
|
return existing;
|
|
400
472
|
}, { mode: 0o600, strictCorrupt: true, fallback: {} });
|
|
401
|
-
// 角色分配校验:只认 subagent/teammate 两个 key(roles.main 之类的杂键直接丢弃);
|
|
402
|
-
// 值必须是 follow / max / 入参 profiles 里存在的 id(按将落盘的列表校验,而非旧文件),
|
|
403
|
-
// 非法值归 'follow'(宽容风格,不 400)。被删 profile 的悬空角色由读取时归 follow 兜底。
|
|
404
|
-
let sanitizedRoles;
|
|
405
|
-
if (incoming.roles && typeof incoming.roles === 'object' && !Array.isArray(incoming.roles)) {
|
|
406
|
-
const byId = new Map(incoming.profiles.map(p => [p.id, p]));
|
|
407
|
-
sanitizedRoles = {};
|
|
408
|
-
for (const k of PROXY_ROLE_KEYS) {
|
|
409
|
-
if (!(k in incoming.roles)) continue; // 未提交的 key 不进 patch → 合并时保留存储值
|
|
410
|
-
const v = incoming.roles[k];
|
|
411
|
-
// key 提交了但值非法(非字符串 / 悬空 id)→ 归 'follow'(显式纠正,不是保留)
|
|
412
|
-
sanitizedRoles[k] = (typeof v === 'string' && v && isValidRoleValue(v, byId)) ? v : 'follow';
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
473
|
// active/roles 走 workspace 级别存储(当前进程独占);合并语义:缺省字段保留文件现值
|
|
416
|
-
|
|
417
|
-
|
|
474
|
+
if (scope === 'session') {
|
|
475
|
+
// 会话级:写进程内映射(主代理 + 角色),不碰 workspace 文件 / 全局默认。
|
|
476
|
+
// roles 按 key 合并:未提交的角色保留会话现值(与 workspace mergeActivePayload 同语义)。
|
|
477
|
+
const existing = getSessionProxy(sessionKey);
|
|
478
|
+
setSessionProxyProfile(sessionKey, {
|
|
479
|
+
main: hasActive ? incoming.active : (existing?.main || getGlobalDefaultProfileId()),
|
|
480
|
+
roles: {
|
|
481
|
+
subagent: sanitizedRoles && 'subagent' in sanitizedRoles ? sanitizedRoles.subagent : (existing?.roles?.subagent || 'follow'),
|
|
482
|
+
teammate: sanitizedRoles && 'teammate' in sanitizedRoles ? sanitizedRoles.teammate : (existing?.roles?.teammate || 'follow'),
|
|
483
|
+
},
|
|
484
|
+
});
|
|
485
|
+
_loadProxyProfile(); // 列表可能同时变了
|
|
486
|
+
} else if (hasActive || sanitizedRoles) {
|
|
418
487
|
setActiveProfileForWorkspace(hasActive ? incoming.active : undefined, sanitizedRoles);
|
|
419
488
|
} else {
|
|
420
489
|
_loadProxyProfile(); // 仅列表变化时也刷新一次以反映删除 / 重命名
|
|
421
490
|
}
|
|
422
|
-
//
|
|
423
|
-
|
|
491
|
+
// 清理悬空会话映射:只针对"本次确实从列表中消失"的 profile id(而非整张提交列表),
|
|
492
|
+
// 避免陈旧 tab 的全量列表把别的会话仍有效的绑定清掉。与 scope 无关。
|
|
493
|
+
if (pruneSessionProxyProfiles) {
|
|
494
|
+
// incoming.profiles 已是落盘后的全量;任何不在这张表里的绑定 id 都是悬空。
|
|
495
|
+
// 注意:这是删 profile 的唯一入口,故以新列表为准清理是安全的。
|
|
496
|
+
pruneSessionProxyProfiles(new Set(incoming.profiles.map(p => p.id)));
|
|
497
|
+
}
|
|
498
|
+
// SSE:session 变更只发同实例客户端(别戳到其他会话的 tab);global/列表刷新全发。
|
|
499
|
+
// session 作用域下生效的 active 是该会话映射里的 main(roles-only 调用时回退到现值)。
|
|
500
|
+
const sessionNow = scope === 'session' ? getSessionProxy(sessionKey) : null;
|
|
501
|
+
const effectiveActive = scope === 'session' ? (sessionNow?.main || null) : getActiveProfileId();
|
|
424
502
|
const activeProfile = incoming.profiles?.find(p => p.id === effectiveActive) || null;
|
|
425
503
|
const maskedProfile = activeProfile?.apiKey ? { ...activeProfile, apiKey: deps.maskApiKey(activeProfile.apiKey) } : activeProfile;
|
|
426
|
-
|
|
504
|
+
const globalActive = getGlobalDefaultProfileId();
|
|
505
|
+
if (scope === 'session') {
|
|
506
|
+
const targets = filterClientsByInstance(deps.clients, sessionKey);
|
|
507
|
+
sendEventToClients(targets, 'proxy_profile', { active: effectiveActive, profile: maskedProfile, instanceKey: sessionKey, roles: sessionNow ? sessionBindingRoles(sessionNow) : undefined, globalActive });
|
|
508
|
+
} else {
|
|
509
|
+
sendEventToClients(deps.clients, 'proxy_profile', { active: effectiveActive, profile: maskedProfile, roles: getStoredRoles(), global: true, globalActive });
|
|
510
|
+
}
|
|
427
511
|
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
428
|
-
res.end(JSON.stringify({ ok: true }));
|
|
512
|
+
res.end(JSON.stringify({ ok: true, scope: scope || 'global', active: effectiveActive, globalActive }));
|
|
429
513
|
} catch {
|
|
430
514
|
res.writeHead(400, { 'Content-Type': 'application/json' });
|
|
431
515
|
res.end(JSON.stringify({ error: 'Invalid JSON' }));
|
package/server/routes/update.js
CHANGED
|
@@ -35,8 +35,21 @@ async function start(req, res, parsedUrl, isLocal, deps) {
|
|
|
35
35
|
json(res, 200, deps.updateJob.getState());
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
// Read an optional { force: true } body so the UI can let the user bypass the
|
|
39
|
+
// "another instance is running" guard after an explicit confirmation. Body
|
|
40
|
+
// parse failure / empty body / non-stream req (tests) all fall back to
|
|
41
|
+
// force=false (legacy behavior).
|
|
42
|
+
const finish = (body) => {
|
|
43
|
+
let force = false;
|
|
44
|
+
try { force = body ? JSON.parse(body)?.force === true : false; }
|
|
45
|
+
catch { /* tolerate non-JSON / empty body as force=false */ }
|
|
46
|
+
deps.updateJob.start({ force }).catch((err) => reportSwallowed('update.start', err));
|
|
47
|
+
json(res, 202, deps.updateJob.getState());
|
|
48
|
+
};
|
|
49
|
+
if (typeof req?.on !== 'function') { finish(''); return; }
|
|
50
|
+
let body = '';
|
|
51
|
+
req.on('data', (chunk) => { body += chunk; if (body.length > 64 * 1024) req.destroy(); });
|
|
52
|
+
req.on('end', () => finish(body));
|
|
40
53
|
}
|
|
41
54
|
|
|
42
55
|
async function restart(req, res, parsedUrl, isLocal, deps) {
|
package/server/server.js
CHANGED
|
@@ -1705,11 +1705,13 @@ async function _doStart() {
|
|
|
1705
1705
|
interactions,
|
|
1706
1706
|
});
|
|
1707
1707
|
// IM adapters no longer run in the main ccv. Each enabled IM runs as an independent,
|
|
1708
|
-
// detached worker process (im-process-manager).
|
|
1709
|
-
// - WORKER (CCV_IM_PLATFORM set): connect ONLY this one platform to the singleton PTY.
|
|
1710
|
-
// -
|
|
1711
|
-
// (
|
|
1712
|
-
|
|
1708
|
+
// detached worker process (im-process-manager). Three CLI-mode cases:
|
|
1709
|
+
// - PTY WORKER (CCV_IM_PLATFORM set, !CCV_SDK_MODE): connect ONLY this one platform to the singleton PTY.
|
|
1710
|
+
// - SDK WORKER (CCV_IM_PLATFORM set, CCV_SDK_MODE): cli.js starts the bridge itself AFTER
|
|
1711
|
+
// initSdkSession (see runImSdkMode) — starting it here would race inbound messages
|
|
1712
|
+
// against an unregistered SDK session.
|
|
1713
|
+
// - MAIN ccv (no CCV_IM_PLATFORM): connect NOTHING in-process; reconcile spawns/adopts the enabled IM workers.
|
|
1714
|
+
if (isCliMode && !isSdkMode && process.env.CCV_IM_PLATFORM) {
|
|
1713
1715
|
const id = process.env.CCV_IM_PLATFORM;
|
|
1714
1716
|
const pmb = await import('./pty-manager.js');
|
|
1715
1717
|
try {
|
|
@@ -1730,9 +1732,10 @@ async function _doStart() {
|
|
|
1730
1732
|
} catch (e) {
|
|
1731
1733
|
console.error(`[CC Viewer] IM worker startBridge(${id}) failed:`, e?.message || e);
|
|
1732
1734
|
}
|
|
1733
|
-
} else if (isCliMode) {
|
|
1735
|
+
} else if (isCliMode && !process.env.CCV_IM_PLATFORM) {
|
|
1734
1736
|
// 主 ccv:先 stopAll(无在进程实例时为 no-op,防御升级残留)再 reconcile,
|
|
1735
1737
|
// 杜绝"旧在进程连接 + 新 detached worker"同时连同一机器人导致丢/重消息。
|
|
1738
|
+
// (SDK worker 已被第一分支的 !isSdkMode 排除,不会走到这里误 reconcile 自己。)
|
|
1736
1739
|
try { await imCore.stopAll(); } catch { /* no in-process instances */ }
|
|
1737
1740
|
imProcMgr.reconcileImProcesses().catch((e) => console.error('[CC Viewer] IM reconcile failed:', e?.message || e));
|
|
1738
1741
|
}
|