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

# File viewer

> Open workspace source files from Pioneer messages on desktop and mobile.

Pioneer makes markdown links in timeline messages clickable. Web links show a globe icon and open in a browser. Local file links show a file icon and open in the configured source editor or file manager.

The file workflow is useful when an agent cites a path and line number, or when you want to inspect the file that a gateway-backed turn used.

## Open a source file

On Desktop, select a local file link in a timeline message. Desktop recognizes absolute paths and `file://` URLs, including an optional line and column, and passes the target to the selected opener.

Local file links use the file icon. Web links use the globe icon. Desktop's configured opener runs on the desktop machine and does not fetch a remote gateway path through the gateway.

The opener uses the line and column when the selected editor supports them. VS Code-style editors receive a `path:line:column` target; JetBrains-style editors receive separate line and column arguments. Other openers receive the file path and use their own default location behavior.

## Mobile source viewer

On mobile, selecting a local file link opens a read-only source screen. The app sends the thread, turn, item, and link target to the gateway. The gateway checks thread access and the turn's workspace scope, then returns a short-lived view grant. The app fetches the text through the authenticated gateway connection and places the cursor at the cited line and column when they are available.

The mobile app validates the grant URL, file metadata, content type, size, and UTF-8 content before displaying the file. It keeps the link context in memory for a short time and releases it when the source screen closes.

## Choose an opener

On Desktop, choose the default application for workspace file links in **Settings > General > Open files**. The setting is stored per gateway, account, and workspace, so the same workspace can use a different editor on different gateways. The desktop detects supported applications that are installed on the machine and always keeps the system file manager as a fallback.

For one thread, open the file-opener menu in the thread header and choose an override. **Default** returns to the workspace choice. A thread override takes precedence over the workspace default and applies only to that thread. If the selected editor is no longer available, Desktop falls back to the system file manager.

Supported choices include Cursor, Trae, Kiro, VS Code, VS Code Insiders, VSCodium, Zed, Antigravity, IntelliJ IDEA, Aqua, CLion, DataGrip, DataSpell, GoLand, PhpStorm, PyCharm, Rider, RubyMine, RustRover, WebStorm, and the system file manager. Editors that support a line and column receive the position from the link; other editors receive the best location format they support.

## View grants

Mobile and other FFI clients send the thread id, turn and item context, and the link target to `thread/file/view_grant/create`. The gateway checks thread access, resolves the workspace path, and returns a relative `/storage/views/...` URL with:

* a short expiry;
* file name and content type;
* byte size;
* optional line and column;
* the session-bound view scope.

The mobile source screen fetches that relative URL through the authenticated gateway connection. FFI callers receive a resolved, short-lived URL and must use it only for the current view. It is not a permanent gateway credential. `GET` and `HEAD` are supported for the view representation.

## Limits and errors

The gateway-backed source viewer is for text files up to 10 MiB. The gateway does not silently truncate a larger file. It returns an explicit error so the client can keep the source link visible and explain why it could not open. Desktop's local editor action does not use this gateway size limit.

The viewer can fail when:

* the thread or file is no longer visible to the current session;
* the path is outside the workspace or allowed file roots;
* the file was deleted or changed into an unsupported type;
* the grant expired before the viewer opened it;
* the gateway is unavailable;
* the file exceeds the text-size limit.

Retrying should request a new grant. It should not reuse an expired URL or bypass the gateway with a local file read.

## External links

Web markdown links are treated separately from workspace file links. Pioneer displays a globe icon and opens them through the client platform. Mobile forwards only HTTP and HTTPS URLs to the platform linker; Desktop delegates web links to the system browser. The source viewer does not fetch web URLs as workspace files.

## File history and artifacts

The viewer shows the current authorized file. To understand how the file changed during agent work, use the turn or thread patch-history surface. Patch history reports exactness and coverage so a provider aggregate is not mistaken for an engine-verified diff.

Artifacts use a different identity. An artifact is a durable uploaded or generated object that can be attached to later work. A workspace file view is a live read of a path under thread authorization. See [Artifacts](https://docs.getpioneer.dev/desktop/artifacts.md) when the file needs to travel with a task or remain available after the workspace path changes.

## Further reading

* [Patch history and file mutation](https://docs.getpioneer.dev/architecture/patch-history.md) explains native mutation, snapshots, and recovery.
* [Patch history API](https://docs.getpioneer.dev/protocol/patch-history.md) documents the view-grant and diff methods.
* [Artifacts architecture](https://docs.getpioneer.dev/architecture/artifacts.md) explains durable artifact storage and HTTP delivery.
* [Tools architecture](https://docs.getpioneer.dev/architecture/tools.md) explains file policy and permission admission.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.