Skip to content

[FEATURE]: Map file types to external applications when opened from chat (like link handling) #47765

Description

@panteleimon

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Describe the enhancement

URLs in chat are handed to the OS default handler (the browser). File paths in chat are not: there is no way to open a referenced file in an external application on any platform, and OS file associations are never consulted.

Two levels of this feature, either would be valuable:

1. Minimal — delegate to the OS default application. When a file path is clicked/opened from chat, hand it to the platform handler (start on Windows, open on macOS, xdg-open on Linux). The user's system file associations decide what opens. No config needed.

2. Full — a config mapping file extensions to external commands, for users who want more control than the OS default:

{
  "file_open": {
    "*.md": "cmd /c start chrome",
    "*.pdf": "open",
    "*.html": "xdg-open"
  }
}

If a full mapper is not feasible, level 1 alone would already close the biggest gap — right now there is no external-open path at all.

Reproduction (observed)

On Windows (TUI, opencode 1.18.29):

  1. Ask the agent to reference an absolute path, e.g. C:\Users\...\report.md
  2. Plain click the path → nothing happens
  3. Ctrl+click the path → nothing happens
  4. A markdown file:// link to the same file → nothing happens

The same asymmetry (built-in viewer only, no external dispatch) applies on macOS and Linux; the click handling itself may differ per platform, which is why the proposed mechanism is deliberately platform-agnostic.

Why

Expected behavior

  • Minimal: any file reference → OS default application, honoring system file associations.
  • Full: mapped extensions → the user's configured command/app; unmapped extensions fall back to the minimal behavior.
  • No new UI surface needed — just a dispatch to the OS.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions