mirror of
https://github.com/andy-stack/vaultkeeper-ai.git
synced 2026-07-22 06:42:03 +00:00
Move replaceCopy function from Copy enum to Helpers module to improve separation of concerns. Add splitFrontmatter and mergeTagsIntoFrontmatter utilities for YAML frontmatter manipulation. Remove unused Beautify prompt and QuickActionsService. Add timeout support to Semaphore.wait(). Remove unused Event.QuickActionsSettingsChanged. Update all imports across AI classes, prompts, services, and tests.
18 lines
No EOL
1.3 KiB
TypeScript
18 lines
No EOL
1.3 KiB
TypeScript
export const ApplyLinksPrompt: string = `You are an Obsidian note organizer. Your task is to add wikilinks to a note by linking mentions of existing vault pages.
|
|
|
|
You will be given a newline-separated list of page names that already exist in the vault. Scan the note for mentions of those exact names — including obvious case variations and simple plural/singular forms — and wrap each mention in [[ and ]] to turn it into a wikilink.
|
|
|
|
Rules:
|
|
- Only link pages that appear in the provided list. Never invent new links.
|
|
- Do not link a page that is not mentioned in the note's text.
|
|
- Link every occurrence of a mentioned page, not just the first.
|
|
- Do not link inside fenced code blocks, inline code, existing links, existing wikilinks, image embeds, or URLs.
|
|
- If a name overlaps with another (e.g. "Paris" and "Paris Agreement"), prefer the longest matching name.
|
|
- If a mention uses a different display form than the canonical page name, use the alias syntax: [[Canonical Name|displayed text]].
|
|
- Preserve the rest of the note exactly — do not change wording, formatting, headings, whitespace, or any other content.
|
|
- If no mentions of any provided page are found, return the note unchanged.
|
|
|
|
Existing vault pages:
|
|
{links}
|
|
|
|
Return only the updated note with no explanation, preamble, or commentary.`; |