Skip to content

feat(tui): add workspace file autocomplete - #82

Open
svadrutk wants to merge 3 commits into
mainfrom
feat/text-file-picker
Open

feat(tui): add workspace file autocomplete#82
svadrutk wants to merge 3 commits into
mainfrom
feat/text-file-picker

Conversation

@svadrutk

@svadrutk svadrutk commented Sep 1, 2026

Copy link
Copy Markdown

HumanLayer Task

Why the change

Typing @ in the TUI can now find and insert workspace-relative file paths without changing Kit's plain-text prompt or ACP submission model.

Special things to note

  • The picker activates only for a typed @ at the start of the prompt or after whitespace; pasted text and email-like input stay ordinary text.
  • Tab completes the selected path, while Enter keeps its existing submit behavior.
  • fff-search is isolated behind a private adapter, and indexing or search failures close the picker without losing prompt text.

Change outline

The new adapter keeps third-party search state outside the editor and application state.

 Cargo.toml / Cargo.lock       # add fff-search and bump Kit to 0.1.119
 src/tui/
 ├── editor.rs                # expose cursor and replace UTF-8-safe ranges
+├── file_search.rs           # own FFF setup, queries, results, and errors
 ├── app.rs                   # own trigger, picker state, revisions, and keys
 ├── mod.rs                   # run blocking index/search work asynchronously
+└── ui.rs                    # render the picker next to the active composer

Search results follow the existing action/update boundary and remain plain prompt text.

typed eligible @
  App inserts @ and emits SearchFiles(query, revision)
    blocking worker lazily starts WorkspaceFileSearch
      fff-search indexes and searches the canonical workspace root
    FileMatches(revision, matches)
      stale revision -> discard
      current revision -> render near composer
  Up/Down -> choose result
  Tab -> replace @query with @relative/path
  Enter -> existing prompt submission

Screenshots

CleanShot 2026-09-01 at 16 24 01 CleanShot 2026-09-01 at 16 24 30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant