mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-09 08:03:50 +00:00
Surface the AI chat's current context-window usage as a "45k / 200k" badge next to the model selector, and make the conversation-trim gate accurate. The provider-reported token usage was already computed end-to-end but dropped. Capture the final loop iteration's usage (prompt + completion) as an accurate "current context size" anchor, persist it per chat in IndexedDB, and display it. Re-base the trim gate on the same anchor: the crude chars-per-4 estimate now includes the system message and tool schemas (previously ignored, which let real context overflow the model window), and is calibrated against the accurate anchor when one exists. The badge colour shifts neutral->amber->red as usage approaches the threshold where older messages start being dropped. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Windmill frontend
The Windmill frontend written in Svelte 5 + Tailwind CSS
The frontend is under AGPL, see the LICENSE file at the root of this repo