feat(mecatui): click agent-generated file links to open them
@JAORMX is already working on this.
Since Sep 7, 2026.
- Dominant language
- Go
- Stars
- 152
- Forks
- 16
- Avg merge
- 14h 48m
- Merged PRs (30d)
- 536
Description
Problem
A mecatl agent can generate a workspace artifact such as a CSV and report its path in the conversation, but mecatui provides no direct way for the user to open it. The user must manually find the file in Finder or run an OS command.
Desired behavior
When an agent reports a generated in-workspace file, mecatui renders the path as a clickable file link. Clicking it opens the artifact with the host OS default application. The rendered path remains selectable/copyable text.
This should build on the terminal-link interaction work in #489 where practical, rather than adding a second incompatible link mechanism.
Scope
- Identify agent-reported workspace artifact paths and render them as an explicit clickable file link in scrollback.
- On click, open the selected artifact with the host OS default application.
- Retain the plain path in the transcript for copying.
- Provide an equivalent keyboard-accessible action for terminals/users that cannot click links.
- Surface an actionable error when a path is missing, outside the workspace, or cannot be opened.
Security constraints
- Only offer file-opening links/actions for paths that resolve inside the active workspace.
- Treat the path as data, never as a shell fragment or command.
- Use an argument-based OS launcher; never construct a shell command from the path.
- Do not make arbitrary URLs or paths in model-authored text trusted file-open targets.
Acceptance criteria
- An agent-generated in-workspace CSV is visibly rendered as a clickable link in mecatui scrollback.
- Clicking the link opens the intended file in the OS default application.
- The same artifact can be opened through a keyboard-accessible action.
- The original path text remains copyable.
- Missing, malformed, symlink-escaping, and out-of-workspace paths are rejected with a visible error and never invoke the launcher.
- Paths containing spaces and Unicode characters open correctly.
- Add offline tests for link rendering, successful launch, and all rejection paths; keep OS launching behind a testable seam.
Related
- #489 — click-to-open URLs in mecatui scrollback
- #677 — generated output files in a UI
- #629 — attachment and output-file support, primarily Studio/WebUI
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.