> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bricks.tools/llms.txt
> Use this file to discover all available pages before exploring further.

# File viewer

> Browse, preview, and search your project files in tabbed right-panel views

Open project files, config assets, and chat-referenced paths in a tabbed viewer beside the chat. The file viewer renders source code, Markdown, images, and animations inline, searches your whole project, and hands files off to an external editor when you need one.

## Open the file viewer

There are three ways to open a file:

* **From the right panel** — Open the right panel and choose **Files** from its start page to browse the file tree.
* **From a tool entry** — When the agent reads, writes, or edits a file, a file icon appears next to the path in the chat. Click it to open that file in a viewer tab.
* **From a chat message** — Click a local file link in any message (for example, a Markdown link like `[README](README.md)`) to open it in a tab.

## File tree

The Files view lists your project in a tree with two sections:

* **Local files** — Files and folders in the project directory. Click a folder to expand or collapse it; click a file to open it in a tab.
* **Config URL assets** — Remote assets referenced by your built application config (image, Lottie, and Rive sources), grouped by subspace. Each entry shows its `md5` so you can match it against the config.

Click the toggle button to hide or show the tree pane. Dependency, build, and tooling folders are excluded from the tree — `node_modules`, `.git`, `.github`, `.claude`, `.codex`, `.husky`, `dist`, `.cache`, and `bun.lock` — while `.bricks/build` is always included.

## Tabs

Each file you open becomes a tab across the top of the viewer. Reopening a file that is already open switches to its existing tab instead of duplicating it, and you can reorder or close tabs as you go.

## Previews by file type

The viewer picks a renderer based on the file:

| File type                                            | Rendering                                                                                             |
| ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| Source code, JSON, text, dotfiles, TOML, YAML, shell | Line-numbered, syntax-highlighted code                                                                |
| Markdown                                             | Rendered preview with a **Preview** / **Source** toggle; renders Mermaid diagrams and embedded images |
| Images and SVG                                       | Inline image                                                                                          |
| Video                                                | Inline player                                                                                         |
| Lottie (`.lottie` or Lottie JSON)                    | Animated preview                                                                                      |
| Rive (`.riv`)                                        | Animated preview                                                                                      |

Files past the size limit — 1 MB for text, 10 MB for binary — show **File is too large to preview.** with a button to open them externally instead.

## Find in a file

Press **Cmd+F** (macOS) or **Ctrl+F** (Windows and Linux) while the viewer is focused to open the find bar. It shows the current match position and total (for example, `1/1`) and highlights every match in the file. Press **Enter** to jump to the next match, and **Esc** or the close button to dismiss the bar.

## Search across files

Type in the **Search files** box at the top of the tree to search file contents across the whole project. Matching files appear under **Content matches**; click a result to open the file. Search returns up to 200 results.

## Open externally

Click **Open file externally** in the viewer header to open the current file in an external editor. The button lists the editors detected on your system.
