Skip to content

feat(chat): drop vault notes and folders into the composer - #33

Merged
luoxuanzao merged 1 commit into
mainfrom
feat/drop-vault-files
Aug 22, 2026
Merged

feat(chat): drop vault notes and folders into the composer#33
luoxuanzao merged 1 commit into
mainfrom
feat/drop-vault-files

Conversation

@luoxuanzao

Copy link
Copy Markdown
Member

Summary

  • Add VaultDropController (src/features/chat/ui/vault-drop.ts): dragging notes/folders from the Obsidian file explorer onto the chat composer inserts @path / @path/ context mentions at the caret, skipping duplicates and showing a drop overlay while dragging. Borrowed from Claudian-plus M1 (drag notes and folders into chat).
  • Wired in tab.ts before ImageContextManager so vault drags are claimed via stopImmediatePropagation without disturbing OS image drag/drop; destroyed in tab-lifecycle.ts.
  • Only markdown files and non-root folders are accepted (matches the mention resolver's semantics); an input event is dispatched after insertion so send availability updates.
  • i18n: new chat.drop.context key in all 10 locales; overlay CSS follows the existing image-drop visual language.

Verification

  • npm run typecheck
  • npm run lint
  • npm run test (3361 passed, incl. 12 new vault-drop.test.ts cases)
  • npm run build
  • npm run release:check
  • npm run audit:prod
  • Deployed to the local test vault for manual drag-and-drop verification

Safety

  • No credentials, private vault content, internal URLs, or personal paths are included
  • User-visible changes are documented in CHANGELOG.md

Drag files/folders from the Obsidian file explorer onto the chat input:
markdown notes become @path mentions, folders become @path/ mentions,
inserted at the caret with duplicates skipped and a drop overlay while
dragging. The controller attaches before ImageContextManager so vault
drags are claimed without disturbing OS image drops.

Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
@luoxuanzao
luoxuanzao merged commit 148888c into main Aug 22, 2026
10 checks passed
@luoxuanzao
luoxuanzao deleted the feat/drop-vault-files branch August 22, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant