Floating workspace file-preview window for the Web client: lazy file tree, CodeMirror preview and in-window edit with save, Markdown and image preview, Quick Open search, and opening paths clicked in the conversation.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:UndeadSheep/dsh-file-preview#path:/packages/dsh-file-preview
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
Workspace file-preview host half: a Typert Remote (filePreview) that lists the
workspace tree, reads/writes text files, and resolves the preview theme and config for
the browser half.
The browser UI lives in a separate package:
@undeadsheep/dsh-client-ui-file-preview.
Remote surface
| Method | Request | Result |
|---|---|---|
listDir |
{ sessionId, path } |
Ok<FileTreeNode[]> | Rejected |
readFile |
{ sessionId, path } |
Ok<{ path, content }> | Rejected |
readImage |
{ sessionId, path } |
Ok<{ path, mimeType, data }> | Rejected |
writeFile |
{ sessionId, path, content } |
Ok<{ path }> | Rejected |
readTheme |
{ sessionId } |
Ok<{ colors, bg, fg }> |
readConfig |
{ sessionId } |
Ok<{ indentSize, useTabs, pollInterval, fontSize }> |
Business results use the repo's { ok: true, value } | { ok: false, error: { code, ... } }
convention; the generated ./remote face wraps them in the RemoteResult carrier.
Wire codecs are generated from the @Remote method types by typert codegen — there is
no hand-written schema file.
listDir lists a single directory (path = '' for the workspace root) and skips
heavy/noise directories (node_modules, .git, .next, .ssh, …) plus sensitive
filenames (.env*, id_rsa*, *.pem, *.key, …). A single listing is capped at
1000 children. Dir nodes carry empty children, which the browser half fills lazily
by calling listDir again when a directory is expanded. readFile / readImage /
writeFile also refuse those sensitive paths, so typing them in Quick Open does not
bypass the tree filter.
Config
| Key | Default | Meaning |
|---|---|---|
maxFileBytes |
2097152 | Maximum UTF-8 byte length the preview will read or write |
maxImageBytes |
5242880 | Maximum byte length of an inline image the preview will read |
Workspace config files (read per Session, optional)
preview.config.json—indentSize,useTabs,pollInterval,fontSize(with.prettierrc/package.json#prettierfallback for indent knobs)preview-theme.json—keyword,string,number,comment,tag,function,type,variable,background,foreground.vscode/settings.json—editor.tokenColorCustomizationsandworkbench.colorCustomizationsare read as a fallback theme
Known limitations
- Preview is text-only (plus raster
png/jpeg/gif/webp); binary, SVG-as-image, or oversized files returnnot-text/too-large. Astatwith nosizeis refused rather than reading the whole file into memory. Writes use the same byte cap as text reads. listDirreturns at most 1000 children per directory.- Symlink following after
resolveis the hostctx.fsimplementation's responsibility; this plugin re-resolves search children againstworkspaceRootbut cannotrealpathon its own. - Syntax highlighting is a lightweight hand-written tokenizer (not highlight.js / TextMate), and a prettier engine cannot be embedded.
- Auto-refresh is polling (
pollInterval, clamped 500–60000 ms), not a real file watcher.
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 8262
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★ 8262
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.
omdsh-dev/DSH-better-sidebar★ 3943
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
ccch1mneyyy/dsh-TUI★ 3913
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 3793
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.
Devin-AXIS/deepseek-design#deepseek-idesign★ 1414
Visual design studio for websites, app prototypes, posters, cards, reports, and magazines, with templates, direct element editing, selection-aware AI draft handoff, and export.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.