@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/package.json
CHANGED
|
@@ -324,21 +324,11 @@ export class SpecCliAdapter implements CliAdapter {
|
|
|
324
324
|
let sections: Record<string, string> | undefined;
|
|
325
325
|
try {
|
|
326
326
|
screen = this.driver.snapshot();
|
|
327
|
-
const
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
let start = 0;
|
|
333
|
-
let end = lines.length;
|
|
334
|
-
if (typeof from === 'number') start = Math.max(0, from);
|
|
335
|
-
else if (typeof fromBottom === 'number') start = Math.max(0, lines.length - fromBottom);
|
|
336
|
-
const until = (sec as any).until;
|
|
337
|
-
if (until && typeof until === 'object' && typeof until.section === 'string') {
|
|
338
|
-
const ref = (this.spec.layout?.sections ?? []).find((s: any) => s.id === until.section) as any;
|
|
339
|
-
if (ref && typeof ref.from_bottom === 'number') end = Math.max(start, lines.length - ref.from_bottom);
|
|
340
|
-
}
|
|
341
|
-
sections[(sec as any).id] = lines.slice(start, end).join('\n');
|
|
327
|
+
const driverSections = this.driver.getSections?.();
|
|
328
|
+
if (driverSections) {
|
|
329
|
+
sections = Object.fromEntries(driverSections.map(s => [s.id, s.text]));
|
|
330
|
+
} else {
|
|
331
|
+
sections = this.readCurrentScreenSections(screen);
|
|
342
332
|
}
|
|
343
333
|
} catch { /* best-effort */ }
|
|
344
334
|
// Read native transcript messages for the debug snapshot
|