Skip to content

Feature request: chat links that open workspace files in the preview pane #2881

@colin715

Description

@colin715

Feature Request: Chat links that open workspace files in the right-side preview pane

Feature Description

Add a supported markdown link format in Hermes WebUI chat messages that opens a workspace file directly in the right-side workspace preview pane.

For example, an assistant could respond with:

[Open product research file](workspace://sample-pantry-product-research-results.md)

or another agreed internal scheme, and clicking the link would call the existing workspace file preview behavior rather than opening the file as a browser attachment/download.

Motivation

Agents often create files in the active workspace, then need to point the user to the result. Today, the assistant can show a path or attach it with MEDIA:/absolute/path, but neither is ideal:

  • A plain path is not clickable.
  • A MEDIA: attachment opens/renders as an attachment, not in the workspace pane.
  • file:// markdown links are rewritten to /api/media?..., which serves the file but does not use the workspace preview pane.

For workflows like client product research, plans, generated reports, markdown summaries, or edited workspace files, the ideal UX is:

  1. Agent creates/updates a file in the current workspace.
  2. Agent sends a concise clickable link in chat.
  3. User clicks the link.
  4. Hermes WebUI opens that file in the existing right-side workspace preview pane.

This would reduce friction for non-technical users who do not want to hunt through the file tree.

Current Behavior / Findings

While researching the WebUI code, I found:

  • The workspace pane already has an openFile(path) function in static/workspace.js that opens files in the preview pane.
  • The file tree calls openFile(item.path) when a file row is clicked.
  • The chat markdown renderer supports normal links and supports file:// links, but file:// is rewritten through _markdownHref(...) to api/media?path=...&inline=1.
  • There does not appear to be a supported chat link scheme that routes a click to openFile(path).

Proposed Solution

Support a custom internal link scheme for workspace files, such as:

[Open file](workspace://relative/path/to/file.md)

When the user clicks one of these links in a chat message:

  1. Prevent default navigation.
  2. Decode the relative workspace path.
  3. Validate/sanitize the path using the same rules as existing workspace file APIs.
  4. Call the existing openFile(path) function.
  5. Open/show the workspace panel in preview mode if it is currently closed or hidden.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestsprint-candidateStrong candidate for next sprintuxUser experience / visual polishworkspaceWorkspace panel, file browser, preview

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions