adhdev 0.9.76-rc.6 → 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/cli/index.js +21 -19
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +21 -19
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -8397,6 +8397,14 @@ function getActiveChatOptions(profile) {
|
|
|
8397
8397
|
if (profile === "full") return {};
|
|
8398
8398
|
return LIVE_STATUS_ACTIVE_CHAT_OPTIONS;
|
|
8399
8399
|
}
|
|
8400
|
+
function resolveSessionStatus(activeChat, providerStatus) {
|
|
8401
|
+
const chatStatus = normalizeManagedStatus(activeChat?.status, { activeModal: activeChat?.activeModal || null });
|
|
8402
|
+
const topLevelStatus = normalizeManagedStatus(providerStatus, { activeModal: activeChat?.activeModal || null });
|
|
8403
|
+
if (chatStatus === "waiting_approval" || topLevelStatus === "waiting_approval") return "waiting_approval";
|
|
8404
|
+
if (chatStatus === "generating" || topLevelStatus === "generating") return "generating";
|
|
8405
|
+
if (topLevelStatus !== "idle") return topLevelStatus;
|
|
8406
|
+
return chatStatus;
|
|
8407
|
+
}
|
|
8400
8408
|
function shouldIncludeSessionControls(profile) {
|
|
8401
8409
|
return profile !== "live";
|
|
8402
8410
|
}
|
|
@@ -8452,9 +8460,7 @@ function buildIdeWorkspaceSession(state, cdpManagers, options) {
|
|
|
8452
8460
|
providerName: state.name,
|
|
8453
8461
|
kind: "workspace",
|
|
8454
8462
|
transport: "cdp-page",
|
|
8455
|
-
status:
|
|
8456
|
-
activeModal: activeChat?.activeModal || null
|
|
8457
|
-
}),
|
|
8463
|
+
status: resolveSessionStatus(activeChat, state.status),
|
|
8458
8464
|
title,
|
|
8459
8465
|
workspace,
|
|
8460
8466
|
...git && { git },
|
|
@@ -8489,9 +8495,7 @@ function buildExtensionAgentSession(parent, ext, options) {
|
|
|
8489
8495
|
providerSessionId: ext.providerSessionId,
|
|
8490
8496
|
kind: "agent",
|
|
8491
8497
|
transport: "cdp-webview",
|
|
8492
|
-
status:
|
|
8493
|
-
activeModal: activeChat?.activeModal || null
|
|
8494
|
-
}),
|
|
8498
|
+
status: resolveSessionStatus(activeChat, ext.status),
|
|
8495
8499
|
title: activeChat?.title || ext.name,
|
|
8496
8500
|
workspace,
|
|
8497
8501
|
...git && { git },
|
|
@@ -8541,9 +8545,7 @@ function buildCliSession(state, options) {
|
|
|
8541
8545
|
providerSessionId: state.providerSessionId,
|
|
8542
8546
|
kind: "agent",
|
|
8543
8547
|
transport: "pty",
|
|
8544
|
-
status:
|
|
8545
|
-
activeModal: activeChat?.activeModal || null
|
|
8546
|
-
}),
|
|
8548
|
+
status: resolveSessionStatus(activeChat, state.status),
|
|
8547
8549
|
title: activeChat?.title || state.name,
|
|
8548
8550
|
workspace,
|
|
8549
8551
|
...git && { git },
|
|
@@ -8591,9 +8593,7 @@ function buildAcpSession(state, options) {
|
|
|
8591
8593
|
providerName: state.name,
|
|
8592
8594
|
kind: "agent",
|
|
8593
8595
|
transport: "acp",
|
|
8594
|
-
status:
|
|
8595
|
-
activeModal: activeChat?.activeModal || null
|
|
8596
|
-
}),
|
|
8596
|
+
status: resolveSessionStatus(activeChat, state.status),
|
|
8597
8597
|
title: activeChat?.title || state.name,
|
|
8598
8598
|
workspace,
|
|
8599
8599
|
...git && { git },
|
|
@@ -13678,8 +13678,9 @@ var init_provider_cli_adapter = __esm({
|
|
|
13678
13678
|
const currentSnapshot = normalizeScreenSnapshot(screenText);
|
|
13679
13679
|
const lastSnapshot = this.lastScreenSnapshot;
|
|
13680
13680
|
if (!lastSnapshot || lastSnapshot === currentSnapshot) return screenText;
|
|
13681
|
-
const
|
|
13682
|
-
const
|
|
13681
|
+
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;
|
|
13682
|
+
const staleSnapshotLooksActive = activeScreenPattern.test(lastSnapshot);
|
|
13683
|
+
const currentScreenLooksIdle = /(?:^|\n|\r)\s*[❯›>]\s*(?:Try\s+["“][^\n\r"”]+["”])?\s*(?:\n|\r|$)/.test(screenText) && !activeScreenPattern.test(screenText);
|
|
13683
13684
|
if (staleSnapshotLooksActive && currentScreenLooksIdle) return screenText;
|
|
13684
13685
|
if (currentSnapshot.length >= lastSnapshot.length) return screenText;
|
|
13685
13686
|
return `${screenText}
|
|
@@ -49353,13 +49354,14 @@ var init_server_connection = __esm({
|
|
|
49353
49354
|
reject(new Error(`Mesh command timed out after ${timeoutMs}ms`));
|
|
49354
49355
|
}, timeoutMs);
|
|
49355
49356
|
const handler = (msg) => {
|
|
49356
|
-
|
|
49357
|
+
const body = msg.payload && typeof msg.payload === "object" ? { ...msg, ...msg.payload } : msg;
|
|
49358
|
+
if (body.requestId !== requestId) return;
|
|
49357
49359
|
this.off("daemon_mesh_result", handler);
|
|
49358
49360
|
clearTimeout(timer);
|
|
49359
|
-
if (
|
|
49360
|
-
reject(new Error(
|
|
49361
|
+
if (body.success === false) {
|
|
49362
|
+
reject(new Error(body.error ?? "Mesh command failed"));
|
|
49361
49363
|
} else {
|
|
49362
|
-
resolve20(
|
|
49364
|
+
resolve20(body.result);
|
|
49363
49365
|
}
|
|
49364
49366
|
};
|
|
49365
49367
|
this.on("daemon_mesh_result", handler);
|
|
@@ -59164,7 +59166,7 @@ var init_adhdev_daemon = __esm({
|
|
|
59164
59166
|
init_version();
|
|
59165
59167
|
init_src();
|
|
59166
59168
|
init_runtime_defaults();
|
|
59167
|
-
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.
|
|
59169
|
+
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.8" });
|
|
59168
59170
|
AdhdevDaemon = class _AdhdevDaemon {
|
|
59169
59171
|
localHttpServer = null;
|
|
59170
59172
|
localWss = null;
|