Inline @ file-mention suggestions for the TUI composer — the SAME
affordance the web composer already has, so both channels share one
behaviour instead of a modal on one side and an inline picker on the
other.
Ranking is powered by fff (internal.file-picker/fuzzy-file-rows) — the
very same engine behind the find_files tool and the gateway
/v1/sessions/:sid/suggest service — so @fpick fuzzily finds
file_picker.clj (typo-tolerant subsequence match ranked by frecency),
not just a literal substring.
The trigger rules mirror the web/JS verbatim so writing a literal @
is never endangered:
@ must begin a word (start of input or right after whitespace),
so foo@bar, user@host, decorators never pop the picker;@@ escapes to a literal @ and suppresses the popup;Ranking rides the POOLED fff index leased from internal.fff-index (via
file-picker/fuzzy-file-rows), the very same instance the grep /
find_files tools and the gateway suggest service search — one index per
workspace, not a private one per popup. This ns owns and closes NOTHING;
the first build is kicked OFF the render thread and the popup shows nothing
until it lands, so a keystroke never waits on a tree scan.
Inline `@` file-mention suggestions for the TUI composer — the SAME affordance the web composer already has, so both channels share one behaviour instead of a modal on one side and an inline picker on the other. Ranking is powered by fff (`internal.file-picker/fuzzy-file-rows`) — the very same engine behind the `find_files` tool and the gateway `/v1/sessions/:sid/suggest` service — so `@fpick` fuzzily finds `file_picker.clj` (typo-tolerant subsequence match ranked by frecency), not just a literal substring. The trigger rules mirror the web/JS verbatim so writing a literal `@` is never endangered: - the `@` must begin a word (start of input or right after whitespace), so `foo@bar`, `user@host`, decorators never pop the picker; - `@@` escapes to a literal `@` and suppresses the popup; - selection is advisory — nothing is rewritten unless the user picks. Ranking rides the POOLED fff index leased from `internal.fff-index` (via `file-picker/fuzzy-file-rows`), the very same instance the `grep` / `find_files` tools and the gateway suggest service search — one index per workspace, not a private one per popup. This ns owns and closes NOTHING; the first build is kicked OFF the render thread and the popup shows nothing until it lands, so a keystroke never waits on a tree scan.
(apply-mention {:keys [lines crow ccol] :as st} path)Splice the picked path into input-state, replacing the active @token
at the caret with a visible file mention (input/format-file-mention) plus
a trailing space. Returns the input unchanged when no mention is active.
Splice the picked `path` into `input-state`, replacing the active `@token` at the caret with a visible file mention (`input/format-file-mention`) plus a trailing space. Returns the input unchanged when no mention is active.
(mention-at head)Return {:query q :at start} for an active @ file mention ending at
the caret, or nil. head is the input text up to the caret. start is
the index of the @ within head.
Return `{:query q :at start}` for an active `@` file mention ending at
the caret, or nil. `head` is the input text up to the caret. `start` is
the index of the `@` within `head`.(suggestions input-state selected-index)File-mention suggestions for input-state, shaped to ride the SAME
overlay + key handling as slash suggestions: :slash/usage is the
path chip, :label the size · age · status meta, :slash/selected?
marks the cursor row. Returns nil when there is no active @ mention
at the caret (so the slash path stays in charge).
File-mention suggestions for `input-state`, shaped to ride the SAME overlay + key handling as slash suggestions: `:slash/usage` is the `path` chip, `:label` the size · age · status meta, `:slash/selected?` marks the cursor row. Returns nil when there is no active `@` mention at the caret (so the slash path stays in charge).
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |