Statusline Claude Code statuslineLayout

AgentKit Statusline

Dòng status trong Claude Code do kit Engineer/Marketing cài — mặc định là gì, custom thế nào, options nào được hỗ trợ.

Cài đặt

Đến từ đâu?

Kit export

Engineer / Marketing ship .config/statusline.cjs + lib hooks (render modes, section registry).

Claude Code registration

Adapter ghi statusLine trong settings Claude Code trỏ tới script đã cài (project hoặc global).

Mặc định

Default đang để gì?

Khi chưa có statuslineLayout trong config, renderer dùng default giống pre-refactor — behavior ổn định.

Mode
full

baseMode / legacy statusline

Quota section
on

trừ khi statuslineQuota: false

Colors
on

trừ khi statuslineColors: false

responsiveBreakpoint
0.85

wrap responsive (0.5–1.0)

maxAgentRows
4

số nhóm agent hiển thị

todoTruncation
50

ký tự cắt todo

Layout dòng mặc định (dashboard builder)

lines[][]
[
  ["model", "context", "quota"],
  ["directory", "git", "cost", "changes"],
  ["agents", "todos"]
]

Lưu ý: section cost mặc định enabled: false trong DEFAULT_SECTIONS — chỉ hiện khi có data cost và được bật/include trong layout.

Sections

Section IDs được hỗ trợ

id Mặc định Icon Ý nghĩa
model bật 🤖 Tên model Claude đang dùng
context bật Thanh % context window
quota bật Usage quota 5h / week (khi cache eligible)
directory bật 📁 Thư mục workspace (home → ~)
git bật 🌿 Branch + dirty/ahead/behind
plan bật 📋 Active plan label (nếu có)
cost tắt 💰 Chi phí API session (khi billing API)
changes bật 📝 Lines + / − trong session
agents bật 🔄 Luồng agents running/completed
todos bật Todo / task snapshot

agents và todos là multi-line sections (render riêng, không nhét chung một dòng flat).

Modes

baseMode / statusline mode

FULL

full (mặc định)

Hiển thị đầy đủ các dòng đã cấu hình: session rows + agents + todos (theo layout).

CMP

compact

Thu gọn — ít dòng hơn, ưu tiên thông tin cốt lõi khi terminal hẹp.

MIN

minimal

Tối thiểu — chỉ vài section quan trọng.

OFF

none

Tắt render statusline (không in dòng status).

Custom

Custom thế nào?

1. Dashboard Statusline Builder (khuyến nghị)

Mở ak config (Desktop hoặc browser dashboard) → trang Statusline. Kéo thả sections, chọn theme preset, preview terminal, Save. Config ghi vào field statuslineLayout trong user config.

2. Sửa config.yaml trực tiếp

Thêm object statuslineLayout vào ~/.agentkit/config.yaml (user). Project config có thể override theo merge rules — secrets vẫn không thuộc project.

Options

statuslineLayout — fields được support

Field Mặc định Options / type Ý nghĩa
baseMode full full | compact | minimal | none Chế độ render chính
lines 3 rows (builder default) string[][] of section ids Bố cục từng dòng status
sections DEFAULT_SECTIONS legacy array {id,enabled,order,…} Format cũ (backward compat)
sectionConfig {} / icons per id: icon, label, color, maxWidth Override hiển thị từng section
theme Default theme contextLow/Mid/High, accent, muted, separator, quotaLow/High Màu context/quota/accent
responsiveBreakpoint 0.85 number 0.5–1.0 Ngưỡng wrap theo độ rộng terminal (legacy layout)
maxAgentRows 4 number (≥0; 0 = hide agents) Số nhóm agent collapse hiển thị
todoTruncation 50 number Cắt text todo

sectionConfig per id

  • icon — emoji/string prefix
  • label — nhãn tùy chọn
  • color — tên ANSI: green, cyan, brightMagenta, dim, …
  • maxWidth — giới hạn độ rộng section (số)

Theme presets (dashboard)

Builder có preset: Default, Monochrome, Nord, Dracula, Catppuccin, Gruvbox, Tokyo Night, Solarized, Rose Pine, One Dark, Ayu — mỗi preset set theme + per-section colors.

Ví dụ

Mẫu statuslineLayout

config.yaml
# ~/.agentkit/config.yaml  (user scope — typical)
statuslineLayout:
  # full | compact | minimal | none
  baseMode: full
  lines:
    - [model, context, quota]
    - [directory, git, cost, changes]
    - [agents, todos]
  sectionConfig:
    model:
      icon: "🤖"
      color: cyan
    cost:
      # cost defaults to off in DEFAULT_SECTIONS; include it in lines to show
      icon: "💰"
      color: dim
  theme:
    contextLow: green
    contextMid: yellow
    contextHigh: red
    accent: cyan
    muted: dim
    separator: dim
    quotaLow: green
    quotaHigh: red
  # 0.5–1.0
  responsiveBreakpoint: 0.85
  maxAgentRows: 4
  todoTruncation: 50

# Optional legacy / related toggles (same config file):
# statusline: full           # fallback if baseMode missing
# statuslineQuota: false     # hide quota windows even if section on
# statuslineColors: false    # disable ANSI colors

Toggles liên quan

Ngoài statuslineLayout

statusline

Legacy mode string (full/compact/…) khi thiếu baseMode.

statuslineQuota

false = ẩn quota windows dù section quota bật.

statuslineColors

false = tắt ANSI color output.

Liên quan