dsh-code-ui 1.6.3 → 1.6.4
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 +7 -4
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -2475,13 +2475,16 @@ window.__ModuleLoader__.load({
|
|
|
2475
2475
|
const r = parseChipRef(refJson)
|
|
2476
2476
|
return r ? chipShortLabel(r) : String(refJson)
|
|
2477
2477
|
},
|
|
2478
|
-
//
|
|
2479
|
-
//
|
|
2480
|
-
//
|
|
2478
|
+
// 发送后保留 chip 标签文本(如 `2:package.json:2-3`):消息里看得见引用了什么,
|
|
2479
|
+
// 不再展开成大段指针,也不进 [code UI] 块——AI 侧仍靠宿主 systemPrompt
|
|
2480
|
+
// section 获知全部引用并调 get_referenced_snippets 读取。编号取发送时刻冻结的 seq。
|
|
2481
2481
|
serialize: async (refJson) => {
|
|
2482
2482
|
const r = parseChipRef(refJson)
|
|
2483
2483
|
if (!r) return '(code UI 引用数据无效: ' + refJson + ')'
|
|
2484
|
-
|
|
2484
|
+
const full = store.references.find((x) => x.id === r.id)
|
|
2485
|
+
const pendHit = numberedPendingRefs().find((x) => x.r.id === r.id)
|
|
2486
|
+
const num = (full && full.seq) || (pendHit && pendHit.n) || '?'
|
|
2487
|
+
return (r.kind === 'translate' ? '🌐' : '') + num + ':' + tagLabel(full || r)
|
|
2485
2488
|
},
|
|
2486
2489
|
},
|
|
2487
2490
|
}), 'code-ui: @ 引用源原型'))
|