diff options
| author | Adam Malczewski <[email protected]> | 2026-03-24 16:13:42 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-03-24 16:13:42 +0900 |
| commit | 6a6bc5379a3a4620df07b4bb196ec0ded636fc8b (patch) | |
| tree | 9f4e059d475df94d9f9d48300e4e732b42096d50 /.rules | |
| parent | d36edfb6b34c05903281ece6d47fc7a1de2bd4f2 (diff) | |
| download | ai-pulse-obsidian-plugin-6a6bc5379a3a4620df07b4bb196ec0ded636fc8b.tar.gz ai-pulse-obsidian-plugin-6a6bc5379a3a4620df07b4bb196ec0ded636fc8b.zip | |
Add get current note, edit fule(but broken for now), and update chat to have markdown
Diffstat (limited to '.rules')
| -rw-r--r-- | .rules/changelog/2026-03/24/13.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/.rules/changelog/2026-03/24/13.md b/.rules/changelog/2026-03/24/13.md new file mode 100644 index 0000000..db16775 --- /dev/null +++ b/.rules/changelog/2026-03/24/13.md @@ -0,0 +1,22 @@ +# Changelog — 2026-03-24 #13 + +## New Tools: Get Current Note & Edit File + +### Added +- **`get_current_note` tool** (`src/tools.ts`): Returns the vault-relative path of the currently active note via `workspace.getActiveFile()`. No approval required. +- **`edit_file` tool** (`src/tools.ts`): Atomic find-and-replace on vault files using `vault.process()`. Accepts `file_path`, `old_text`, and `new_text`. Requires user approval. Only replaces the first occurrence. + +### Changed +- **System prompt** (`src/ollama-client.ts`): Updated to teach the AI the `get_current_note → read_file → edit_file` workflow and to reference both new tools. + +## Markdown Rendering in Assistant Bubbles + +### Added +- **Markdown rendering** (`src/chat-view.ts`): Assistant chat bubbles now render their content as markdown after streaming completes using Obsidian's `MarkdownRenderer.render()`. During streaming, plain text is shown for performance. +- **`finalizeBubble()` method** (`src/chat-view.ts`): New method that clears a streaming bubble's plain text and replaces it with rendered markdown. +- **`bubbleContent` Map** (`src/chat-view.ts`): Tracks accumulated raw text per bubble so it can be rendered as markdown upon finalization. +- **Markdown CSS** (`styles.css`): Scoped typography rules for `.ai-organizer-markdown` inside assistant bubbles — compact margins, scaled-down headings (1.05–1.15em), styled code blocks, tables, blockquotes, lists, and images to fit narrow sidebar bubbles. + +### Changed +- Bubble finalization logic consolidated into `finalizeBubble()` — replaced inline finalization in `onCreateBubble`, post-response, and error handlers. +- Proper cleanup of `bubbleContent` map in clear chat, close, error, and approval handlers. |
