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/cli/index.js
CHANGED
|
@@ -8917,6 +8917,14 @@ function getActiveChatOptions(profile) {
|
|
|
8917
8917
|
if (profile === "full") return {};
|
|
8918
8918
|
return LIVE_STATUS_ACTIVE_CHAT_OPTIONS;
|
|
8919
8919
|
}
|
|
8920
|
+
function resolveSessionStatus(activeChat, providerStatus) {
|
|
8921
|
+
const chatStatus = normalizeManagedStatus(activeChat?.status, { activeModal: activeChat?.activeModal || null });
|
|
8922
|
+
const topLevelStatus = normalizeManagedStatus(providerStatus, { activeModal: activeChat?.activeModal || null });
|
|
8923
|
+
if (chatStatus === "waiting_approval" || topLevelStatus === "waiting_approval") return "waiting_approval";
|
|
8924
|
+
if (chatStatus === "generating" || topLevelStatus === "generating") return "generating";
|
|
8925
|
+
if (topLevelStatus !== "idle") return topLevelStatus;
|
|
8926
|
+
return chatStatus;
|
|
8927
|
+
}
|
|
8920
8928
|
function shouldIncludeSessionControls(profile) {
|
|
8921
8929
|
return profile !== "live";
|
|
8922
8930
|
}
|
|
@@ -8972,9 +8980,7 @@ function buildIdeWorkspaceSession(state, cdpManagers, options) {
|
|
|
8972
8980
|
providerName: state.name,
|
|
8973
8981
|
kind: "workspace",
|
|
8974
8982
|
transport: "cdp-page",
|
|
8975
|
-
status:
|
|
8976
|
-
activeModal: activeChat?.activeModal || null
|
|
8977
|
-
}),
|
|
8983
|
+
status: resolveSessionStatus(activeChat, state.status),
|
|
8978
8984
|
title,
|
|
8979
8985
|
workspace,
|
|
8980
8986
|
...git && { git },
|
|
@@ -9009,9 +9015,7 @@ function buildExtensionAgentSession(parent, ext, options) {
|
|
|
9009
9015
|
providerSessionId: ext.providerSessionId,
|
|
9010
9016
|
kind: "agent",
|
|
9011
9017
|
transport: "cdp-webview",
|
|
9012
|
-
status:
|
|
9013
|
-
activeModal: activeChat?.activeModal || null
|
|
9014
|
-
}),
|
|
9018
|
+
status: resolveSessionStatus(activeChat, ext.status),
|
|
9015
9019
|
title: activeChat?.title || ext.name,
|
|
9016
9020
|
workspace,
|
|
9017
9021
|
...git && { git },
|
|
@@ -9061,9 +9065,7 @@ function buildCliSession(state, options) {
|
|
|
9061
9065
|
providerSessionId: state.providerSessionId,
|
|
9062
9066
|
kind: "agent",
|
|
9063
9067
|
transport: "pty",
|
|
9064
|
-
status:
|
|
9065
|
-
activeModal: activeChat?.activeModal || null
|
|
9066
|
-
}),
|
|
9068
|
+
status: resolveSessionStatus(activeChat, state.status),
|
|
9067
9069
|
title: activeChat?.title || state.name,
|
|
9068
9070
|
workspace,
|
|
9069
9071
|
...git && { git },
|
|
@@ -9111,9 +9113,7 @@ function buildAcpSession(state, options) {
|
|
|
9111
9113
|
providerName: state.name,
|
|
9112
9114
|
kind: "agent",
|
|
9113
9115
|
transport: "acp",
|
|
9114
|
-
status:
|
|
9115
|
-
activeModal: activeChat?.activeModal || null
|
|
9116
|
-
}),
|
|
9116
|
+
status: resolveSessionStatus(activeChat, state.status),
|
|
9117
9117
|
title: activeChat?.title || state.name,
|
|
9118
9118
|
workspace,
|
|
9119
9119
|
...git && { git },
|
|
@@ -14635,8 +14635,9 @@ var init_provider_cli_adapter = __esm({
|
|
|
14635
14635
|
const currentSnapshot = normalizeScreenSnapshot(screenText);
|
|
14636
14636
|
const lastSnapshot = this.lastScreenSnapshot;
|
|
14637
14637
|
if (!lastSnapshot || lastSnapshot === currentSnapshot) return screenText;
|
|
14638
|
-
const
|
|
14639
|
-
const
|
|
14638
|
+
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;
|
|
14639
|
+
const staleSnapshotLooksActive = activeScreenPattern.test(lastSnapshot);
|
|
14640
|
+
const currentScreenLooksIdle = /(?:^|\n|\r)\s*[❯›>]\s*(?:Try\s+["“][^\n\r"”]+["”])?\s*(?:\n|\r|$)/.test(screenText) && !activeScreenPattern.test(screenText);
|
|
14640
14641
|
if (staleSnapshotLooksActive && currentScreenLooksIdle) return screenText;
|
|
14641
14642
|
if (currentSnapshot.length >= lastSnapshot.length) return screenText;
|
|
14642
14643
|
return `${screenText}
|
|
@@ -90307,7 +90308,7 @@ var init_adhdev_daemon = __esm({
|
|
|
90307
90308
|
init_version();
|
|
90308
90309
|
init_src();
|
|
90309
90310
|
init_runtime_defaults();
|
|
90310
|
-
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.
|
|
90311
|
+
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.9" });
|
|
90311
90312
|
AdhdevDaemon = class _AdhdevDaemon {
|
|
90312
90313
|
localHttpServer = null;
|
|
90313
90314
|
localWss = null;
|
|
@@ -91143,6 +91144,19 @@ ${err?.stack || ""}`);
|
|
|
91143
91144
|
void this.statusReporter?.sendUnifiedStatusReport({ forceServer: true, reason });
|
|
91144
91145
|
void this.flushP2PDaemonMetadataSubscriptions();
|
|
91145
91146
|
}
|
|
91147
|
+
emitMeshCheckpointCompleteIfNeeded(commandType, result, normalizedData) {
|
|
91148
|
+
if (commandType !== "git_checkpoint" || result?.success !== true || !this.meshManager) return;
|
|
91149
|
+
const workspace = String(normalizedData.workspace ?? "");
|
|
91150
|
+
const baseContext = {
|
|
91151
|
+
workspace,
|
|
91152
|
+
checkpoint_message: result.checkpoint?.message ?? String(normalizedData.message ?? ""),
|
|
91153
|
+
commit: result.checkpoint?.commit ?? "",
|
|
91154
|
+
source_session_id: String(normalizedData.targetSessionId ?? "")
|
|
91155
|
+
};
|
|
91156
|
+
void this.buildMeshCheckpointContext(workspace, baseContext).then((ctx) => {
|
|
91157
|
+
this.meshManager.emit({ trigger: "git_checkpoint_complete", context: ctx });
|
|
91158
|
+
});
|
|
91159
|
+
}
|
|
91146
91160
|
async handleCommand(msg, cmd, args) {
|
|
91147
91161
|
const normalizedArgs = this.ensureInteractionContext(args);
|
|
91148
91162
|
const interactionId = String(normalizedArgs._interactionId);
|
|
@@ -91177,6 +91191,10 @@ ${err?.stack || ""}`);
|
|
|
91177
91191
|
if (cmd === "resolve_action" || cmd === "send_chat" || cmd === "read_chat") {
|
|
91178
91192
|
void this.flushP2PSessionModalSubscriptions();
|
|
91179
91193
|
}
|
|
91194
|
+
if (cmd.startsWith("git_")) {
|
|
91195
|
+
void this.flushP2PWorkspaceGitSubscriptions();
|
|
91196
|
+
}
|
|
91197
|
+
this.emitMeshCheckpointCompleteIfNeeded(cmd, result, normalizedArgs);
|
|
91180
91198
|
this.sendResult(msg, result.success, { ...result, interactionId });
|
|
91181
91199
|
recordDebugTrace({
|
|
91182
91200
|
interactionId,
|
|
@@ -91258,18 +91276,7 @@ ${err?.stack || ""}`);
|
|
|
91258
91276
|
if (cmdType.startsWith("git_")) {
|
|
91259
91277
|
void this.flushP2PWorkspaceGitSubscriptions();
|
|
91260
91278
|
}
|
|
91261
|
-
|
|
91262
|
-
const workspace = String(normalizedData.workspace ?? "");
|
|
91263
|
-
const baseContext = {
|
|
91264
|
-
workspace,
|
|
91265
|
-
checkpoint_message: routed.checkpoint?.message ?? String(normalizedData.message ?? ""),
|
|
91266
|
-
commit: routed.checkpoint?.commit ?? "",
|
|
91267
|
-
source_session_id: String(normalizedData.targetSessionId ?? "")
|
|
91268
|
-
};
|
|
91269
|
-
void this.buildMeshCheckpointContext(workspace, baseContext).then((ctx) => {
|
|
91270
|
-
this.meshManager.emit({ trigger: "git_checkpoint_complete", context: ctx });
|
|
91271
|
-
});
|
|
91272
|
-
}
|
|
91279
|
+
this.emitMeshCheckpointCompleteIfNeeded(cmdType, routed, normalizedData);
|
|
91273
91280
|
return { ...routed, interactionId };
|
|
91274
91281
|
} catch (e) {
|
|
91275
91282
|
logCommand({ ts: (/* @__PURE__ */ new Date()).toISOString(), cmd: cmdType, source: "p2p", interactionId, success: false, error: e.message, durationMs: Date.now() - cmdStart });
|
|
@@ -91422,6 +91429,7 @@ ${err?.stack || ""}`);
|
|
|
91422
91429
|
result = { success: true, result: relayResult };
|
|
91423
91430
|
} else {
|
|
91424
91431
|
result = await this.components.router.execute(command, normalizedArgs, "ipc");
|
|
91432
|
+
this.emitMeshCheckpointCompleteIfNeeded(command, result, normalizedArgs);
|
|
91425
91433
|
}
|
|
91426
91434
|
ws.send(JSON.stringify({
|
|
91427
91435
|
type: "ext:command_result",
|