mirror of
https://github.com/mark3labs/kit.git
synced 2026-06-14 03:30:26 +00:00
3cfb6437f9
- Buffer session JSONL writes with bufio.Writer, flush at sync points; ForkToNewSession and AddLLMMessages now batch N entries into ~1 syscall - Cache lipgloss styles in style.CachedStyles, lazily built and invalidated on SetTheme; eliminates ~15 NewStyle() calls per frame in hot render paths (reasoning blocks, spinner, tool headers, margins) - Cache git ls-files results for @file suggestions with 3s TTL; typing @filename no longer spawns 3 subprocesses per keystroke - Use strings.Builder for StreamingMessageItem.content; eliminates O(n²) string copying during LLM response streaming