mirror of
https://github.com/logancyang/obsidian-copilot.git
synced 2026-07-22 07:50:24 +00:00
* feat(agent-mode): make note links clickable in chat and tool cards Switches markdown rendering to the modern `MarkdownRenderer.render(app, …)` API via a shared `renderMarkdown` wrapper, and adds a delegated click handler so `a.internal-link` inside chat/agent/plan-preview views opens via `app.workspace.openLinkText` (left-click in current pane, cmd/middle in a new tab). Tool ActionCards now also expose the collapsed line as a clickable target once the call has completed. Threads `app` explicitly through the components and utilities that previously relied on the global `app` (lexicalTextUtils, notePreviewUtils, vaultPath, AtMention/Note/Paste/TextInsertion plugins) using the `useApp()` hook at the leaf, and updates AGENTS.md to discourage new uses of the global. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * test(chat): fix ChatSingleMessage mocks for wireInternalLinks The `renderMarkdown` wrapper now calls `component.register(...)` after `MarkdownRenderer.render(...)`. The test's `obsidian.Component` mock was missing `register`, causing the promise to reject and `logError` (which calls the unmocked `getSettings()`) to crash. Add `register` to the Component mock and mock `getSettings` as a safety net. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(agent-mode): resolve internal links against active note Pass the active file path as sourcePath to renderMarkdown so wikilinks with duplicate basenames or heading-only references resolve to the right file instead of falling back to vault root. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| chat-components | ||
| command-ui | ||
| composer | ||
| modals | ||
| project | ||
| quick-ask | ||
| ui | ||
| Chat.tsx | ||
| CopilotView.tsx | ||
| CustomPromptSyntaxInstruction.tsx | ||
| IndexingProgressCard.tsx | ||
| SystemPromptSyntaxInstruction.tsx | ||
| TruncatedText.tsx | ||