rait-09_obsidian-agent-client/test/stubs
RAIT-09 96ce06bcde refactor(wikilink): resolve links via Obsidian's metadata cache
Replace the hand-rolled regex extraction + basename index with
metadataCache.getFileCache().links. The cache excludes links inside code
blocks/inline code (fixing false positives like a C++ [[nodiscard]] in a
code sample), separates embeds and frontmatter, and hands back already-
tokenized links with positions — so the regex, #/| splitting, embed
exclusion, and the per-prompt vault scan all go away.

Each link now resolves to its single destination via Obsidian's own
getFirstLinkpathDest (the file it would actually open), so the
resolved/unresolved/ambiguous three-state collapses to resolved/
unresolved and the basename index (and its full-vault scan) is gone.
Aliases come from the raw 'original' text, not displayText, which
Obsidian auto-populates for section links. Selection scoping now filters
by cached link position instead of re-scanning the selected substring.

Sibling-block emission, ref correlation, empty-skip, slash-command
suppression, and the byte-identical note bodies are all unchanged.
2026-07-05 02:06:36 +09:00
..
obsidian.ts refactor(wikilink): resolve links via Obsidian's metadata cache 2026-07-05 02:06:36 +09:00