Skip to content

feat: configurable footer line 2 & expose plan quotas (weekly/5h) to status_line.command #2435

Description

@YueDeity

Summary

Follow-up to #2255 (shipped in 0.30.0, thanks @he-yufeng!). While building a custom
footer with [status_line] I ran into three gaps. All are about making the footer
fully customizable for status_line.command users.

1. Footer line 2 is hardcoded and cannot be hidden

status_line.items / status_line.command only control line 1. Line 2's
right side is always formatContextStatus(state.contextUsage, state.contextTokens, state.maxContextTokens) (see FooterComponent.render), with no way to hide or
customize it.

Once a user renders their own context bar via status_line.command, the built-in
context: 45% (114k/256k) on line 2 shows the same data twice.

Ask: a way to hide or reconfigure line 2, e.g.

[status_line]
line2 = false            # hide the second footer line entirely
# or make context a slot: items = [...], line2_items = ["context"]

2. statusLinePayload does not include plan quotas

Current payload (from statusLinePayload() in the footer component):

{ "model", "cwd", "gitBranch", "permissionMode", "planMode",
  "contextUsage", "contextTokens", "maxContextTokens", "sessionId", "version" }

The managed-plan quotas shown by /usage and on footer line 2 (e.g. 25% wk · 4% 5h)
are not exposed, so command scripts cannot render them. The data already exists
client-side via GET https://api.kimi.com/coding/v1/usages
(IOAuthService.getManagedUsage{ summary, limits[], extraUsage },
rows shaped { name, window, used, limit, resetAt }).

Ask: include a quota snapshot in the payload, e.g.

"quota": {
  "weekly": { "used": 37, "limit": 100, "resetAt": "..." },
  "limits": [ { "windowMinutes": 300, "used": 11, "limit": 100, "resetAt": "..." } ]
}

3. A refresh-interval setting for quota data

Quota values change slowly (per-minute granularity is plenty), but
status_line.command runs every second and must stay under 300ms — far too tight
for an HTTP call per run. If the engine polls quotas itself and serves a cached
snapshot to the payload, scripts stay fast and the API stays calm.

Ask: something like

[status_line]
quota_refresh_seconds = 120   # engine-side quota poll interval; 0 disables

Current workaround (fragile)

My script reads ~/.kimi-code/credentials/kimi-code.json, calls
/coding/v1/usages directly, and caches the result for 2 minutes with a
detached refresher. It works, but it re-implements auth and depends on internal
file formats — hence this request.

Environment

  • kimi-code v0.31.0
  • macOS (darwin arm64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions