dsh-code-ui 1.6.1 → 1.6.2
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/lib/client.js +14 -6
- package/package.json +94 -94
package/lib/client.js
CHANGED
|
@@ -2414,10 +2414,6 @@ window.__ModuleLoader__.load({
|
|
|
2414
2414
|
const snap = shell && shell.snapshot
|
|
2415
2415
|
if (!snap || typeof snap.draftRev !== 'number' || typeof snap.draft !== 'string') return false
|
|
2416
2416
|
if (snap.phase && snap.phase !== 'plain' && snap.phase !== 'claimed') return false
|
|
2417
|
-
const inputTriggers = store.inputTriggers
|
|
2418
|
-
if (!inputTriggers || !inputTriggers.live || !inputTriggers.live.controllers) return false
|
|
2419
|
-
const controller = inputTriggers.live.controllers.get(sid)
|
|
2420
|
-
if (!controller || typeof controller.execute !== 'function') return false
|
|
2421
2417
|
let detectLen = snap.draft.length
|
|
2422
2418
|
const occs = Array.isArray(snap.occurrences) ? snap.occurrences : []
|
|
2423
2419
|
for (const o of occs) {
|
|
@@ -2425,8 +2421,20 @@ window.__ModuleLoader__.load({
|
|
|
2425
2421
|
}
|
|
2426
2422
|
if (detectLen < 0) detectLen = 0
|
|
2427
2423
|
const label = chipLabelFor(r)
|
|
2428
|
-
const
|
|
2429
|
-
|
|
2424
|
+
const span = { start: detectLen, end: detectLen, draftRev: snap.draftRev }
|
|
2425
|
+
const insert = { source: 'code-ui', ref: JSON.stringify({ id: r.id, path: r.path, lineStart: r.lineStart, lineEnd: r.lineEnd, kind: r.kind }), label: label, appearance: 'file', clipboardText: label }
|
|
2426
|
+
// 0.2.0-rc.x:优先走 shell.insertReference 公共契约(span-CAS,Lexical 离散更新,
|
|
2427
|
+
// 立即渲染)。旧路径(inputTriggers.live.controllers.get(sid))在 0.2.0 上失效——
|
|
2428
|
+
// controllers 改按 SessionBinding 对象键控,字符串 sid 取不到 controller,
|
|
2429
|
+
// chip 插不进去,发送时才由 submit 补丁附带指针(表现为「引用回车才出现」)。
|
|
2430
|
+
if (typeof shell.insertReference === 'function') {
|
|
2431
|
+
return shell.insertReference(insert, span) === true
|
|
2432
|
+
}
|
|
2433
|
+
const inputTriggers = store.inputTriggers
|
|
2434
|
+
if (!inputTriggers || !inputTriggers.live || !inputTriggers.live.controllers) return false
|
|
2435
|
+
const controller = inputTriggers.live.controllers.get(sid)
|
|
2436
|
+
if (!controller || typeof controller.execute !== 'function') return false
|
|
2437
|
+
return controller.execute({ insert: insert }, span) === true
|
|
2430
2438
|
} catch (e) { return false }
|
|
2431
2439
|
}
|
|
2432
2440
|
// chip ref(JSON 串)→ 引用数据;解析失败返回 null
|
package/package.json
CHANGED
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-code-ui",
|
|
3
|
-
"version": "1.6.
|
|
4
|
-
"description": "Cursor 风格的 AI 代码编辑器工作台插件(DSH):文件树、多标签页编辑、语法高亮、引用/翻译行内标签给 AI、右侧停靠/悬浮窗口双布局",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "lib/index.js",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/soGoodayo/dsh-code-ui.git"
|
|
10
|
-
},
|
|
11
|
-
"homepage": "https://github.com/soGoodayo/dsh-code-ui#readme",
|
|
12
|
-
"bugs": {
|
|
13
|
-
"url": "https://github.com/soGoodayo/dsh-code-ui/issues"
|
|
14
|
-
},
|
|
15
|
-
"exports": {
|
|
16
|
-
".": {
|
|
17
|
-
"default": "./lib/index.js"
|
|
18
|
-
},
|
|
19
|
-
"./client": {
|
|
20
|
-
"default": "./lib/client.js"
|
|
21
|
-
},
|
|
22
|
-
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
23
|
-
"./icon": "./icon.svg",
|
|
24
|
-
"./package.json": "./package.json"
|
|
25
|
-
},
|
|
26
|
-
"files": [
|
|
27
|
-
"lib",
|
|
28
|
-
"cordis.patch.yml",
|
|
29
|
-
"icon.svg",
|
|
30
|
-
"README.md",
|
|
31
|
-
"LICENSE"
|
|
32
|
-
],
|
|
33
|
-
"engines": {
|
|
34
|
-
"dsh": ">=0.1.5-rc.1 <0.3.0"
|
|
35
|
-
},
|
|
36
|
-
"dsh": {
|
|
37
|
-
"bundle": {
|
|
38
|
-
"patch": "./cordis.patch.yml"
|
|
39
|
-
},
|
|
40
|
-
"client": {
|
|
41
|
-
"inject": [
|
|
42
|
-
"@deepseek-ai/dsh-client-ui-slots",
|
|
43
|
-
"@deepseek-ai/dsh-client-ui-conversation",
|
|
44
|
-
"@deepseek-ai/dsh-client-ui-settings",
|
|
45
|
-
"@deepseek-ai/dsh-client-ui-theme"
|
|
46
|
-
],
|
|
47
|
-
"platform": "web"
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"peerDependencies": {
|
|
51
|
-
"@deepseek-ai/cordis": "^4.0.1",
|
|
52
|
-
"@deepseek-ai/dsh": ">=0.1.5-rc.1 <0.3.0",
|
|
53
|
-
"@deepseek-ai/dsh-typert-protocol": ">=0.1.5-rc.1 <0.3.0",
|
|
54
|
-
"@deepseek-ai/dsh-tools": ">=0.1.5-rc.1 <0.3.0",
|
|
55
|
-
"@deepseek-ai/dsh-settings": ">=0.1.0-rc.7 <0.3.0",
|
|
56
|
-
"react": "^18.2.0"
|
|
57
|
-
},
|
|
58
|
-
"peerDependenciesMeta": {
|
|
59
|
-
"@deepseek-ai/dsh-typert-protocol": {
|
|
60
|
-
"optional": true
|
|
61
|
-
},
|
|
62
|
-
"@deepseek-ai/dsh-tools": {
|
|
63
|
-
"optional": true
|
|
64
|
-
},
|
|
65
|
-
"@deepseek-ai/dsh-settings": {
|
|
66
|
-
"optional": true
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
"dependencies": {
|
|
70
|
-
"@deepseek-ai/schemastery": "^3.18.1"
|
|
71
|
-
},
|
|
72
|
-
"devDependencies": {
|
|
73
|
-
"@deepseek-ai/dsh-typert-protocol": "^0.2.0-rc.2",
|
|
74
|
-
"@types/node": "^26.2.0",
|
|
75
|
-
"@types/react": "~18.3.1",
|
|
76
|
-
"react": "^18.3.1",
|
|
77
|
-
"tsdown": "^0.22.14",
|
|
78
|
-
"typescript": "^7.0.2"
|
|
79
|
-
},
|
|
80
|
-
"scripts": {},
|
|
81
|
-
"publishConfig": {
|
|
82
|
-
"registry": "https://registry.npmjs.org/"
|
|
83
|
-
},
|
|
84
|
-
"license": "MIT",
|
|
85
|
-
"keywords": [
|
|
86
|
-
"dsh",
|
|
87
|
-
"deepseek-harness",
|
|
88
|
-
"cursor",
|
|
89
|
-
"editor",
|
|
90
|
-
"code-ui",
|
|
91
|
-
"plugin"
|
|
92
|
-
],
|
|
93
|
-
"packageManager": "pnpm@11.23.0+sha512.f00082e5b283a199b74e079da28d155c008fe232f44c8a06ea7ddfa014ecf719fc362f790ecc67b28106ddac2afb24c49a9a079159da560b2ce7d1e98efd11af"
|
|
94
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-code-ui",
|
|
3
|
+
"version": "1.6.2",
|
|
4
|
+
"description": "Cursor 风格的 AI 代码编辑器工作台插件(DSH):文件树、多标签页编辑、语法高亮、引用/翻译行内标签给 AI、右侧停靠/悬浮窗口双布局",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/soGoodayo/dsh-code-ui.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/soGoodayo/dsh-code-ui#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/soGoodayo/dsh-code-ui/issues"
|
|
14
|
+
},
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"default": "./lib/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./client": {
|
|
20
|
+
"default": "./lib/client.js"
|
|
21
|
+
},
|
|
22
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
23
|
+
"./icon": "./icon.svg",
|
|
24
|
+
"./package.json": "./package.json"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"lib",
|
|
28
|
+
"cordis.patch.yml",
|
|
29
|
+
"icon.svg",
|
|
30
|
+
"README.md",
|
|
31
|
+
"LICENSE"
|
|
32
|
+
],
|
|
33
|
+
"engines": {
|
|
34
|
+
"dsh": ">=0.1.5-rc.1 <0.3.0"
|
|
35
|
+
},
|
|
36
|
+
"dsh": {
|
|
37
|
+
"bundle": {
|
|
38
|
+
"patch": "./cordis.patch.yml"
|
|
39
|
+
},
|
|
40
|
+
"client": {
|
|
41
|
+
"inject": [
|
|
42
|
+
"@deepseek-ai/dsh-client-ui-slots",
|
|
43
|
+
"@deepseek-ai/dsh-client-ui-conversation",
|
|
44
|
+
"@deepseek-ai/dsh-client-ui-settings",
|
|
45
|
+
"@deepseek-ai/dsh-client-ui-theme"
|
|
46
|
+
],
|
|
47
|
+
"platform": "web"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
52
|
+
"@deepseek-ai/dsh": ">=0.1.5-rc.1 <0.3.0",
|
|
53
|
+
"@deepseek-ai/dsh-typert-protocol": ">=0.1.5-rc.1 <0.3.0",
|
|
54
|
+
"@deepseek-ai/dsh-tools": ">=0.1.5-rc.1 <0.3.0",
|
|
55
|
+
"@deepseek-ai/dsh-settings": ">=0.1.0-rc.7 <0.3.0",
|
|
56
|
+
"react": "^18.2.0"
|
|
57
|
+
},
|
|
58
|
+
"peerDependenciesMeta": {
|
|
59
|
+
"@deepseek-ai/dsh-typert-protocol": {
|
|
60
|
+
"optional": true
|
|
61
|
+
},
|
|
62
|
+
"@deepseek-ai/dsh-tools": {
|
|
63
|
+
"optional": true
|
|
64
|
+
},
|
|
65
|
+
"@deepseek-ai/dsh-settings": {
|
|
66
|
+
"optional": true
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"dependencies": {
|
|
70
|
+
"@deepseek-ai/schemastery": "^3.18.1"
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.2.0-rc.2",
|
|
74
|
+
"@types/node": "^26.2.0",
|
|
75
|
+
"@types/react": "~18.3.1",
|
|
76
|
+
"react": "^18.3.1",
|
|
77
|
+
"tsdown": "^0.22.14",
|
|
78
|
+
"typescript": "^7.0.2"
|
|
79
|
+
},
|
|
80
|
+
"scripts": {},
|
|
81
|
+
"publishConfig": {
|
|
82
|
+
"registry": "https://registry.npmjs.org/"
|
|
83
|
+
},
|
|
84
|
+
"license": "MIT",
|
|
85
|
+
"keywords": [
|
|
86
|
+
"dsh",
|
|
87
|
+
"deepseek-harness",
|
|
88
|
+
"cursor",
|
|
89
|
+
"editor",
|
|
90
|
+
"code-ui",
|
|
91
|
+
"plugin"
|
|
92
|
+
],
|
|
93
|
+
"packageManager": "pnpm@11.23.0+sha512.f00082e5b283a199b74e079da28d155c008fe232f44c8a06ea7ddfa014ecf719fc362f790ecc67b28106ddac2afb24c49a9a079159da560b2ce7d1e98efd11af"
|
|
94
|
+
}
|