Skip to content

[FEATURE] /explorer: VS Code-style file tree + fuzzy file finder in the chat TUI #588

Description

@edenreich

Summary

Add a /explorer chat command that opens a persistent VS Code-style file
explorer in the TUI - a left side panel showing the project's directory tree,
plus an fzf-like fuzzy file finder to jump to any file in the project quickly.

This mirrors the recently landed /diff "Changes" panel: the explorer is a left
rail that coexists with the chat (pushing the input to the right), is navigable
with the arrow keys, and closes with esc. Selecting a file previews it in the
main area; v opens it in the user's real editor (reusing the PTY editor added
for /diff).

The goal is to let developers browse and open project files without leaving the
chat TUI - the same way /diff lets them review changes in-terminal.

Acceptance Criteria

  • /explorer opens a persistent left "Explorer" panel (VS Code style) showing the working-directory tree; it coexists with the chat (input shifts right) and esc returns to the terminal - mirroring the /diff panel layout.
  • Tree navigation: collapsible folders, up/down to move, left/right (and h/l) to collapse/expand, file-type glyphs, respects .gitignore with a toggle to show hidden/ignored files.
  • Fuzzy finder (fzf-like): a key opens an incremental filter prompt; typing fuzzy-matches file paths across the project; enter opens the highlighted match. Scales to large repos (async/streamed file walk).
  • Selecting a file previews its contents in the main area (syntax-highlighted via the existing diffview/chroma renderer); binary/oversized files show a placeholder.
  • v (or the configured key) opens the selected file in the user's real editor via the existing PTY editor.
  • All panel + finder keybindings are user-configurable through a new explorer keybinding namespace in keybindings.yaml (following the diff_viewer namespace pattern).
  • The tree refreshes when files are created/removed/renamed (fsnotify or a poll, consistent with how /diff live-refreshes).
  • Unit tests for the file-walk/filter/tree model; a [DOCS] follow-up issue is filed against inference-gateway/docs when the feature ships.

Implementation notes (reusable building blocks)

This can lean heavily on infrastructure already in the repo:

  • Side panel + tree + configurable keymap: internal/ui/components/diff_viewer.go (the /diff Changes panel) is the template - flattened collapsible rows, selection preservation, a dedicated ViewState (ViewStateDiffViewer in internal/domain/state.go), a /-shortcut + side-effect (internal/shortcuts/, internal/handlers/chat_shortcut_handler.go), and the configurable diff_viewer keybinding namespace (config/keybindings.go + ResolveNamespaceBindings).
  • Open in real editor: the PTY-backed editor internal/ui/components/pty_editor.go (runs the user's $VISUAL/$EDITOR/vim in a pane) plus the encodeKey helper.
  • File preview: the diffview renderer behind internal/ui/components/diff_renderer.go can render a single file's content with syntax highlighting.
  • Fuzzy matching: pick a small, dependency-light fuzzy matcher (fzf-style scoring); scope the walk to the repo root and honor .gitignore.

Suggested approach: add a ViewStateExplorer + /explorer shortcut, a new explorer
component reusing the diff viewer's sidebar/keymap patterns, and a fuzzy-finder
overlay; reuse the PTY editor for v.

Follow-up to the /diff work (panel + configurable keybindings + PTY editor).

Activity

  1. added
    enhancement
    on Jun 4, 2026
  2. added theissue type on Jun 4, 2026
  3. added a commit that references this issue on Jun 4, 2026
    2b73fcc
  4. inference-gateway-releaser commented on Jun 5, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.118.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementreleased

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions