@adhdev/daemon-core 0.9.82-rc.177 → 0.9.82-rc.178
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 +26 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/providers/spec/cli-adapter.ts +24 -1
package/dist/index.mjs
CHANGED
|
@@ -27859,7 +27859,7 @@ var SpecCliAdapter = class {
|
|
|
27859
27859
|
activeInteractivePrompt: this.activeInteractivePrompt
|
|
27860
27860
|
};
|
|
27861
27861
|
}
|
|
27862
|
-
if (
|
|
27862
|
+
if (lc === "busy" || lc === "generating") {
|
|
27863
27863
|
return { status: "generating", messages: [], activeModal: null, activeInteractivePrompt: this.activeInteractivePrompt };
|
|
27864
27864
|
}
|
|
27865
27865
|
return { status: "idle", messages: [], activeModal: null, activeInteractivePrompt: this.activeInteractivePrompt };
|
|
@@ -27993,13 +27993,37 @@ var SpecCliAdapter = class {
|
|
|
27993
27993
|
return Promise.resolve({ ok: true, effects });
|
|
27994
27994
|
}
|
|
27995
27995
|
getDebugSnapshot() {
|
|
27996
|
+
let screen = "";
|
|
27997
|
+
let sections;
|
|
27998
|
+
try {
|
|
27999
|
+
screen = this.driver.snapshot();
|
|
28000
|
+
const lines = screen.split("\n");
|
|
28001
|
+
sections = {};
|
|
28002
|
+
for (const sec of this.spec.layout?.sections ?? []) {
|
|
28003
|
+
const from = sec.from_top;
|
|
28004
|
+
const fromBottom = sec.from_bottom;
|
|
28005
|
+
let start = 0;
|
|
28006
|
+
let end = lines.length;
|
|
28007
|
+
if (typeof from === "number") start = Math.max(0, from);
|
|
28008
|
+
else if (typeof fromBottom === "number") start = Math.max(0, lines.length - fromBottom);
|
|
28009
|
+
const until = sec.until;
|
|
28010
|
+
if (until && typeof until === "object" && typeof until.section === "string") {
|
|
28011
|
+
const ref = (this.spec.layout?.sections ?? []).find((s) => s.id === until.section);
|
|
28012
|
+
if (ref && typeof ref.from_bottom === "number") end = Math.max(start, lines.length - ref.from_bottom);
|
|
28013
|
+
}
|
|
28014
|
+
sections[sec.id] = lines.slice(start, end).join("\n");
|
|
28015
|
+
}
|
|
28016
|
+
} catch {
|
|
28017
|
+
}
|
|
27996
28018
|
return {
|
|
27997
28019
|
cliType: this.cliType,
|
|
27998
28020
|
spec_id: this.spec.id,
|
|
27999
28021
|
current_state: this.latestState,
|
|
28000
28022
|
current_modal: this.latestModal,
|
|
28001
28023
|
activeInteractivePrompt: this.activeInteractivePrompt,
|
|
28002
|
-
exited: this.exited
|
|
28024
|
+
exited: this.exited,
|
|
28025
|
+
screen,
|
|
28026
|
+
sections
|
|
28003
28027
|
};
|
|
28004
28028
|
}
|
|
28005
28029
|
getRuntimeMetadata() {
|