summaryrefslogtreecommitdiffhomepage
path: root/.rules/changelog/2026-03/29/01.md
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-03-29 13:44:05 +0900
committerAdam Malczewski <[email protected]>2026-03-29 13:44:05 +0900
commite8d107e454b3804e089a33ce5fe7c931040d4647 (patch)
tree4f8787fae670e86515baed54e00087ce3ef28da6 /.rules/changelog/2026-03/29/01.md
parent67d7d50ee2b05f66de3ab6aea38ff5d7d56ce839 (diff)
downloadai-pulse-obsidian-plugin-e8d107e454b3804e089a33ce5fe7c931040d4647.tar.gz
ai-pulse-obsidian-plugin-e8d107e454b3804e089a33ce5fe7c931040d4647.zip
remove calendar and chat history
Diffstat (limited to '.rules/changelog/2026-03/29/01.md')
-rw-r--r--.rules/changelog/2026-03/29/01.md30
1 files changed, 0 insertions, 30 deletions
diff --git a/.rules/changelog/2026-03/29/01.md b/.rules/changelog/2026-03/29/01.md
deleted file mode 100644
index 6d037c6..0000000
--- a/.rules/changelog/2026-03/29/01.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# Chat History Persistence & Cross-Device Sync
-
-## New File: `src/chat-history.ts`
-- Added `toPersistableMessages()` — filters ChatMessage[] to only user/assistant messages
-- Added `toRuntimeMessages()` — converts persisted messages back to ChatMessage[] for LLM context
-- Re-exports `PersistedMessage` type from settings
-
-## Modified: `src/settings.ts`
-- Added `PersistedMessage` interface (role: user | assistant, content: string)
-- Added `chatHistory: PersistedMessage[]` field to `AIPulseSettings`
-- Chat history is stored in `data.json` via Obsidian's `loadData()`/`saveData()`, ensuring:
- - Correct file path regardless of plugin folder name vs manifest ID
- - Native Obsidian Sync support
- - `onExternalSettingsChange()` fires automatically on sync
-
-## Modified: `src/chat-view.ts`
-- On **open**: restores persisted chat history from `plugin.settings.chatHistory`, renders user messages as plain text and assistant messages as rendered markdown with wiki-link navigation
-- On **message send**: debounced save (500ms) after user message and after assistant response completes
-- On **close**: flushes pending save and cleans up debounce timer
-- On **clear chat**: sets `chatHistory` to empty array and saves settings (syncs clear to all devices)
-- Added `reloadChatHistory()` public method for external sync triggers; skips reload if streaming is active
-- Added `saveChatHistoryDebounced()` with snapshot update to prevent false sync reloads
-- Added `renderPersistedMessages()` to re-render history with markdown and wiki-link click handlers
-
-## Modified: `src/main.ts`
-- Added `onExternalSettingsChange()` — reloads settings and checks for chat history changes when Obsidian Sync updates `data.json`
-- Added `visibilitychange` DOM event listener — reloads settings from disk when the app regains focus (covers device switching)
-- Added `checkChatHistorySync()` — snapshot-based change detection that reloads the chat view only when the persisted data differs from the known state
-- Added `updateChatSnapshot()` — called after local saves and restores to prevent false sync triggers
-- Added `buildChatSnapshot()` helper — lightweight string comparison using message count and last message content