pty-manager 1.2.11 → 1.2.12
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.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -1
- package/dist/index.mjs.map +1 -1
- package/dist/pty-worker.js +9 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -442,6 +442,11 @@ declare class PTYSession extends EventEmitter {
|
|
|
442
442
|
writeRaw(data: string): void;
|
|
443
443
|
/**
|
|
444
444
|
* Send a task/message to the session
|
|
445
|
+
*
|
|
446
|
+
* Text and Enter are sent as separate writes with a small delay.
|
|
447
|
+
* This is required for TUI-based CLIs (Gemini CLI, ink/React-based tools)
|
|
448
|
+
* which drop the trailing \r if it arrives in the same write buffer
|
|
449
|
+
* during a render cycle.
|
|
445
450
|
*/
|
|
446
451
|
send(message: string): SessionMessage;
|
|
447
452
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -442,6 +442,11 @@ declare class PTYSession extends EventEmitter {
|
|
|
442
442
|
writeRaw(data: string): void;
|
|
443
443
|
/**
|
|
444
444
|
* Send a task/message to the session
|
|
445
|
+
*
|
|
446
|
+
* Text and Enter are sent as separate writes with a small delay.
|
|
447
|
+
* This is required for TUI-based CLIs (Gemini CLI, ink/React-based tools)
|
|
448
|
+
* which drop the trailing \r if it arrives in the same write buffer
|
|
449
|
+
* during a render cycle.
|
|
445
450
|
*/
|
|
446
451
|
send(message: string): SessionMessage;
|
|
447
452
|
/**
|
package/dist/index.js
CHANGED
|
@@ -656,6 +656,11 @@ var PTYSession = class extends import_events.EventEmitter {
|
|
|
656
656
|
}
|
|
657
657
|
/**
|
|
658
658
|
* Send a task/message to the session
|
|
659
|
+
*
|
|
660
|
+
* Text and Enter are sent as separate writes with a small delay.
|
|
661
|
+
* This is required for TUI-based CLIs (Gemini CLI, ink/React-based tools)
|
|
662
|
+
* which drop the trailing \r if it arrives in the same write buffer
|
|
663
|
+
* during a render cycle.
|
|
659
664
|
*/
|
|
660
665
|
send(message) {
|
|
661
666
|
this._status = "busy";
|
|
@@ -667,7 +672,10 @@ var PTYSession = class extends import_events.EventEmitter {
|
|
|
667
672
|
content: message,
|
|
668
673
|
timestamp: /* @__PURE__ */ new Date()
|
|
669
674
|
};
|
|
670
|
-
this.
|
|
675
|
+
const formatted = this.adapter.formatInput(message);
|
|
676
|
+
this.writeRaw(formatted);
|
|
677
|
+
setTimeout(() => this.sendKeys("enter"), 50);
|
|
678
|
+
this.logger.debug({ sessionId: this.id, input: message }, "Sent input to session");
|
|
671
679
|
return msg;
|
|
672
680
|
}
|
|
673
681
|
/**
|