DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

NonchalantLudens /

NonchalantLudens/dsh-side-dir

Verified

Project directory preview for the DeepSeek Harness web GUI — details-panel file tree + read-only file preview via a fenced /dirpreview command

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@bc3547c7

dsh-side-dir

dsh-plugin

DeepSeek Harness(dsh)Web 界面的项目目录预览插件:侧栏「目录」开关 → 右侧 details 面板浏览当前会话工作目录的文件树,点击文件只读预览内容。

English | 简体中文

How it works

  • 目录树:懒加载。展开目录时经 /dirpreview list 命令(ctx.fs.listDir)列出该层全部子项——含文件、类型与大小,单层上限 500 条。
  • 文件内容:核心 wire 契约封闭(插件不能新增 RPC),内容通过插件注册的 /dirpreview read 命令经 command.execute RPC 返回——官方允许的 host→client 数据通道。
  • 安全围栏:所有路径 ctx.fs.resolve 到会话 cwd 并用 ctx.fs.contains 校验,越界拒绝;只读(handler 无任何写入);内容上限 256KiB;二进制文件由 ctx.fs.readText 原生拒绝。
  • 入口:侧栏底部「目录」按钮切换。ON 时以 priority 遮蔽 details 单槽渲染面板(原生面板在 OFF 后完整恢复);OFF 释放。

Install

dsh plugin --profile web add github:NonchalantLudens/dsh-side-dir
# 或 npm 发布后:
# dsh plugin --profile web add dsh-side-dir

重启 dsh web,侧栏底部点「目录」。

Structure

  • lib/index.js — host 半边:注册 /dirpreview 命令(root / list / read 三个子命令)
  • lib/client.js — 客户端产物(加载器闭包工厂格式,手写维护):侧栏开关 + details 面板(目录树 + 文件预览)
  • cordis.patch.yml — 安装时插入 host 行;dsh.client 声明使客户端产物自动进入 web roster

Design doc

docs/specs/2026-08-23-side-dir-design.md

License

MIT

—/ 5

No ratings yet

Verified DSH bundle

Commit bc3547c77b4f

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout