返回目录
模型与 MCP 插件

dsh-composer-ease

mengge237/dsh-composer-ease

DSH Web 输入框的补全与编辑:括号引号自动配对(中文输入法的全角括号默认换半角)、选中即环绕、跳闭符、删空对;弹层给本文词 / 语言词表 / 工作区文件 / 模型名 | Completion and editing for the DSH web composer: auto-pairing (full-width brackets become half-width by default), wrap-selection, closer skipping, empty-pair delete, and a popup over draft words, language tables, workspace files and model ids

Stars
0
Forks
0
Issues
0
更新
5 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:mengge237/dsh-composer-ease

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README


description: "Composer for the DeepSeek Harness Web GUI: bracket and quote pairing, wrap-on-selection, closer skipping, empty-pair backspace, and a completion popup over draft words, language tables, workspace files and model ids. Full-width brackets typed through a Chinese IME are converted to half-width ()." kind: "package-reference"

dsh-composer-ease

English | 中文

Summary

dsh-composer-ease is a DSH bundle plugin that adds a completion popup to the DSH Web composer, with bracket and quote pairing: brackets and quotes pair up, typing an opener over a selection wraps it, a closer over an existing closer is skipped, backspace removes an empty pair, and a completion popup opens after two characters. The browser half is plain DOM; the server half exposes two read-only loopback routes and writes nothing.

overview

Table of Contents

Install

dsh plugin --profile web add https://github.com/mengge237/dsh-composer-ease
dsh plugin --profile web remove dsh-composer-ease

Desktop (Electron) uses its own plugin manager; dsh plugin --profile desktop is rejected by the CLI. When developing, the browser half is read from disk on every request (refresh applies), while the server half needs a dsh web restart.

Use this package

Action Key / trigger Behaviour
Auto pair ( [ { " ' backtick, full-width family caret between the pair; no pairing after a path/identifier character, or when text follows the caret
Wrap selection type any opener over a selection text becomes (text); single-line selections only (see boundaries)
Type-over / delete empty pair closer already to the right / backspace inside () no duplicate; both sides removed
Complete two characters, or Ctrl+Space popup: draft words, language tables, workspace files, model ids, snippets
Accept / navigate Tab or click / ↑ ↓ Enter stays the send key; ← → Home End dismiss the popup and only move the caret
Dismiss Esc Shift+Enter still inserts a newline

Completion follows the context: a fenced block selects the language table, otherwise the draft and the visible conversation vote, then the language you have been accepting candidates from.

Understand the implementation

  • lib/index.js — server half: /dsh-composer-ease/words and /config.json, both behind a loopback trust fence; ranking uses lib/fuzzy.js (VS Code's fuzzyScore, copied verbatim).
  • lib/client/*.js — browser half, nine fragments concatenated into lib/client.js by tools/build-client.mjs (the host loads exactly one file).
  • Chinese candidates come from the dictionary (lib/cjk-lexicon.js) only: the prefix is matched against the word list, so word length follows the data instead of a fixed cap.
  • The popup is plain DOM anchored to the caret; it never touches the host editor's data model.

Boundaries and known limits

See docs/boundaries-and-implementation.md for the measured list (multiline wrapping, insertion limits, IME behaviour, squiggle geometry) and the reason behind each.

Development and tests

npm run build          # fragments → lib/client.js
npm test               # five offline suites, 185 items, zero network
npm run check:all      # structure, duplicates, refactor budget, docs, privacy, prose, copies
node test/real/matrix.mjs "http://127.0.0.1:3081/?token=…" 3 --verbose   # live matrix, 49 cases per round

The host composer is Lexical: it ignores sel.modify(...), ignores beforeinput's preventDefault, and does not guarantee an input event — selection work uses flattened offsets plus explicit Ranges and cross-frame verification.

Sources and licenses

  • Interaction design follows Visual Studio Code (MIT); no source copied except lib/fuzzy.js (verbatim, see THIRD-PARTY.md).
  • Word-table data comes from monaco-editor, codemirror/lang-html, codemirror/lang-css, MDN browser-compat-data and jieba's dictionary; each entry in THIRD-PARTY.md records repo, commit, files and the full license text.
  • This plugin: MIT (see LICENSE).

Dev note

  • Change lib/client/*.js, then npm run build; never edit lib/client.js.
  • Every convention has a runnable check under tools/check-*.mjs; CI only runs them (.github/workflows/checks.yml, ubuntu + windows, one run per branch via concurrency).
  • Release: bump package.json, add a CHANGELOG entry with the commit sha, then npm run check:all.

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类模型与 MCP
规则置信度中

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。