@threadbase-sh/streamer 1.55.3 → 1.55.4

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 CHANGED
@@ -996,6 +996,7 @@ import { Terminal } from "@xterm/headless";
996
996
  var PTY_COLS = 120;
997
997
  var PTY_ROWS = 40;
998
998
  var SCREEN_SCROLLBACK = 1e3;
999
+ var REPLAY_MAX_LINES = SCREEN_SCROLLBACK + PTY_ROWS;
999
1000
  function digestBytes(s) {
1000
1001
  const escaped = s.replace(new RegExp(String.fromCharCode(27), "g"), "\\x1b").replace(/\r/g, "\\r").replace(/\n/g, "\\n").replace(/\t/g, "\\t");
1001
1002
  if (escaped.length <= 200) return escaped;
@@ -12315,7 +12316,7 @@ function createApiDeps(deps) {
12315
12316
  }
12316
12317
  deps.addSessionSubscriber(msg.sessionId, ws);
12317
12318
  if (deps.ptyManager.hasSession(msg.sessionId)) {
12318
- const lines = await deps.ptyManager.getOutputLines(msg.sessionId, 200);
12319
+ const lines = await deps.ptyManager.getOutputLines(msg.sessionId, REPLAY_MAX_LINES);
12319
12320
  const userMessages = deps.ptyManager.getInputHistory(msg.sessionId);
12320
12321
  ws.send(
12321
12322
  JSON.stringify({