agent.libx.js 0.93.40 → 0.93.41

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/cli.js CHANGED
@@ -8002,7 +8002,9 @@ var MarkdownStream = class {
8002
8002
  this.inFence = r.inFence;
8003
8003
  out += r.out + "\r\n";
8004
8004
  }
8005
- if (this.buf) {
8005
+ const tailIsTableRow = this.tableBuf.length > 0 && !this.inFence && /^\s*\|/.test(this.buf);
8006
+ if (this.buf && !tailIsTableRow) {
8007
+ if (this.tableBuf.length) out += this.flushTable();
8006
8008
  out += renderMdLine(this.buf, this.inFence, this.p, this.cols).out;
8007
8009
  this.lineRows = Math.max(1, Math.ceil(this.buf.length / Math.max(1, this.cols)));
8008
8010
  }
@@ -8012,11 +8014,8 @@ var MarkdownStream = class {
8012
8014
  flush() {
8013
8015
  let out = "";
8014
8016
  if (this.tableBuf.length && this.buf && !this.inFence && isTableRow(this.buf)) {
8015
- if (this.lineRows > 1) out += `\x1B[${this.lineRows - 1}A\r\x1B[J`;
8016
- else if (this.lineRows === 1) out += "\r\x1B[K";
8017
8017
  this.tableBuf.push(this.buf);
8018
8018
  this.buf = "";
8019
- this.lineRows = 0;
8020
8019
  }
8021
8020
  out += this.tableBuf.length ? this.flushTable() : "";
8022
8021
  this.buf = "";