dshbase

插件目录 / UI & Skins / dsh-wikilink

dsh-wikilink

已验证 · 实测可装 zhaoscsc

✓ 持续维护 基于 14 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

3Stars
0Forks
0未关闭 issue
JavaScript语言
2026-08-15最近推送
跨平台平台

功能简介

dsh-wikilink — DSH 插件(界面)

✅
我们的评价
可用 — 实测通过,早期项目

dsh-wikilink — DSH 插件(界面) 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-wikilink

中文版 README:README.zh.md · 简体中文文档入口

Obsidian-style [[wikilink]] mentions for the DeepSeek Harness web GUI. Type [[ in the composer and a note-title picker floats up: fuzzy search your workspace notes as you type — including out-of-order (subsequence) matches (「曼食」 finds 曼谷街头美食文化观察) and space-separated multi-term matches (「曼谷 美食」 finds 曼谷街头美食文化观察 / 曼谷笔记:美食 / 曼谷朱拉隆功夜市美食探索). Press Enter to attach, and the referenced note content ships to the model when the message is sent.

composer:  summarize  [[曼谷 美.    ← picker over the token, auto-closed brackets
            ┌────────────────────────────────────────────────────────┐
            │ 📄 曼谷街头美食文化观察:鱼鳔老太太摊位的夜间消费场景          │
            │ 📄 曼谷笔记:美食                                     │
            │ 📄 曼谷朱拉隆功夜市美食探索:KINNKUNG海鲜馆的惊喜体验         │
            └────────────────────────────────────────────────────────┘
draft:     summarize  [[曼谷笔记:美食]]   ← readable plain-text token
model:     <note path="5-存档/06-专题档案/数字游民/曼谷笔记:美食.md" title="曼谷笔记:美食">…content…</note>  ← injected at send time

Typing [[ auto-closes ]] with the caret between the brackets (Obsidian-style), and the picker opens exactly on the double bracket — a single [ in prose never triggers it.

Prerequisites: harness patches

The harness input pipeline only recognizes / and @ as trigger characters, so this plugin ships with five small patches to the installed @deepseek-ai client bundles (all in the npx installation cache):

  1. dsh-client-ui-input-trigger — recognize [ as a trigger, only in the [[ double-bracket form; [[ tokens may span spaces (note titles with spaces)
  2. dsh-client-ui-conversation — auto-close [[ into [[]] with the caret centered (IME-composition guard included)
  3. dsh-client-ui-input-trigger — menu CSS: wider picker (760px) and 70% title share
  4. dsh-client-ui-input-trigger — detectTrigger whitespace-crossing: [[曼谷 美食]] (with a space) still matches
  5. dsh-client-ui-conversation — fullwidth-bracket normalization: 【【 typed under a Chinese IME is normalized to [[ so the picker still opens and the landed token stays halfwidth [[title]]

Without these patches the [[ trigger and the auto-close will not work. See DEV.md for the exact patch snippets. Reinstalling @deepseek-ai/dsh (npx cache rebuild) wipes them — re-apply per DEV.md.

IME caveat: some Chinese input methods (Sogou, WeChat, Baidu, system Pinyin, …) have a symbol auto-completion feature (smart punctuation / bracket auto-pairing) that auto-inserts a closing bracket when you type [ or 【 ([ → [], 【 → 【】). That breaks the double-open detection and the picker never opens. Disable symbol auto-completion in the input method settings (it may be called smart punctuation / bracket auto-pairing / symbol suggestion).

Install

dsh plugin --profile web add https://github.com/zhaoscsc/dsh-wikilink/archive/refs/heads/main.tar.gz

Restart the web server so the host half and the served client bundle pick up the plugin. The enable switch lives in Settings → Wikilinks.

Configuration

Host-side tunables on the plugin row in the profile patch layer:

- id: dsh-wikilink
  config:
    maxIndexedFiles: 100000   # hard cap on indexed entries (large vaults need this)
    maxFileBytes: 262144      # hard cap on one attached note; larger files are refused
    ignoreDirs: ['.git', 'node_modules']   # directory basenames the walk skips

The index is cached per session for 30 seconds; an index-status strip above the composer reports indexing in progress / done (with the note count) / failed.

Model experience

Aspect Effect
Token cost One attached note adds its complete content (up to maxFileBytes) to the request.
Tool calls None — the content is already in the prompt.
Message format Each note serializes as <note path="…" title="…">…</note>, injected as a user-role message with source wikilink-mention.
Resolution [[dir/title]] resolves by exact path; [[title]] resolves only when the title is unique; unresolvable or ambiguous tokens stay plain prose.

Matching

Four tiers over the note title (then the relative path): contiguous substring > subsequence (out-of-order) > path substring > path subsequence. Queries split on whitespace must all match (AND). Both query and titles are NFC-normalized.

Real examples from a travel-note vault:

Query Result
[[曼谷 美食]] 曼谷街头美食文化观察:鱼鳔老太太摊位的夜间消费场景 · 曼谷笔记:美食 · 曼谷朱拉隆功夜市美食探索
[[曼食]] (out-of-order) 曼谷街头美食文化观察(matches across skipped characters)
[[鱼鳔]] 曼谷街头美食文化观察:鱼鳔老太太摊位的夜间消费场景

Known limitations

  • The workspace index is cached per session for 30 seconds; files created later appear on the next menu open after that window.
  • A note literally named .md is skipped (its empty title would fail the wire schema).
  • Keyboard navigation beyond Enter/Escape is provided by the harness pipeline (same as the / and @ menus).

Development

node build.mjs        # esbuild is vendored under ./node_modules; zod is inlined into the client bundle

See DEV.md for the architecture, the harness patch snippets, and the build/dev loop.

License

MIT

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-wikilink」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:zhaoscsc/dsh-wikilink

Headless(CLI)profile:

dsh plugin --profile headless add github:zhaoscsc/dsh-wikilink

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

使用场景

改变 dsh 的外观或交互方式——一套主题、皮肤或新面板,重塑工作区。

适合谁

在 web UI 里一待几小时、想让它按自己的习惯好看又好用的人。

二次开发建议

皮肤、面板和主题 token 是扩展点——写新皮肤、加面板,或与上游配色同步 token。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

UI & Skins 里更多

浏览全部 7797 个插件 →