@dmsdc-ai/aigentry-telepty 0.1.73 → 0.1.74

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.
Files changed (2) hide show
  1. package/cli.js +4 -6
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -871,21 +871,19 @@ async function main() {
871
871
  const isCr = msg.data === '\r';
872
872
  if (isCr && injectQueue.length > 0) {
873
873
  // CR with pending queued text — queue CR too and flush immediately.
874
- // Prevents the busy-session bug where CR fires before queued text,
875
- // causing empty submit followed by orphaned text without Return.
876
874
  injectQueue.push(msg.data);
877
875
  if (queueFlushTimer) { clearTimeout(queueFlushTimer); queueFlushTimer = null; }
878
876
  flushInjectQueue();
879
- } else if (isCr && isIdle()) {
880
- // CR when idlewrite immediately
877
+ } else if (isCr) {
878
+ // CR always written immediately never idle-gated
881
879
  child.write(msg.data);
882
- } else if (!isCr && isIdle()) {
880
+ } else if (isIdle()) {
883
881
  // Text when idle — write immediately
884
882
  child.write(msg.data);
885
883
  promptReady = false;
886
884
  lastInjectTextTime = Date.now();
887
885
  } else {
888
- // Not idle (user typing or CLI busy) — queue for safe delivery
886
+ // Text when not idle — queue for safe delivery
889
887
  injectQueue.push(msg.data);
890
888
  scheduleIdleFlush();
891
889
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dmsdc-ai/aigentry-telepty",
3
- "version": "0.1.73",
3
+ "version": "0.1.74",
4
4
  "main": "daemon.js",
5
5
  "bin": {
6
6
  "aigentry-telepty": "install.js",