@adhdev/daemon-core 0.9.76-rc.7 → 0.9.76-rc.8
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/index.js +15 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/cli-adapters/provider-cli-adapter.ts +4 -3
- package/src/status/builders.ts +17 -12
package/dist/index.js
CHANGED
|
@@ -1766,8 +1766,9 @@ var init_provider_cli_adapter = __esm({
|
|
|
1766
1766
|
const currentSnapshot = normalizeScreenSnapshot(screenText);
|
|
1767
1767
|
const lastSnapshot = this.lastScreenSnapshot;
|
|
1768
1768
|
if (!lastSnapshot || lastSnapshot === currentSnapshot) return screenText;
|
|
1769
|
-
const
|
|
1770
|
-
const
|
|
1769
|
+
const activeScreenPattern = /\besc to (?:interrupt|stop)\b|Enter to interrupt, Ctrl\+C to cancel|Enter to confirm\s*[·•-]\s*Esc to cancel|\b(?:MCP servers?|tool calls?)\b[^\n\r]{0,160}\brequire approval\b/i;
|
|
1770
|
+
const staleSnapshotLooksActive = activeScreenPattern.test(lastSnapshot);
|
|
1771
|
+
const currentScreenLooksIdle = /(?:^|\n|\r)\s*[❯›>]\s*(?:Try\s+["“][^\n\r"”]+["”])?\s*(?:\n|\r|$)/.test(screenText) && !activeScreenPattern.test(screenText);
|
|
1771
1772
|
if (staleSnapshotLooksActive && currentScreenLooksIdle) return screenText;
|
|
1772
1773
|
if (currentSnapshot.length >= lastSnapshot.length) return screenText;
|
|
1773
1774
|
return `${screenText}
|
|
@@ -11191,6 +11192,14 @@ function getActiveChatOptions(profile) {
|
|
|
11191
11192
|
if (profile === "full") return {};
|
|
11192
11193
|
return LIVE_STATUS_ACTIVE_CHAT_OPTIONS;
|
|
11193
11194
|
}
|
|
11195
|
+
function resolveSessionStatus(activeChat, providerStatus) {
|
|
11196
|
+
const chatStatus = normalizeManagedStatus(activeChat?.status, { activeModal: activeChat?.activeModal || null });
|
|
11197
|
+
const topLevelStatus = normalizeManagedStatus(providerStatus, { activeModal: activeChat?.activeModal || null });
|
|
11198
|
+
if (chatStatus === "waiting_approval" || topLevelStatus === "waiting_approval") return "waiting_approval";
|
|
11199
|
+
if (chatStatus === "generating" || topLevelStatus === "generating") return "generating";
|
|
11200
|
+
if (topLevelStatus !== "idle") return topLevelStatus;
|
|
11201
|
+
return chatStatus;
|
|
11202
|
+
}
|
|
11194
11203
|
function shouldIncludeSessionControls(profile) {
|
|
11195
11204
|
return profile !== "live";
|
|
11196
11205
|
}
|
|
@@ -11269,9 +11278,7 @@ function buildIdeWorkspaceSession(state, cdpManagers, options) {
|
|
|
11269
11278
|
providerName: state.name,
|
|
11270
11279
|
kind: "workspace",
|
|
11271
11280
|
transport: "cdp-page",
|
|
11272
|
-
status:
|
|
11273
|
-
activeModal: activeChat?.activeModal || null
|
|
11274
|
-
}),
|
|
11281
|
+
status: resolveSessionStatus(activeChat, state.status),
|
|
11275
11282
|
title,
|
|
11276
11283
|
workspace,
|
|
11277
11284
|
...git && { git },
|
|
@@ -11306,9 +11313,7 @@ function buildExtensionAgentSession(parent, ext, options) {
|
|
|
11306
11313
|
providerSessionId: ext.providerSessionId,
|
|
11307
11314
|
kind: "agent",
|
|
11308
11315
|
transport: "cdp-webview",
|
|
11309
|
-
status:
|
|
11310
|
-
activeModal: activeChat?.activeModal || null
|
|
11311
|
-
}),
|
|
11316
|
+
status: resolveSessionStatus(activeChat, ext.status),
|
|
11312
11317
|
title: activeChat?.title || ext.name,
|
|
11313
11318
|
workspace,
|
|
11314
11319
|
...git && { git },
|
|
@@ -11358,9 +11363,7 @@ function buildCliSession(state, options) {
|
|
|
11358
11363
|
providerSessionId: state.providerSessionId,
|
|
11359
11364
|
kind: "agent",
|
|
11360
11365
|
transport: "pty",
|
|
11361
|
-
status:
|
|
11362
|
-
activeModal: activeChat?.activeModal || null
|
|
11363
|
-
}),
|
|
11366
|
+
status: resolveSessionStatus(activeChat, state.status),
|
|
11364
11367
|
title: activeChat?.title || state.name,
|
|
11365
11368
|
workspace,
|
|
11366
11369
|
...git && { git },
|
|
@@ -11408,9 +11411,7 @@ function buildAcpSession(state, options) {
|
|
|
11408
11411
|
providerName: state.name,
|
|
11409
11412
|
kind: "agent",
|
|
11410
11413
|
transport: "acp",
|
|
11411
|
-
status:
|
|
11412
|
-
activeModal: activeChat?.activeModal || null
|
|
11413
|
-
}),
|
|
11414
|
+
status: resolveSessionStatus(activeChat, state.status),
|
|
11414
11415
|
title: activeChat?.title || state.name,
|
|
11415
11416
|
workspace,
|
|
11416
11417
|
...git && { git },
|