@adhdev/daemon-core 0.9.82-rc.203 → 0.9.82-rc.204
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 +5 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/providers/spec/cli-adapter.ts +5 -15
package/dist/index.mjs
CHANGED
|
@@ -28550,21 +28550,11 @@ var SpecCliAdapter = class {
|
|
|
28550
28550
|
let sections;
|
|
28551
28551
|
try {
|
|
28552
28552
|
screen = this.driver.snapshot();
|
|
28553
|
-
const
|
|
28554
|
-
|
|
28555
|
-
|
|
28556
|
-
|
|
28557
|
-
|
|
28558
|
-
let start = 0;
|
|
28559
|
-
let end = lines.length;
|
|
28560
|
-
if (typeof from === "number") start = Math.max(0, from);
|
|
28561
|
-
else if (typeof fromBottom === "number") start = Math.max(0, lines.length - fromBottom);
|
|
28562
|
-
const until = sec.until;
|
|
28563
|
-
if (until && typeof until === "object" && typeof until.section === "string") {
|
|
28564
|
-
const ref = (this.spec.layout?.sections ?? []).find((s) => s.id === until.section);
|
|
28565
|
-
if (ref && typeof ref.from_bottom === "number") end = Math.max(start, lines.length - ref.from_bottom);
|
|
28566
|
-
}
|
|
28567
|
-
sections[sec.id] = lines.slice(start, end).join("\n");
|
|
28553
|
+
const driverSections = this.driver.getSections?.();
|
|
28554
|
+
if (driverSections) {
|
|
28555
|
+
sections = Object.fromEntries(driverSections.map((s) => [s.id, s.text]));
|
|
28556
|
+
} else {
|
|
28557
|
+
sections = this.readCurrentScreenSections(screen);
|
|
28568
28558
|
}
|
|
28569
28559
|
} catch {
|
|
28570
28560
|
}
|