adhdev 0.8.90 → 0.8.91
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 +18 -8
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +18 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -7830,10 +7830,11 @@ async function handleReadChat(h, args) {
|
|
|
7830
7830
|
const parsedRecord = parsedStatus && typeof parsedStatus === "object" ? parsedStatus : null;
|
|
7831
7831
|
const adapterStatus = adapter.getStatus();
|
|
7832
7832
|
const shouldPreferAdapterMessages = Array.isArray(adapterStatus.messages) && adapterStatus.messages.length > 0 && Array.isArray(parsedRecord?.messages) && adapterStatus.messages.length > parsedRecord.messages.length;
|
|
7833
|
+
const parsedShowsApproval = hasNonEmptyModalButtons(parsedRecord?.activeModal) && parsedRecord?.status === "waiting_approval";
|
|
7833
7834
|
const status = parsedRecord ? {
|
|
7834
7835
|
...parsedRecord,
|
|
7835
7836
|
messages: shouldPreferAdapterMessages ? adapterStatus.messages : parsedRecord.messages,
|
|
7836
|
-
status: adapterStatus.status !== "idle" ? adapterStatus.status : parsedRecord.status || adapterStatus.status,
|
|
7837
|
+
status: parsedShowsApproval ? parsedRecord.status : adapterStatus.status !== "idle" ? adapterStatus.status : parsedRecord.status || adapterStatus.status,
|
|
7837
7838
|
activeModal: parsedRecord.activeModal || adapterStatus.activeModal
|
|
7838
7839
|
} : adapterStatus;
|
|
7839
7840
|
const title = typeof parsedRecord?.title === "string" ? parsedRecord.title : void 0;
|
|
@@ -12848,14 +12849,15 @@ var init_provider_cli_adapter = __esm({
|
|
|
12848
12849
|
return;
|
|
12849
12850
|
}
|
|
12850
12851
|
const startupModal = this.getStartupConfirmationModal(screenText);
|
|
12851
|
-
const modal = this.runParseApproval(tail) || startupModal;
|
|
12852
|
-
const rawScriptStatus = this.runDetectStatus(tail);
|
|
12853
|
-
const scriptStatus = startupModal ? "waiting_approval" : rawScriptStatus;
|
|
12854
12852
|
const parsedTranscript = this.parseCurrentTranscript(
|
|
12855
12853
|
this.committedMessages,
|
|
12856
12854
|
this.responseBuffer,
|
|
12857
12855
|
this.currentTurnScope
|
|
12858
12856
|
);
|
|
12857
|
+
const parsedModal = parsedTranscript?.activeModal && Array.isArray(parsedTranscript.activeModal.buttons) && parsedTranscript.activeModal.buttons.some((button) => typeof button === "string" && button.trim()) ? parsedTranscript.activeModal : null;
|
|
12858
|
+
const modal = this.runParseApproval(tail) || parsedModal || startupModal;
|
|
12859
|
+
const rawScriptStatus = this.runDetectStatus(tail);
|
|
12860
|
+
const scriptStatus = startupModal ? "waiting_approval" : parsedModal && parsedTranscript?.status === "waiting_approval" ? "waiting_approval" : rawScriptStatus;
|
|
12859
12861
|
const parsedMessages = Array.isArray(parsedTranscript?.messages) ? normalizeCliParsedMessages(parsedTranscript.messages, {
|
|
12860
12862
|
committedMessages: this.committedMessages,
|
|
12861
12863
|
scope: this.currentTurnScope,
|
|
@@ -12865,6 +12867,7 @@ var init_provider_cli_adapter = __esm({
|
|
|
12865
12867
|
return;
|
|
12866
12868
|
}
|
|
12867
12869
|
const lastParsedAssistant = [...parsedMessages].reverse().find((message) => message.role === "assistant");
|
|
12870
|
+
const parsedShowsLiveAssistantProgress = parsedTranscript?.status === "generating" && !!lastParsedAssistant && parsedMessages.length > this.committedMessages.length;
|
|
12868
12871
|
const normalizedPromptSnippet = normalizePromptText(this.submitRetryPromptSnippet || this.currentTurnScope?.prompt || "");
|
|
12869
12872
|
this.recordTrace("settled", {
|
|
12870
12873
|
tail: summarizeCliTraceText(tail, 500),
|
|
@@ -13019,7 +13022,7 @@ var init_provider_cli_adapter = __esm({
|
|
|
13019
13022
|
const effectiveScreenText = screenText || this.accumulatedBuffer;
|
|
13020
13023
|
const noActiveTurn = !this.currentTurnScope;
|
|
13021
13024
|
const looksIdleChrome = /(^|\n)\s*[❯›>]\s*(?:\n|$)/m.test(effectiveScreenText) || /accept edits on/i.test(effectiveScreenText) && (/Update available!/i.test(screenText) || /\/effort/i.test(screenText) || /^.*➜\s+\S+/m.test(effectiveScreenText));
|
|
13022
|
-
if (prevStatus === "idle" && !this.isWaitingForResponse && noActiveTurn && !modal && looksIdleChrome) {
|
|
13025
|
+
if (prevStatus === "idle" && !this.isWaitingForResponse && noActiveTurn && !modal && looksIdleChrome && !parsedShowsLiveAssistantProgress) {
|
|
13023
13026
|
return;
|
|
13024
13027
|
}
|
|
13025
13028
|
if (prevStatus === "waiting_approval") {
|
|
@@ -38248,6 +38251,10 @@ var init_reporter = __esm({
|
|
|
38248
38251
|
}
|
|
38249
38252
|
}
|
|
38250
38253
|
onStatusChange() {
|
|
38254
|
+
if (this.deps.p2p?.isConnected) {
|
|
38255
|
+
this.resetP2PHash();
|
|
38256
|
+
this.sendUnifiedStatusReport({ p2pOnly: true, reason: "status-change" }).catch((e) => LOG.warn("Status", `Immediate P2P status send failed: ${e?.message}`));
|
|
38257
|
+
}
|
|
38251
38258
|
this.throttledReport();
|
|
38252
38259
|
}
|
|
38253
38260
|
throttledReport() {
|
|
@@ -38345,10 +38352,12 @@ var init_reporter = __esm({
|
|
|
38345
38352
|
}
|
|
38346
38353
|
async sendUnifiedStatusReport(opts) {
|
|
38347
38354
|
const { serverConn, p2p } = this.deps;
|
|
38348
|
-
|
|
38355
|
+
const serverConnected = !!serverConn?.isConnected();
|
|
38356
|
+
const p2pConnected = !!p2p?.isConnected;
|
|
38357
|
+
if (!serverConnected && !p2pConnected) return;
|
|
38349
38358
|
this.lastStatusSentAt = Date.now();
|
|
38350
38359
|
const now = this.lastStatusSentAt;
|
|
38351
|
-
const target = opts?.p2pOnly ? "P2P" : "P2P+Server";
|
|
38360
|
+
const target = opts?.p2pOnly ? "P2P" : serverConnected ? "P2P+Server" : "P2P";
|
|
38352
38361
|
const allStates = this.deps.instanceManager.collectAllStates();
|
|
38353
38362
|
const ideStates = allStates.filter((s) => s.category === "ide");
|
|
38354
38363
|
const cliStates = allStates.filter((s) => s.category === "cli");
|
|
@@ -38427,6 +38436,7 @@ var init_reporter = __esm({
|
|
|
38427
38436
|
...wsPayload,
|
|
38428
38437
|
timestamp: void 0
|
|
38429
38438
|
}));
|
|
38439
|
+
if (!serverConnected || !serverConn) return;
|
|
38430
38440
|
if (!opts?.forceServer && wsHash === this.lastServerStatusHash) {
|
|
38431
38441
|
LOG.debug("Server", `skip duplicate status_report${opts?.reason ? ` (${opts.reason})` : ""}`);
|
|
38432
38442
|
return;
|
|
@@ -86508,7 +86518,7 @@ var init_adhdev_daemon = __esm({
|
|
|
86508
86518
|
init_version();
|
|
86509
86519
|
init_src();
|
|
86510
86520
|
init_runtime_defaults();
|
|
86511
|
-
pkgVersion = resolvePackageVersion({ injectedVersion: "0.8.
|
|
86521
|
+
pkgVersion = resolvePackageVersion({ injectedVersion: "0.8.91" });
|
|
86512
86522
|
AdhdevDaemon = class _AdhdevDaemon {
|
|
86513
86523
|
localHttpServer = null;
|
|
86514
86524
|
localWss = null;
|