@tarcisiopgs/lisa 1.7.0 → 1.7.1

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
@@ -317,7 +317,9 @@ function error(message) {
317
317
  emitJson("error", message);
318
318
  return;
319
319
  }
320
- console.error(`${pc.red("[lisa]")} ${pc.dim(timestamp())} ${message}`);
320
+ if (shouldPrintToConsole()) {
321
+ console.error(`${pc.red("[lisa]")} ${pc.dim(timestamp())} ${message}`);
322
+ }
321
323
  writeToFile("error", message);
322
324
  }
323
325
  function ok(message) {
@@ -3285,8 +3287,14 @@ function installSignalHandlers() {
3285
3287
  `Failed to revert ${issueId}: ${err instanceof Error ? err.message : String(err)}`
3286
3288
  );
3287
3289
  }
3290
+ kanbanEmitter.emit("issue:reverted", issueId);
3291
+ }
3292
+ const hasTUI = kanbanEmitter.listenerCount("tui:exit") > 0;
3293
+ kanbanEmitter.emit("tui:exit");
3294
+ if (hasTUI) {
3295
+ await new Promise((resolve6) => setTimeout(resolve6, 250));
3288
3296
  }
3289
- process.exit(1);
3297
+ process.exit(0);
3290
3298
  };
3291
3299
  process.on("SIGINT", () => {
3292
3300
  cleanup("SIGINT");
@@ -4114,7 +4122,7 @@ Add them to your ${shell} and run: source ${shell}`));
4114
4122
  if (isTUI) {
4115
4123
  const { render } = await import("ink");
4116
4124
  const { createElement } = await import("react");
4117
- const { KanbanApp } = await import("./kanban-UW2MC2PB.js");
4125
+ const { KanbanApp } = await import("./kanban-BY7QNVEE.js");
4118
4126
  render(createElement(KanbanApp, { config: merged }), { exitOnCtrlC: false });
4119
4127
  }
4120
4128
  await runLoop(merged, {
@@ -1,11 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
+ kanbanEmitter,
3
4
  useKanbanState
4
5
  } from "./chunk-MUBWKMRZ.js";
5
6
 
6
7
  // src/ui/kanban.tsx
7
8
  import { Box as Box6, useApp, useInput as useInput2 } from "ink";
8
- import { useState as useState3 } from "react";
9
+ import { useEffect as useEffect3, useState as useState3 } from "react";
9
10
 
10
11
  // src/ui/board.tsx
11
12
  import { Box as Box3, Text as Text3 } from "ink";
@@ -283,8 +284,9 @@ function IssueDetail({ card, onBack }) {
283
284
  } else if (card.column === "done" && card.startedAt !== void 0 && card.finishedAt !== void 0) {
284
285
  elapsedDisplay = formatElapsed2(card.finishedAt - card.startedAt);
285
286
  }
286
- const innerWidth = Math.max(0, terminalCols - 6);
287
- const separator = `\u2560${"\u2550".repeat(innerWidth)}\u2563`;
287
+ const SIDEBAR_TOTAL_WIDTH = 28;
288
+ const separatorInner = Math.max(0, terminalCols - SIDEBAR_TOTAL_WIDTH - 4);
289
+ const separator = `\u2560${"\u2550".repeat(Math.max(0, separatorInner - 2))}\u2563`;
288
290
  const totalLines = lines.length;
289
291
  const scrollPct = totalLines <= bodyRows ? "100%" : `${Math.round((startLine + bodyRows) / totalLines * 100)}%`;
290
292
  return /* @__PURE__ */ jsxs4(
@@ -413,6 +415,13 @@ function KanbanApp({ config }) {
413
415
  const [activeView, setActiveView] = useState3("board");
414
416
  const [activeColIndex, setActiveColIndex] = useState3(0);
415
417
  const [activeCardIndex, setActiveCardIndex] = useState3(0);
418
+ useEffect3(() => {
419
+ const onExit = () => exit();
420
+ kanbanEmitter.on("tui:exit", onExit);
421
+ return () => {
422
+ kanbanEmitter.off("tui:exit", onExit);
423
+ };
424
+ }, [exit]);
416
425
  const backlog = cards.filter((c) => c.column === "backlog");
417
426
  const inProgress = cards.filter((c) => c.column === "in_progress");
418
427
  const done = cards.filter((c) => c.column === "done");
@@ -420,7 +429,6 @@ function KanbanApp({ config }) {
420
429
  useInput2((input, key) => {
421
430
  if (input === "q") {
422
431
  process.emit("SIGINT");
423
- exit();
424
432
  return;
425
433
  }
426
434
  if (activeView === "detail") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarcisiopgs/lisa",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "Deterministic autonomous issue resolver — structured AI agent loop for Linear/Trello",
5
5
  "license": "MIT",
6
6
  "type": "module",