dsh-composer-ease 0.0.0-stage → 0.9.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +180 -0
- package/LICENSE +21 -0
- package/README.i18n.yaml +30 -0
- package/README.md +79 -2
- package/README.zh.md +80 -0
- package/THIRD-PARTY.md +259 -0
- package/cordis.patch.yml +11 -0
- package/lib/cjk-domain.js +24 -0
- package/lib/cjk-lexicon.js +30049 -0
- package/lib/client/10-foundation.js +396 -0
- package/lib/client/20-pairing.js +177 -0
- package/lib/client/30-popup.js +320 -0
- package/lib/client/40-language.js +174 -0
- package/lib/client/45-settings.js +225 -0
- package/lib/client/50-caret.js +254 -0
- package/lib/client/60-keys.js +242 -0
- package/lib/client/70-input.js +369 -0
- package/lib/client/80-apply.js +76 -0
- package/lib/client/_head.js +17 -0
- package/lib/client/_tail.js +3 -0
- package/lib/client.js +2262 -0
- package/lib/domain-words.js +13 -0
- package/lib/en-common.js +54 -0
- package/lib/en-lexicon.js +66 -0
- package/lib/fuzzy.js +485 -0
- package/lib/index.js +438 -0
- package/lib/words.js +88 -0
- package/package.json +63 -4
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// dsh-composer-ease —— 本机领域词(T3:代码与文档里高频、但英文词表里没有的词)
|
|
2
|
+
// 本文件由 tools/gen-lexicon.mjs 生成,**不要手改**(改了就下次生成即被覆盖)。
|
|
3
|
+
// 重新生成:node tools/gen-lexicon.mjs --words <词表> --corpus lib docs --cap 30000 --domain-cap 1000
|
|
4
|
+
// 出处与许可证见 EN_LEXICON_SOURCE / DOMAIN_WORDS_SOURCE 与本仓 THIRD-PARTY.md
|
|
5
|
+
|
|
6
|
+
export const DOMAIN_WORDS = ["dsh", "json", "gh-archive", "mjs", "jsonl", "deepseek-harness", "github", "dsh-fixes", "ps1", "http", "changelog", "bailian-free-auto", "sha256", "dsh-composer-ease", "plugins", "zstd", "npm", "mtime", "session-compaction-handoff", "cmd", "local-kb", "silent-first", "mengge237", "beforeinput", "oninput", "deepseek", "contextscore", "cwd", "microsoft", "vscode", "cjk", "bailian", "tokenplan", "ls-remote", "cs-drill", "goproxy", "cordis", "txt", "powershell", "ttlmin", "levelmax", "client-behavior", "real-regress", "server-routes", "workspaceroots", "unreleased", "en-lexicon", "yaml", "qwen3-max", "glm-5", "dsh-local-runbook", "dsh-kit", "dsh-shim", "dsh-020rc2", "golangci-lint", "start-process", "deepseek-ai", "yml", "job-hunter", "csv", "dns", "dns-bridge", "lenovo", "cjs", "dsh-accel-keep", "wscript"]
|
|
7
|
+
|
|
8
|
+
export const DOMAIN_WORDS_SOURCE = {
|
|
9
|
+
what: '从本机语料统计的高频词(TF),只收词表里没有的',
|
|
10
|
+
roots: ["lib","docs","<本地路径>"],
|
|
11
|
+
kept: DOMAIN_WORDS.length,
|
|
12
|
+
note: '生成式数据:换机器或换语料后会变,因此不写死出处,只记本机根目录与条数。',
|
|
13
|
+
}
|
package/lib/en-common.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// dsh-composer-ease —— 手写「常用英文词」先验(**可手改**,不由工具生成)。
|
|
2
|
+
//
|
|
3
|
+
// 为什么需要它:T2 的 30 万词表没有词频,生成时只能按「短者优先」排,于是 `deled`(冷词,5 字母)
|
|
4
|
+
// 会排在 `delete`(常用,6 字母)前面。这份手写表就是「常用度先验」:补全排序时它优先于长度。
|
|
5
|
+
// 加词原则:开发语境里真的会打、且不在 words.js 关键字表里的常见词。
|
|
6
|
+
|
|
7
|
+
export const CURATED_COMMON = [
|
|
8
|
+
'about', 'above', 'accept', 'access', 'across', 'action', 'active', 'actual', 'add', 'added', 'after',
|
|
9
|
+
'again', 'against', 'agent', 'agree', 'allow', 'already', 'always', 'answer', 'any', 'appear', 'apply',
|
|
10
|
+
'argue', 'argument', 'around', 'assume', 'attach', 'available', 'avoid', 'back', 'base', 'basic',
|
|
11
|
+
'because', 'become', 'before', 'begin', 'behind', 'belong', 'below', 'best', 'better', 'between', 'block',
|
|
12
|
+
'body', 'both', 'break', 'bring', 'build', 'built', 'cache', 'call', 'came', 'cannot', 'case', 'cause',
|
|
13
|
+
'center', 'certain', 'change', 'check', 'choose', 'class', 'clean', 'clear', 'click', 'client', 'close',
|
|
14
|
+
'code', 'collect', 'come', 'command', 'comment', 'common', 'complete', 'config', 'confirm', 'connect',
|
|
15
|
+
'consider', 'contain', 'content', 'context', 'control', 'convert', 'copy', 'correct', 'could', 'count',
|
|
16
|
+
'cover', 'create', 'current', 'custom', 'data', 'debug', 'decide', 'default', 'delete', 'depend', 'deploy',
|
|
17
|
+
'describe', 'detail', 'detect', 'device', 'differ', 'direct', 'disable', 'display', 'document', 'done',
|
|
18
|
+
'double', 'down', 'drop', 'each', 'early', 'edit', 'effect', 'either', 'element', 'empty', 'enable', 'end',
|
|
19
|
+
'enough', 'enter', 'entry', 'error', 'even', 'event', 'every', 'exact', 'example', 'except', 'exist',
|
|
20
|
+
'expect', 'explain', 'export', 'extend', 'extra', 'fail', 'false', 'fetch', 'field', 'figure', 'file',
|
|
21
|
+
'fill', 'filter', 'final', 'find', 'first', 'fixed', 'flag', 'follow', 'force', 'form', 'format', 'found',
|
|
22
|
+
'frame', 'free', 'from', 'full', 'function', 'general', 'generate', 'given', 'global', 'good', 'group',
|
|
23
|
+
'grow', 'handle', 'have', 'header', 'help', 'here', 'hidden', 'hide', 'high', 'highlight', 'hold', 'hook',
|
|
24
|
+
'host', 'however', 'idea', 'ignore', 'image', 'import', 'index', 'info', 'init', 'inline', 'input',
|
|
25
|
+
'insert', 'inside', 'install', 'instance', 'instead', 'item', 'join', 'just', 'keep', 'key', 'kind',
|
|
26
|
+
'known', 'label', 'large', 'last', 'later', 'launch', 'layer', 'layout', 'leave', 'left', 'length', 'less',
|
|
27
|
+
'level', 'light', 'like', 'limit', 'line', 'link', 'list', 'live', 'load', 'local', 'lock', 'log', 'logic',
|
|
28
|
+
'look', 'loop', 'lower', 'main', 'make', 'manage', 'many', 'mark', 'match', 'matter', 'maybe', 'mean',
|
|
29
|
+
'measure', 'merge', 'message', 'method', 'middle', 'might', 'mode', 'model', 'modify', 'more', 'most',
|
|
30
|
+
'mount', 'move', 'much', 'must', 'name', 'need', 'never', 'next', 'node', 'none', 'normal', 'note',
|
|
31
|
+
'notice', 'null', 'number', 'object', 'offer', 'offset', 'often', 'once', 'only', 'open', 'option',
|
|
32
|
+
'order', 'other', 'output', 'over', 'owner', 'pack', 'page', 'pair', 'param', 'parent', 'parse', 'part',
|
|
33
|
+
'pass', 'path', 'pattern', 'pause', 'people', 'perform', 'pick', 'place', 'plan', 'please', 'point',
|
|
34
|
+
'popup', 'position', 'possible', 'power', 'prefix', 'prepare', 'present', 'press', 'prevent', 'previous',
|
|
35
|
+
'print', 'problem', 'process', 'produce', 'project', 'promise', 'proper', 'property', 'protect', 'provide',
|
|
36
|
+
'public', 'pull', 'push', 'put', 'query', 'quick', 'quite', 'raise', 'range', 'rate', 'read', 'ready',
|
|
37
|
+
'real', 'reason', 'receive', 'record', 'reduce', 'refer', 'refresh', 'register', 'reload', 'remain',
|
|
38
|
+
'remove', 'render', 'repeat', 'replace', 'reply', 'report', 'request', 'require', 'reset', 'resolve',
|
|
39
|
+
'resource', 'response', 'rest', 'result', 'resume', 'retry', 'return', 'review', 'right', 'role', 'root',
|
|
40
|
+
'round', 'route', 'rule', 'run', 'safe', 'same', 'save', 'scale', 'scan', 'schedule', 'scope', 'screen',
|
|
41
|
+
'script', 'scroll', 'search', 'second', 'section', 'select', 'send', 'separate', 'serialize', 'server',
|
|
42
|
+
'service', 'session', 'set', 'setting', 'setup', 'several', 'share', 'shift', 'short', 'should', 'show',
|
|
43
|
+
'side', 'signal', 'simple', 'since', 'single', 'size', 'skip', 'slice', 'slide', 'slow', 'small', 'some',
|
|
44
|
+
'sort', 'source', 'space', 'span', 'spec', 'split', 'stack', 'start', 'state', 'static', 'stay', 'step',
|
|
45
|
+
'still', 'stop', 'store', 'string', 'strip', 'style', 'submit', 'such', 'support', 'sure', 'switch',
|
|
46
|
+
'sync', 'system', 'table', 'take', 'talk', 'target', 'task', 'tell', 'template', 'test', 'text', 'than',
|
|
47
|
+
'that', 'their', 'them', 'then', 'there', 'these', 'they', 'thing', 'think', 'this', 'those', 'though',
|
|
48
|
+
'three', 'through', 'throw', 'time', 'title', 'toggle', 'token', 'tool', 'top', 'total', 'touch', 'trace',
|
|
49
|
+
'track', 'transform', 'tree', 'trigger', 'trim', 'true', 'try', 'turn', 'type', 'under', 'until', 'update',
|
|
50
|
+
'upload', 'upper', 'usage', 'use', 'user', 'valid', 'value', 'variable', 'verify', 'version', 'very',
|
|
51
|
+
'view', 'virtual', 'visible', 'visit', 'wait', 'walk', 'want', 'watch', 'weak', 'well', 'were', 'what',
|
|
52
|
+
'when', 'where', 'whether', 'which', 'while', 'white', 'whole', 'wide', 'will', 'window', 'with', 'within',
|
|
53
|
+
'without', 'word', 'work', 'world', 'would', 'wrap', 'write', 'wrong', 'year', 'yield', 'your', 'zero',
|
|
54
|
+
]
|