[Feature]: Highlight AI-modified content directly in the Obsidian editor
Before submitting
- I searched existing issues and did not find the same request.
Problem or unmet use case
When an agent edits a Markdown file through the main Claudian chat using Write, Edit, or apply_patch, the changes are applied directly to the file. Claudian displays the diff only inside the chat tool card.
For long notes or edits spanning multiple sections, it is difficult to identify the affected content while reading the document. Users must repeatedly switch between the editor and the chat diff, manually locate each changed line, and may overlook unintended changes.
Inline Edit does provide a temporary preview for text explicitly selected by the user, but it does not cover file edits initiated through the main chat and does not leave any indication in the document after a change is applied.
Desired outcome
After an agent modifies a Markdown file through the main chat, Claudian should indicate the affected ranges directly in the Obsidian editor.
The indication should:
Highlight added or modified content in the document itself.
Provide an appropriate anchored indication when content was deleted.
Remain visible long enough for the user to review the changes, including when the affected file is opened after the edit completes.
Provide a clear way to dismiss all highlights or mark the changes as reviewed.
Source Mode and Live Preview would be the most important initial targets. Reading View support could be considered separately.
Affected provider
Not provider-specific
Proposed solution
Reuse the normalized file-diff information already displayed by Claudian’s chat edit cards and project it into affected Markdown editor instances as temporary CodeMirror decorations.
A provider-neutral change-review controller could associate each successful agent edit with:
The vault-relative file path.
The relevant agent turn or edit operation.
Added and modified ranges in the resulting document.
Anchors representing deletions where possible.
A review state such as unreviewed or dismissed.
Possible UI treatments include a subtle background color on changed lines, gutter markers, and commands for “Next AI change,” “Previous AI change,” and “Clear AI change highlights.”
The highlights should be ephemeral UI state rather than content written into the Markdown file. If precise ranges are unavailable—for example, after an unstructured shell command—the feature could omit the highlight or derive a diff from a bounded pre-edit snapshot instead of showing potentially incorrect ranges.
An opt-in setting could control whether these document highlights are enabled and whether they clear automatically on the next agent edit, when the user manually changes the affected text, or only when explicitly dismissed.
Alternatives considered
Expanding the existing diff card in chat. This shows the changes accurately, but users still have to locate them manually in the document.
Using Git or Obsidian file history. These tools can review changes after the fact, but they are separate workflows and do not identify the relevant content directly in the active document.
Asking the agent to summarize line numbers. Line numbers can become stale and are less reliable than editor decorations attached to the actual document state.
Additional context
Observed with Claudian 2.2.7 on Windows.
The existing “Expand file edits by default” setting affects only diff cards in the chat panel; it does not display change markers in the document editor.
Source: YishenTu/claudian