@dsh-plus/secret-env 0.1.9 → 0.1.10
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 +1 -0
- package/package.json +2 -2
- package/src/client/menu.tsx +3 -0
package/lib/client.js
CHANGED
|
@@ -680,6 +680,7 @@ ${extra}
|
|
|
680
680
|
const chips = root.querySelectorAll("[data-composer-chip]");
|
|
681
681
|
for (let i = 0; i < chips.length; i++) {
|
|
682
682
|
const el = chips[i];
|
|
683
|
+
if (el === void 0) continue;
|
|
683
684
|
if (range.comparePoint(el, el.childNodes.length) > 0) continue;
|
|
684
685
|
const occurrence = occurrences[i];
|
|
685
686
|
if (occurrence === void 0) continue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-plus/secret-env",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "dsh-plus service+ui plugin: 密钥环境变量——以 $DSH_VAR_* 变量名向 agent 暴露密钥(全局持久/会话级/一次性),执行期经 dsh-shell-env 原生注入,值不进消息流,不影响缓存率",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"src"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@dsh-plus/shared": "0.1.
|
|
22
|
+
"@dsh-plus/shared": "0.1.15"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@deepseek-ai/cordis": "^4.0.2",
|
package/src/client/menu.tsx
CHANGED
|
@@ -74,6 +74,9 @@ function caretDraftOffset(
|
|
|
74
74
|
const chips = root.querySelectorAll('[data-composer-chip]')
|
|
75
75
|
for (let i = 0; i < chips.length; i++) {
|
|
76
76
|
const el = chips[i]
|
|
77
|
+
// 索引访问在 noUncheckedIndexedAccess 下带 undefined;i < length 保证存在,
|
|
78
|
+
// 此分支不可达,仅为类型安全收窄。
|
|
79
|
+
if (el === undefined) continue
|
|
77
80
|
// 光标位于芯片结束之后(含边界)才计入修正
|
|
78
81
|
if (range.comparePoint(el, el.childNodes.length) > 0) continue
|
|
79
82
|
const occurrence = occurrences[i]
|