@adhdev/daemon-core 0.9.82-rc.207 → 0.9.82-rc.208
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 +3 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/providers/spec/driver.ts +12 -3
package/package.json
CHANGED
|
@@ -500,6 +500,15 @@ export class SpecDriver {
|
|
|
500
500
|
this.lastBusyState = evState;
|
|
501
501
|
// Cancel any pending idle commit — non-idle reading invalidates it.
|
|
502
502
|
this.cancelIdleHold();
|
|
503
|
+
// Reset completion_idle_after tracking on busy re-entry. If the
|
|
504
|
+
// completion marker is still on screen when a new PTY burst
|
|
505
|
+
// arrives (rapid tool-output toggle), the old firstSeenAt would
|
|
506
|
+
// make ageMs >= holdMs immediately on the very next reevaluate,
|
|
507
|
+
// forcing idle again before the new output has settled and
|
|
508
|
+
// creating a rapid busy↔idle loop. Resetting here forces the
|
|
509
|
+
// hold window to restart from the current moment.
|
|
510
|
+
this.completionIdleKey = '';
|
|
511
|
+
this.completionIdleFirstSeenAt = 0;
|
|
503
512
|
// Schedule a re-evaluation when the hold window expires. PTYs
|
|
504
513
|
// typically stop emitting once the agent stops printing (the
|
|
505
514
|
// footer settles), so without an explicit timer the driver
|
|
@@ -813,8 +822,8 @@ function guessExt(mime: string): string {
|
|
|
813
822
|
|
|
814
823
|
function extractMatchedRules(ev: SpecEvaluation): string[] {
|
|
815
824
|
if (!Array.isArray(ev.trace)) return [];
|
|
816
|
-
return
|
|
817
|
-
.filter(t => t.
|
|
818
|
-
.map(t => t.
|
|
825
|
+
return ev.trace
|
|
826
|
+
.filter(t => t.kind === 'state_match')
|
|
827
|
+
.map(t => t.text)
|
|
819
828
|
.filter(Boolean);
|
|
820
829
|
}
|