Turns file and directory paths in DSH chat into clickable buttons: click one to preview the file in the right sidebar, or open it with the system default application.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-file-opener
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:sailoumili/dsh-file-opener
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Turns file and directory paths that appear in a DSH conversation into clickable buttons: click one to preview it in the right sidebar, or to open it with your system's default application.
- Package:
dsh-file-opener - Repository: https://github.com/sailoumili/dsh-file-opener
- Supports the web and desktop builds of DSH 0.1.7-alpha.1 and later
- No third-party runtime dependencies, writes no state files, makes no network requests
Features
| Action | Result |
|---|---|
| Click a file path | Opens in the right sidebar if the sidebar can display it, otherwise with the system default application |
| Shift + click a file path | Always opens with the system default application |
| Click a directory path | Opens the directory in File Explorer |
| Click the folder icon after a path | File: opens the directory containing it. Directory: opens the directory itself |
| Click a path that does not exist | Opens the nearest real directory above it, without an error |
- Recognized path forms: absolute paths,
~/...(expanded to the current user's home directory), and./or../(resolved against the session working directory). - Inline code in user messages that carries no official button becomes clickable with the same folder icon, as long as its content is a path.
- A failed open always shows a visible message; nothing fails silently.
Installation
Web build
dsh plugin --profile web add dsh-file-opener
Desktop build
- Open the DSH desktop app and click Plugins in the left sidebar.
- Click Add plugin.
- Enter the package name
dsh-file-openerand click Install, then wait for it to finish. - When installation completes, click Enable now and confirm its switch is on under Installed.
Making the AI emit clickable paths
The plugin recognizes path text inside inline code (wrapped in backticks). To make files mentioned in AI replies clickable, ask the AI to write complete paths in your agent instruction file (for example AGENTS.md):
Every file or directory you mention in a reply must be wrapped in backticks as a complete
absolute path, for example `C:\work\report.md`. Never write only a file name, and never give
a directory and then a bare file name.
What happens when you click
Clicking a file path resolves in this order:
- The path does not exist → open the directory containing it.
- The path is a directory → open it in File Explorer.
- The path is a file:
- Its content is plain text → right sidebar;
- Otherwise, query the official previewer registry; a match → right sidebar;
- No match → system default application.
Plain text is decided by content alone: the first 4 KB are read, and the file counts as plain text when it contains no NUL byte and decodes as UTF-8. The extension is irrelevant.
Formats that open in the right sidebar
Markdown (md, markdown), HTML (html, htm), images (png, jpg, jpeg, gif, webp, bmp, ico, svg), PDF (pdf), Office (doc, docx, ppt, pptx), Excel (xlsx, xls, csv, tsv), syntax-highlighted code (every suffix in the official code-language table, such as ts, js, py, go, rs, java, c, cpp, cs, php, sh, bat, ps1, yaml, toml, sql, xml, css), and any file whose content is plain text (such as txt, log, dxf).
Formats that open with the system default application
dwg, psd, ai, skp, max, zip, 7z, rar, mp3, mp4, exe, msi, lnk, iso, tif, tiff, avif, and similar: archives, audio and video, installers, disk images, and binary formats the official previewers do not handle.
Two cases that look like faults but are not
.dxf: DXF is a text format, so it is treated as plain text and shown as source in the sidebar rather than launching CAD. Hold Shift while clicking to open it in CAD..docx,.xlsx,.pptx: DSH 0.2.0-rc.2 ships Office and Excel previewers, so these open in the sidebar rather than launching Office. This is intended behavior.
Office and Excel previews in the sidebar depend on the host's conversion component. When conversion fails, the sidebar only reports that it cannot preview the file and does not fall back automatically; hold Shift while clicking to open it with the system application.
Known limitations
- Opening directories is implemented for Windows only; other platforms fall back to the right sidebar.
- UNC network paths (
\\server\share) and Windows reserved device names (CON,PRN,AUX,NUL,COM1-COM9,LPT1-LPT9) are not opened. - Relative paths have no absolute path available and can only open in the sidebar; Shift does not force the system application for them.
- A path outside the workspace handed to the sidebar preview can return 403 under the host's access policy, and a very large file can return 413; hold Shift while clicking to open it with the system application.
- A path the process cannot read is treated as missing, which shows up as opening its parent directory.
- When a file name ends with a single quote or a backtick, that character is stripped as punctuation.
License
MIT, see LICENSE.
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 10686
Task board for the dsh web GUI: a sidebar multi-column kanban whose cards run in real DSH agent sessions and can also be scheduled with cron expressions, executed host-side even with the browser closed.
zhu1090093659/dsh-web#packages/dsh-web-all★ 10686
Plugin and skin collection for the DSH Web UI: task board, Git graph, right-side panel, remote mobile UI, pet, live token stats, and a skin center.
ccch1mneyyy/dsh-TUI★ 8436
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 7504
A fixed-corner whale widget for the DSH web GUI — balance, today's usage and per-turn cost with peak/off-peak pricing, editable balance-alert and daily-budget bubbles, a module-based custom bubble queue with A/B weighted choices and random lines or images, 30+ vendor templates (OpenAI, OpenRouter, Kimi, SiliconFlow, Ark, Zhipu, MiniMax and more) with per-model balance and subscription quota, plus task-end sound, imported audio, custom roles and a resource manager. Local-only, no telemetry.
omdsh-dev/DSH-better-sidebar★ 5379
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
omdsh-dev/dsh-genui★ 1076
Interactive UI components rendered inline in replies: layout, charts, forms, quizzes, mermaid, 3D scenes, and an action event loop back to the model.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.