From 3ff11f32b3501189cb38a41f7f24bcdf33f28055 Mon Sep 17 00:00:00 2001 From: Dave Date: Wed, 25 Feb 2026 11:26:35 +0000 Subject: [PATCH] story-kit: create 179_story_add_configurable_chat_history_pruning --- ...y_add_configurable_chat_history_pruning.md | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .story_kit/work/1_upcoming/179_story_add_configurable_chat_history_pruning.md diff --git a/.story_kit/work/1_upcoming/179_story_add_configurable_chat_history_pruning.md b/.story_kit/work/1_upcoming/179_story_add_configurable_chat_history_pruning.md new file mode 100644 index 0000000..a267208 --- /dev/null +++ b/.story_kit/work/1_upcoming/179_story_add_configurable_chat_history_pruning.md @@ -0,0 +1,23 @@ +--- +name: "Add configurable chat history pruning" +--- + +# Story 179: Add configurable chat history pruning + +## User Story + +As a user, I want chat history to be automatically pruned to a configurable limit, so that long sessions don't bloat localStorage and degrade performance. + +## Acceptance Criteria + +- [ ] Default limit of 200 messages is applied when saving to localStorage +- [ ] Messages are pruned from the front (oldest removed first) via messages.slice(-limit) +- [ ] Limit is configurable via localStorage key storykit-chat-history-limit:{projectPath} +- [ ] A limit of 0 means unlimited (no pruning) +- [ ] useChatHistory returns maxMessages and setMaxMessages for future UI use +- [ ] Existing useChatHistory tests continue to pass +- [ ] New tests cover: pruning at limit, custom limit, unlimited mode + +## Out of Scope + +- TBD