xonecas.io
7814
Ta

tiny-c-agent / files

tiny-c-agent / src / tui / usage.h

504 bytes
1// tiny TUI context readout: how full the next request's window would be.
2
3#ifndef TINY_TUI_USAGE_H
4#define TINY_TUI_USAGE_H
5
6// `812`, `12.3k`, `1.24M` — trailing zeros trimmed. Returns malloc'd.
7char *tiny_format_tokens(long n);
8
9// The context row: dim, yellow as the window nears, red once the next request
10// could not carry a maximum-size reply. `window` <= 0 shows only the count.
11// Returns malloc'd, styled text.
12char *tiny_context_usage_line(long used, long window, long max_tokens);
13
14#endif