feat: inline reference chips in composer and message bubbles - #35
Merged
Conversation
… message bubbles - Add CodeMirror-backed live composer with reference chip decorations (atomic delete, click-to-open, auto-height) bridged onto the legacy textarea so all existing input consumers keep working unchanged - Render @path tokens in user message bubbles as the same chips via a markdown pre-pass (vault-verified, code spans untouched) - Keep sent message content untouched: chips are display-only skins - Open files in a leaf and reveal folders in the file explorer; openLinkText misfires on folders by offering to create a file - Add ReferenceChipKind type to prepare typed click dispatch - Add @codemirror/commands dependency for editor history
- Add ReferenceChipKind as the single chip type union; all chip surfaces (mention dropdown, composer, bubble HTML) now share it - Dispatch chip clicks through a per-kind action registry (openReferenceChip): files open in a leaf, folders reveal in the file explorer; stale kinds fall back to the entry's real type - Flash the revealed folder entry with the brand color so chip clicks have a visible landing point without touching theme active styling
- Bubble mention chips now verify @tokens with longest-match vault shrinking, so paths containing spaces chipify instead of truncating at the first space. - Vault drops are claimed in the capture phase so CodeMirror never pastes the OS-level obsidian:// URI payload next to the mention. - Dropped references register through FileContextManager so they chipify in the composer exactly like dropdown insertions. Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
Composer chips previously required Cmd/Ctrl-click to open while a plain click only selected the chip text. Align with message-bubble chips: a plain click now dispatches the open action on both surfaces. Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
Each composer chip now ends with an x button that deletes the whole token atomically, matching the Backspace behavior. stopPropagation keeps the chip's click-to-open intact. Bubble chips stay button-free. Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
|
|
||
| const escapedPath = typeof CSS !== 'undefined' && CSS.escape | ||
| ? CSS.escape(path) | ||
| : path.replace(/"/g, '\\"'); |
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@file/@folder/mention tokens as inline chips in the chat composer (CodeMirror-basedLiveComposerbehind a hidden-textareaComposerBridge, so all existing input consumers keep working unchanged) and in sent message bubbles.obsidian://openURI next to the mention, and dropped references register throughFileContextManagerso they chipify exactly like dropdown insertions.@pathtext, especially for CJK vaults where spaced filenames are common.Verification
npm run typechecknpm run lintnpm run test(3400 tests)npm run buildnpm run release:checknpm run audit:prodSafety
CHANGELOG.md