Jiyr0119 / dsh-workspace-explorer

已收录

DeepSeek Harness 工作区文件资源管理器:右侧目录树面板,点击/拖拽文件引用进输入框,UI 对齐 DSH 原生风格 | Workspace file explorer plugin for DeepSeek Harness: right-side file tree panel, click or drag file references into the composer, native DSH look

main工具 查看源代码

安装

npx -y @deepseek-ai/dsh plugin --profile web add github:Jiyr0119/dsh-workspace-explorer

此安装命令根据 GitHub 仓库地址生成,是未经验证的安装起点。

README

维护者编写的文档快照。

在 GitHub 查看 ↗
提交版本 e8b4fca同步于 2026年8月17日

dsh-workspace-explorer

English | 中文

License npm npm downloads Pages Last commit

A workspace file explorer for the DeepSeek Harness Web UI: a file-tree button in the session header opens an animated popup showing the current workspace's directory tree — click or drag a file to send its reference to the model.

Inspired by the VS Code / Cursor project tree, filling the gap of a missing directory view in DSH after workspaces are added.

🖥 Live Demo (GitHub Pages)

🔗 Try the interactive preview

An interactive mock of the panel UI — no DeepSeek Harness needed to try it. The real plugin runs inside the Harness web UI as a dynamic Cordis plugin.

dsh-workspace-explorer demo

Screenshots · 截图

Panel

File tree

Insert & send

Features

  • 📂 Animated popup — a file-tree icon in the session header (beside the session log button) opens a floating panel with a spring-like fade/scale-in animation; the popup is measured live to sit between the session header and the composer (the chat area's right side), so it never covers the input box
  • 🗂 Top tab bar — click at the top of the panel to switch between Files and Settings; the Settings page tunes behavior live (hide noise dirs, show sizes, reference format, preview lines, panel width) and mirrors into DSH Settings → Workspace Explorer
  • 🗂 Lazy-loading tree — directories load on demand; noise dirs (node_modules, .git, dist, __pycache__, …) are hidden automatically
  • 🎨 File-type icons — filled, color-coded document badges per extension (TS / JS / Python / JSON / Markdown / image / config / shell, …); amber folders that brighten when expanded
  • 🖱 Click to insert — click a file row to append a [file: relative-path] reference to the composer; after sending, the model resolves it with its read tool
  • 🖱 Drag & drop — drop a file into the composer to insert at the caret (fullscreen dashed hint); dropping elsewhere appends to the end
  • 🌓 Theme-aware — built entirely on DSH's --dsw-alias-* design tokens; adapts to light/dark with a native dialog look (16px radius, lv3 shadow)
  • 🔍 Search & filter — filter files by name across loaded directories (flat result list with a match count)
  • 👁 Inline preview — peek the first 60 lines of any text file; insert the reference, or paste the full content for small files (≤ 32 KB)
  • 🌐 i18n — zh/en dictionaries registered through DSH's locale service; the panel follows the DSH UI language

Quick Start

Installation & usage

Way 1 · Native install via dsh plugin add / storefront (recommended) One command installs the full plugin — no build step, no config changes. The npm package ships a native host half (lib/index.js, webServer JSON routes incl. /dsh-we/api/config) and a browser bundle (lib/client.js via dsh.plugin.json).

dsh plugin --profile web add -w @jiyr0119/dsh-workspace-explorer@latest

(or click the install button in the DSH market). After install, a file-tree icon appears in the session header; restart or hard-refresh the web UI if needed. This is the zero-config, no-build path.

Way 2 · npm source package (manual paste) npm install @jiyr0119/dsh-workspace-explorer — the package ships dynamic/host.js / dynamic/client.js for the manual paste flow below, with semver releases.

Way 3 · Dynamic plugin paste (zero-build fallback) A dynamic Cordis plugin: no build step, no config changes — useful for quick experimentation or environments without the storefront.

  1. In the DSH web UI, have an agent run cordis_define (or use the dynamic plugin panel) with idPrefix wsex.
  2. Paste the whole dynamic/host.js into Host code.
  3. Paste the whole dynamic/client.js into Client code.
  4. cordis_run to activate; authorize on the Run card when it first appears.
  5. Click the 🌲 file-tree icon in the session header → expand directories → click a file, or drag it into the composer, then send.

ℹ️ pnpm note: modern pnpm (9/10) refuses to add a dependency at the workspace root (ERR_PNPM_ADDING_TO_ROOT), hence the -w flag above. Alternative: create ~/.dsh/profiles/web/.npmrc containing ignore-workspace-root-check=true.

⚠️ Common misconception: a listing alone never auto-installs anything — users still click install. With Way 1 the full UI now appears after install (native bundle, v0.4.0+ verified with a clean dsh plugin add — no boot errors).

See docs/install.md for details.

Usage

  1. Click the 🌲 file-tree icon at the top of the session header (right side, beside the session log button) to open the popup.
  2. Expand directories to browse files.
  3. Click a file, or drag it into the composer, then send.
  4. Use the Settings tab at the top of the popup (or DSH Settings → Workspace Explorer) to adjust panel behavior.

Project Structure

dsh-workspace-explorer/
├── README.md             # Docs — English (default)
├── README.zh.md          # Docs — 中文
├── LICENSE               # MIT
├── CHANGELOG.md          # Release notes
├── manifest.json         # Plugin metadata
├── package.json          # Repo metadata (not an npm package)
├── demo/
│   ├── index.html        # Interactive mock preview (GitHub Pages)
│   └── preview.gif       # Demo animation (README)
├── .github/
│   └── workflows/
│       └── pages.yml     # Deploys demo/ to GitHub Pages
├── docs/
│   ├── install.md        # Install guide
│   ├── native-package.md # Native DSH package roadmap (upstream PR sketch)
│   └── publish.md        # Publishing workflow (GitHub + npm)
├── src/
│   ├── index.ts          # Native host half: webServer JSON routes (/dsh-we/api/*)
│   └── client/
│       └── index.tsx     # Native client half: popup + tree + icons + drag & drop
├── dynamic/
│   ├── host.js           # Dynamic paste host half: fs listing + ws-tree.* RPC
│   └── client.js         # Dynamic paste client half: popup + tree + icons
└── lib/                  # Built artifacts (lib/index.js + lib/client.js)

Implementation Notes

CapabilityMechanism
Directory listingHost fs.resolve / fs.listDir
Host→Client RPCharness.handle('ws-tree.list' / 'ws-tree.peek')host.call(...)
Popupshell.overlay slot (useWorkspaces / useSessions), position measured between session header & composer
Toggle buttonconversation.session.header.utilities slot (file-tree icon)
Composer writeconversation.input.dockinputActions.setDraft
Drag & dropHTML5 DnD; native caret insert in the textarea, append elsewhere
Theming--dsw-alias-* CSS variables (light/dark)

Version

Current version v0.4.0 — animated popup opened from a session-header file-tree icon, positioned between the header and the composer; full feature set (tree, search, preview, click/drag references, settings, i18n). See CHANGELOG.md for release notes.

Roadmap

Done ✅

  • v0.1 core: right-side file tree, click / drag-to-composer references, native DSH look
  • Search & filter; inline preview (first 60 lines); content insertion for small files (≤ 32 KB)
  • i18n (zh/en via the DSH locale service, follows the DSH UI language)
  • Demo language toggle, GitHub Pages preview, demo GIF, storefront screenshots
  • npm source package + dsh.bundle contract + awesome-dsh-plugin PR (#1158, pending merge)

Track A — UX polish

  • Multi-select & batch insert file references (Shift / Cmd)
  • Draggable / resizable panel that remembers position & width
  • Full keyboard navigation (↑↓ to move, Enter to insert, Esc to close)
  • Path actions: copy path, reveal in the OS file manager

Track B — Productivity

  • Content search across loaded dirs (host-side grep)
  • Recent files / favorites
  • Paginated preview for large files (next / previous page)
  • File operations (rename / delete / new, under the fs permission fence)

Track C — Ecosystem & distribution

  • npm @jiyr0119/dsh-workspace-explorer (v0.1.1 publishing)
  • awesome-dsh-plugin listing (PR #1158)
  • Native DSH package (@Remote namespace; needs upstream support) — see docs/native-package.md
  • dsh-genie hardened install (host-side persistence)
  • CI: lint + e2e + automated release

Track D — Quality & maintainability

  • Virtual scrolling (huge directories)
  • Light / dark theme regression checks
  • Playwright e2e for the demo and the real plugin

License

MIT

项目文件与信号

以下项目是目录快照中检测到的公开仓库信号。

插件清单已检测
文档已检测
示例已检测

仓库信息

开发语言
JavaScript
许可证
MIT
最新发布
v0.4.0
最后更新
2026年8月17日 09:10

谨慎安装

请检查源代码、权限、生命周期脚本、依赖与网络访问;不受信任的插件应先在隔离环境中测试。