Skip to content

Persist conversation history to disk so exchanges survive app restarts#14

Open
vikvang wants to merge 2 commits intofarzaa:mainfrom
vikvang:feature/conversation-persistence
Open

Persist conversation history to disk so exchanges survive app restarts#14
vikvang wants to merge 2 commits intofarzaa:mainfrom
vikvang:feature/conversation-persistence

Conversation

@vikvang
Copy link
Copy Markdown

@vikvang vikvang commented Apr 8, 2026

Summary

Save conversation history as JSON to Application Support/Clicky/conversation_history.json after each exchange and reload it on launch. Cap stored history at 50 messages via a named constant. Add a "Clear History" button to the companion panel that wipes both in-memory and on-disk history.

Changes

  • CompanionManager.swift: Add ConversationExchange Codable struct, maximumStoredConversationMessageCount constant (50), persistence methods (saveConversationHistoryToDisk, loadConversationHistoryFromDisk, clearConversationHistory), load on start(), save after each append, use new limit
  • CompanionPanelView.swift: Add "Clear History" button styled consistently with existing panel buttons

Conversation link

Co-Authored-By: Oz oz-agent@warp.dev

sathvik vang and others added 2 commits April 7, 2026 23:21
…ogging

Add per-IP sliding-window rate limiting on /chat (20 req/min) and /tts
(30 req/min) to prevent abuse without external storage. All error paths
now return consistent JSON with { error, code } shape so the client can
programmatically handle failures. Every request is logged with method,
route, IP, and status for observability via wrangler tail.

Co-Authored-By: Oz <oz-agent@warp.dev>
Save conversation history as JSON to Application Support/Clicky/ after
each exchange and reload it on launch. Cap stored history at 50 messages
(named constant). Add a Clear History button to the companion panel that
wipes both in-memory and on-disk history.

Co-Authored-By: Oz <oz-agent@warp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant