#1282·claudian

[Feature]: Auto-attach Linked content for the active non-Markdown file (PDF, canvas, base, images)

Author: Libera-sudoCreated Sep 8, 2026Updated Sep 16, 2026
Labelsstale

Version: Claudian 2.2.6 · Obsidian 1.13.7 · macOS

What happens With a PDF (or canvas / base / image) as the active file, the composer's auto-draft Linked content stays empty; only .md files are picked up. @-mention already lists every vault file since #326, so the file can be attached by hand, but the "current file follows the editor" behaviour doesn't work for lecture slides, which is the main thing I chat about.

Where src/features/chat/linked-content/LinkedContentController.ts:

typescript
private eligibleActiveFilePath(file: TFile | null): string | null {
  if (!file
    || file.extension.toLocaleLowerCase() !== 'md'
    || this.getExcludedTagState(file) !== 'not-excluded'
  ) return null;
  return normalizeLinkedContentPath(file.path);
}

Also getExcludedTagState returns 'unknown' for any file without a metadata cache entry, so even without the extension check a non-md file would be rejected as soon as excludedTags is non-empty.

Why it looks safe Live requests only carry the path — context.linkedContent = { path }; the content field (which would inline the body via appendLinkedContentBody) is only produced when migrating stored conversations. So the agent just receives <linked_content path="…pdf" /> and reads it with its own tools, which is what #41 already relies on for @-mentioned PDFs.

Proposal

  • Drop the md gate, or make it an allow-list setting (default: md, pdf, canvas, base + image types).
  • Treat files with no metadata cache as not-excluded (they cannot carry tags).

I'm currently doing exactly this from a companion plugin by overriding eligibleActiveFilePath on the controller prototype; would prefer it upstream.