M11: provider model catalog, per-model context window, subscription usage in footer + /usage
ci / check (push) Canceled after 0s
ci / check (pull_request) Canceled after 0s

This commit is contained in:
hermes committed 2026-10-01 11:53:27 +00:00
1 parent 3fee36d788
commit 6533dde4ca
11 files changed
+751 -54

No files matched your search

+13 -4
View File
@@ -15,11 +15,20 @@ hx -r parser # resume the session whose title best matche
```
TUI: `enter` send, `alt-enter`/`ctrl-j` newline, `esc` abort, `ctrl-o` expand tool output, `pgup`/`pgdn` scroll.
`/help` lists commands: builtins (`/model`, `/provider`, `/compact`, `/clear`, `/lsp`, `/mcp`, `/skills`, `/new`, `/sessions`, `/resume`, `/quit`), MCP
`/help` lists commands: builtins (`/model`, `/provider`, `/compact`, `/clear`, `/lsp`, `/mcp`, `/skills`, `/new`, `/sessions`, `/resume`, `/usage`, `/quit`), MCP
prompts (`/server:prompt`) and skills. Typing `/` opens a completion popup for commands and their arguments
(`up`/`down` select, `tab`/`enter` accept, `esc` close); `tab` completes `@file` (mentioned files are
attached). `ctrl-p` opens a picker over commands, skills, models and the 5 newest sessions.
Models: the list comes from the provider (`/v1/models` for Claude, the Codex backend's model list), cached a
day in `~/.hx/models-<provider>.json`, with a built-in list as fallback. Only logged-in providers are
offered; the default provider is the configured one, else the first logged in. The context bar and
auto-compaction follow the active model's window (e.g. 1M for Claude 5.x).
Usage: once a response arrives, the footer shows subscription limits from the provider's headers:
time windows with used % and time to reset (`5h 42% ↻2h13m · week 13%`) and, for credit billing, the
credit balance or extra-usage state. `/usage` shows the details.
Sessions: `/new` (or `/clear`) starts a new session file; the old one stays resumable. `/sessions` opens a
full-screen picker with a preview: type to filter by title, `tab` toggles this project / all projects,
`ctrl-d` deletes (asks first), `enter` resumes. The title (first prompt) shows in the footer and the
@@ -32,9 +41,9 @@ Config: `~/.hx/config.toml`, overridden per project by `.hx/config.toml`:
```toml
provider = "claude" # or "codex"
claude_model = "claude-sonnet-4-5"
codex_model = "gpt-5-codex"
compact_at = 150000 # auto-compact threshold (estimated tokens)
# claude_model = "claude-sonnet-5-5" # default: the account's latest Sonnet
# codex_model = "gpt-5.6-sol" # default: Codex's top-listed model
# compact_at = 900000 # default: 90% of the model's context window
max_tokens = 16384
# system_prompt = "..." # replaces built-in prompt; AGENTS.md still appended