Expand description
ContextBar — Zed extension entry point + engine re-exports.
The reusable engine now lives in the context-bar-core crate. This crate
is the thin host layer: it re-exports the engine modules under their
historical paths (so context_bar::usage_signal, crate::context_engine,
… keep resolving for the CLI binary, the example, and the wasm glue below)
and adds the Zed extension surface.
§Verified
- Extension loads in Zed Preview.
process:execcan shell out togitinside the worktree.- Engine writes
.context-bar/{state.json,brief-*.md,AGENT.md}artifacts. run_slash_commandreceives aWorktreeand is the strongest verified hook to wire automatic refresh into.
§Unverified / explicitly isolated behind seams
- Zed has no public always-on HUD primitive yet. The HUD layer is expected
to consume
state.jsondirectly when a hook exists. zed_extension_api0.7 exposes no load-time or worktree-open hook, so the first refresh fires on the first agent interaction that reaches the extension (any slash command). After that, [auto_refresh::refresh] keeps the surface fresh idempotently. Once a real load hook ships, the call site moves; the function does not.- Codex ACP threads in Zed Preview do not currently invoke extension slash
commands. Agents are therefore expected to read
.context-bar/AGENT.mdfrom the filesystem (Codex/Claude conventions) until a richer automatic-context hook is verified. - The seam for both cases is
context_engine::assemble, which takes pre-collected signals and is decoupled fromzed::Worktree.
Modules§
- agent_
context - Combined, agent-readable brief.
- claude_
statusline - context_
engine - detail_
html - Detail page renderer.
- git_
signal - hud
- HUD rendering.
- i18n
- Bilingual (EN/TR) text selection, shared by every Rust surface.
- live
- 5h-block burn status — the engine half of the live dashboard (ROADMAP B2) and the native popover gauge (C1). Pure: derives burn rate, % of limit, ETA-to-limit, and a projected block total from a snapshot + a clock.
- report
- Tabular usage/cost reports built from a
UsageSnapshot. - state_
writer - time_
windows - usage_
signal - Cross-project agent usage signals.