Custom `@` search scope for the DSH Web composer: keeps archived, stale and unrelated-subagent sessions out of the `@` menu, switches file paths between flat and tree, and puts every rule in Settings.
Install
# from a prebuilt release tarball
dsh plugin --profile web add -w "https://github.com/Ruiming-cn/dsh-better-at/releases/download/v0.3.0/dsh-better-at-0.3.0.tgz"
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Ruiming-cn/dsh-better-at
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
Fast
@file/session reference caching for the DeepSeek Harness Web GUI.
dsh-better-at keeps the native DSH @ reference behavior — hierarchical
workspace file/folder references and DSH session references — while removing the
per-keystroke host round trips that make the @ menu feel slow.
Tired of
@dumping everything at once? With dsh-better-at, you decide where@searches.
Features
- 🎯 Custom
@search scope: skip archived sessions, skip sessions idle for N days (default 7), skip subagents outside the current conversation, and present file paths flat or as an indented tree. Every rule is enforced in the browser, so a scope change applies to the next@without a rescan. - ⚡ Fast first open: session-scope warm-up preloads the workspace file index
and the DSH session index before the first
@. - ⚡ Local keystroke filtering: after the initial load, typing filters and ranks candidates entirely in the browser; no Host request per keystroke.
- 📁 Hierarchical file/folder references: empty/path queries show direct children, bare fuzzy queries search basenames across the whole workspace.
- 🎛️ Native-shaped rows: file and folder icons, folder rows that drill down with Tab, a parent-directory subtitle for nested entries, and session rows showing their working directory and age.
- 💬 DSH session references: full session metadata is indexed locally and ranked by working-directory affinity, matching the native ordering.
- 🔒 Native mention compatibility: the plugin wraps the existing
referencesource and keeps itsonPick/codec, so file and session mentions keep the original serialized form (@path,@"path",@[label](dsh-session:...)). - 🧩 No Harness source changes: everything is implemented as an out-of-tree Host Remote + browser client bundle.
How It Works
DSH Web @ menu
│ candidates() · local filter/rank
▼
dsh-better-at client cache
│ listFiles / listSessions (once per TTL)
▼
DSH Host betterAt Remote
├── bounded workspace file/directory index
└── full DSH session index + canonical mentions
betterAt/listFileswalks the current workspace once and returns a bounded file/directory index. Defaults exclude.gitandnode_modulesonly, matching the native file-reference behavior.betterAt/listSessionsreads the complete logical session corpus fromctx.sessionQueryand generates nativedsh-session:mentions for the browser.- File indices are cached per session for 30 seconds; the session index is cached globally for 5 minutes. Both use stale-while-revalidate: an expired cache returns the previous snapshot immediately while refreshing in the background.
- The browser wraps the native
@source (trigger='@',name='reference') without replacing its pick/codec path. - Each index snapshot is prepared once for keystroke-time use: basenames, lower-cased names, hidden flags, and parent directories are computed when the snapshot arrives, and ranking keeps only the best rows instead of sorting every match.
- The Host Remote is a strict Typert contribution:
lib/typert.host.jscarries the descriptors the Gateway validates, and the browser mounts the same descriptors fromlib/typert.remote-client.js.
Requirements
- DeepSeek Harness (DSH) Web 0.2.2-rc.5 or newer with the native
@reference source available. - Node.js ≥ 22 for local development/building.
Installation
From the prebuilt release tarball (no build step):
dsh plugin --profile web add https://github.com/Ruiming-cn/dsh-better-at/releases/download/v0.3.0/dsh-better-at-0.3.0.tgz
From GitHub source (lib/ is committed, so no build runs on install):
dsh plugin --profile web add github:Ruiming-cn/dsh-better-at
From a local checkout:
dsh plugin --profile web add .
Restart dsh web after installation.
Usage
Use @ exactly as usual:
@opens the fast file/folder + session picker.@src/browses insidesrc/; Tab on a folder row descends instead of inserting it.@READMEfuzzy-searches file basenames.@refactorfilters DSH sessions by id, cwd, or label.
After selection, the native composer behavior is preserved: files become atomic file references (or editable directory paths), and DSH sessions become native session references.
Search scope
Open Settings → @ search scope to shape what @ searches. The scope is
stored in the browser, applies to the next @, and never triggers a workspace
rescan.
| Rule | Default | Behavior |
|---|---|---|
| Skip archived sessions | on | Sessions archived in the workspace registry are not offered. Archiving itself is untouched. |
| Skip sessions idle for N days | 7 |
A session with no durable activity in the window is dropped. 0 disables the rule; a running session is always kept. |
| Skip subagents outside this conversation | on | Subagent sessions descended from the current conversation stay listed; unrelated subagent sessions are hidden. |
| File path display | flat | flat shows the name plus its parent directory; tree indents by workspace depth and shows the full relative path. |
The Host index keeps the facts (archived state, subagent lineage); the browser applies the rules, which is why a toggle costs no Host round trip. Reset to defaults restores the table above.
Host configuration
The Host plugin accepts two indexing settings through the profile patch:
# ~/.dsh/profiles/web/cordis.patch.yml
- id: dsh-better-at
config:
maxEntries: 10000
ignoreDirs:
- .git
- node_modules
| Option | Default | Description |
|---|---|---|
maxEntries |
10000 |
Hard cap on indexed workspace entries; the walk reports truncation. |
ignoreDirs |
['.git', 'node_modules'] |
Directory basenames never indexed or traversed. |
Performance Notes
- The first
@after a warm session is normally served from memory. - Each keystroke scores prepared rows: the per-snapshot projection keeps the lower-cased basename, hidden flag, and parent directory, so no path string is re-split or re-lowercased while typing, and ranking keeps only the best rows instead of sorting every match.
- The browser bundle ships no general validation library; the two wire shapes are checked by hand-written boundary parsers.
- The main trade-off is a small freshness window: file changes may take up to 30 seconds to appear; session metadata up to 5 minutes. Background refreshes keep the previous snapshot visible while updating.
Compatibility Notes
- Verified against DeepSeek Harness 0.2.2-rc.5. The Host contribution uses the
0.2.x strict Typert codec form (
create()factory); an older Harness that expects the 0.1.xschemafield will not register the Remote, and the plugin then falls back to the nativecandidatespath. - The browser integration intentionally uses the same private
inputTriggers.live.sourceswrapping pattern asdsh-skill-fuzzy. If a future Harness version changes that internal structure, the plugin degrades to the nativecandidatespath when the Remote is unavailable. - Symbolic links are not indexed or traversed, matching the native file-reference search behavior.
- The current session is excluded from DSH session candidates to avoid self-references, which the native session-reference protocol rejects.
Development
npm install
npm run check
npm run typecheck— TypeScript strict typecheck against the installed DSH package types.npm run test— pure-function unit tests (Node test runner), including a guard that the committed Typert artifacts matchsrc/contract.ts.npm run build— buildslib/index.js(Host ESM),lib/client.js(single-file browser bundle),lib/typert.host.js+lib/typert.remote-client.js(Typert manifests) and.d.tsdeclarations.
lib/ is committed so profile installs can run without a build step.
License
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 10669
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★ 10669
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.
ccch1mneyyy/dsh-TUI★ 8366
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 7489
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.
omdsh-dev/DSH-better-sidebar★ 5362
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
omdsh-dev/dsh-genui★ 1070
Interactive UI components rendered inline in replies: layout, charts, forms, quizzes, mermaid, 3D scenes, and an action event loop back to the model.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.