mirror of
https://github.com/patriceckhart/zot.git
synced 2026-06-29 06:43:40 +02:00
The redraw path rebuilt the full transcript on every key event: filtered the agent's full message slice, refreshed tool path maps, walked every message through the per-message render cache, and re-assembled the entire chat line buffer. With a long session, the O(N) work per keystroke made typing visibly lag. Add an idle render cache: the previously built chat is reused when nothing relevant changed (terminal width, transcript revision, status notes, help/update banners, expand-all). The agent now exposes a cheap monotonically increasing Revision() that ticks whenever messages are appended or replaced, so the cache key stays trivial. Live turns (busy/streaming/tool-call mutations) keep the old rebuild path. |
||
|---|---|---|
| .. | ||
| extensions | ||
| modes | ||
| tools | ||
| args.go | ||
| botcmd.go | ||
| botcmd_unix.go | ||
| botcmd_windows.go | ||
| build.go | ||
| changelog.go | ||
| cli.go | ||
| config.go | ||
| extcmd.go | ||
| modelsync.go | ||
| rpc.go | ||
| systemprompt.go | ||
| update.go | ||