@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.js
CHANGED
|
@@ -28866,21 +28866,11 @@ var SpecCliAdapter = class {
|
|
|
28866
28866
|
let sections;
|
|
28867
28867
|
try {
|
|
28868
28868
|
screen = this.driver.snapshot();
|
|
28869
|
-
const
|
|
28870
|
-
|
|
28871
|
-
|
|
28872
|
-
|
|
28873
|
-
|
|
28874
|
-
let start = 0;
|
|
28875
|
-
let end = lines.length;
|
|
28876
|
-
if (typeof from === "number") start = Math.max(0, from);
|
|
28877
|
-
else if (typeof fromBottom === "number") start = Math.max(0, lines.length - fromBottom);
|
|
28878
|
-
const until = sec.until;
|
|
28879
|
-
if (until && typeof until === "object" && typeof until.section === "string") {
|
|
28880
|
-
const ref = (this.spec.layout?.sections ?? []).find((s) => s.id === until.section);
|
|
28881
|
-
if (ref && typeof ref.from_bottom === "number") end = Math.max(start, lines.length - ref.from_bottom);
|
|
28882
|
-
}
|
|
28883
|
-
sections[sec.id] = lines.slice(start, end).join("\n");
|
|
28869
|
+
const driverSections = this.driver.getSections?.();
|
|
28870
|
+
if (driverSections) {
|
|
28871
|
+
sections = Object.fromEntries(driverSections.map((s) => [s.id, s.text]));
|
|
28872
|
+
} else {
|
|
28873
|
+
sections = this.readCurrentScreenSections(screen);
|
|
28884
28874
|
}
|
|
28885
28875
|
} catch {
|
|
28886
28876
|
}
|