New host API for it: sp_host_add_status() takes a named renderer, and sp_host_status_text() joins the segments with ' | '. The numbers a plugin shows come from the harness through struct sp_meter - context used and window, session tokens, cache hits, tokens per second, running tasks. A plugin that counted for itself would drift from the harness within one turn. plugins/status renders clock, ctx with a 24 column bar, cache, tok/s, tokens in and out, cost and task count. Prices are configuration, not knowledge: SPLINTER_CTX_MAX=32768 SPLINTER_PRICE_IN=0.3 SPLINTER_PRICE_OUT=1.2 Without prices the cost segment says nothing instead of inventing a number. Also fixed: the status.so recipe compiled kids.c, so the plugin that loaded was the kid mode with a different name - the reason seven status registrations produced an empty line. Known open: the segments compose (probe: 'clock: 17:28:14 | ctx 0/32.8k [........................] 0% | 0 in / 0 out | $0.0000') but the bar still draws only the title - not yet isolated.
233 KiB
Executable File
233 KiB
Executable File