imcodes 2026.4.1858-dev.1836 → 2026.4.1862-dev.1840
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/dist/src/daemon/command-handler.d.ts.map +1 -1
- package/dist/src/daemon/command-handler.js +22 -19
- package/dist/src/daemon/command-handler.js.map +1 -1
- package/dist/src/daemon/file-change-normalizer.d.ts.map +1 -1
- package/dist/src/daemon/file-change-normalizer.js +40 -12
- package/dist/src/daemon/file-change-normalizer.js.map +1 -1
- package/dist/src/daemon/lifecycle.d.ts.map +1 -1
- package/dist/src/daemon/lifecycle.js +6 -1
- package/dist/src/daemon/lifecycle.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-handler.d.ts","sourceRoot":"","sources":["../../../src/daemon/command-handler.ts"],"names":[],"mappings":"AAOA,OAAO,EAA0D,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACvH,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEpG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAyBnD,OAAO,EAAsE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"command-handler.d.ts","sourceRoot":"","sources":["../../../src/daemon/command-handler.ts"],"names":[],"mappings":"AAOA,OAAO,EAA0D,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACvH,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEpG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAyBnD,OAAO,EAAsE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAmhB3H,wBAAsB,yBAAyB,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBtF;AAoID,MAAM,WAAW,YAAY;IAC3B,MA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,CAAA;CAAE,CAAC;AAEzD,iFAAiF;AACjF,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,GAAG,MAAM,CAa3E;AAED,gEAAgE;AAChE,wBAAgB,2BAA2B,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,GAAG,MAAM,CAI5E;AAED,wCAAwC;AACxC,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,GAAG,MAAM,CAEtE;AAED,uDAAuD;AACvD,wBAAsB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAEhL"}
|
|
@@ -119,6 +119,10 @@ async function buildSubSessionSync(id, overrides) {
|
|
|
119
119
|
const sessionName = subSessionName(id);
|
|
120
120
|
const record = getSession(sessionName);
|
|
121
121
|
const r = { ...record, ...overrides };
|
|
122
|
+
if (!r?.agentType) {
|
|
123
|
+
logger.warn({ id, sessionName }, 'Skipping subsession.sync without agentType');
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
122
126
|
// Compute transport display metadata fresh — matches session-list.ts hydration logic.
|
|
123
127
|
// The session store may have stale or missing metadata during early launch/update windows.
|
|
124
128
|
const freshDisplay = r?.agentType === 'qwen'
|
|
@@ -144,7 +148,7 @@ async function buildSubSessionSync(id, overrides) {
|
|
|
144
148
|
// For an idle session with no recent state change, that next event
|
|
145
149
|
// might never come, so the dot could stay gray indefinitely.
|
|
146
150
|
state: r?.state ?? null,
|
|
147
|
-
sessionType: r
|
|
151
|
+
sessionType: r.agentType,
|
|
148
152
|
cwd: r?.projectDir ?? null,
|
|
149
153
|
shellBin: null,
|
|
150
154
|
ccSessionId: r?.ccSessionId ?? null,
|
|
@@ -178,6 +182,12 @@ async function buildSubSessionSync(id, overrides) {
|
|
|
178
182
|
effort: r?.effort ?? null,
|
|
179
183
|
};
|
|
180
184
|
}
|
|
185
|
+
async function sendSubSessionSync(serverLink, id, overrides) {
|
|
186
|
+
const payload = await buildSubSessionSync(id, overrides);
|
|
187
|
+
if (!payload)
|
|
188
|
+
return;
|
|
189
|
+
serverLink.send(payload);
|
|
190
|
+
}
|
|
181
191
|
function normalizeTransportConfigUpdate(value) {
|
|
182
192
|
return value && typeof value === 'object' && !Array.isArray(value)
|
|
183
193
|
? value
|
|
@@ -242,7 +252,7 @@ async function handleSubSessionTransportConfigUpdate(cmd, serverLink) {
|
|
|
242
252
|
supervisionAutomation.applySnapshotUpdate(sessionName, extractSessionSupervisionSnapshot(nextTransportConfig ?? null));
|
|
243
253
|
const id = sessionName.replace(/^deck_sub_/, '');
|
|
244
254
|
try {
|
|
245
|
-
|
|
255
|
+
await sendSubSessionSync(serverLink, id, { transportConfig: nextTransportConfig });
|
|
246
256
|
}
|
|
247
257
|
catch {
|
|
248
258
|
// not connected
|
|
@@ -363,7 +373,7 @@ async function syncSubSessionIfNeeded(sessionName, serverLink) {
|
|
|
363
373
|
return;
|
|
364
374
|
const subId = sessionName.slice('deck_sub_'.length);
|
|
365
375
|
try {
|
|
366
|
-
|
|
376
|
+
await sendSubSessionSync(serverLink, subId);
|
|
367
377
|
}
|
|
368
378
|
catch { /* ignore */ }
|
|
369
379
|
}
|
|
@@ -485,9 +495,7 @@ function refreshQwenQuotaUsageLabels(serverLink) {
|
|
|
485
495
|
if (session.name.startsWith('deck_sub_')) {
|
|
486
496
|
const subId = session.name.replace(/^deck_sub_/, '');
|
|
487
497
|
if (serverLink)
|
|
488
|
-
void
|
|
489
|
-
serverLink.send(payload);
|
|
490
|
-
}).catch(() => { });
|
|
498
|
+
void sendSubSessionSync(serverLink, subId).catch(() => { });
|
|
491
499
|
}
|
|
492
500
|
}
|
|
493
501
|
if (serverLink)
|
|
@@ -511,7 +519,7 @@ export async function refreshCodexQuotaMetadata(serverLink) {
|
|
|
511
519
|
continue;
|
|
512
520
|
const subId = session.name.replace(/^deck_sub_/, '');
|
|
513
521
|
try {
|
|
514
|
-
|
|
522
|
+
await sendSubSessionSync(serverLink, subId);
|
|
515
523
|
}
|
|
516
524
|
catch {
|
|
517
525
|
// not connected
|
|
@@ -891,13 +899,8 @@ export function handleWebCommand(msg, serverLink) {
|
|
|
891
899
|
upsertSession({ ...record, label: nextLabel, updatedAt: Date.now() });
|
|
892
900
|
logger.info({ sessionName: sName, label }, 'subsession.rename: label updated');
|
|
893
901
|
const id = sName.replace(/^deck_sub_/, '');
|
|
894
|
-
void
|
|
895
|
-
|
|
896
|
-
serverLink.send(payload);
|
|
897
|
-
}
|
|
898
|
-
catch {
|
|
899
|
-
// not connected
|
|
900
|
-
}
|
|
902
|
+
void sendSubSessionSync(serverLink, id, { label: nextLabel }).catch(() => {
|
|
903
|
+
// not connected
|
|
901
904
|
});
|
|
902
905
|
}
|
|
903
906
|
}
|
|
@@ -2974,7 +2977,7 @@ async function handleSubSessionStart(cmd, serverLink) {
|
|
|
2974
2977
|
});
|
|
2975
2978
|
// Sync to server DB
|
|
2976
2979
|
try {
|
|
2977
|
-
|
|
2980
|
+
await sendSubSessionSync(serverLink, id);
|
|
2978
2981
|
}
|
|
2979
2982
|
catch { /* not connected */ }
|
|
2980
2983
|
}
|
|
@@ -3010,7 +3013,7 @@ async function handleSubSessionStart(cmd, serverLink) {
|
|
|
3010
3013
|
});
|
|
3011
3014
|
// Sync to server DB so frontend can see the sub-session
|
|
3012
3015
|
try {
|
|
3013
|
-
|
|
3016
|
+
await sendSubSessionSync(serverLink, id);
|
|
3014
3017
|
}
|
|
3015
3018
|
catch { /* not connected */ }
|
|
3016
3019
|
}
|
|
@@ -3058,7 +3061,7 @@ async function handleSubSessionRestart(cmd, serverLink) {
|
|
|
3058
3061
|
transportConfig: ('transportConfig' in cmd ? cmd.transportConfig : undefined),
|
|
3059
3062
|
});
|
|
3060
3063
|
try {
|
|
3061
|
-
|
|
3064
|
+
await sendSubSessionSync(serverLink, id);
|
|
3062
3065
|
}
|
|
3063
3066
|
catch { /* not connected */ }
|
|
3064
3067
|
}
|
|
@@ -3079,7 +3082,7 @@ async function handleSubSessionRebuildAll(cmd, serverLink) {
|
|
|
3079
3082
|
await rebuildSubSessions(subSessions).catch((e) => logger.error({ err: e }, 'subsession.rebuild_all failed'));
|
|
3080
3083
|
for (const sub of subSessions) {
|
|
3081
3084
|
try {
|
|
3082
|
-
|
|
3085
|
+
await sendSubSessionSync(serverLink, sub.id);
|
|
3083
3086
|
}
|
|
3084
3087
|
catch (e) {
|
|
3085
3088
|
logger.warn({ err: e, id: sub.id }, 'Failed to sync rebuilt sub-session');
|
|
@@ -3114,7 +3117,7 @@ async function handleSubSessionSetModel(cmd, serverLink) {
|
|
|
3114
3117
|
await startSubSession({ id, type: 'codex', cwd: cwd ?? null, codexModel: model });
|
|
3115
3118
|
// Sync restarted sub-session to server DB
|
|
3116
3119
|
try {
|
|
3117
|
-
|
|
3120
|
+
await sendSubSessionSync(serverLink, id);
|
|
3118
3121
|
}
|
|
3119
3122
|
catch { /* not connected */ }
|
|
3120
3123
|
}
|