@tarcisiopgs/lisa 1.21.1 → 1.21.2

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.
@@ -772,9 +772,18 @@ function useKanbanState(bellEnabled, initialCards = []) {
772
772
  const onLogFile = (issueId, logFile) => {
773
773
  setCards((prev) => prev.map((c) => c.id === issueId ? { ...c, logFile } : c));
774
774
  };
775
+ const MAX_OUTPUT_SIZE = 2e5;
775
776
  const onOutput = (issueId, text) => {
776
777
  setCards(
777
- (prev) => prev.map((c) => c.id === issueId ? { ...c, outputLog: c.outputLog + text } : c)
778
+ (prev) => prev.map((c) => {
779
+ if (c.id !== issueId) return c;
780
+ let newLog = c.outputLog + text;
781
+ if (newLog.length > MAX_OUTPUT_SIZE) {
782
+ const trimAt = newLog.indexOf("\n", newLog.length - MAX_OUTPUT_SIZE);
783
+ newLog = trimAt !== -1 ? newLog.slice(trimAt + 1) : newLog.slice(-MAX_OUTPUT_SIZE);
784
+ }
785
+ return { ...c, outputLog: newLog };
786
+ })
778
787
  );
779
788
  };
780
789
  const onReconcileRemove = (issueId) => {
package/dist/index.js CHANGED
@@ -47,7 +47,7 @@ import {
47
47
  setOutputMode,
48
48
  updateNotice,
49
49
  warn
50
- } from "./chunk-XE35VI6S.js";
50
+ } from "./chunk-3QCZWKDJ.js";
51
51
  import {
52
52
  notify,
53
53
  resetTitle,
@@ -7315,7 +7315,7 @@ var run = defineCommand6({
7315
7315
  if (isTTY) {
7316
7316
  const { render } = await import("ink");
7317
7317
  const { createElement } = await import("react");
7318
- const { KanbanApp } = await import("./kanban-VOOYRIWF.js");
7318
+ const { KanbanApp } = await import("./kanban-GK6MHA5G.js");
7319
7319
  const demoConfig = {
7320
7320
  provider: "claude",
7321
7321
  source: "linear",
@@ -7398,7 +7398,7 @@ Add them to your ${shell} and run: source ${shell}`));
7398
7398
  onBeforeExit = () => persistence.stop();
7399
7399
  const { render } = await import("ink");
7400
7400
  const { createElement } = await import("react");
7401
- const { KanbanApp } = await import("./kanban-VOOYRIWF.js");
7401
+ const { KanbanApp } = await import("./kanban-GK6MHA5G.js");
7402
7402
  render(createElement(KanbanApp, { config: merged, initialCards }), { exitOnCtrlC: false });
7403
7403
  }
7404
7404
  await runLoop(merged, {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  kanbanEmitter,
4
4
  useKanbanState
5
- } from "./chunk-XE35VI6S.js";
5
+ } from "./chunk-3QCZWKDJ.js";
6
6
  import {
7
7
  resetTitle,
8
8
  startSpinner,
@@ -418,6 +418,24 @@ function formatElapsed2(ms) {
418
418
  function hyperlink(url, text) {
419
419
  return `\x1B]8;;${url}\x07${text}\x1B]8;;\x07`;
420
420
  }
421
+ var ANSI_CSI = /\x1b\[[0-9;]*[A-Za-z]/g;
422
+ var ANSI_OSC = /\x1b\][^\x07]*\x07/g;
423
+ var ANSI_CHARSET = /\x1b\([A-Z]/g;
424
+ function stripAnsi(str) {
425
+ return str.replace(ANSI_CSI, "").replace(ANSI_OSC, "").replace(ANSI_CHARSET, "").replace(/\r/g, "");
426
+ }
427
+ function truncateLine(line, maxWidth) {
428
+ const clean = stripAnsi(line);
429
+ if (clean.length <= maxWidth) return clean;
430
+ return `${clean.slice(0, maxWidth - 1)}\u2026`;
431
+ }
432
+ function processOutputLines(raw) {
433
+ const normalized = raw.replace(/\r\n/g, "\n");
434
+ return normalized.split("\n").map((line) => {
435
+ const parts = line.split("\r");
436
+ return parts[parts.length - 1] ?? "";
437
+ });
438
+ }
421
439
  function logLineColor(line) {
422
440
  if (/\berror\b|✖/i.test(line)) return "red";
423
441
  if (/\bwarn(ing)?\b/i.test(line)) return "yellow";
@@ -478,10 +496,15 @@ function IssueDetail({ card, onBack }) {
478
496
  }
479
497
  });
480
498
  const { columns: terminalCols, rows: terminalRows } = useTerminalSize();
499
+ const SIDEBAR_TOTAL_WIDTH = 30;
481
500
  const bodyRows = Math.max(1, terminalRows - 10);
482
- const lines = card.outputLog.split("\n");
501
+ const maxLineWidth = Math.max(1, terminalCols - SIDEBAR_TOTAL_WIDTH - 4);
502
+ const lines = useMemo(() => processOutputLines(card.outputLog), [card.outputLog]);
483
503
  const startLine = Math.max(0, lines.length - bodyRows - logScrollOffset);
484
- const visibleLines = lines.slice(startLine, startLine + bodyRows);
504
+ const visibleLines = useMemo(
505
+ () => lines.slice(startLine, startLine + bodyRows).map((l) => truncateLine(l, maxLineWidth)),
506
+ [lines, startLine, bodyRows, maxLineWidth]
507
+ );
485
508
  const status = statusLabel(card.column, card.hasError, card.killed, card.skipped, card.merged);
486
509
  let elapsedDisplay = null;
487
510
  let isRunning = false;
@@ -492,7 +515,6 @@ function IssueDetail({ card, onBack }) {
492
515
  } else if (card.column === "done" && card.startedAt !== void 0 && card.finishedAt !== void 0) {
493
516
  elapsedDisplay = formatElapsed2(card.finishedAt - card.startedAt);
494
517
  }
495
- const SIDEBAR_TOTAL_WIDTH = 30;
496
518
  const separator = useMemo(() => {
497
519
  const separatorInner = Math.max(0, terminalCols - SIDEBAR_TOTAL_WIDTH - 4);
498
520
  return `\u2560${"\u2550".repeat(Math.max(0, separatorInner - 2))}\u2563`;
@@ -555,7 +577,7 @@ function IssueDetail({ card, onBack }) {
555
577
  const color = logLineColor(line);
556
578
  return (
557
579
  // biome-ignore lint/suspicious/noArrayIndexKey: log lines have no stable key
558
- /* @__PURE__ */ jsx4(Text4, { color, dimColor: color === "white", children: line }, i)
580
+ /* @__PURE__ */ jsx4(Text4, { color, dimColor: color === "white", wrap: "truncate", children: line }, i)
559
581
  );
560
582
  }) })
561
583
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarcisiopgs/lisa",
3
- "version": "1.21.1",
3
+ "version": "1.21.2",
4
4
  "description": "Autonomous issue resolver",
5
5
  "keywords": [
6
6
  "loop",