<!-- https://zerolog.ch/docs/files · Docs / Compute -->
# Files

A real file tree of the workspace. Open **Compute**, then **Files**, and pick a workspace.

## What you can do

- browse
- open a file, rendered or as source
- edit a text file and save it
- download a single file

A paused workspace shows its last listing from network storage. Restore the workspace to open or download files.

## Getting files in

- attach them in a chat
- mount the workspace as a [network drive](https://zerolog.ch/docs/smb)
- use the editor or the [terminal](https://zerolog.ch/docs/terminal)

## What the AI sees

Edits you make are immediately what the AI sees. If the file changed after you opened it, your save is refused and you reload first.

you edit a file

the AI sees it

the same filesystem

no sync step

## Browsing and editing workspace files

Mermaid source of the diagram on this page:

```mermaid
%% Files: one workspace's file tree. Facts from web/apps/web/components/compute/files.tsx, components/chat/file-viewer.tsx, server/routes/containers.js (files-metadata, files, file, text, POST file).
flowchart TB
  tab["1. Compute, Files<br/>pick a workspace"]
  live["Running workspace<br/>live file tree"]
  off["Paused workspace<br/>last listing from<br/>network storage"]
  restore["Restore workspace"]
  open["2. Open a file<br/>rendered or as source"]
  save["Edit a text file and save<br/>refused if the file changed<br/>since you opened it"]:::hot
  dl["Download one file"]
  ai["Same filesystem<br/>the AI sees the change"]

  tab --> live
  tab --> off
  off --> restore --> live
  live --> open
  live --> dl
  open --> save --> ai

  classDef hot stroke:#8f7ac9
```
