DeepSeek Harness 插件

dsh-lens

TypeScript/JavaScript diagnostics lens for DeepSeek Harness(英文原文)

跳到安装方式

来源信息

GitHub 仓库
hajimixiaojie/dsh-lens
最近更新
2026年8月14日
分类
插件开发工具
GitHub stars
0
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/hajimixiaojie/dsh-lens
插件名:dsh-lens
作者:hajimixiaojie

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

dsh-lens

A "code health check" plugin for DSH (DeepSeek Harness). It watches your code changes, checks for syntax/type/lint problems, shows them on a card next to the chat input, and shares them with the AI assistant — no technical knowledge required.

---

1. What does it do?

Think of it as a doctor who sits next to your code:

  • After every edit, it quickly checks for obvious mistakes (e.g. a missing

bracket).

  • When the AI reads or edits a TypeScript/JavaScript file, it runs a full check in the background (type check, lint).
  • Problems appear on a diagnostic card above the chat input and are also

reported to the AI assistant so it can help fix them.

It never blocks your edits or modifies your files on its own. Card refreshes use a separate read-only endpoint and never place snapshot JSON in the AI conversation context.

---

2. Before you start

You needHow to check
A computer (Windows or Mac)You are using one now ✓
DSH installedYou can open the DSH web UI
A terminal windowSee Step 1 below

> What is a terminal? On Windows it is called PowerShell: > click the Start button → type PowerShell → press Enter. > A dark window with a blinking cursor appears. All commands below are typed there.

---

3. Install, step by step (about 3 minutes)

Step 1 — Check that DSH is installed

Copy this line into the terminal and press Enter:

dsh --version

Success looks like: a version number such as 0.1.0-rc.6.

If you see dsh is not recognized (or command not found): DSH is not installed yet or not on your PATH. Install DSH first (see FAQ below).

---

Step 2 — Install the plugin (copy one command)

dsh plugin --profile web add npm:@dsh-lens/dsh-lens

What this does: dsh plugin manages plugins, --profile web targets the web profile, add npm:@dsh-lens/dsh-lens downloads the plugin from npm (an app store for software).

Success looks like: text scrolls and stops, returning to a prompt (usually Done). It normally takes less than a minute.

> Testing locally before publishing? Run npm run pack in the plugin > source folder (produces dsh-lens-0.1.0.tgz), then install it: > > `` > dsh plugin --profile web add C:\your\path\dsh-lens-0.1.0.tgz > ` > > (Plain npm pack names the file dsh-lens-dsh-lens-0.1.0.tgz` — also fine; > delete the old .tgz before repacking.)

---

Step 3 — Confirm it is installed

dsh plugin --profile web list

Success looks like: the list contains a line with @dsh-lens/dsh-lens.

---

Step 4 — Restart DSH

1. Close the DSH window/page completely. 2. Open DSH again as usual.

Done. It starts working automatically — no further setup.

---

4. Quick check that it works (30 seconds)

1. Open any TypeScript project (a folder containing tsconfig.json). 2. Open a .ts file and intentionally break one line, e.g.: `` const x: number = "hello"; `` 3. Save the file. 4. Look near the chat input — a diagnostic card should appear saying something like "1 个问题 / 1 issue".

> Projects without a tsconfig.json are intentionally not checked.

---

5. FAQ

ProblemSolution
dsh is not recognizedDSH is not installed or not on PATH. Reinstall DSH.
Permission error / Access deniedRight-click PowerShell → Run as administrator, retry Step 2.
No card after restartMake sure you opened the web UI, the project has tsconfig.json, and Step 3 listed the plugin.
Card always says "no diagnostics"Normal — no problems found. Introduce an error and save to see it.
Want to uninstalldsh plugin --profile web remove dsh-lens
Want to disable checksSee "Advanced settings" below; set enabled to false.

---

6. Advanced settings (some technical knowledge needed; skippable)

The defaults work for most users. To customize, create a file named .dsh-lens.json in your project root (never auto-generated):

{
  "enabled": true,
  "typecheck": { "enabled": true },
  "eslint": { "enabled": false },
  "exclude": ["generated/**"]
}

Priority: built-in defaults < DSH global config < project .dsh-lens.json. Changes hot-reload on save — no restart needed.

Full config (profile patch):

- id: dsh-lens
  config:
    enabled: true
    include:
      - "**/*.{ts,tsx,js,jsx,mts,cts,mjs,cjs}"
    exclude:
      - "**/node_modules/**"
      - "**/dist/**"
      - "**/build/**"
    fast:
      enabled: true
      maxFileBytes: 524288
      budgetMs: 50
    typecheck:
      enabled: true
      debounceMs: 800
      timeoutMs: 60000
    eslint:
      enabled: false
      debounceMs: 1000
      timeoutMs: 30000
    feedback:
      inject: true
      maxDiagnostics: 8
      maxBytes: 4096
    scheduler:
      maxConcurrentProjects: 2

---

7. For developers

  • Requirements: Node.js >= 20; DSH baseline 0.1.0-rc.6 (all

@deepseek-ai/* packages are peers, not bundled); TypeScript >= 5.0.0 is an optional peer.

  • Commands: npm installnpm run verify (typecheck + 107 tests + build) →

npm pack --dry-run.

  • Pipeline:
write/edit ──► quick syntax (transpileModule) ──► post-execute additionalContexts
     │
read ─┴─► debounced background check (tsc / eslint via ctx.subprocess)
              └─► delta classification ──► agent.inject() report
                                     └─► lens snapshot ──► Web card
  • Modules: ./client, ./adapter, ./diagnostics, ./quick-syntax,

./scheduler, ./background-check, ./providers, ./delta, ./feedback, ./snapshot, ./lens-card, ./config, ./reliability, ./types.

  • The Web card polls a same-origin, no-store HTTP snapshot endpoint; polling

does not write command events or snapshot JSON into the Session context.

  • Known limitations: no Web settings page in the first release; typecheck

and eslint share one debounce pipeline.

Changelog

See [CHANGELOG.md](./CHANGELOG.md).

License

MIT — see [LICENSE](./LICENSE).