logancyang_obsidian-copilot/src/hooks
Logan Yang cd726a0e83
feat: drag relevant notes and sources into editor to insert wikilinks (#2288)
* feat: drag relevant notes and sources into editor to insert wikilinks

Adds Obsidian-native drag-and-drop support to the Relevant Notes panel
and Sources modal, using app.dragManager so dropping onto an editor
automatically inserts [[wikilink]] without any custom drop handler.

- New useNoteDrag hook wraps app.dragManager.dragLink/onDragStart
- RelevantNotes: title link (expanded) and badge (collapsed) are draggable
- SourcesModal: source links are draggable (vanilla JS class context)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: prevent drop zone overlay when dragging from relevant notes

The chat container's "drop files here" overlay incorrectly appeared when
dragging notes from the relevant notes pane. Mark internal drags with a
custom data transfer type so the drop zone hook can skip them.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 11:56:55 -07:00
..
use-draggable.ts Add Editor "Quick Ask" Floating Panel + Persistent Selection Highlights (#2139) 2026-02-03 17:37:33 -08:00
use-raf-throttled-callback.ts Add Editor "Quick Ask" Floating Panel + Persistent Selection Highlights (#2139) 2026-02-03 17:37:33 -08:00
use-resizable.ts Add Editor "Quick Ask" Floating Panel + Persistent Selection Highlights (#2139) 2026-02-03 17:37:33 -08:00
use-streaming-chat-session.ts Implement modular context compaction architecture (#2159) 2026-02-06 21:52:33 -08:00
useActiveFile.ts Listen to active note changes (#1015) 2025-01-06 23:23:56 -08:00
useChatFileDrop.ts feat: drag relevant notes and sources into editor to insert wikilinks (#2288) 2026-03-13 11:56:55 -07:00
useChatManager.ts feat: Add Web Viewer bridge for referencing open web tabs in chat (#2096) 2026-01-12 17:54:54 -08:00
useChatScrolling.ts feat: Improve error handling architecture across chain runners. (#1931) 2025-10-23 17:00:23 -07:00
useLatestVersion.ts Add update notification (#1415) 2025-04-02 21:44:37 -07:00
useNoteDrag.ts feat: drag relevant notes and sources into editor to insert wikilinks (#2288) 2026-03-13 11:56:55 -07:00
useProjectContextStatus.ts feat: Add project new context loading ui. (#1695) 2025-08-08 09:59:00 -07:00