adhdev 0.9.76-rc.7 → 0.9.76-rc.9
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 +35 -27
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +35 -27
- 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}
|
|
@@ -59165,7 +59166,7 @@ var init_adhdev_daemon = __esm({
|
|
|
59165
59166
|
init_version();
|
|
59166
59167
|
init_src();
|
|
59167
59168
|
init_runtime_defaults();
|
|
59168
|
-
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.
|
|
59169
|
+
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.9" });
|
|
59169
59170
|
AdhdevDaemon = class _AdhdevDaemon {
|
|
59170
59171
|
localHttpServer = null;
|
|
59171
59172
|
localWss = null;
|
|
@@ -60001,6 +60002,19 @@ ${err?.stack || ""}`);
|
|
|
60001
60002
|
void this.statusReporter?.sendUnifiedStatusReport({ forceServer: true, reason });
|
|
60002
60003
|
void this.flushP2PDaemonMetadataSubscriptions();
|
|
60003
60004
|
}
|
|
60005
|
+
emitMeshCheckpointCompleteIfNeeded(commandType, result, normalizedData) {
|
|
60006
|
+
if (commandType !== "git_checkpoint" || result?.success !== true || !this.meshManager) return;
|
|
60007
|
+
const workspace = String(normalizedData.workspace ?? "");
|
|
60008
|
+
const baseContext = {
|
|
60009
|
+
workspace,
|
|
60010
|
+
checkpoint_message: result.checkpoint?.message ?? String(normalizedData.message ?? ""),
|
|
60011
|
+
commit: result.checkpoint?.commit ?? "",
|
|
60012
|
+
source_session_id: String(normalizedData.targetSessionId ?? "")
|
|
60013
|
+
};
|
|
60014
|
+
void this.buildMeshCheckpointContext(workspace, baseContext).then((ctx) => {
|
|
60015
|
+
this.meshManager.emit({ trigger: "git_checkpoint_complete", context: ctx });
|
|
60016
|
+
});
|
|
60017
|
+
}
|
|
60004
60018
|
async handleCommand(msg, cmd, args) {
|
|
60005
60019
|
const normalizedArgs = this.ensureInteractionContext(args);
|
|
60006
60020
|
const interactionId = String(normalizedArgs._interactionId);
|
|
@@ -60035,6 +60049,10 @@ ${err?.stack || ""}`);
|
|
|
60035
60049
|
if (cmd === "resolve_action" || cmd === "send_chat" || cmd === "read_chat") {
|
|
60036
60050
|
void this.flushP2PSessionModalSubscriptions();
|
|
60037
60051
|
}
|
|
60052
|
+
if (cmd.startsWith("git_")) {
|
|
60053
|
+
void this.flushP2PWorkspaceGitSubscriptions();
|
|
60054
|
+
}
|
|
60055
|
+
this.emitMeshCheckpointCompleteIfNeeded(cmd, result, normalizedArgs);
|
|
60038
60056
|
this.sendResult(msg, result.success, { ...result, interactionId });
|
|
60039
60057
|
recordDebugTrace({
|
|
60040
60058
|
interactionId,
|
|
@@ -60116,18 +60134,7 @@ ${err?.stack || ""}`);
|
|
|
60116
60134
|
if (cmdType.startsWith("git_")) {
|
|
60117
60135
|
void this.flushP2PWorkspaceGitSubscriptions();
|
|
60118
60136
|
}
|
|
60119
|
-
|
|
60120
|
-
const workspace = String(normalizedData.workspace ?? "");
|
|
60121
|
-
const baseContext = {
|
|
60122
|
-
workspace,
|
|
60123
|
-
checkpoint_message: routed.checkpoint?.message ?? String(normalizedData.message ?? ""),
|
|
60124
|
-
commit: routed.checkpoint?.commit ?? "",
|
|
60125
|
-
source_session_id: String(normalizedData.targetSessionId ?? "")
|
|
60126
|
-
};
|
|
60127
|
-
void this.buildMeshCheckpointContext(workspace, baseContext).then((ctx) => {
|
|
60128
|
-
this.meshManager.emit({ trigger: "git_checkpoint_complete", context: ctx });
|
|
60129
|
-
});
|
|
60130
|
-
}
|
|
60137
|
+
this.emitMeshCheckpointCompleteIfNeeded(cmdType, routed, normalizedData);
|
|
60131
60138
|
return { ...routed, interactionId };
|
|
60132
60139
|
} catch (e) {
|
|
60133
60140
|
logCommand({ ts: (/* @__PURE__ */ new Date()).toISOString(), cmd: cmdType, source: "p2p", interactionId, success: false, error: e.message, durationMs: Date.now() - cmdStart });
|
|
@@ -60280,6 +60287,7 @@ ${err?.stack || ""}`);
|
|
|
60280
60287
|
result = { success: true, result: relayResult };
|
|
60281
60288
|
} else {
|
|
60282
60289
|
result = await this.components.router.execute(command, normalizedArgs, "ipc");
|
|
60290
|
+
this.emitMeshCheckpointCompleteIfNeeded(command, result, normalizedArgs);
|
|
60283
60291
|
}
|
|
60284
60292
|
ws.send(JSON.stringify({
|
|
60285
60293
|
type: "ext:command_result",
|