@sejuneoh/aitop 0.31.1 → 0.32.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 CHANGED
@@ -3,7 +3,7 @@
3
3
  [![npm](https://img.shields.io/npm/v/@sejuneoh/aitop)](https://www.npmjs.com/package/@sejuneoh/aitop)
4
4
  [![license: MIT](https://img.shields.io/badge/license-MIT-blue)](https://github.com/SejuneOh/aitop/blob/main/LICENSE)
5
5
 
6
- **`top` for your AI coding agents.** One live terminal screen for every Claude Code, Codex CLI and Antigravity CLI session on your machine. Read-only.
6
+ **`top` for your AI coding agents.** One live terminal screen for every Claude Code, Codex CLI and Antigravity CLI session on your machine. No hooks, read-only.
7
7
 
8
8
  ```bash
9
9
  npx @sejuneoh/aitop # try it, no install
@@ -14,13 +14,14 @@ npm i -g @sejuneoh/aitop # then just run: aitop
14
14
 
15
15
  - **See who needs you.** A waiting session jumps to the top and `n` takes you there. Add `--notify=waiting,done,context` for desktop alerts, or `aitop --line` for a tmux status line.
16
16
  - **Know which session is which.** Every row shows the session name (your `/rename` or the tool's title). `y` copies a resume command, and `--report sessions` prints yesterday's sessions with cost for your standup.
17
- - **All agents, all profiles, nothing sent.** Claude Code, Codex and Antigravity side by side, from [several history folders](#several-claude-or-codex-profiles) (`~/.claude`, `~/.claude-work`, ...). No network, no ports, no dependencies.
17
+ - **No hooks, nothing sent.** Claude Code, Codex CLI and Antigravity CLI side by side, from [several history folders](#several-claude-or-codex-profiles) (`~/.claude`, `~/.claude-work`, ...). aitop only reads the logs they already write. It changes no settings and needs no network, ports or dependencies.
18
18
 
19
19
  **How it differs from similar tools**
20
20
 
21
21
  - [ccusage](https://github.com/ryoppippi/ccusage) reports token usage and cost from local logs (daily, monthly, session, 5-hour blocks). aitop is a live session monitor first, with smaller cost reports on the side.
22
22
  - [abtop](https://github.com/graykode/abtop) is a Rust live dashboard for Claude Code, Codex CLI and OpenCode, with rate limits, ports and keys to kill sessions. aitop installs with npm, also covers Antigravity, and only watches.
23
23
  - [claude-code-monitor](https://github.com/onikan27/claude-code-monitor) watches Claude Code on macOS through hooks it adds to `~/.claude/settings.json`, with a phone web view. aitop adds no hooks and only reads existing logs, on Linux, macOS, WSL and Windows.
24
+ - [Agents Stack](https://marketplace.visualstudio.com/items?itemName=MykD.agents-stack) is a VS Code extension for Claude Code, Antigravity, Codex and Gemini CLI. It adds hooks to each agent's config, and Antigravity has no hook for approval waits, so those do not show. aitop runs in any terminal, adds no hooks and shows Antigravity sessions waiting for approval.
24
25
 
25
26
  ## Install
26
27
 
@@ -36,9 +37,9 @@ Native Windows support is early (Windows Terminal recommended): Claude Code and
36
37
 
37
38
  ## Features
38
39
 
39
- - **Live status** of every session and its subagents: thinking, running a tool, waiting for you, idle
40
+ - **Live status** of every session and its subagents: thinking, running a tool, waiting for you, idle. Subagent rows show how long they have run ([details](#subagents))
40
41
  - **Waiting alerts**: blocked sessions jump to the top, with optional bell, desktop notification or hook command
41
- - **Tokens and cost** per session and for today / last 7 days, at public API list prices
42
+ - **Tokens and cost** per session and for today / last 7 days, estimated at public API list prices. This is not your bill
42
43
  - **Changed files and diffs** per session and per prompt
43
44
  - **Read-only**: no network, no ports, no dependencies. It only reads the session logs each CLI already writes
44
45
 
@@ -65,6 +66,14 @@ To continue a session elsewhere (for example when you cannot jump to its tab, as
65
66
 
66
67
  In `--json`, `phase` stays the Korean status text in every language (as does `AITOP_WAITING_FOR` for `--on-waiting`). Session `name` uses the same user-given names as the table: a Codex session's `name` changes from the folder name to its `thread_name` once it has one. For scripts, use `phaseKind`, a stable state name: `think`, `write`, `tool`, `team`, `waiting`, `idle`, `done`, `ended` (or `null`). Other text fields follow their own rules: with English selected, `--doctor --json` has Korean `tools.*.hint` but English `config.problems`.
67
68
 
69
+ ### Subagents
70
+
71
+ Subagents show as `├─` rows under their session. While one works, its row shows how long it has run (`42s`, `3m12s`, `1h05m`).
72
+
73
+ A dim `stalled?` appears when a working subagent's log has not changed for 3 minutes. While it runs a tool that can be slow (Bash, PowerShell, a nested agent, web fetch or search, an MCP tool, agy `run_command`), the limit is 10 minutes. It is only a guess. It never shows while the session waits for you, and it does not change sorting, alerts, the window title or `--line`. `--json` has it per member as `stalled`, with `startedAt` and `lastActivityAt`.
74
+
75
+ When an Antigravity subagent waits for your approval, its parent row waits too, as `<agent>: <tool>`. So the session jumps to the top and counts for `n`, `--notify` and `--line`. If the parent waits itself, its own wait shows first. Other waiting subagents show on their own rows.
76
+
68
77
  ### Daily report
69
78
 
70
79
  `aitop --report daily` prints tokens and cost (API list price, like the header) per day, newest first, with a total row, then exits. Columns are per tool by default, per model with `--by model`, or per project with `--by project` (the last folder name of the working directory: Claude log `cwd`, Codex `turn_context.cwd`, agy workspace; Claude Code worktrees under `<repo>/.claude/worktrees/` count as the repo; `(unknown)` when missing; extra columns beyond the terminal width are merged into `(others)`, `--json` lists all with a `paths` map); `--days N` goes back up to 30 days, and `--json` gives the same numbers for scripts. The first run reads up to 30 days of logs, so it can take a while (progress shows on stderr); later runs use the cache.
@@ -82,7 +91,7 @@ aitop --report monthly --by model --months 6
82
91
 
83
92
  ### Session report
84
93
 
85
- `aitop --report sessions [--since yesterday|today|Nd|YYYY-MM-DD] [--plan USD] [--md|--json] [--show-prompts]` lists every session that used tokens in the period (default: since midnight yesterday; at most 30 days back), highest cost first: tool, main model (`+N` more), project (same rule as `--by project`), session name (your `/rename` name, then the tool's title, then the folder), start and end of activity within the period, tokens, cost (API list price, `?` for unpriced models) and files changed (`-` when unknown, always for agy). A summary card on top shows the total, the share per tool and the session count; `--plan 200` adds how many times the period's share of a $200/month subscription (period days / 30) you used, still in API list price and not your bill. Claude subagents are counted in their parent session. `--md` prints Markdown you can paste (`|` and line breaks escaped), `--json` the same numbers for scripts. First prompts are hidden unless you pass `--show-prompts`, so they do not end up in shared output (session names still show).
94
+ `aitop --report sessions [--since yesterday|today|Nd|YYYY-MM-DD] [--plan USD] [--md|--json] [--show-prompts]` lists every session that used tokens in the period (default: since midnight yesterday; at most 30 days back), highest cost first: tool, main model (`+N` more), project (same rule as `--by project`), session name (your `/rename` name, then the tool's title, then the folder), start and end of activity within the period, tokens, cost (API list price; unpriced models are left out, not guessed, and `--json` marks them with `unpriced`) and files changed (`-` when unknown, always for agy). A summary card on top shows the total, the share per tool and the session count; `--plan 200` adds how many times the period's share of a $200/month subscription (period days / 30) you used, still in API list price and not your bill. Claude subagents are counted in their parent session. `--md` prints Markdown you can paste (`|` and line breaks escaped), `--json` the same numbers for scripts. First prompts are hidden unless you pass `--show-prompts`, so they do not end up in shared output (session names still show).
86
95
 
87
96
  ```
88
97
  aitop --report sessions --md --plan 200
@@ -129,3 +138,5 @@ aitop reads `~/.claude` and `~/.codex` by default. To read more profiles, list t
129
138
  ## License
130
139
 
131
140
  [MIT](https://github.com/SejuneOh/aitop/blob/main/LICENSE)
141
+
142
+ Not affiliated with or endorsed by Anthropic, OpenAI or Google. Product names are trademarks of their owners.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sejuneoh/aitop",
3
- "version": "0.31.1",
3
+ "version": "0.32.0",
4
4
  "description": "터미널에서 Claude Code · Codex · Antigravity · Gemini 세션과 토큰을 실시간으로 보는 읽기 전용 모니터",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/i18n.mjs CHANGED
@@ -259,7 +259,7 @@ export const STRINGS = {
259
259
  'report.date': '날짜',
260
260
  'report.total': '합계',
261
261
  'report.empty': '이 기간에 기록된 사용량이 없습니다',
262
- 'report.unpriced': '? 가격표에 없는 모델이 있어 비용이 실제보다 적게 잡혔을 수 있습니다',
262
+ 'report.unpriced': '가격표에 없는 모델이 있어 비용이 실제보다 적게 잡혔을 수 있습니다',
263
263
  'report.partial': '시간 상한 안에 기록을 다 읽지 못해 일부만 셌습니다. 다시 실행하면 이어 읽습니다',
264
264
  'report.progress': '사용량 장부 읽는 중 {pct}% ({s}초)',
265
265
  'report.capped': '--days 는 장부가 남기는 {n}일까지만 볼 수 있어 {n}일로 줄입니다',
@@ -391,6 +391,7 @@ export const STRINGS = {
391
391
  'tools.hidden': '숨김 {list}',
392
392
  'tools.ended': '종료된 세션 포함 (24시간)',
393
393
  'table.title': '세션 {n}',
394
+ 'member.stalled': '멈춘 듯',
394
395
  'group.count': '{n}개',
395
396
  'group.waiting': '응답 대기',
396
397
  'group.pinned': '고정',
@@ -446,7 +447,7 @@ export const STRINGS = {
446
447
  'legend.pin': '고정한 세션 (p). SESSION 칸 앞에 붙는다',
447
448
  'legend.status': '지금 단계. 큰 기록을 처음 읽는 동안은 기록 읽는 중 N%',
448
449
  'legend.tokens': '세션 누적 토큰 (서브에이전트 포함, 캐시 읽기 포함)',
449
- 'legend.cost': 'API 정가로 환산한 비용 (Codex 는 OpenAI 정가 추정). ? 는 가격표에 없는 모델 포함',
450
+ 'legend.cost': 'API 정가로 환산한 비용 (Codex 는 OpenAI 정가 추정). 가격표에 없는 모델은 빼고 센다',
450
451
  'legend.context': '마지막 요청의 컨텍스트 사용률 (모델별 창 크기 기준)',
451
452
  'legend.idleCol': '마지막 활동 후 지난 시간. 작업 중이면 now',
452
453
  'legend.hiddenKey': '숨김 N',
@@ -562,7 +563,7 @@ export const STRINGS = {
562
563
  'detail.netLabel': '캐시제외',
563
564
  'detail.apiValue': 'API 환산 {v}',
564
565
  'detail.netValue': '캐시 제외 {v}',
565
- 'detail.unpriced': ' ? 가격표에 없는 모델 포함',
566
+ 'detail.unpriced': ' 가격표에 없는 모델은 빼고 셈',
566
567
 
567
568
  // 데스크톱 알림 (--notify). 화면 언어를 따른다.
568
569
  'notify.one': 'aitop: 응답 대기 ({tool})',
@@ -661,7 +662,7 @@ export const STRINGS = {
661
662
  'report.date': 'Date',
662
663
  'report.total': 'Total',
663
664
  'report.empty': 'No usage recorded in this period',
664
- 'report.unpriced': '? includes unpriced models, so the cost may be lower than actual',
665
+ 'report.unpriced': 'Includes unpriced models, so the cost may be lower than actual',
665
666
  'report.partial': 'Could not read all logs within the time limit, so this is partial. Run again to continue',
666
667
  'report.progress': 'Reading usage logs {pct}% ({s}s)',
667
668
  'report.capped': '--days is limited to the {n} days the ledger keeps, using {n}',
@@ -790,6 +791,7 @@ export const STRINGS = {
790
791
  'tools.hidden': 'hidden {list}',
791
792
  'tools.ended': 'with ended sessions (24h)',
792
793
  'table.title': 'Sessions {n}',
794
+ 'member.stalled': 'stalled?',
793
795
  'group.count': '{n}',
794
796
  'group.waiting': 'Waiting',
795
797
  'group.pinned': 'Pinned',
@@ -845,7 +847,7 @@ export const STRINGS = {
845
847
  'legend.pin': 'Pinned session (p), before SESSION',
846
848
  'legend.status': 'Current step (Reading log N% on first load)',
847
849
  'legend.tokens': 'Tokens incl. subagents and cache reads',
848
- 'legend.cost': 'API cost (Codex estimated). ? = unpriced',
850
+ 'legend.cost': 'API cost (Codex estimated). Unpriced models not counted',
849
851
  'legend.context': 'Context used by the last request',
850
852
  'legend.idleCol': 'Time since last activity. now while working',
851
853
  'legend.hiddenKey': 'hidden N',
@@ -958,7 +960,7 @@ export const STRINGS = {
958
960
  'detail.netLabel': 'No cache',
959
961
  'detail.apiValue': 'API cost {v}',
960
962
  'detail.netValue': 'no cache {v}',
961
- 'detail.unpriced': ' ? includes unpriced models',
963
+ 'detail.unpriced': ' unpriced models not counted',
962
964
 
963
965
  'notify.one': 'aitop: waiting ({tool})',
964
966
  'notify.title': 'aitop: waiting',
package/src/json.mjs CHANGED
@@ -2,6 +2,7 @@ import { projectBudget } from './budget.mjs';
2
2
  import { toolsJson } from './doctor.mjs';
3
3
  import { phaseText } from './i18n.mjs';
4
4
  import { resumeCmd } from './resume.mjs';
5
+ import { memberStalled } from './sources/common.mjs';
5
6
 
6
7
  // aitop --json 출력. 다른 스크립트나 AI 가 읽기 쉬운 모양으로 세션 목록과 사용량 합계를 담는다.
7
8
  // 텍스트는 수집 단계에서 이미 비밀값 가림이 적용돼 있다.
@@ -60,7 +61,9 @@ export function toJson(data, version = null, opts = {}) {
60
61
  context: { used: s.context?.used ?? 0, window: s.context?.window ?? null },
61
62
  // 변경 내용(diff)은 넣지 않고 파일별 통계만 넣는다. 줄 수는 편집마다 더한 누적값이다 (git diff 아님).
62
63
  files: (s.files ?? []).map((f) => ({ path: f.path, created: Boolean(f.created), edits: f.edits, writtenLines: f.add, deletedLines: f.del, updatedAt: iso(f.at), agents: f.agents ?? [] })),
63
- members: (s.members ?? []).map((m) => ({ name: m.name, task: m.task ?? null, model: m.model ?? null, status: m.status, phase: koPhase(m.phase), phaseKind: m.phase?.kind ?? null, tokens: m.tokens ?? 0, cost: money(m.cost) })),
64
+ // startedAt·lastActivityAt 은 세션의 startedAt·updatedAt 과 같은 ISO 시각이다 (모르면 null).
65
+ // stalled 는 화면의 '멈춘 듯' 과 같은 짐작(common.mjs memberStalled)을 data.at 기준으로 본 값이다.
66
+ members: (s.members ?? []).map((m) => ({ name: m.name, task: m.task ?? null, model: m.model ?? null, status: m.status, phase: koPhase(m.phase), phaseKind: m.phase?.kind ?? null, tokens: m.tokens ?? 0, cost: money(m.cost), startedAt: iso(m.startedAt), lastActivityAt: iso(m.lastActivityAt), stalled: memberStalled(m, data.at ?? Date.now(), s.status) })),
64
67
  })),
65
68
  };
66
69
  }
package/src/report.mjs CHANGED
@@ -289,7 +289,7 @@ function foldOthers(columns, keep, lines) {
289
289
  }
290
290
 
291
291
  // --json 모양: 키는 영어, 값은 숫자만 (날짜·이름은 문자열). partial: 시간 상한 때문에 덜 읽었는지.
292
- // 칸마다 unpriced(가격표에 없는 모델이 끼었는지)를 참·거짓으로 둔다. 화면의 ? 와 같은 뜻이다.
292
+ // 칸마다 unpriced(가격표에 없는 모델이 끼었는지)를 참·거짓으로 둔다. 그 몫은 비용에서 빠져 있다.
293
293
  export function reportJson(r, version, { partial = false } = {}) {
294
294
  const items = (o) => Object.fromEntries(r.columns.map((c) => [c, { tokens: o.items[c]?.tokens ?? 0, cost: o.items[c]?.cost ?? 0, unpriced: Boolean(o.items[c]?.unpriced) }]));
295
295
  const monthly = r.report === 'monthly';
@@ -312,7 +312,7 @@ export function reportJson(r, version, { partial = false } = {}) {
312
312
  }
313
313
 
314
314
  // 칸 하나: '1.2M $3.40'. 토큰이 없으면 '-'. 가격표에 없는 모델이 끼었으면 화면 헤더처럼 비용 뒤에 ? 를 붙인다 ('$12.30?').
315
- const cell = (x) => (x && (x.tokens > 0 || x.cost > 0) ? `${fmtTokens(Math.round(x.tokens))} ${money(x.cost)}${x.unpriced ? '?' : ''}` : '-');
315
+ const cell = (x) => (x && (x.tokens > 0 || x.cost > 0) ? `${fmtTokens(Math.round(x.tokens))} ${x.unpriced && !(x.cost > 0) ? '-' : money(x.cost)}` : '-');
316
316
 
317
317
  // 사람이 읽는 표. 머리글·합계 줄 문구는 화면 언어(t)를 따른다. 도구·모델·프로젝트 이름은 그대로 쓴다.
318
318
  const colName = (c) => (c === UNKNOWN ? t('report.unknown') : c === OTHERS ? t('report.others') : truncate(stripControl(c), HEAD_MAX));
@@ -288,7 +288,7 @@ const mdhm = (ms) => {
288
288
  // 끝 시각: 시작과 같은 날이면 시:분만.
289
289
  const endText = (x) => (x.end == null ? '-' : x.start != null && dayKey(x.start) === dayKey(x.end) ? hm(new Date(x.end)) : mdhm(x.end));
290
290
  const startText = (x) => (x.start == null ? '-' : mdhm(x.start));
291
- const costText = (x) => (used(x) ? `${money(x.cost)}${x.unpriced ? '?' : ''}` : '-');
291
+ const costText = (x) => (used(x) && !(x.unpriced && !(x.cost > 0)) ? money(x.cost) : '-');
292
292
  const filesText = (x) => (x.files == null ? '-' : `${x.files}${x.filesMore ? '+' : ''}`);
293
293
  const modelText = (x) => (x.model ? `${x.model}${x.models.length > 1 ? ` +${x.models.length - 1}` : ''}` : '-');
294
294
  const projectText = (x) => (x.project === UNKNOWN ? t('report.unknown') : x.project);
@@ -304,7 +304,7 @@ const daysText = (n) => (n >= 10 ? String(Math.round(n)) : n.toFixed(1));
304
304
  function cardLines(r, md = false) {
305
305
  const s = r.summary;
306
306
  const b = (x) => (md ? `**${x}**` : x);
307
- const out = [t('sessions.cardTotal', { cost: b(`${money(s.cost)}${s.unpriced ? '?' : ''}`), tokens: fmtTokens(Math.round(s.tokens)), n: s.sessions })];
307
+ const out = [t('sessions.cardTotal', { cost: b(s.unpriced && !(s.cost > 0) ? '-' : money(s.cost)), tokens: fmtTokens(Math.round(s.tokens)), n: s.sessions })];
308
308
  const tools = Object.entries(s.tools).map(([tool, o]) => `${tool} ${pct(o.share)}`);
309
309
  if (tools.length) out.push(t(s.shareBy === 'cost' ? 'sessions.cardTools' : 'sessions.cardToolsTokens', { tools: tools.join(' · ') }));
310
310
  if (s.plan) {
@@ -9,7 +9,7 @@ import { homedir } from 'node:os';
9
9
  import { fileURLToPath } from 'node:url';
10
10
  import { openReadOnly, loadSqlite } from '../sqlite.mjs';
11
11
  import { findProcesses, isAgy, openFiles } from '../procs.mjs';
12
- import { addActivity, emptyTokens, mergeActivity, pushEvent, describeTool, toolDetail, isNoisePrompt, MEMBER_FADE_MS } from './common.mjs';
12
+ import { addActivity, emptyTokens, mergeActivity, pushEvent, describeTool, toolDetail, isNoisePrompt, isLongTool, MEMBER_FADE_MS } from './common.mjs';
13
13
  import { contextWindow, geminiCost } from '../pricing.mjs';
14
14
  import { debug, debugIo } from '../log.mjs';
15
15
 
@@ -245,6 +245,8 @@ const fresh = () => ({
245
245
  events: [],
246
246
  turns: [],
247
247
  turnCount: 0,
248
+ // 읽은 단계 가운데 가장 이른 만든 시각 (서브에이전트 경과 시간의 기준).
249
+ firstAt: null,
248
250
  lastTool: null,
249
251
  last: null,
250
252
  // 아직 바뀌는 중인 단계 가운데 가장 뒤의 것 (지금 무엇을 하는지 보이는 데 쓴다).
@@ -426,6 +428,7 @@ function addEvent(n, at, kind, text) {
426
428
 
427
429
  function applyStep(n, s, idx) {
428
430
  if (!s) return;
431
+ if (s.at && (n.firstAt == null || s.at < n.firstAt)) n.firstAt = s.at;
429
432
  const at = s.at ? new Date(s.at).toISOString() : null;
430
433
  if (s.type === STEP.PROMPT) {
431
434
  if (s.text && !isNoisePrompt(s.text)) {
@@ -599,22 +602,28 @@ export function matchLive(procs, rows, filesOf = openFiles, dir = AGY_ROOT) {
599
602
  return { live, loose };
600
603
  }
601
604
 
602
- function member(r, g) {
605
+ // wait: 이 서브에이전트가 허락을 기다리는 도구 (subWait 가 정한다). 기다리면 상태를 'waiting' 으로 두고 무엇을 기다리는지 보인다.
606
+ function member(r, g, wait = null) {
603
607
  return {
604
608
  id: r.id,
605
609
  name: r.agent || 'agent',
606
610
  model: g.model,
607
611
  task: r.title ?? '',
608
- status: r.running ? 'busy' : 'done',
612
+ status: wait ? 'waiting' : r.running ? 'busy' : 'done',
609
613
  started: g.tokens.total > 0,
610
- phase: r.running ? { kind: 'think', msg: 'steps', args: { n: r.steps } } : { kind: 'done' },
614
+ phase: wait ? { kind: 'waiting', args: { what: wait } } : r.running ? { kind: 'think', msg: 'steps', args: { n: r.steps } } : { kind: 'done' },
611
615
  now: '',
612
616
  tokens: g.tokens.total,
613
617
  cost: g.cost,
614
618
  costNoCache: g.costNoCache,
615
619
  costUnknown: g.costUnknown,
616
- // 기록에 시작 시각이 없어 마지막으로 바뀐 시각을 둔다 (정렬용).
620
+ // 대화 목록에는 시작 시각이 없어 마지막으로 바뀐 시각을 둔다 (정렬용).
617
621
  updatedAt: r.updatedAt,
622
+ // 경과 시간의 기준은 읽은 단계 가운데 가장 이른 만든 시각, 멈춘 듯 판단은 대화 목록의 마지막 수정 시각이다.
623
+ startedAt: g.firstAt ?? null,
624
+ lastActivityAt: r.updatedAt ?? null,
625
+ // 실행 중인 단계가 run_command 처럼 오래 걸릴 수 있는 도구면 멈춘 듯 기준을 길게 잡는다 (common.mjs).
626
+ longStep: Boolean(r.running && g.open?.type === STEP.TOOL && isLongTool(g.open.tool?.name)),
618
627
  };
619
628
  }
620
629
 
@@ -638,13 +647,22 @@ export function waitingFor(g) {
638
647
  return w.what;
639
648
  }
640
649
 
650
+ // 서브에이전트가 허락을 기다리는지. 부모와 같은 규칙(waitingFor: steps status 9, 본 뒤 -wal 이 바뀌면 대기 아님)을 쓴다.
651
+ // 부모 세션이 살아 있고 서브에이전트 자신도 아직 실행 중(r.running)일 때만 센다. 끝난 서브에이전트에 남은 9 는
652
+ // 허락 없이 끝난 흔적이라 무시한다.
653
+ export function subWait(parentLive, r, g) {
654
+ if (!parentLive || !r.running) return null;
655
+ return waitingFor(g);
656
+ }
657
+
641
658
  // 실행 중일 때는 아직 바뀌는 중인 단계, 없으면 마지막으로 끝난 단계로 지금 할 일을 짐작한다.
642
659
  // 끝난 답변이 도구 호출을 냈으면 그 도구를 실행할 차례이고, 끝난 도구 호출 뒤에는 모델이 결과를 읽고 생각한다.
643
- export function phaseOf(live, r, g, runningMembers = 0) {
660
+ // kidWait: 부모가 기다리지 않을 때 대신 보일 서브에이전트의 허락 대기 문구 (collectAgy 가 정한다).
661
+ export function phaseOf(live, r, g, runningMembers = 0, kidWait = null) {
644
662
  if (!live) return { kind: 'ended' };
645
663
  // 같이 도는 에이전트 수는 args.agents 로 보내고, 화면이 문구 뒤에 붙인다.
646
664
  const extra = runningMembers ? { agents: runningMembers } : {};
647
- const wait = waitingFor(g);
665
+ const wait = waitingFor(g) ?? kidWait;
648
666
  if (wait) return { kind: 'waiting', args: { what: wait, ...extra } };
649
667
  if (!r.running) return { kind: 'idle' };
650
668
  // 바뀌는 중인 단계와 끝난 단계 가운데 더 뒤의 것이 지금 하는 일이다 (앞의 명령이 오래 도는 동안 뒤 단계가 이어질 수 있다).
@@ -708,10 +726,11 @@ export function collectAgy({ showEnded, budget }) {
708
726
  const kids = children.get(r.id) ?? [];
709
727
  // 서브에이전트 기록은 한 번만 읽어 행과 합계가 같은 값을 쓰게 한다.
710
728
  const kidUsage = kids.map((c) => readConversation(c.id, budget));
729
+ const kidWaits = kids.map((c, i) => subWait(isLive, c, kidUsage[i]));
711
730
  // 끝난 서브에이전트는 Claude 팀원처럼 잠시 "완료"로 보였다가 행에서 빠진다. 합계에는 그대로 남는다.
712
731
  const members = kids
713
- .map((c, i) => member(c, kidUsage[i]))
714
- .filter((m) => m.status === 'busy' || (m.updatedAt != null && Date.now() - m.updatedAt <= MEMBER_FADE_MS))
732
+ .map((c, i) => member(c, kidUsage[i], kidWaits[i]))
733
+ .filter((m) => m.status !== 'done' || (m.updatedAt != null && Date.now() - m.updatedAt <= MEMBER_FADE_MS))
715
734
  .sort((a, b) => (a.updatedAt ?? 0) - (b.updatedAt ?? 0));
716
735
  // 메인과 서브에이전트를 항목별로 더한다 (Claude 세션과 같은 방식).
717
736
  const tokens = { ...g.tokens, main: g.tokens.total, sub: 0, subCount: kids.length };
@@ -726,8 +745,23 @@ export function collectAgy({ showEnded, budget }) {
726
745
  costNoCache += u.costNoCache;
727
746
  costUnknown ||= u.costUnknown;
728
747
  }
729
- const running = members.filter((m) => m.status === 'busy').length;
730
- const wait = isLive ? waitingFor(g) : null;
748
+ // 허락을 기다리는 서브에이전트도 아직 끝나지 않았으니 같이 도는 에이전트로 센다.
749
+ const running = members.filter((m) => m.status !== 'done').length;
750
+ // 부모 행의 대기 규칙:
751
+ // 1. 부모 대화가 허락을 기다리면 그것을 보인다. 부모와 서브가 함께 기다려도 부모 것이 먼저다.
752
+ // 2. 아니면 기다리는 서브에이전트 가운데 가장 오래 기다린 것(마지막으로 바뀐 시각이 가장 이른 것)을 '이름: 도구' 로 보인다.
753
+ // 나머지 서브에이전트의 대기는 각자의 팀원 행에 보인다.
754
+ // 대기 정렬·--notify·--line·summary.json 은 세션의 status·waitingFor·waitSince 를 쓰므로 이것으로 함께 바뀐다.
755
+ const own = isLive ? waitingFor(g) : null;
756
+ let kidIdx = -1;
757
+ if (!own) {
758
+ for (let i = 0; i < kids.length; i++) {
759
+ if (kidWaits[i] && (kidIdx < 0 || (kids[i].updatedAt ?? Infinity) < (kids[kidIdx].updatedAt ?? Infinity))) kidIdx = i;
760
+ }
761
+ }
762
+ const kidWait = kidIdx >= 0 ? `${kids[kidIdx].agent || 'agent'}: ${kidWaits[kidIdx]}` : null;
763
+ const wait = own ?? kidWait;
764
+ const waitDetail = own ? (g.wait.detail ?? own) : kidWait ? (kidUsage[kidIdx].wait?.detail ?? kidWaits[kidIdx]) : null;
731
765
  out.push({
732
766
  tool: 'gemini',
733
767
  id: r.id,
@@ -740,17 +774,17 @@ export function collectAgy({ showEnded, budget }) {
740
774
  model: g.model,
741
775
  live: isLive,
742
776
  status: !isLive ? 'ended' : wait ? 'waiting' : r.running ? 'busy' : 'idle',
743
- phase: phaseOf(isLive, r, g, running),
777
+ phase: phaseOf(isLive, r, g, running, kidWait),
744
778
  cost,
745
779
  costNoCache,
746
780
  costUnknown,
747
781
  waitingFor: wait,
748
- waitDetail: wait ? (g.wait.detail ?? wait) : null,
782
+ waitDetail,
749
783
  now: g.lastTool ?? g.events.at(-1)?.text ?? '',
750
784
  startedAt: null,
751
785
  updatedAt: r.updatedAt ?? Date.now(),
752
786
  // 대기 시작 시각 (--line 요약용). 기록에 시각이 없으면 지금 시각으로 메우지 않고 null.
753
- waitSince: wait ? (r.updatedAt ?? null) : null,
787
+ waitSince: own ? (r.updatedAt ?? null) : kidWait ? (kids[kidIdx].updatedAt ?? null) : null,
754
788
  tokens,
755
789
  context: { used: g.prompt, window: contextWindow(g.model, g.prompt) },
756
790
  events: g.events,
@@ -74,7 +74,7 @@ export class ClaudeTracker {
74
74
  this.tokens = emptyTokens();
75
75
  this.cost = 0;
76
76
  this.costNoCache = 0;
77
- // 가격표에 없는 모델의 사용량이 섞였는지. 그 몫은 비용에 넣지 않고 화면에 '?' 로 알린다.
77
+ // 가격표에 없는 모델의 사용량이 섞였는지. 그 몫은 비용에 넣지 않는다 (--json 의 costUnknown, 상세 패널 안내 줄).
78
78
  this.costUnknown = false;
79
79
  this.context = 0;
80
80
  this.model = null;
@@ -7,7 +7,7 @@ import { contextWindow } from '../pricing.mjs';
7
7
  import { join, basename } from 'node:path';
8
8
  import { isSessionAlive } from '../procs.mjs';
9
9
  import { ClaudeTracker, tailCustomTitle } from './claude-tracker.mjs';
10
- import { emptyTokens, mergeActivity, MEMBER_FADE_MS, sessionName } from './common.mjs';
10
+ import { emptyTokens, isLongTool, mergeActivity, MEMBER_FADE_MS, sessionName } from './common.mjs';
11
11
  import { mergeFiles } from './files.mjs';
12
12
  import { debug, debugIo } from '../log.mjs';
13
13
  import { claudeDirs, claudeProjectRoots, dedupeBy } from './dirs.mjs';
@@ -148,7 +148,11 @@ function readMembers(transcript, parent, budget) {
148
148
  costNoCache: t.costNoCache,
149
149
  costUnknown: t.costUnknown,
150
150
  loading: t.loading != null,
151
- startedAt: t.events[0]?.at,
151
+ // 경과 시간의 기준은 서브에이전트 기록의 첫 줄 시각, 멈춘 듯 판단은 기록 파일의 마지막 수정 시각이다.
152
+ startedAt: t.firstAt ?? t.events[0]?.at,
153
+ lastActivityAt: t.mtimeMs || null,
154
+ // Bash 처럼 결과가 오기까지 오래 걸릴 수 있는 도구가 도는 중이면 멈춘 듯 기준을 길게 잡는다 (common.mjs).
155
+ longStep: [...t.pending.values()].some((p) => isLongTool(p.name)),
152
156
  });
153
157
  }
154
158
  members.sort((a, b) => (a.startedAt ?? 0) - (b.startedAt ?? 0));
@@ -5,6 +5,29 @@ export const MAX_EVENTS = 40;
5
5
  // 끝난 서브에이전트(팀원)는 이 시간 동안 "완료"로 보였다가 목록에서 사라진다.
6
6
  export const MEMBER_FADE_MS = 6000;
7
7
 
8
+ // 작업 중인 서브에이전트가 '멈춘 듯' 보이기까지 기록이 바뀌지 않은 시간.
9
+ // 서브에이전트는 모델 응답 한 번, 도구 결과 한 번마다 기록에 한 줄을 쓴다. 긴 생각을 하는 응답도 대개 1~2분 안에 끝나므로
10
+ // 3분 동안 한 줄도 없으면 드문 일로 본다. 다만 Bash 같은 도구가 도는 동안에는 결과가 올 때까지 쓰지 않는데,
11
+ // Claude Code 의 Bash 시간 제한이 최대 10분이라 그런 단계에서는 10분을 기다린다.
12
+ // 짐작일 뿐이라 화면에 흐리게만 보이고 정렬·알림·창 제목·--line 에는 쓰지 않는다.
13
+ export const MEMBER_STALL_MS = 3 * 60_000;
14
+ export const MEMBER_STALL_LONG_MS = 10 * 60_000;
15
+ // 결과가 올 때까지 오래 기록이 없을 수 있는 도구 (Claude·agy 이름). 서브에이전트 안의 서브에이전트(Agent·Task)도 그동안 쓰지 않는다.
16
+ // Skill 은 지침 글을 바로 돌려주는 도구라 넣지 않는다.
17
+ export const LONG_TOOLS = new Set(['Bash', 'PowerShell', 'Agent', 'Task', 'WebFetch', 'WebSearch', 'run_command', 'shell', 'call_mcp_tool']);
18
+ // MCP 도구(mcp__서버__도구, agy 는 call_mcp_tool)는 바깥 서버가 응답할 때까지 기다리므로 얼마나 걸릴지 알 수 없어 오래 걸리는 쪽으로 본다.
19
+ export const isLongTool = (name) => LONG_TOOLS.has(name) || String(name ?? '').startsWith('mcp__');
20
+
21
+ // m: 수집기가 만든 팀원. status 'busy' 이고 lastActivityAt 이 기준보다 오래됐으면 true. longStep 이면 긴 기준을 쓴다.
22
+ // 허락을 기다리는 동안은 기록이 멈추는 것이 정상이므로, 팀원이 응답 대기('waiting')이거나 부모 세션(parentStatus)이
23
+ // 응답 대기면 멈춘 듯으로 보지 않는다 (Claude 는 서브에이전트의 허락 요청이 부모 세션의 대기로만 보인다).
24
+ // 팀원 쪽은 'busy' 가 아니면(대기·완료 모두) 따로 보지 않고 false 다. 부모가 기다리면 형제 팀원의 표시도 함께 꺼진다 (덜 알리는 쪽).
25
+ export function memberStalled(m, now = Date.now(), parentStatus = null) {
26
+ if (parentStatus === 'waiting') return false;
27
+ if (m?.status !== 'busy' || !Number.isFinite(m.lastActivityAt)) return false;
28
+ return now - m.lastActivityAt >= (m.longStep ? MEMBER_STALL_LONG_MS : MEMBER_STALL_MS);
29
+ }
30
+
8
31
  export function emptyTokens() {
9
32
  return { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 };
10
33
  }
package/src/text.mjs CHANGED
@@ -254,3 +254,12 @@ export function fmtAgo(ms) {
254
254
  if (s < 86400) return Math.floor(s / 3600) + 'h';
255
255
  return Math.floor(s / 86400) + 'd';
256
256
  }
257
+
258
+ // 서브에이전트 경과 시간. 1분 아래는 42s, 1시간 아래는 3m12s, 그 위는 1h05m (초는 버린다).
259
+ export function fmtElapsed(ms) {
260
+ const s = Math.max(0, Math.floor(ms / 1000));
261
+ const two = (n) => String(n).padStart(2, '0');
262
+ if (s < 60) return `${s}s`;
263
+ if (s < 3600) return `${Math.floor(s / 60)}m${two(s % 60)}s`;
264
+ return `${Math.floor(s / 3600)}h${two(Math.floor(s / 60) % 60)}m`;
265
+ }
package/src/ui/draw.mjs CHANGED
@@ -76,13 +76,14 @@ export function gauge(used, total, cells) {
76
76
 
77
77
  export const dollars = (usd) => (usd >= 1000 ? `$${Math.round(usd).toLocaleString('en-US')}` : usd >= 100 ? `$${usd.toFixed(0)}` : `$${usd.toFixed(2)}`);
78
78
 
79
- // 비용을 모르는 도구는 '-'. 가격표에 없는 모델이 섞이면 아는 몫 뒤에 '?' 를 붙이고, 아는 몫이 없으면 '?' 만 보인다.
79
+ // 비용을 모르는 도구는 '-'. 가격표에 없는 모델이 섞이면 아는 몫만 보이고(표시는 붙이지 않는다), 아는 몫이 없으면 '-'.
80
+ // 가격표에 없는 모델이 섞였는지는 --json 의 unpriced·costUnknown 과 상세 패널 안내 줄로 알린다.
80
81
  // 비용 표시 기준: 'api' 는 API 정가 환산(캐시 포함), 'net' 은 캐시 읽기·쓰기를 뺀 입력·출력만.
81
82
  export const costOf = (x, mode = 'api') => (mode === 'net' ? x?.costNoCache ?? null : x?.cost ?? null);
82
83
 
83
84
  export function money(usd, unknown = false) {
84
85
  if (usd == null) return '-';
85
- if (unknown) return usd > 0 ? `${dollars(usd)}?` : '?';
86
+ if (unknown && !(usd > 0)) return '-';
86
87
  return dollars(usd);
87
88
  }
88
89
 
package/src/ui/table.mjs CHANGED
@@ -2,7 +2,8 @@
2
2
  import { describe } from '../doctor.mjs';
3
3
  import { BRAND } from '../brand.mjs';
4
4
  import { projectBudget } from '../budget.mjs';
5
- import { fmtAgo, fmtTokens, pad, truncate, width } from '../text.mjs';
5
+ import { fmtAgo, fmtElapsed, fmtTokens, pad, truncate, width } from '../text.mjs';
6
+ import { memberStalled } from '../sources/common.mjs';
6
7
  import { BUDGET_COLOR, PALETTE, PHASE_COLOR, RESET, style } from './theme.mjs';
7
8
  import { NOW, SPIN, clock, costOf, gauge, glyph, levelBar, line, money, segsWidth, shortModel } from './draw.mjs';
8
9
  import { glyphs } from './glyphs.mjs';
@@ -52,10 +53,10 @@ export function columns(W) {
52
53
 
53
54
  // 헤더의 7일 비용 막대. days: usage.days7 (오래된 날 → 오늘). 7일 중 가장 큰 날을 █ 로 맞춘다.
54
55
  // 비용이 0 인 날은 ▁ 를 장식 색(faint)으로, 쓴 날은 ▂~█ 로 그린다. 색이 없어도 쓴 날(▂ 이상)과 안 쓴 날(▁)이 갈린다.
55
- // 가격표에 없는 모델만 쓴 날(아는 비용 0)은 쓰지 않은 날과 헷갈리지 않게 ? 로 둔다.
56
+ // 가격표에 없는 모델만 쓴 날(아는 비용 0)은 쓰지 않은 날과 헷갈리지 않게 가장 낮은 '쓴 날' 막대(▂)를 흐린 색으로 둔다.
56
57
  export function weekBar(days, costMode = 'api') {
57
58
  const bar = levelBar(days.map((d) => costOf(d, costMode)));
58
- return bar.map((x, i) => (x.t === glyphs().week[0] && days[i].unknown ? { t: '?', fg: PALETTE.muted } : x));
59
+ return bar.map((x, i) => (x.t === glyphs().week[0] && days[i].unknown ? { t: glyphs().week[1], fg: PALETTE.muted } : x));
59
60
  }
60
61
 
61
62
  export function header(view, W) {
@@ -109,7 +110,7 @@ export function header(view, W) {
109
110
  const bud = u ? projectBudget(u, view.budgetDay, { now: view.data.at ?? Date.now() }) : null;
110
111
  const ofBudget = bud ? [{ t: `/${Number.isInteger(bud.day) ? `$${bud.day.toLocaleString('en-US')}` : `$${bud.day.toFixed(2)}`}`, fg: PALETTE.muted, bg: B }] : [];
111
112
  // 캐시 제외 화면에서 예산 칸 없이 예상만 남으면 캐시 제외 금액으로 읽히지 않게 'API 예상' 이라고 적는다.
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);
113
+ const projOf = (label) => (bud && bud.level !== 'ok' ? { t: `${label} ${usd(bud.projected)}${bud.level === 'warn' ? '!' : ''}`, fg: BUDGET_COLOR[bud.level], bg: B, bold: true } : null);
113
114
  const projSeg = projOf(t('hdr.proj'));
114
115
  const projApi = net ? projOf(t('hdr.projApi')) : projSeg;
115
116
  // budget: 'full' | 'proj' (아래 right 참고). 오늘 칸 뒤에 붙는 예산 칸.
@@ -126,9 +127,8 @@ export function header(view, W) {
126
127
  ...(tok ? [{ t: ` ${fmtTokens(p.tokens)}`, fg: PALETTE.info, bg: B }] : []),
127
128
  ];
128
129
  // 지출 속도: 최근 1시간 비용(5분 칸 근사)을 시간당으로. 0 이거나 아직 집계 중이면 숨기고, 폭이 모자라면 가장 먼저 뺀다.
129
- // 아는 몫이 0 인데 가격표에 없는 모델이 섞였으면 금액 없이 (?/h) 만 보인다.
130
130
  const hour = u?.lastHour && u.loading == null ? (net ? u.lastHour.costNoCache : u.lastHour.cost) : null;
131
- const rateText = hour >= 0.005 ? `${usd(hour)}${u.lastHour.unknown ? '?' : ''}` : hour != null && u.lastHour.unknown ? '?' : null;
131
+ const rateText = hour >= 0.005 ? usd(hour) : null;
132
132
  const rate = rateText ? [{ t: ` (${rateText}/h)`, fg: PALETTE.muted, bg: B }] : null;
133
133
  // bar: 7일 금액 뒤의 날짜별 막대. 집계 중이거나 날짜별 값이 없으면 넣지 않는다.
134
134
  const bar = u?.loading == null && u?.days7?.length ? [{ t: ' ', bg: B }, ...weekBar(u.days7, view.costMode).map((x) => ({ ...x, bg: B }))] : null;
@@ -367,8 +367,10 @@ const pendingGauge = (cells) => [{ t: glyphs().bar.empty.repeat(cells), fg: PALE
367
367
  export const statusText = (phase) => phaseText(phase, { short: true });
368
368
 
369
369
  // 메인 세션 아래에 붙는 팀원(서브에이전트) 행. 끝나면 잠깐 "완료"로 보였다가 사라진다.
370
- // parentModel: 부모와 같은 모델이면 모델 칸을 비운다. costMode: 'api' | 'net'.
371
- export function memberRow(m, last, c, W, frame, parentModel, costMode = 'api') {
370
+ // parentModel: 부모와 같은 모델이면 모델 칸을 비운다. costMode: 'api' | 'net'. parentStatus: 부모 세션 상태 (응답 대기면 멈춘 듯을 붙이지 않는다).
371
+ // 경과 시간은 초 단위로 바뀌지만 타이머를 따로 두지 않는다. 작업 중인 팀원이 있으면 ui.mjs animating() 이 이미 참이라
372
+ // 스피너 틱(120ms)마다 다시 그리고 있고, 그 틱에 실려 바뀐다. 끝난 팀원(done)은 경과 시간을 그리지 않아 틱을 붙잡지 않는다.
373
+ export function memberRow(m, last, c, W, frame, parentModel, costMode = 'api', parentStatus = null) {
372
374
  const done = m.status === 'done';
373
375
  const g = done ? { t: '✓', fg: PALETTE.info } : { t: SPIN[(frame + 3) % SPIN.length], fg: PALETTE.team, bold: true };
374
376
  const branch = last ? glyphs().memberLast : glyphs().member;
@@ -390,11 +392,26 @@ export function memberRow(m, last, c, W, frame, parentModel, costMode = 'api') {
390
392
  { t: label, fg: done ? PALETTE.info : PALETTE.team },
391
393
  { t: pad(showSuffix ? suffix : '', nameW - width(label)) + ' ', fg: PALETTE.info },
392
394
  );
395
+ // 팀원 행은 CONTEXT·IDLE 칸이 비므로 그 자리(둘 사이 공백 포함)에 작업 중 경과 시간과 '멈춘 듯' 을 오른쪽 맞춤으로 둔다.
396
+ // 두 칸은 폭과 상관없이 늘 있는 열이라, 좁아지면 이름·STATUS 가 먼저 줄고 경과 시간은 남는다 (세션 행의 IDLE 과 같은 규칙).
397
+ // '멈춘 듯' 은 글자로 적어 색이 없어도 구분되고, 흐린 색으로만 둔다. 놓는 곳은 위에서부터 들어가는 첫 자리다:
398
+ // 끝 칸에 '멈춘 듯 3m12s' → STATUS 칸 앞 (CTX 5칸만 남는 폭) → STATUS 칸도 그보다 좁으면 경과 시간 뒤에 '?' 하나 (3m12s?).
399
+ const tailW = c.ctx + 1 + c.age;
400
+ const elapsed = !done && Number.isFinite(m.startedAt) ? fmtElapsed(NOW - m.startedAt) : '';
401
+ const stalled = !done && memberStalled(m, NOW, parentStatus) ? t('member.stalled') : '';
402
+ const both = stalled && elapsed ? width(stalled) + 1 + width(elapsed) <= tailW : Boolean(stalled);
403
+ const before = stalled && !both && c.status >= width(stalled) + 1;
404
+ const quest = stalled && !both && !before;
405
+ const inStatus = before ? [{ t: `${stalled} `, fg: PALETTE.info, italic: true }] : [];
393
406
  segs.push(
394
- { t: pad(statusText(m.phase), c.status) + ' ', fg: done ? PALETTE.info : PHASE_COLOR[m.phase?.kind] ?? PALETTE.muted },
407
+ ...inStatus,
408
+ { t: pad(statusText(m.phase), Math.max(0, c.status - segsWidth(inStatus))) + ' ', fg: done ? PALETTE.info : PHASE_COLOR[m.phase?.kind] ?? PALETTE.muted },
395
409
  { t: pad(m.loading ? '…' : started ? fmtTokens(m.tokens ?? 0) : '', c.tokens, 'right') + ' ', fg: done || m.loading ? PALETTE.info : PALETTE.muted },
396
410
  );
397
411
  if (c.showCost) segs.push({ t: pad(m.loading ? '…' : started ? money(costOf(m, costMode), m.costUnknown) : '', c.cost, 'right') + ' ', fg: done || m.loading ? PALETTE.info : PALETTE.muted });
412
+ const mark = stalled && both ? [{ t: stalled, fg: PALETTE.info, italic: true }, ...(elapsed ? [{ t: ' ' }] : [])] : [];
413
+ const time = elapsed ? [{ t: elapsed, fg: PALETTE.info }, ...(quest ? [{ t: '?', fg: PALETTE.info, italic: true }] : [])] : [];
414
+ if (mark.length || time.length) segs.push({ t: ' '.repeat(Math.max(0, tailW - segsWidth([...mark, ...time]))) }, ...mark, ...time);
398
415
  // 끝난 팀원은 종료 행처럼 기울임꼴로 둔다.
399
416
  return line(done ? segs.map((x) => ({ ...x, italic: true })) : segs, W);
400
417
  }
package/src/ui.mjs CHANGED
@@ -84,7 +84,7 @@ export function render(view, W, H) {
84
84
  // 준비 완료 전에는 값이 커지는 대로 ▲ 가 옮겨 다니므로 붙이지 않는다.
85
85
  const hot = view.ready === false ? null : topCost(visible.filter(isSession).map((r) => r.s), view.costMode);
86
86
  if (!sessions.length) table.push(...(view.filter ? [line([{ t: ` ${t('ui.noMatch', { q: view.filter })}`, fg: PALETTE.muted, italic: true }], TW)] : emptyLines(view, TW)));
87
- 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))));
87
+ 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, r.s.status) : sessionRow(r.s, c, TW, r.s === sel, view.frame, hot, view.costMode, Boolean(view.pins?.includes(r.s.id))));
88
88
  if (clipped) {
89
89
  const onScreen = new Set(visible.filter(isSession).map((r) => r.s));
90
90
  const hidden = sessions.filter((s) => !onScreen.has(s));