Preview text, code and Markdown files

Text, code and Markdown files open in the side panel beside your chat, as a read-only preview. This page covers reading a long file in parts, the controls above the file, opening a file at a chosen line, and the messages these viewers show when something goes wrong; the preview pane itself and its viewer picker are on Preview files in the side panel.

Read a text file

Text and code files are read in parts as you read on, so a long file opens without the whole of it being read at once. The read limits are listed on Browse workspace files.

  1. Open the file in the preview. The first part appears.
  2. Scroll to the bottom of the pane, or choose Load more, to bring in the next part.
  3. Keep going while the control is there; at the end of the file it disappears.

Read code

Read Markdown

The controls above the file

Open a file at a line

When a file cannot be read

If the preview cannot read a file, the pane names the reason; where trying again can help, it offers Retry.

MessageWhat it means
File not found. It may have been moved or deleted.The file is no longer at this path, and no retry is offered.
This page exceeds the {limit} limit and cannot be read.The file, or the part being read, is over the preview's size limit, so it is refused rather than shortened; the limit is shown as bytes, KB or MB. Open the file in its usual application.
Not a regular file, nothing to display.What is at the path is not an ordinary file that can be read.
Preview is not available for this file type yet.The file's type has no viewer, so nothing is read or shown for it.
Read failed: {message}Something else went wrong; the detail after the colon says what.
The file resource service is unavailable.The part of Oda that serves files to the preview cannot be reached, so the pane cannot read the file; try Reload in the header.
The {name} preview is unavailable.The viewer named in the message cannot start for this file; switch to another viewer with Open with where one fits the file.

When the file's details cannot be read, a notice bar offers Reload, which reads them again.

When the file changes while you read and the pane is still showing the earlier version, it says The file has changed, showing the previous content. and the Reload next to the notice keeps your place; Preview files in the side panel covers refresh behaviour.

Questions, answered

How do I know I have reached the end of a file?

The Load more control stays while more of the file remains. It turns into a loading indicator while the next part is read, and disappears at the end: once it is gone, you have the whole file.

Why is one line highlighted when a file opens?

A search hit, a chat step or a link can open a file at a chosen line, and the preview then loads the file's parts until that line is shown, bringing the line into view and marking it. Opening the file again without a chosen line clears the highlight.

Why does my file open with highlighting and line numbers?

It is a code file, so it opens in the code viewer, with the source highlighted, its language named and line numbers along the side. Open with switches the viewer where more than one fits the file.

Why is there no wrap control on some files?

The wrap control belongs to the text and code viewers only; rendered Markdown, HTML pages, images, PDFs and spreadsheets do not offer it. In the text and code viewers wrapping is on by default, and the control turns it off and on again.

How do I copy code from the preview?

Use Copy in the code viewer, or on a code block inside a Markdown file. The control reads Copied after you use it.

Why do images and links in my Markdown appear late?

A Markdown file renders as one page that builds up while the file arrives, and its links, images and formulas finish resolving when the whole read completes. An image stored beside the file loads through the chat's file access; a web address stays as written.

What does The file resource service is unavailable. mean?

The part of Oda that serves files to the preview cannot be reached right now, so the pane cannot read the file. The tab stays open; try Reload in the header.

Why does the preview say a viewer is unavailable?

The viewer named in the message cannot start for this file. Where another viewer fits the file, switch to it with Open with; otherwise open the file in its usual application.

What does Not a regular file, nothing to display. mean?

What is at the path is not an ordinary file, so there is nothing to show. A folder or a special entry cannot be previewed; open an ordinary file instead.