summaryrefslogtreecommitdiffhomepage
path: root/.rules/changelog/2026-03/24
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-03-24 14:01:20 +0900
committerAdam Malczewski <[email protected]>2026-03-24 14:01:20 +0900
commit7f9b25a1479f9897aea7f85c3fb58a568b0bd642 (patch)
treeecb9dec930ba46c4f749d07ec023c2a1960599f8 /.rules/changelog/2026-03/24
parent5a44a97111d304945bbfc3da02d29a83191d816c (diff)
downloadai-pulse-obsidian-plugin-7f9b25a1479f9897aea7f85c3fb58a568b0bd642.tar.gz
ai-pulse-obsidian-plugin-7f9b25a1479f9897aea7f85c3fb58a568b0bd642.zip
add streaming of ai text
Diffstat (limited to '.rules/changelog/2026-03/24')
-rw-r--r--.rules/changelog/2026-03/24/07.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/.rules/changelog/2026-03/24/07.md b/.rules/changelog/2026-03/24/07.md
new file mode 100644
index 0000000..d1327e7
--- /dev/null
+++ b/.rules/changelog/2026-03/24/07.md
@@ -0,0 +1,29 @@
+# Changelog — 2026-03-24 (07)
+
+## Added: Streaming AI Responses
+
+### New
+- **`src/ollama-client.ts`** — Added `sendChatMessageStreaming()` function:
+ - Uses native `fetch()` with `stream: true` for real-time token delivery
+ - `readNdjsonStream()` async generator parses newline-delimited JSON, handles partial lines across chunks
+ - `onChunk` callback fires for every content delta
+ - `AbortSignal` support for cancellation
+ - Full tool-calling agent loop support (tools execute non-streamed, final answer streams)
+ - `StreamingChatOptions` interface for clean parameter passing
+- **Plan file** at `.rules/plan/streaming.md`
+
+### Changed
+- **`src/chat-view.ts`** — Switched from `sendChatMessage` to `sendChatMessageStreaming`:
+ - Creates empty assistant bubble immediately, appends text chunks progressively
+ - `AbortController` created on send, aborted on Stop click or view close
+ - Send button becomes red "Stop" button during streaming
+ - `debouncedScrollToBottom()` limits scroll updates to every 50ms
+ - On completion/abort, streaming class removed from bubble
+- **`styles.css`** — Added `.ai-organizer-stop-btn` red styling for the stop button
+
+### Tool call UI refinements (from previous session)
+- Removed "Tool Use:" prefix from header (icon is sufficient)
+- Removed redundant "Searched for:" / "Read file:" from summaries
+- Added leading `/` to file paths in read_file summary
+- Added result summary line (e.g. "3 results found", "no results found")
+- JSON args and result are now inside a collapsible `<details>` element