@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.cjs CHANGED
@@ -1049,6 +1049,7 @@ var import_headless = require("@xterm/headless");
1049
1049
  var PTY_COLS = 120;
1050
1050
  var PTY_ROWS = 40;
1051
1051
  var SCREEN_SCROLLBACK = 1e3;
1052
+ var REPLAY_MAX_LINES = SCREEN_SCROLLBACK + PTY_ROWS;
1052
1053
  function digestBytes(s) {
1053
1054
  const escaped = s.replace(new RegExp(String.fromCharCode(27), "g"), "\\x1b").replace(/\r/g, "\\r").replace(/\n/g, "\\n").replace(/\t/g, "\\t");
1054
1055
  if (escaped.length <= 200) return escaped;
@@ -12358,7 +12359,7 @@ function createApiDeps(deps) {
12358
12359
  }
12359
12360
  deps.addSessionSubscriber(msg.sessionId, ws);
12360
12361
  if (deps.ptyManager.hasSession(msg.sessionId)) {
12361
- const lines = await deps.ptyManager.getOutputLines(msg.sessionId, 200);
12362
+ const lines = await deps.ptyManager.getOutputLines(msg.sessionId, REPLAY_MAX_LINES);
12362
12363
  const userMessages = deps.ptyManager.getInputHistory(msg.sessionId);
12363
12364
  ws.send(
12364
12365
  JSON.stringify({