中文EN

dsh-aiignore

usage已测通过npmApache-2.0

在右侧栏新增 AIignore 标签页:按五个维度给当前对话和所在目录打分,在构建产物、锁文件、日志被读进模型之前把它们拦下,并能一键把这些规则写进 .aiignore。

下载量 / Downloads
10,133
依赖体积 / node_modules
0.46 MB
测试时间 / Tested
2026-11-06
DSH 版本 / Version
0.2.2-rc.1

安装

dsh plugin --profile web add dsh-aiignore

沙箱测试结果

阶段结果
1 安装✓
2 列装✓
3 挂载✓
4 启动—

四阶段在隔离沙箱里跑:安装(有网)→ 列装 → 挂载 → 启动(后三步断网)。

README

dsh-aiignore — context noise guard for DeepSeek Harness

A Host plugin that checks a workspace when a session opens it and tells the

agent which files would waste its context — build output, lockfiles, logs,

huge files.

The scan is the same one the ai-context-doctor

CLI runs; this package only decides when to run it and how to phrase the

result for the model. Everything is local: no network, no API key, no upload.

Requirements

DeepSeek Harness · >= 0.2.0 — the version that ships sidebarRightTabs; declared as engines.dsh in package.json and in every market-index entry, so an older Harness refuses the install instead of half-loading it

Node.js · >= 18 — the Host half uses node:test and structuredClone

Permissions · none. No network, no API key, no telemetry; it reads the workspace and writes .aiignore and .aiignore.policy.json

Without a sidebar service the same button opens the panel as a floating card,

so an older or trimmed-down Harness still gets the report, just not the tab.

What the agent sees

When a workspace scores below the threshold, the agent receives one short note

before it starts reading files:

[ai-context-doctor] This workspace scores 29/100 for context health: 71% of 1.7 MB in 24 files is likely noise.
Biggest offenders: dist/ (400.0 KB, generated build output), package-lock.json (400.0 KB, lockfile).
Suggested .aiignore: dist/, package-lock.json, *.log.
Do not read those files unless the task needs them; ask before opening large generated files.

Clean workspaces get no message at all — a plugin that speaks on every session

becomes noise itself.

The panel

The bundle also ships a browser half. A folder button sits beside the add-files

button in the composer; clicking it opens the right sidebar on the

AIignore tab, and expands the sidebar if it was collapsed. On a Host without

sidebar services the same button opens the panel as a floating card instead, so

one plugin covers both.

Three tabs inside, and the first one exists to answer a single question: *is

this doing anything?*

  • Protection — a score, one button, and nothing else competing with them.

The number is this conversation's current score: the one it would have if

the rules in force applied to what it actually read. There is no *before →

after* pair to read — one number, and it moves when the rules or the strength

move, because it is computed from them. (The folder's own score, rules and

all, lives on Settings as On disk 22 · Reaches the model 71, where the

arithmetic belongs.) A folder nobody has scanned says not scanned yet

rather than printing a dash under a label that promises a number, and a

conversation that read nothing junk-worthy says so in words instead of a

zero. Optimize now is always there — it

rescans, writes whatever is missing, re-scores, and reports what moved, so

the interaction is: look, press, watch the number change.

The strength ladder is one click away in Fine-tune the strength: five

notches, each labelled with the score this folder would have there, because

five scores at once answer a question nobody asked yet. Picking a notch

writes it, rescans and repaints from the new report. Below that, **one notch

stricter** with the number attached ("would block 2 more files, about

65k–81k tokens"), then the files actually kept out and how many rules are in

force.

  • Files — opens on the files this session touched (what the agent read

and what it wrote), then lets you browse the whole workspace a directory at a

time. Search, filter by verdict — and when a filter has nothing in it, the

panel says which filter that was instead of looking empty. The three verdicts

are spelled out right under the filters: noise is regenerated by a build, a

lockfile or a log; review is worth a look before it goes in (env files,

deploy scripts, big data); ignored already has a line in .aiignore. Under

that, Worth a rule lists what the scanner would still add (+ *.log,

+ coverage/) — one click writes the line and rescans. A noise file's detail

card offers the widest rule that covers it, Add dist/, not only its own

path, because a per-file line is a rule you write again every build.

  • Settings — everything you can change, off the screen that answers *is it

working*: Rules in .aiignore with an × per line, the note for the agent

with a preview of exactly the text it will read, and the five-dimension

arithmetic folded away at the bottom. It points at Protection for the

strength ladder instead of keeping a second copy of it — two controls for one

setting drift, and the copy that stops being authoritative is always the one

on the page nobody is looking at.

It no longer asks you to imagine what the note does: three one-click

sentences, then a preview of exactly the text the agent will read before

your next message.

  • One button runs the job. Optimize now reads the folder, writes the

rules, re-scores and moves the number on screen. While it runs you see the two

steps it actually performs, each marked done only when its work is finished —

no percentage bar inventing progress the Host never reported.

  • The rules are visible, and removable one at a time. Under the score sits

Rules in .aiignore: every line that is in force, each with an ×. Removing

one edits exactly that line — comments and the other rules stay — so a rule

you disagree with is one click away instead of an all-or-nothing undo.

  • **The strength is part of the score, not a se

…(truncated)

以上内容来自 npm 上的 README,我们只做格式化,不改内容。

版本

npm 上共发布:51,最后更新 2026-11-01

链接

GitHub · Homepage · npm

同类插件