M2.6: go-to popup for files, classes and symbols

One popup with Files / Classes / Symbols tabs (Tab switches), opened by
goto.fileOpen (Mod+P), goto.classOpen (Mod+Alt+C) and goto.symbolOpen
(Mod+T), each with an optional {query} for agents. Live debounced query
against goto.* with stale answers dropped, matched characters marked,
directory / namespace / container column, library rows labelled, an
indexing hint with progress and a re-query on indexReady. Enter or a
click opens through editor.reveal; Escape closes. An exclusive modal and
a launcher: any other command closes it.

goto.file items now carry `library` (PM decision). indexProgress and
indexReady join the ipc event union. Notes in plan/phpstorm/08-goto.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-10-17 17:03:06 +02:00
parent ef198f5f8f
commit 943ff889df
21 changed files with 1650 additions and 23 deletions

View file

@ -400,7 +400,7 @@ impl Command for File {
const SPEC: CommandSpec = goto_spec(
"goto.file",
"Go to File",
"{ query, limit? (default 50, at most 1000) }; returns { items: [{ path, score, matches: [[start, end]] }], indexing }: fuzzy over project-relative paths, file names weighted higher, project files before vendor files; matches are UTF-16 ranges in path; indexing is true while the index is still being built (partial results)",
"{ query, limit? (default 50, at most 1000) }; returns { items: [{ path, score, matches: [[start, end]], library }], indexing }: fuzzy over project-relative paths, file names weighted higher, project files before vendor files (library); matches are UTF-16 ranges in path; indexing is true while the index is still being built (partial results)",
);
&SPEC
}
@ -417,7 +417,14 @@ impl Command for File {
.map(|index| index.find_files(&query, limit))
.unwrap_or_default()
.into_iter()
.map(|hit| json!({ "path": hit.path, "score": hit.score, "matches": hit.matches }))
.map(|hit| {
json!({
"path": hit.path,
"score": hit.score,
"matches": hit.matches,
"library": hit.library,
})
})
.collect();
Ok(Outcome::value(
json!({ "items": items, "indexing": state.index.indexing() }),