ui, model, cost and idle timeouts
- lcm: the sidebar widget and /status segment show the context, the number of
compactions, messages and bytes of the last cut, and how many old tool
outputs were trimmed. The counters are the compactor's own, not an estimate.
- cost: a provider-reported USD cost (usage.cost/cost_usd) is carried through
sse/openai, the agent and the engine. /cost reports it with the cache share
and splits judged from plain turns; the notes say that an upstream judge is
not visible in the provider's usage. The status plugin and junction prefer
the reported number over list-price arithmetic.
- curses: the running turn's seconds moved from the input line to the status
bar. Notes and errors are transcript rows below the cause, never text in the
input line or the status bar; a failed backend request is a status row and is
retried by the agent. The steer prompt is only "steer> " and what was typed.
- model: /model probe works in the chat. The picker lists the configuration at
once, then asks the endpoint the session is on what it serves and adds those
models, so a router's whole menu is selectable. provider/model selectors now
apply the right provider instead of becoming a model name. The choice is
written to <session>.model and restored when that session is reopened; /new
carries the current model into the new session.
- sidebar: plugin titles are bold and underlined (this curses has no italic
attribute), with a rule between the plugin blocks.
- run/cli: a command timeout is an idle window. Every chunk on stdout or
stderr resets it, and the process is asked with waitpid(WNOHANG) whether it
is still there before the window is extended. A long build that keeps
reporting progress is no longer killed for being long; a silent hang is.
- config: ';' separates settings on one line, so
plugin lcm { keep = 6; tool_trim = 8192 } parses as two keys.
- tests: lcm widget/status counters, one-line config blocks, session model
restore and /model probe, cli idle timeout with a talkative and a silent
command, run output reset, and the UI status/retry rows.
make check: all tests passed.
This commit is contained in:
1 parent
dc9a1c62ec
commit
af2001bfee
33 files changed
+1035
-184
No files matched your search
@@ -112,6 +112,7 @@ struct sp_engine_state {
|
||||
char dir[512];
|
||||
char theme[48]; /* set by the front end, for /status */
|
||||
size_t tokens_in, tokens_out;
|
||||
double cost; /* provider-reported, USD */
|
||||
size_t ctx_used; /* prompt tokens of the last request */
|
||||
size_t ctx_max; /* context window, 0 = unknown */
|
||||
size_t cached; /* of ctx_used, served from the provider cache */
|
||||
@@ -134,6 +135,13 @@ int sp_engine_state(struct sp_engine *, struct sp_engine_state *);
|
||||
*/
|
||||
size_t sp_engine_models(struct sp_engine *, struct sp_model_choice *,
|
||||
size_t max);
|
||||
/*
|
||||
* The models the endpoint this session is on reports at /v1/models, as
|
||||
* selectors /model accepts. This talks to the network; the picker asks for it
|
||||
* after the configured list is already on screen.
|
||||
*/
|
||||
size_t sp_engine_served_models(struct sp_engine *, struct sp_model_choice *,
|
||||
size_t max);
|
||||
|
||||
/* -------------------------------------------------------------- lifecycle */
|
||||
|
||||
|
||||
Reference in new issue
Block a user