Browse workspace files

The side panel shows the folder a chat works in as a browsable file tree, and a file opens from it in a read-only preview that keeps up with the file as it changes. This page covers browsing the folder, how a file is read, and what a failed read says; Preview files in Oda covers the viewers themselves.

Browse the chat's folder

  1. Open the side panel and choose Workspace files.
  2. Expand a folder to see inside it. Folders are read one level at a time, and a folder you reopen shows its earlier contents while it reads them again.
  3. Click a file row to open its preview.

How a file is read

Limits at a glance

ReadLimit
One part of a text fileup to 5,000 lines; 2 MiB per part
A whole file32 MiB
One folder listing2,000 entries, then cut with a note

When a read fails

A read that cannot run reports why, with one of these messages:

MessageMeaning
no entry at "<path>"There is nothing at that path.
"<path>" is a <type>What is there is not an ordinary file: a folder, a link, or something else.
"<path>" is outside the workspaceA folder listing or folder watch pointed outside the chat's folder.
"<path>" contains NUL bytesThe file is not text, so a text read cannot show it.
"<path>" is not UTF-8 textThe file is not text, so a text read cannot show it.
"<path>" exceeds the <n> byte full-file capThe file is larger than the whole-file limit.
lines <a>-<b> of "<path>" exceed the <cap> byte capThe part being read is over the byte limit; it is refused rather than shortened.
<n> bytes of "<path>" exceed the <cap> byte capThe part being read is over the byte limit; it is refused rather than shortened.

A file that is deleted, or swapped for another one while you read it, is reported as an error; a preview never answers with content that does not match the file. A file that returns at the same path can be picked up again.

Follow a file as it changes

The folder's git branch

When the chat's folder is inside a Git repository, the strip under the message box shows the checked-out branch, or the short commit of a detached checkout. Nothing shows while Oda does not know the branch, or when the folder is not in a repository, and the branch follows a checkout or a new repository without a reload.

Questions, answered

Does Oda have to stay inside the workspace folder to read a file?

No. Oda reads the files your computer account can open, inside the chat's folder or outside it. Browsing is narrower: the Workspace files tree and folder watching stay inside the chat's folder, so you never see folders above it.

Why can't Oda read a file through a symbolic link?

A read refuses a file reached through a symbolic link, even when the link points back inside the folder. The tree still shows the link and marks what it points to. Open the file in its usual app to read it there.

Why does the preview load a long file in parts?

Text is read in parts of up to 5,000 lines, and a part that would exceed 2 MiB is refused rather than shortened. The preview brings in the next part as you read on; that keeps a long file readable without loading it whole.

What happens to a preview when the file changes?

The preview follows the file: when it changes, the open view is refreshed. Watching is shared, so several previews of the same file use the same watch.

What happens when the file is deleted or replaced while I read it?

The read is refused with an error, never answered with content that does not match the file. If the file returns at the same path, the preview can pick it up again.

Why does a folder show only some of its entries?

A folder holding more than 2,000 entries is cut at 2,000 and the tree says so: Too many entries, showing only some of them. Open the folder in your own app when you need the full list.

Why does a read say the file is not UTF-8 text?

The file is not plain text the way a text read needs: its bytes do not decode as UTF-8, or it contains NUL bytes that mark it as binary. A text preview cannot show it; open it in an app that understands the format.

Can I rename or delete files from the tree?

No. The tree and its previews are read-only. To work with the files yourself, open the folder in your own app with Open In... (Open files and folders in other apps); the changes Oda makes in a chat appear in the chat's changed-files card (Changed files and comparisons).