@sejuneoh/aitop 0.22.0 → 0.23.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.
- package/README.md +7 -2
- package/bin/aitop.mjs +23 -45
- package/package.json +3 -3
- package/src/config.mjs +33 -25
- package/src/doctor.mjs +45 -24
- package/src/help.mjs +87 -58
- package/src/i18n.mjs +809 -0
- package/src/json.mjs +8 -2
- package/src/line.mjs +4 -2
- package/src/notify.mjs +14 -8
- package/src/order.mjs +4 -3
- package/src/sources/antigravity.mjs +16 -15
- package/src/sources/claude-tracker.mjs +4 -4
- package/src/sources/claude.mjs +10 -10
- package/src/sources/codex.mjs +5 -5
- package/src/sources/gemini.mjs +1 -1
- package/src/ui/chrome.mjs +62 -54
- package/src/ui/detail.mjs +49 -42
- package/src/ui/table.mjs +35 -33
- package/src/ui.mjs +4 -3
package/src/ui/detail.mjs
CHANGED
|
@@ -6,6 +6,10 @@ import { PALETTE, PHASE_COLOR } from './theme.mjs';
|
|
|
6
6
|
import { NOW, box, clock, fill, gauge, glyph, hhmm, levelBar, money, rule, segsWidth, tilde } from './draw.mjs';
|
|
7
7
|
import { activitySeries } from '../sources/common.mjs';
|
|
8
8
|
import { glyphs } from './glyphs.mjs';
|
|
9
|
+
import { STRINGS, phaseText, t as tr } from '../i18n.mjs';
|
|
10
|
+
|
|
11
|
+
// 탭 이름: 이번 지시·전체 탭은 turns.mjs 가 ko 이름을 붙이므로 지금 언어로 바꾼다. 지시 탭(T5)은 그대로.
|
|
12
|
+
const tabLabel = (tab, short = false) => (tab.key === 'now' ? tr('detail.tabNow', null, { short }) : tab.key === 'all' ? tr('detail.tabAll') : tab.label);
|
|
9
13
|
|
|
10
14
|
// 세션 폴더 기준 상대 경로. 폴더 밖이면 ~ 로 줄인다.
|
|
11
15
|
export function relPath(cwd, p) {
|
|
@@ -31,7 +35,7 @@ export const ROOMY = 16;
|
|
|
31
35
|
// ▸ src/ui.mjs 편집 ×3 새 파일 14:02. 파일 이름은 진하게, 폴더는 흐리게.
|
|
32
36
|
// 줄 수는 편집마다 더한 값이라 git diff 처럼 읽히지 않게 목록에는 넣지 않는다. 좁으면 시각, 새 파일 표시 순으로 뺀다.
|
|
33
37
|
export function fileRow(f, cwd, w, selected) {
|
|
34
|
-
const tail = [{ t: `${GAP}
|
|
38
|
+
const tail = [{ t: `${GAP}${tr('detail.edits', { n: f.edits })}`, fg: PALETTE.muted }, ...(f.created ? [{ t: `${GAP}${tr('detail.newFile')}`, fg: PALETTE.brand }] : []), { t: `${GAP}${hhmm(f.at)}`, fg: PALETTE.info }];
|
|
35
39
|
const tailW = () => tail.reduce((a, x) => a + width(x.t), 0);
|
|
36
40
|
while (tail.length > 1 && w - 2 * BAND_PAD - tailW() < 12) tail.pop();
|
|
37
41
|
const pathW = Math.max(1, w - 2 * BAND_PAD - tailW());
|
|
@@ -53,14 +57,16 @@ export function fileRow(f, cwd, w, selected) {
|
|
|
53
57
|
// 변경 조각을 고친 순서의 역순(최신 먼저)으로, 조각마다 시각 · 누가 · 위치 머리를 달아 보인다.
|
|
54
58
|
// 같은 파일을 여러 번 고치면 줄 번호 기준이 매번 달라져 하나의 diff 로 합칠 수 없다.
|
|
55
59
|
export function diffBody(f, w) {
|
|
56
|
-
if (f.hidden) return [[INDENT, { t: '
|
|
57
|
-
if (!f.hunks.length) return [[INDENT, { t: f.deleted ? '
|
|
60
|
+
if (f.hidden) return [[INDENT, { t: tr('detail.hidden'), fg: PALETTE.info, italic: true }]];
|
|
61
|
+
if (!f.hunks.length) return [[INDENT, { t: tr(f.deleted ? 'detail.deleted' : 'detail.noHunks'), fg: PALETTE.info, italic: true }]];
|
|
58
62
|
const nums = w >= 50;
|
|
59
63
|
const textW = w - 1 - (nums ? 5 : 0);
|
|
60
64
|
const out = [];
|
|
61
65
|
for (const h of f.hunks) {
|
|
62
66
|
const head = h.unnumbered ? `@@ ${h.context ?? ''}`.trimEnd() : `@@ -${h.oldStart},${h.oldLines} +${h.newStart},${h.newLines} @@`;
|
|
63
|
-
|
|
67
|
+
// 소스가 붙인 '메인' 은 지금 언어로 바꾸고, 팀원 이름은 그대로 둔다.
|
|
68
|
+
const who = h.agent == null || h.agent === STRINGS.ko['detail.main'] ? tr('detail.main') : h.agent;
|
|
69
|
+
out.push([{ t: `${clock(h.at)} · ${who} · ${head}`, fg: PALETTE.tool, dim: true }]);
|
|
64
70
|
let n = h.newStart;
|
|
65
71
|
for (const l of h.lines) {
|
|
66
72
|
const k = l[0];
|
|
@@ -70,9 +76,9 @@ export function diffBody(f, w) {
|
|
|
70
76
|
const seg = k === '+' ? { fg: PALETTE.busy, bg: PALETTE.addBg } : k === '-' ? { fg: PALETTE.alert, bg: PALETTE.delBg } : { fg: PALETTE.muted };
|
|
71
77
|
out.push([...(nums ? [no] : []), { ...seg, t: pad(l, textW) }]);
|
|
72
78
|
}
|
|
73
|
-
if (h.cut) out.push([{ t:
|
|
79
|
+
if (h.cut) out.push([{ t: tr('detail.cut', { n: h.cut }), fg: PALETTE.info, italic: true }]);
|
|
74
80
|
}
|
|
75
|
-
if (f.dropped) out.push([{ t:
|
|
81
|
+
if (f.dropped) out.push([{ t: tr('detail.dropped', { n: f.dropped }), fg: PALETTE.info, italic: true }]);
|
|
76
82
|
return out.map((r) => [INDENT, ...r]);
|
|
77
83
|
}
|
|
78
84
|
|
|
@@ -87,7 +93,7 @@ export function diffView(s, files, f, w, rows, view) {
|
|
|
87
93
|
const meta = `${files.indexOf(f) + 1}/${files.length}${body.length > page ? ` · ${Math.round(((top + page) / body.length) * 100)}%` : ''}`;
|
|
88
94
|
// 좁으면 편집 수를 줄이거나 빼고, 파일 위치와 스크롤 위치는 남긴다.
|
|
89
95
|
const room = w - 10 - width(meta);
|
|
90
|
-
const stats = [
|
|
96
|
+
const stats = [tr('detail.diffStats', { e: f.edits, a: f.add, d: f.del }), ` · ×${f.edits}`, ''].find((x) => room - width(x) >= 12) ?? '';
|
|
91
97
|
const name = truncateLeft(relPath(s.cwd, f.path), Math.max(8, room - width(stats)));
|
|
92
98
|
const label = [{ t: '‹ ', fg: PALETTE.brand, bold: true }, { t: name, fg: PALETTE.text, bold: true }, { t: stats, fg: PALETTE.info }];
|
|
93
99
|
return [rule(label, meta, w, PALETTE.brand), ...(gap ? [[]] : []), ...body.slice(top, top + page)];
|
|
@@ -99,7 +105,7 @@ export function activity(s, n, dim = false) {
|
|
|
99
105
|
const icon = { prompt: { t: '❯ ', fg: tc, bold: true }, tool: { t: `${glyphs().event} `, fg: PALETTE.tool }, reply: { t: '↳ ', fg: PALETTE.muted } };
|
|
100
106
|
// 기록 줄 순서와 시각이 어긋날 때가 있어(병렬 도구 호출 등) 시각 순으로 다시 정렬한다. 같은 시각이면 기록 순서를 지킨다.
|
|
101
107
|
const events = [...(s.events ?? [])].sort((a, b) => a.at - b.at).slice(-n);
|
|
102
|
-
if (!events.length) return [[INDENT, { t: '
|
|
108
|
+
if (!events.length) return [[INDENT, { t: tr('detail.noActivity'), fg: PALETTE.info, italic: true }]];
|
|
103
109
|
const rows = events.map((e) => [INDENT, { t: clock(e.at) + ' ', fg: PALETTE.info }, icon[e.kind], { t: e.text, fg: e.kind === 'prompt' ? PALETTE.text : PALETTE.muted, bold: e.kind === 'prompt' }]);
|
|
104
110
|
return dim ? rows.map((r) => r.map((x) => ({ ...x, fg: PALETTE.info, bold: false }))) : rows;
|
|
105
111
|
}
|
|
@@ -111,7 +117,7 @@ export function activitySpark(s, room, dim = false) {
|
|
|
111
117
|
const all = activitySeries(s.activity, NOW);
|
|
112
118
|
if (!all.some((x) => x > 0)) return [];
|
|
113
119
|
for (const n of [24, 12]) {
|
|
114
|
-
const tail = { t:
|
|
120
|
+
const tail = { t: tr('detail.hours', { n }), fg: PALETTE.info };
|
|
115
121
|
const bar = levelBar(all.slice(-n)).map((x) => (dim ? { ...x, fg: PALETTE.faint } : x));
|
|
116
122
|
const segs = [{ t: ' ' }, ...bar, dim ? { ...tail, fg: PALETTE.faint } : tail];
|
|
117
123
|
if (segsWidth(segs) <= room) return segs;
|
|
@@ -126,7 +132,7 @@ export const TAB_WINDOW = 3;
|
|
|
126
132
|
// 숨긴 탭 수는 숨긴 쪽에 따로 붙인다: 이번 지시 … +2 T4 T3 ‹T2› … +1 전체.
|
|
127
133
|
// 폭이 모자라면 가운데 탭 → … +N → '이번 지시' 이름 → 고르지 않은 양끝 탭 순으로 줄여, 고른 탭은 늘 남긴다.
|
|
128
134
|
export function tabsLine(tabs, tab, w) {
|
|
129
|
-
const seg = (
|
|
135
|
+
const seg = (x, short) => (x.key === tab.key ? { t: `‹${tabLabel(x)}›`, fg: PALETTE.text, bg: PALETTE.rowSel, bold: true } : { t: tabLabel(x, short), fg: PALETTE.muted });
|
|
130
136
|
const turns = tabs.slice(1, -1);
|
|
131
137
|
const at = turns.findIndex((t) => t.key === tab.key);
|
|
132
138
|
const start = at >= TAB_WINDOW ? at - TAB_WINDOW + 1 : 0;
|
|
@@ -156,10 +162,10 @@ export function tabsLine(tabs, tab, w) {
|
|
|
156
162
|
|
|
157
163
|
// 탭 아래 설명: 지시면 시각과 첫 줄, 전체면 편집 수.
|
|
158
164
|
export function tabNote(tab, files) {
|
|
159
|
-
if (tab.key === 'all') return [{ t:
|
|
165
|
+
if (tab.key === 'all') return [{ t: tr('detail.allNote', { n: files.reduce((a, f) => a + f.edits, 0) }), fg: PALETTE.info, italic: true }];
|
|
160
166
|
const p = tab.turn;
|
|
161
167
|
const edits = files.reduce((a, f) => a + f.edits, 0);
|
|
162
|
-
return [{ t: p ? `${hhmm(p.at)} "${p.text}"` : '
|
|
168
|
+
return [{ t: p ? `${hhmm(p.at)} "${p.text}"` : tr('detail.noTurn'), fg: PALETTE.info, italic: true }, ...(edits ? [{ t: tr('detail.editCount', { n: edits }), fg: PALETTE.muted }] : [])];
|
|
163
169
|
}
|
|
164
170
|
|
|
165
171
|
// 허락을 기다리는 요청을 폭에 맞춰 여러 줄로 나눈다. 명령은 띄어쓰기와 상관없이 글자 단위로 끊어 빠짐없이 보인다.
|
|
@@ -197,7 +203,7 @@ export function requestBlock(s, w, max = REQUEST_LINES) {
|
|
|
197
203
|
while (last.length && width(last.join('')) + width(mark) > textW) last.pop();
|
|
198
204
|
lines[max - 1] = last.join('') + mark;
|
|
199
205
|
}
|
|
200
|
-
return [rule([{ t: '
|
|
206
|
+
return [rule([{ t: tr('detail.request'), fg: PALETTE.waiting, bold: true }], '', w), ...lines.map((l) => [INDENT, { t: l, fg: PALETTE.text }])];
|
|
201
207
|
}
|
|
202
208
|
|
|
203
209
|
// 오른쪽 칸: 고친 파일이 없으면 최근 활동만, 있으면 위쪽 절반까지 변경 파일 구획(배경 띠), 파일을 열면 diff.
|
|
@@ -208,8 +214,9 @@ export function rightColumn(s, w, rows, view) {
|
|
|
208
214
|
if (req.length) return [...req, ...rightColumn({ ...s, waitDetail: null }, w, rows - req.length, view)];
|
|
209
215
|
const all = s.files ?? [];
|
|
210
216
|
const focused = view?.focus === 'files';
|
|
211
|
-
// 가로줄 끝에 '─' 두 칸은 남긴다 (── 3칸 + 최근 활동 9칸 + 막대 + ' ─' 2칸).
|
|
212
|
-
const
|
|
217
|
+
// 가로줄 끝에 '─' 두 칸은 남긴다 (── 3칸 + 최근 활동 이름(한국어 9칸) + 막대 + ' ─' 2칸).
|
|
218
|
+
const activityName = tr('detail.activity');
|
|
219
|
+
const activityRule = () => rule([{ t: activityName, fg: focused ? PALETTE.muted : PALETTE.text, bold: true }, ...activitySpark(s, w - 3 - width(activityName) - 2, focused)], '', w);
|
|
213
220
|
if (!all.length) return [activityRule(), ...activity(s, rows - 1)];
|
|
214
221
|
const tab = currentTab(s, view?.tab);
|
|
215
222
|
const files = filesForTab(s, tab);
|
|
@@ -217,7 +224,7 @@ export function rightColumn(s, w, rows, view) {
|
|
|
217
224
|
if (open) return diffView(s, files, open, w, rows, view);
|
|
218
225
|
// 이번 지시에 고친 파일이 없으면 한 줄로 접고 남는 줄을 최근 활동에 준다. 목록에 들어가면(f) 다시 펼친다.
|
|
219
226
|
if (!files.length && !focused) {
|
|
220
|
-
const folded = rule([{ t: '
|
|
227
|
+
const folded = rule([{ t: tr('detail.files'), fg: PALETTE.text, bold: true }, { t: tr('detail.tabNone', { tab: tabLabel(tab) }), fg: PALETTE.muted }], tr('detail.allFiles', { n: all.length }), w);
|
|
221
228
|
return [folded, activityRule(), ...activity(s, rows - 2)];
|
|
222
229
|
}
|
|
223
230
|
|
|
@@ -225,9 +232,9 @@ export function rightColumn(s, w, rows, view) {
|
|
|
225
232
|
const gutter = focused ? [{ t: glyphs().select, fg: PALETTE.brand }] : [];
|
|
226
233
|
const inner = w - segsWidth(gutter);
|
|
227
234
|
const tier = rows >= ROOMY ? 3 : rows >= 11 ? 2 : 1;
|
|
228
|
-
const label = [{ t: '
|
|
235
|
+
const label = [{ t: tr('detail.files'), fg: focused ? PALETTE.brand : PALETTE.text, bold: true }, ...(tier === 1 ? [{ t: ` · ${tabLabel(tab)}`, fg: PALETTE.muted }] : [])];
|
|
229
236
|
// git diff 가 아니라 Edit/Write 기록이고 Bash 로 바꾼 파일은 빠진다는 것을 화면에서 바로 알 수 있게 한다.
|
|
230
|
-
const meta =
|
|
237
|
+
const meta = `${tr('detail.filesMeta', { n: files.length })}${focused ? '' : ' · f'}`;
|
|
231
238
|
const head = [rule(label, meta, inner, focused ? PALETTE.brand : PALETTE.line)];
|
|
232
239
|
// 11~15 줄에서는 지시 문장이 탭에 밀려 사라지지 않게 그 자리를 먼저 남긴다.
|
|
233
240
|
const note = tabNote(tab, files);
|
|
@@ -245,9 +252,9 @@ export function rightColumn(s, w, rows, view) {
|
|
|
245
252
|
const start = selIdx >= slots ? selIdx - slots + 1 : 0;
|
|
246
253
|
const shown = files.slice(start, start + slots);
|
|
247
254
|
const list = [];
|
|
248
|
-
if (!files.length) list.push(fill([BAND_LEFT, { t: '
|
|
255
|
+
if (!files.length) list.push(fill([BAND_LEFT, { t: tr('detail.noFiles'), fg: PALETTE.info, italic: true }, { t: `${GAP}${focused ? '←/→' : `${tr('detail.fThen')} ←/→`} ${tr('detail.otherPrompts')}`, fg: PALETTE.info }], inner, PALETTE.bar));
|
|
249
256
|
shown.forEach((f, k) => list.push(fileRow(f, s.cwd, inner, start + k === selIdx)));
|
|
250
|
-
if (overflow) list.push(fill([BAND_LEFT, { t:
|
|
257
|
+
if (overflow) list.push(fill([BAND_LEFT, { t: tr('detail.moreFiles', { n: files.length - shown.length }), fg: PALETTE.muted }], inner, PALETTE.bar));
|
|
251
258
|
const block = [...head, ...(gap ? [[]] : []), ...list, ...(gap ? [[]] : [])];
|
|
252
259
|
const R = block.map((segs) => [...gutter, ...segs]);
|
|
253
260
|
R.push(activityRule(), ...activity(s, rows - R.length - 1, focused));
|
|
@@ -277,12 +284,12 @@ function fitGroups(groups, w) {
|
|
|
277
284
|
// 폭이 모자라면 pid → 토큰 내역 → 서브에이전트 수 → ctx 순으로 뺀다.
|
|
278
285
|
export function summaryLines(s, w, frame, view) {
|
|
279
286
|
const g = glyph(s, frame);
|
|
280
|
-
const phase = [{ ...g, t: g.t + ' ' }, { t: s.phase
|
|
287
|
+
const phase = [{ ...g, t: g.t + ' ' }, { t: phaseText(s.phase) || s.status, fg: PHASE_COLOR[s.phase?.kind] ?? PALETTE.text, bold: true }];
|
|
281
288
|
const sep = { t: ' · ', fg: PALETTE.info };
|
|
282
289
|
const optional = [
|
|
283
290
|
s.branch && [sep, { t: s.branch, fg: PALETTE.info }],
|
|
284
291
|
s.kind && [sep, { t: s.kind, fg: PALETTE.info }],
|
|
285
|
-
s.startedAt && [sep, { t:
|
|
292
|
+
s.startedAt && [sep, { t: tr('detail.startedAgo', { at: hhmm(s.startedAt), ago: fmtAgo(NOW - s.startedAt) }), fg: PALETTE.info }],
|
|
286
293
|
].filter(Boolean);
|
|
287
294
|
// 폴더가 FOLDER_MIN 칸(짧으면 제 길이)을 얻을 때까지 시작 → 종류 → 브랜치 순으로 뺀다. 폴더는 왼쪽부터 줄여 끝 이름을 남긴다.
|
|
288
295
|
const path = tilde(s.cwd ?? '');
|
|
@@ -296,9 +303,9 @@ export function summaryLines(s, w, frame, view) {
|
|
|
296
303
|
const t = s.tokens ?? {};
|
|
297
304
|
const net = view?.costMode === 'net';
|
|
298
305
|
const total = { segs: [{ t: fmtTokens(t.total), fg: PALETTE.text, bold: true }] };
|
|
299
|
-
const parts = { segs: [{ t: ' (', fg: PALETTE.info }, { t:
|
|
300
|
-
const sub = t.subCount ? { segs: [{ t:
|
|
301
|
-
const cost = s.cost != null ? { segs: [sep, ...(net ? [{ t: '
|
|
306
|
+
const parts = { segs: [{ t: ' (', fg: PALETTE.info }, { t: tr('detail.tokenParts', { i: fmtTokens(t.input), o: fmtTokens(t.output), c: fmtTokens((t.cacheRead ?? 0) + (t.cacheWrite ?? 0)) }), fg: PALETTE.info }, { t: ')', fg: PALETTE.info }], drop: 3 };
|
|
307
|
+
const sub = t.subCount ? { segs: [{ t: tr('detail.sub', { n: t.subCount }), fg: PALETTE.muted }], drop: 2 } : null;
|
|
308
|
+
const cost = s.cost != null ? { segs: [sep, ...(net ? [{ t: tr('detail.netTag'), fg: PALETTE.muted }] : []), { t: money(net ? s.costNoCache : s.cost, s.costUnknown), fg: PALETTE.money, bold: true }] } : null;
|
|
302
309
|
let ctx = null;
|
|
303
310
|
if (s.context?.window) {
|
|
304
311
|
const r = Math.min(1, Math.max(0, s.context.used / s.context.window || 0));
|
|
@@ -329,30 +336,30 @@ export function detail(s, W, H, frame, view) {
|
|
|
329
336
|
const more = (segs) => L.push([INDENT, { t: ' '.repeat(9) }, ...segs]);
|
|
330
337
|
|
|
331
338
|
const g = glyph(s, frame);
|
|
332
|
-
L.push([{ ...g, t: g.t + ' ' }, { t: s.phase
|
|
333
|
-
section('
|
|
334
|
-
kv('
|
|
335
|
-
if (s.branch) kv('
|
|
336
|
-
kv('
|
|
337
|
-
kv('
|
|
338
|
-
if (s.startedAt) kv('
|
|
339
|
+
L.push([{ ...g, t: g.t + ' ' }, { t: phaseText(s.phase) || s.status, fg: PHASE_COLOR[s.phase?.kind] ?? PALETTE.text, bold: true }]);
|
|
340
|
+
section(tr('detail.session'));
|
|
341
|
+
kv(tr('detail.folder'), tilde(s.cwd));
|
|
342
|
+
if (s.branch) kv(tr('detail.branch'), s.branch);
|
|
343
|
+
kv(tr('detail.model'), s.model ?? '-');
|
|
344
|
+
kv(tr('detail.kind'), `${s.kind ?? '-'}${s.pid ? ` · pid ${s.pid}` : ''}`);
|
|
345
|
+
if (s.startedAt) kv(tr('detail.started'), tr('detail.ago', { at: clock(s.startedAt), ago: fmtAgo(NOW - s.startedAt) }));
|
|
339
346
|
|
|
340
347
|
// 합계 = 메인 + 서브 = 입력 + 출력 + 캐시 읽기 + 캐시 쓰기 가 화면에서 그대로 맞아떨어지게 보인다.
|
|
341
348
|
const t = s.tokens ?? {};
|
|
342
|
-
section('
|
|
343
|
-
kv('
|
|
344
|
-
if (t.subCount) more([{ t:
|
|
345
|
-
more([{ t:
|
|
346
|
-
more([{ t:
|
|
347
|
-
if (s.cost != null) section('
|
|
348
|
-
else if (s.context?.window) section('
|
|
349
|
+
section(tr('detail.tokens'));
|
|
350
|
+
kv(tr('detail.total'), fmtTokens(t.total));
|
|
351
|
+
if (t.subCount) more([{ t: tr('detail.mainSub', { m: fmtTokens(t.main), n: t.subCount, s: fmtTokens(t.sub) }), fg: PALETTE.info }]);
|
|
352
|
+
more([{ t: tr('detail.inOut', { i: fmtTokens(t.input), o: fmtTokens(t.output) }), fg: PALETTE.info }]);
|
|
353
|
+
more([{ t: tr('detail.cache', { r: fmtTokens(t.cacheRead), w: fmtTokens(t.cacheWrite) }), fg: PALETTE.info }]);
|
|
354
|
+
if (s.cost != null) section(tr('detail.cost'));
|
|
355
|
+
else if (s.context?.window) section(tr('detail.context'));
|
|
349
356
|
if (s.cost != null) {
|
|
350
357
|
const net = view?.costMode === 'net';
|
|
351
|
-
L.push([INDENT, { t: pad(net ? '
|
|
352
|
-
more([{ t: net ?
|
|
358
|
+
L.push([INDENT, { t: pad(tr(net ? 'detail.netLabel' : 'detail.apiLabel'), 9), fg: PALETTE.muted }, { t: money(net ? s.costNoCache : s.cost, s.costUnknown), fg: PALETTE.money, bold: true }]);
|
|
359
|
+
more([{ t: net ? tr('detail.apiValue', { v: money(s.cost, s.costUnknown) }) : tr('detail.netValue', { v: money(s.costNoCache, s.costUnknown) }), fg: PALETTE.info }, ...(s.costUnknown ? [{ t: tr('detail.unpriced'), fg: PALETTE.info }] : [])]);
|
|
353
360
|
}
|
|
354
361
|
if (s.context?.window) {
|
|
355
|
-
L.push([INDENT, { t: pad('
|
|
362
|
+
L.push([INDENT, { t: pad(tr('detail.context'), 9), fg: PALETTE.muted }, { t: pad(`${fmtTokens(s.context.used)}/${fmtTokens(s.context.window)}`, 11) + ' ', fg: PALETTE.text }, ...gauge(s.context.used, s.context.window, Math.max(4, leftW - width(INDENT.t) - 26))]);
|
|
356
363
|
}
|
|
357
364
|
|
|
358
365
|
const R = rightColumn(s, W - leftW - 7, H - 2, view);
|
package/src/ui/table.mjs
CHANGED
|
@@ -6,6 +6,8 @@ import { fmtAgo, fmtTokens, pad, truncate, width } from '../text.mjs';
|
|
|
6
6
|
import { BUDGET_COLOR, PALETTE, PHASE_COLOR, RESET, style } from './theme.mjs';
|
|
7
7
|
import { NOW, SPIN, clock, costOf, gauge, glyph, levelBar, line, money, segsWidth, shortModel } from './draw.mjs';
|
|
8
8
|
import { glyphs } from './glyphs.mjs';
|
|
9
|
+
import { phaseText, t } from '../i18n.mjs';
|
|
10
|
+
import { NO_FOLDER } from '../order.mjs';
|
|
9
11
|
|
|
10
12
|
// 검색어가 세션 이름·폴더·모델 중 하나에 들어 있으면 남긴다 (대소문자 무시).
|
|
11
13
|
export function filterSessions(sessions, query) {
|
|
@@ -67,20 +69,20 @@ export function header(view, W) {
|
|
|
67
69
|
const B = PALETTE.bar;
|
|
68
70
|
const G = glyphs();
|
|
69
71
|
// 0 인 상태는 빼서 오른쪽 사용량 자리를 남긴다. 좁으면 이름을 줄인다.
|
|
70
|
-
const stat = (glyph, n,
|
|
72
|
+
const stat = (glyph, n, key, color, bold, narrow) =>
|
|
71
73
|
n
|
|
72
74
|
? [
|
|
73
75
|
{ t: ` ${glyph} `, fg: color, bg: B },
|
|
74
|
-
{ t: `${n} ${
|
|
76
|
+
{ t: `${n} ${t(key, null, { short: narrow })}`, fg: bold ? color : PALETTE.text, bg: B, bold },
|
|
75
77
|
]
|
|
76
78
|
: [];
|
|
77
79
|
// drop: 0 은 모두 보이고, 1 은 live 수(다른 수의 합)를 빼고, 2 는 ○ 대기까지 뺀다.
|
|
78
80
|
// 빼고 나서 남는 상태 수가 없으면 live 수는 남긴다.
|
|
79
81
|
const leftOf = (narrow, drop = 0) => {
|
|
80
82
|
const others = [
|
|
81
|
-
...stat('⠿', working, '
|
|
82
|
-
...stat(G.unseen, unseen, '
|
|
83
|
-
...(drop < 2 ? stat(G.idle, idle, '
|
|
83
|
+
...stat('⠿', working, 'hdr.working', PALETTE.busy, false, narrow),
|
|
84
|
+
...stat(G.unseen, unseen, 'hdr.unseen', PALETTE.busy, true, narrow),
|
|
85
|
+
...(drop < 2 ? stat(G.idle, idle, 'hdr.idle', PALETTE.idle, false, narrow) : []),
|
|
84
86
|
];
|
|
85
87
|
const counts = [
|
|
86
88
|
...(drop < 1 || !others.length ? [{ t: `${live.length} live`, fg: PALETTE.text, bg: B, bold: true }] : []),
|
|
@@ -90,7 +92,7 @@ export function header(view, W) {
|
|
|
90
92
|
{ t: ` ${BRAND.logo} `, fg: PALETTE.chipText, bg: PALETTE.brand, bold: true },
|
|
91
93
|
{ t: ' ', bg: B },
|
|
92
94
|
// 응답 대기가 있으면 사람이 할 일이므로 맨 앞에 둔다.
|
|
93
|
-
...(waiting ? [...stat(G.waiting, waiting, '
|
|
95
|
+
...(waiting ? [...stat(G.waiting, waiting, 'hdr.waiting', PALETTE.waiting, true, narrow).map((x, i) => (i === 0 ? { ...x, t: x.t.trimStart() } : x)), ...(counts.length ? [{ t: ' ', bg: B }] : [])] : []),
|
|
94
96
|
...counts,
|
|
95
97
|
];
|
|
96
98
|
};
|
|
@@ -108,12 +110,12 @@ export function header(view, W) {
|
|
|
108
110
|
const ofBudget = bud ? [{ t: `/${Number.isInteger(bud.day) ? `$${bud.day.toLocaleString('en-US')}` : `$${bud.day.toFixed(2)}`}`, fg: PALETTE.muted, bg: B }] : [];
|
|
109
111
|
// 캐시 제외 화면에서 예산 칸 없이 예상만 남으면 캐시 제외 금액으로 읽히지 않게 'API 예상' 이라고 적는다.
|
|
110
112
|
const projOf = (label) => (bud && bud.level !== 'ok' ? { t: `${label} ${usd(bud.projected)}${bud.unknown ? '?' : ''}${bud.level === 'warn' ? '!' : ''}`, fg: BUDGET_COLOR[bud.level], bg: B, bold: true } : null);
|
|
111
|
-
const projSeg = projOf('
|
|
112
|
-
const projApi = net ? projOf('
|
|
113
|
+
const projSeg = projOf(t('hdr.proj'));
|
|
114
|
+
const projApi = net ? projOf(t('hdr.projApi')) : projSeg;
|
|
113
115
|
// budget: 'full' | 'proj' (아래 right 참고). 오늘 칸 뒤에 붙는 예산 칸.
|
|
114
116
|
const budgetPart = (budget) => {
|
|
115
117
|
if (!bud) return [];
|
|
116
|
-
if (budget === 'full' && net) return [dot, { t: '
|
|
118
|
+
if (budget === 'full' && net) return [dot, { t: `${t('hdr.budget')} `, fg: PALETTE.muted, bg: B }, { t: money(bud.spent, bud.unknown), fg: PALETTE.money, bg: B }, ...ofBudget, ...(projSeg ? [{ t: ' ', bg: B }, projSeg] : [])];
|
|
117
119
|
return projApi ? [dot, projApi] : [];
|
|
118
120
|
};
|
|
119
121
|
const period = (label, p, tok, rate = [], extra = []) => [
|
|
@@ -130,19 +132,19 @@ export function header(view, W) {
|
|
|
130
132
|
const rate = rateText ? [{ t: ` (${rateText}/h)`, fg: PALETTE.muted, bg: B }] : null;
|
|
131
133
|
// bar: 7일 금액 뒤의 날짜별 막대. 집계 중이거나 날짜별 값이 없으면 넣지 않는다.
|
|
132
134
|
const bar = u?.loading == null && u?.days7?.length ? [{ t: ' ', bg: B }, ...weekBar(u.days7, view.costMode).map((x) => ({ ...x, bg: B }))] : null;
|
|
133
|
-
const week = (tok, withBar = false) => (u.loading != null ? [{ t:
|
|
135
|
+
const week = (tok, withBar = false) => (u.loading != null ? [{ t: t('hdr.weekLoading', { pct: Math.floor(u.loading * 100) }), fg: PALETTE.info, bg: B }] : period(t('hdr.week'), u.week, tok, [], withBar && bar ? bar : []));
|
|
134
136
|
// 장부를 못 읽었으면 화면에 있는 세션(모든 도구)의 누적 토큰이라도 보인다.
|
|
135
137
|
const fallback = [{ t: `Σ ${fmtTokens(sessions.reduce((a, s) => a + (s.tokens?.total ?? 0), 0))} tok`, fg: PALETTE.muted, bg: B }];
|
|
136
138
|
const clockSeg = { t: clock(view.data.at), fg: PALETTE.muted, bg: B };
|
|
137
139
|
// 비용은 API 정가 환산이다 (구독 요금제의 실제 청구액이 아님). 폭이 되면 그렇다고 적는다.
|
|
138
|
-
const api = { t: net ? '
|
|
139
|
-
const apiShort = { t: net ? '
|
|
140
|
+
const api = { t: `${t(net ? 'hdr.netLong' : 'hdr.apiLong')} `, fg: net ? PALETTE.brand : PALETTE.info, bg: B };
|
|
141
|
+
const apiShort = { t: `${t(net ? 'hdr.netShort' : 'hdr.apiShort')} `, fg: net ? PALETTE.brand : PALETTE.info, bg: B };
|
|
140
142
|
// 오른쪽 한 줄의 구성. 위에서부터 차례로 시도한다.
|
|
141
143
|
// api: 'long' | 'short' | null, tok: 토큰 수, week: 7일 칸, bar: 7일 막대, budget: 'full'(/$50 와 예상) | 'proj'(예상만) | 'only'(오늘 금액 없이 예상만).
|
|
142
144
|
// clock: false 면 시각을 뺀다 (캐시 제외 기준에서 오늘 비용을 지킬 때만 쓴다).
|
|
143
145
|
const right = ({ api: a = null, rate: withRate = false, tok = false, week: withWeek = false, bar: withBar = false, budget = 'full', clock = true }) => {
|
|
144
146
|
const label = a === 'long' ? [api] : a === 'short' ? [apiShort] : [];
|
|
145
|
-
const today = budget === 'only' ? [projApi] : [...period('
|
|
147
|
+
const today = budget === 'only' ? [projApi] : [...period(t('hdr.today'), u.today, tok, withRate ? rate : [], budget === 'full' && !net ? ofBudget : []), ...budgetPart(budget)];
|
|
146
148
|
return [...label, ...today, ...(withWeek ? [dot, ...week(tok, withBar)] : []), ...(clock ? [dot, clockSeg] : [])];
|
|
147
149
|
};
|
|
148
150
|
// 7일 막대는 지출 속도 다음으로 먼저 뺀다 (토큰 수보다 먼저).
|
|
@@ -196,7 +198,7 @@ function toolPart(p, level, showEnded) {
|
|
|
196
198
|
// 세션이 없는 도구는 이름만 흐리게 둔다.
|
|
197
199
|
if (!p.live) {
|
|
198
200
|
// 종료 세션을 함께 볼 때는 그 도구의 누적 토큰을 흐리게 남긴다. 기록 폴더가 없으면 미설치로 보인다.
|
|
199
|
-
const more = !extra ? [] : p.missing ? [{ t:
|
|
201
|
+
const more = !extra ? [] : p.missing ? [{ t: ` ${t('tools.missing')}`, fg: PALETTE.info, italic: true }] : showEnded && p.count ? [{ t: ` · ${fmtTokens(p.tok)}`, fg: PALETTE.info }] : [];
|
|
200
202
|
return [{ t: ` ${name}`, fg: PALETTE.info }, ...more];
|
|
201
203
|
}
|
|
202
204
|
const tc = PALETTE.tools[p.tool];
|
|
@@ -243,7 +245,7 @@ export function toolStrip(view, W) {
|
|
|
243
245
|
const parts = visible.length ? visible : all;
|
|
244
246
|
const hidden = all.filter((p) => !parts.includes(p));
|
|
245
247
|
// 숨김 표시: 도구 이름을 적고, 자리가 모자라면 개수만 적는다.
|
|
246
|
-
const notes = hidden.length ? [[{ t:
|
|
248
|
+
const notes = hidden.length ? [[{ t: t('tools.hidden', { list: hidden.map((p) => p.tool).join(' ') }), fg: PALETTE.info }], [{ t: t('tools.hidden', { list: hidden.length }), fg: PALETTE.info }]] : [[]];
|
|
247
249
|
const plus = (n) => (n ? [{ t: `+${n}`, fg: PALETTE.info }] : []);
|
|
248
250
|
const build = (shown, level, tail = []) => {
|
|
249
251
|
const gap = { t: level ? ' ' : ' ' };
|
|
@@ -282,7 +284,7 @@ export function toolStrip(view, W) {
|
|
|
282
284
|
segs = fits(noted.segs) && liveOf(noted) >= liveOf(bare) ? noted.segs : bare.segs;
|
|
283
285
|
}
|
|
284
286
|
// 종료 세션 표시는 다 들어갈 때만 붙인다 (잘린 조각이 남지 않게).
|
|
285
|
-
const ended = [{ t: ' ' }, { t: '
|
|
287
|
+
const ended = [{ t: ' ' }, { t: t('tools.ended'), fg: PALETTE.info, italic: true }];
|
|
286
288
|
if (view.showEnded && segsWidth(segs) + segsWidth(ended) <= W) segs.push(...ended);
|
|
287
289
|
return line(segs, W);
|
|
288
290
|
}
|
|
@@ -315,7 +317,7 @@ export function sessionRow(s, c, W, selected, frame, hot, costMode = 'api', pinn
|
|
|
315
317
|
const pc = s.phase?.kind === 'idle' ? PALETTE.info : PHASE_COLOR[s.phase?.kind] ?? PALETTE.muted;
|
|
316
318
|
// 아직 토큰을 하나도 쓰지 않은 세션은 숫자 칸을 비운다. 기다리는 중이면 '아직 지시 없음'.
|
|
317
319
|
const blank = s.lazy || !(s.tokens?.total > 0);
|
|
318
|
-
const
|
|
320
|
+
const status = blank && s.tool !== 'gemini' && (s.status === 'idle' || s.status === 'live') ? t('phase.noPrompt') : statusText(s.phase);
|
|
319
321
|
const segs = [
|
|
320
322
|
{ t: selected ? glyphs().select : ' ', fg: PALETTE.brand, bold: true },
|
|
321
323
|
{ ...g, t: g.t + ' ' },
|
|
@@ -328,7 +330,7 @@ export function sessionRow(s, c, W, selected, frame, hot, costMode = 'api', pinn
|
|
|
328
330
|
segs.push(...pin, { t: pad(s.name ?? '', c.name - segsWidth(pin)) + ' ', fg: ended ? PALETTE.ended : PALETTE.text, bold: selected });
|
|
329
331
|
if (c.showProject) segs.push({ t: pad(s.project ?? '', c.project) + ' ', fg: ended ? PALETTE.ended : PALETTE.muted });
|
|
330
332
|
segs.push(
|
|
331
|
-
{ t: pad(
|
|
333
|
+
{ t: pad(status, c.status) + ' ', fg: pc, bold: s.status === 'waiting' },
|
|
332
334
|
{ t: pad(blank ? '' : fmtTokens(s.tokens.total), c.tokens, 'right') + ' ', fg: ended ? PALETTE.ended : PALETTE.muted },
|
|
333
335
|
);
|
|
334
336
|
if (c.showCost) segs.push({ t: pad(blank ? '' : (hot?.has(s.id) ? glyphs().hot : '') + money(costOf(s, costMode), s.costUnknown), c.cost, 'right') + ' ', fg: s.cost == null || ended ? PALETTE.info : hot?.has(s.id) ? PALETTE.money : PALETTE.muted, bold: Boolean(hot?.has(s.id)) });
|
|
@@ -338,11 +340,8 @@ export function sessionRow(s, c, W, selected, frame, hot, costMode = 'api', pinn
|
|
|
338
340
|
}
|
|
339
341
|
|
|
340
342
|
// 표의 STATUS 칸 글. 응답 대기는 ◆ 와 행 색으로 이미 보이므로 무엇을 허락해 달라는지만 적고, 요청 내용이 없으면 '응답 대기' 를 남긴다.
|
|
341
|
-
// 상세 창은
|
|
342
|
-
export
|
|
343
|
-
const text = phase?.text ?? '';
|
|
344
|
-
return phase?.kind === 'waiting' ? text.replace(/^응답 대기 · /, '') : text;
|
|
345
|
-
}
|
|
343
|
+
// 상세 창은 phaseText 의 긴 문구 전체를 보인다.
|
|
344
|
+
export const statusText = (phase) => phaseText(phase, { short: true });
|
|
346
345
|
|
|
347
346
|
// 메인 세션 아래에 붙는 팀원(서브에이전트) 행. 끝나면 잠깐 "완료"로 보였다가 사라진다.
|
|
348
347
|
// parentModel: 부모와 같은 모델이면 모델 칸을 비운다. costMode: 'api' | 'net'.
|
|
@@ -381,17 +380,17 @@ export function memberRow(m, last, c, W, frame, parentModel, costMode = 'api') {
|
|
|
381
380
|
export const MARK_COLOR = { ok: PALETTE.busy, missing: PALETTE.alert, limited: PALETTE.muted };
|
|
382
381
|
|
|
383
382
|
export function emptyLines(view, W) {
|
|
384
|
-
const out = [line([{ t: view.showEnded ? '
|
|
383
|
+
const out = [line([{ t: ` ${t(view.showEnded ? 'empty.none24' : 'empty.none')}`, fg: PALETTE.muted, italic: true }], W), line([], W)];
|
|
385
384
|
const tools = Object.values(view.data.tools?.tools ?? {});
|
|
386
|
-
const pathW = Math.max(0, ...tools.map((
|
|
387
|
-
for (const
|
|
388
|
-
const d = describe(
|
|
385
|
+
const pathW = Math.max(0, ...tools.map((r) => width(r.path)));
|
|
386
|
+
for (const r of tools) {
|
|
387
|
+
const d = describe(r, NOW);
|
|
389
388
|
// 일부 지원(○)은 폭이 모호한 글자라 기호 세트를 따른다.
|
|
390
|
-
const mark =
|
|
391
|
-
out.push(line([{ t: ` ${mark} `, fg: MARK_COLOR[
|
|
389
|
+
const mark = r.state === 'limited' ? glyphs().idle : d.mark;
|
|
390
|
+
out.push(line([{ t: ` ${mark} `, fg: MARK_COLOR[r.state], bold: true }, { t: pad(r.tool, 7), fg: PALETTE.tools[r.tool], bold: true }, { t: pad(d.state, 10), fg: PALETTE.text }, { t: pad(d.path, pathW + 2), fg: PALETTE.muted }, { t: d.detail, fg: PALETTE.info }], W));
|
|
392
391
|
if (d.hint) out.push(line([{ t: ` → ${d.hint}`, fg: PALETTE.info }], W));
|
|
393
392
|
}
|
|
394
|
-
if (!view.showEnded) out.push(line([], W), line([{ t:
|
|
393
|
+
if (!view.showEnded) out.push(line([], W), line([{ t: ` ${t('empty.show')}`, fg: PALETTE.info }, { t: 'e', fg: PALETTE.text, bold: true }, { t: t('empty.or'), fg: PALETTE.info }, { t: 'aitop --all', fg: PALETTE.text }], W));
|
|
395
394
|
return out;
|
|
396
395
|
}
|
|
397
396
|
|
|
@@ -406,7 +405,7 @@ export function topCost(sessions, costMode = 'api') {
|
|
|
406
405
|
export function tableBox(inner, W, count) {
|
|
407
406
|
const e = glyphs().edge.normal;
|
|
408
407
|
const ln = (t) => style({ fg: PALETTE.line }) + t + RESET;
|
|
409
|
-
const title = `
|
|
408
|
+
const title = ` ${t('table.title', { n: count })} `;
|
|
410
409
|
const top = line([{ t: e.tl + e.h, fg: PALETTE.line }, { t: title, fg: PALETTE.muted }, { t: e.h.repeat(Math.max(0, W - 3 - width(title))) + e.tr, fg: PALETTE.line }], W);
|
|
411
410
|
return [top, ...inner.map((l) => ln(`${e.v} `) + l + ln(` ${e.v}`)), line([{ t: e.bl + e.h.repeat(W - 2) + e.br, fg: PALETTE.line }], W)];
|
|
412
411
|
}
|
|
@@ -414,12 +413,15 @@ export function tableBox(inner, W, count) {
|
|
|
414
413
|
// 이 높이 이상이면 세션 표를 상자로 감싼다 (상자 테두리에 두 줄이 든다).
|
|
415
414
|
export const TABLE_BOX_H = 30;
|
|
416
415
|
|
|
416
|
+
// 묶음 이름. 응답 대기·고정·폴더 없음 묶음은 order.mjs 가 ko 이름을 붙이므로 화면에서 지금 언어로 바꾼다.
|
|
417
|
+
const groupName = (g) => (g.waiting ? t('group.waiting') : g.pinned ? t('group.pinned') : g.name === NO_FOLDER ? t('group.noFolder') : g.name);
|
|
418
|
+
|
|
417
419
|
// 묶기(g) 화면의 묶음 머리 한 줄: 이름 · 세션 수 · 묶음 비용. 세션 행보다 한 단계 흐리게 둔다.
|
|
418
420
|
export function groupRow(g, W) {
|
|
419
421
|
return line([
|
|
420
422
|
{ t: ' ▾ ', fg: PALETTE.info },
|
|
421
|
-
{ t: g
|
|
422
|
-
{ t: ` ${g.count}
|
|
423
|
+
{ t: groupName(g), fg: PALETTE.muted, bold: true },
|
|
424
|
+
{ t: ` ${t('group.count', { n: g.count })}`, fg: PALETTE.info },
|
|
423
425
|
...(g.cost > 0 || g.unknown ? [{ t: ' · ', fg: PALETTE.info }, { t: money(g.cost, g.unknown), fg: PALETTE.muted }] : []),
|
|
424
426
|
], W);
|
|
425
427
|
}
|
package/src/ui.mjs
CHANGED
|
@@ -7,6 +7,7 @@ import { TABLE_BOX_H, columns, emptyLines, filterSessions, groupRow, header, mem
|
|
|
7
7
|
import { detail } from './ui/detail.mjs';
|
|
8
8
|
import { detailOpen, footer, help } from './ui/chrome.mjs';
|
|
9
9
|
import { arrange } from './order.mjs';
|
|
10
|
+
import { t } from './i18n.mjs';
|
|
10
11
|
|
|
11
12
|
export { PALETTE, style } from './ui/theme.mjs';
|
|
12
13
|
export { money } from './ui/draw.mjs';
|
|
@@ -25,7 +26,7 @@ export function render(view, W, H) {
|
|
|
25
26
|
const lines = [];
|
|
26
27
|
if (!view.data) {
|
|
27
28
|
// 첫 수집은 동기로 돌아 이 화면이 다시 그려지지 않으므로 움직이지 않는 로고를 둔다.
|
|
28
|
-
const msg = `${BRAND.logo}
|
|
29
|
+
const msg = `${BRAND.logo} ${t('ui.loading')}`;
|
|
29
30
|
for (let i = 0; i < H; i++) lines.push(i === Math.floor(H / 2) ? line([{ t: ' '.repeat(Math.max(0, Math.floor((W - width(msg)) / 2))) }, { t: msg, fg: PALETTE.brand }], W) : line([], W));
|
|
30
31
|
return lines;
|
|
31
32
|
}
|
|
@@ -78,13 +79,13 @@ export function render(view, W, H) {
|
|
|
78
79
|
const isSession = (r) => r.s && !r.m;
|
|
79
80
|
const visible = rows.slice(start, start + shown);
|
|
80
81
|
const hot = topCost(visible.filter(isSession).map((r) => r.s), view.costMode);
|
|
81
|
-
if (!sessions.length) table.push(...(view.filter ? [line([{ t: `
|
|
82
|
+
if (!sessions.length) table.push(...(view.filter ? [line([{ t: ` ${t('ui.noMatch', { q: view.filter })}`, fg: PALETTE.muted, italic: true }], TW)] : emptyLines(view, TW)));
|
|
82
83
|
for (const r of visible) table.push(r.g ? groupRow(r.g, TW) : r.m ? memberRow(r.m, r.last, c, TW, view.frame, r.s.model, view.costMode) : sessionRow(r.s, c, TW, r.s === sel, view.frame, hot, view.costMode, Boolean(view.pins?.includes(r.s.id))));
|
|
83
84
|
if (clipped) {
|
|
84
85
|
const onScreen = new Set(visible.filter(isSession).map((r) => r.s));
|
|
85
86
|
const hidden = sessions.filter((s) => !onScreen.has(s));
|
|
86
87
|
const waitingHidden = hidden.filter((s) => s.status === 'waiting').length;
|
|
87
|
-
table.push(line([{ t: `
|
|
88
|
+
table.push(line([{ t: ` ${t('ui.more', { n: hidden.length })}`, fg: PALETTE.muted }, ...(waitingHidden ? [{ t: t('ui.moreWaiting', { n: waitingHidden }), fg: PALETTE.waiting, bold: true }] : []), { t: t('ui.moveHint'), fg: PALETTE.info }], TW));
|
|
88
89
|
}
|
|
89
90
|
lines.push(...(boxed ? tableBox(table, W, sessions.length) : table));
|
|
90
91
|
if (wantDetail) {
|