- Add trimHistory() to keep most recent messages within 100k token budget - Add formatMessageWithHistory() to prepend conversation context to each message - Wire up in useAIChat.ts: sendMessage now includes full history - Keep --resume as belt-and-suspenders for same-session continuity - 14 new tests in ai-chat.test.ts and useAIChat.test.ts
6.1 KiB
6.1 KiB