feat(amicode): file-reference resolution — click file paths in chat to open in editor - #143
Merged
Merged
Conversation
…o open in editor Resolves relative paths against vault mounts (first-hit precedence). Extracts and rewrites file references in markdown responses. Skill chips, read-tool loaded-file rows, and edit/write trigger filenames are now clickable (open in editor via the VS Code bridge). Server: GET /amicode/resolve-file resolves path-like strings to absolute on-disk paths (tiers: absolute → ~ → mount-prefixed → relative first-hit → typed-prefix bare filenames). Same loopback gate as the vault browser. Client: markdown-file-refs.ts provides an app-injected resolver registry with bounded (500, FIFO) cache and in-flight dedupe. markFileLinks() in markdown.tsx wraps resolved path-pills in file:// anchors and rewrites dead relative authored links. Co-authored-by: Aaron Trowbridge <aaron.j.trowbridge@gmail.com>
jeonghun-jj-lee
added a commit
that referenced
this pull request
Aug 12, 2026
…micode#349) (#191) The file-reference resolution feature (PR #143, c1e4862) accidentally removed the [data-slot="question-text-form"] CSS rules that gave the kind:"text" question textarea its border, background, radius, and min-height. Without them the textarea renders transparent and borderless — effectively invisible to the user. Restores the two rule blocks (v2 design tokens + legacy compat) and adds a regression test that asserts the selectors remain present. Closes harmoniqs/amicode#349
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.
Resolves relative paths against vault mounts (first-hit precedence). Extracts and rewrites file references in markdown responses. Skill chips, read-tool loaded-file rows, and edit/write trigger filenames are now clickable (open in editor via the VS Code bridge).
Server
GET /amicode/resolve-file?path=<text>— resolves path-like strings to absolute on-disk paths. Tiers: absolute →~→ mount-prefixed → relative first-hit → typed-prefix bare filenames. Same loopback gate as the vault browser; resolves only, never reads.Refactors
scanMountsinto a structuredlistMounts()(returns{id, kind, writable, dir}[]) that the resolver walks for first-hit resolution.Client
markdown-file-refs.ts— app-injected resolver registry with bounded (500, FIFO) cache and in-flight dedupe. Transient fetch failures stay uncached so the next render retries.markFileLinks()inmarkdown.tsx— wraps resolved path-pills infile://anchors and rewrites dead relative authored links. Gated ondata-new-layout.Wiring
AmicodeFileRefBridgemounted inSelectedServerProviders— registers the resolver per-call viapickVaultServerOpenableFilenamein tool cards — edit/write/read filenames are clickable buttonsAmicoSkillChipgainspathprop — opensSKILL.mdsource on clickopenFileInEditor(abs)bridge posts to the VS Code extension hostTests
amicode-file-resolve.test.ts: 9 passmarkdown-file-refs.test.ts: 5 passCo-authored-by: Aaron Trowbridge aaron.j.trowbridge@gmail.com