fix(v0.5.1): 适配rc.5并修正控制室与更新提醒

This commit is contained in:
Aisland
2026-10-31 17:05:17 +08:00
parent 56ffe0cd1c
commit f98246ef0c
25 changed files with 703 additions and 237 deletions
+11
View File
@@ -86,6 +86,17 @@ export function createSessionSnapshotAdapter() {
}
}
/** Display only: done means the run ended, never that the task succeeded.
* Keep the adapter's completion edge unchanged for widget-result/ack handling.
*/
export function consoleStatusOf(entry: any, pending: string | null, legacyFace?: any): 'idle' | 'busy' | 'need' | 'done' {
if (!entry) return 'idle'
if (pending != null) return 'need'
if (entry.running === true) return 'busy'
if (entry.completed === true || legacyFace?.completed === true) return 'done'
return 'idle'
}
/** Parent links and the host's child catalog can each contain otherwise missing children. */
export function childSessionIdsOf(snapshot: any, sid: string): Set<string> {
const children = new Set<string>()