triflux 7.4.0 → 7.5.0

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.
@@ -144,7 +144,7 @@ function poll() {
144
144
  if (resultSize > 10 || shellReturned) {
145
145
  workerState.set(paneName, { paneIdx: pane.index, done: true });
146
146
  const meaningful = lines.filter((l) => !(/^(PS\s|>|\$)/.test(l)) && !(/tokens?\s+used/i.test(l)));
147
- const verdict = meaningful.pop()?.slice(0, 80) || "completed";
147
+ const verdict = meaningful.pop() || "completed";
148
148
  tui.updateWorker(paneName, {
149
149
  cli,
150
150
  role: pane.title,
@@ -154,7 +154,7 @@ function poll() {
154
154
  });
155
155
  } else {
156
156
  const meaningful = lines.filter(l => !(/^(PS\s|>|\$)/.test(l)));
157
- const snap = meaningful.pop()?.slice(0, 60) || lastLine.slice(0, 60);
157
+ const snap = meaningful.pop() || lastLine;
158
158
  tui.updateWorker(paneName, { cli, role: pane.title, status: "running", snapshot: snap, elapsed });
159
159
  }
160
160
  }
package/hub/team/tui.mjs CHANGED
@@ -11,6 +11,9 @@ try {
11
11
  VERSION = require("../../package.json").version;
12
12
  } catch { /* fallback */ }
13
13
 
14
+ const PREFIX_WIDTH = 48;
15
+ const FALLBACK_COLUMNS = 80;
16
+
14
17
  /**
15
18
  * 로그 스트림 대시보드 생성 (append-only)
16
19
  * @param {object} [opts]
@@ -42,10 +45,18 @@ export function createLogDashboard(opts = {}) {
42
45
  return dim(`[${sec}s]`);
43
46
  }
44
47
 
48
+ function getMessageWidth() {
49
+ const columns = Number.isFinite(process.stdout.columns)
50
+ ? process.stdout.columns
51
+ : FALLBACK_COLUMNS;
52
+ return Math.max(3, columns - PREFIX_WIDTH);
53
+ }
54
+
45
55
  function oneLine(text, fallback = "n/a") {
46
56
  const normalized = String(text || "").replace(/\s+/g, " ").trim();
47
57
  if (!normalized) return fallback;
48
- return normalized.length > 160 ? `${normalized.slice(0, 157)}...` : normalized;
58
+ const max = getMessageWidth();
59
+ return normalized.length > max ? `${normalized.slice(0, max - 3)}...` : normalized;
49
60
  }
50
61
 
51
62
  function cliColor(cli) {