@michengai/dsh-btw 1.0.2 → 1.0.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/CHANGELOG.md +19 -0
- package/CHANGELOG.zh-CN.md +19 -0
- package/lib/client.js +7470 -46
- package/lib/index.js +20 -10
- package/lib/types/client/QuoteDock.d.ts +7 -0
- package/lib/types/client/SelectionAsk.d.ts +8 -2
- package/lib/types/client/quotes.d.ts +3 -3
- package/lib/types/client/trigger-source.d.ts +53 -0
- package/lib/types/client/user-quote-chip.d.ts +44 -0
- package/lib/types/limits.d.ts +7 -1
- package/lib/types/locales.d.ts +5 -0
- package/lib/types/shared.d.ts +1 -1
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.4] - 2026-10-22
|
|
4
|
+
|
|
5
|
+
- Support structured quote references via host input trigger channel: Register `@dsh-btw-quote` source with dedicated clipboard and model prompt codecs, allowing quotes to be managed as atomic mention references without flattening long excerpts into composer drafts (#12).
|
|
6
|
+
- Render quote context in conversation bubbles as native ReferenceChip capsules: Parse leading selected context blocks into structured quote nodes, rendering compact capsules at the top of message bubbles with full card details mounted via React Portal to prevent container clipping (#12).
|
|
7
|
+
- Multi-card popover list with independent navigation: Display multiple referenced excerpts as discrete cards with distinct provenance badges, scrolling preview, and dedicated "Jump to source" actions for pinpoint anchor navigation (#12).
|
|
8
|
+
- Fortify quote heading parser against false positives: Enforce whitespace-only prefix bounds and require at least one valid quote item before creating a capsule, preventing in-text discussions or bare headings from being captured (#12).
|
|
9
|
+
- Harmonize detect coordinates and bilingual locale support: Use `captureInsertion()` for accurate detect-span offsets across existing mention chips, bind slot locale to `QuoteUserTextNode`, and complete bilingual localization (#12).
|
|
10
|
+
- Add `@deepseek-ai/dsh-client-ui-input-trigger` to peerDependencies across all supported host versions (0.2.0-rc.1 through 0.2.1-rc.2).
|
|
11
|
+
|
|
12
|
+
## [1.0.3] - 2026-10-22
|
|
13
|
+
|
|
14
|
+
- Fix main-session tool calls being suppressed when quoting text: Remove side-ask-specific tool prohibition instructions from quote prompt formatting so the main agent can still invoke tools as needed (#11).
|
|
15
|
+
- Prevent Enter key and click event overreach in dialogs: Exclude selection modals and dialogs from global keydown capture and click handlers, preventing side-question input from polluting the main draft (#13).
|
|
16
|
+
- Guard draft merging and expansion against non-plain submission phases: Prevent quote data loss when submitting messages in flight (#13).
|
|
17
|
+
- Refine quote deduplication and prevent empty-question submission: Deduplicate quotes by content, role, and turn index to support identical excerpts across turns, and intercept Enter on empty drafts to avoid sending blank queries (#14).
|
|
18
|
+
- Distinguish host send and stop buttons: Accurately match send, queue, and steer message actions in the host InputBar while explicitly ignoring the stop generation button, avoiding premature quote consumption (#13).
|
|
19
|
+
- Support multiple quotes on the same DOM element and improve anchor lifecycle: Store space-separated anchor IDs on DOM nodes, recycle `data-btw-anchor` upon quote removal, and align fallback jump turn counting strictly with selection logic (#15).
|
|
20
|
+
- Unify terminology and enforce quote limits: Unify quote and note wording across UI and prompt, cap cumulative quotes at 16,000 characters with localized error messages, and clean up legacy callbacks (#15).
|
|
21
|
+
|
|
3
22
|
## [1.0.2] - 2026-10-21
|
|
4
23
|
|
|
5
24
|
- Prevent tool-call pattern pollution from inherited session context: Inject high-priority negative tool constraints into the trailing user prompt, instructing models that all tools are disabled and strictly forbidding tool calls or call tags in favor of direct text answers (#10).
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## [1.0.4] - 2026-10-22
|
|
4
|
+
|
|
5
|
+
- 支持宿主输入触发器结构化引用通道:注册 `@dsh-btw-quote` 触发源并提供剪贴板与模型提示词专用编解码器,支持将划选引用作为原子 Mention 胶囊管理,不再把长文本粗暴拍平进输入框草稿 (#12)。
|
|
6
|
+
- 消息气泡内引文胶囊化与原生体验对齐:自动将消息开头的划选上下文解析为结构化引文节点,在用户气泡顶部优雅呈现 `<ReferenceChip>` 原生胶囊;浮层详情通过 React Portal 挂载到根节点,彻底避免气泡容器样式裁剪与层叠遮挡 (#12)。
|
|
7
|
+
- 多引文独立卡片列表与精准出处定位:将多次引用的摘录独立渲染为带有出处徽章的卡片,支持长引文滑动预览与卡片内专属「定位到原文」平滑滚动高亮操作 (#12)。
|
|
8
|
+
- 强化引文提示词解析器防误判:增加前缀空白与非空条目双重约束,正文中间讨论或无引文条目的空标题坚决不匹配为假胶囊 (#12)。
|
|
9
|
+
- 纠正 Mention 插入坐标系与完善多语言支持:优先通过 `captureInsertion()` 捕获真实 detect 坐标避免多 Mention 越界,气泡槽位注册绑定 `locale: NS`,补齐中英文双语字典 (#12)。
|
|
10
|
+
- 在 `peerDependencies` 中补充声明 `@deepseek-ai/dsh-client-ui-input-trigger`,覆盖全部 4 个支持宿主版本(0.2.0-rc.1 至 0.2.1-rc.2)。
|
|
11
|
+
|
|
12
|
+
## [1.0.3] - 2026-10-22
|
|
13
|
+
|
|
14
|
+
- 修复主会话划词引用误注入禁工具引导词导致模型放弃调用工具的问题:移除引用拼装中的旁问专用禁工具指令,仅保留参考数据与防注入说明,恢复主会话正常工具调用能力 (#11)。
|
|
15
|
+
- 严格限制 Enter 键与点击事件捕获范围:排除旁问弹窗与各类 Modal 对话框,避免在弹窗内按回车误污染主会话草稿与清空引用 (#13)。
|
|
16
|
+
- 增加草稿合并与展开的提交事务状态守卫:在宿主处于 submitting/adjudicating 状态时禁止改写草稿,防止因提交冲突导致引用静默丢失 (#13)。
|
|
17
|
+
- 细化引用去重维度并拦截空草稿误发:去重键升级为「文本 + 角色 + 轮次」,允许不同出处的同名引文共存;草稿为空时按回车拦截合并,防止发出无提问内容的纯引文消息 (#14)。
|
|
18
|
+
- 精准区分宿主发送与停止生成按钮:匹配宿主 InputBar 的发送消息、排队发送与插话发送操作,显式忽略停止生成按钮,避免生成中途误触发引用合并 (#13)。
|
|
19
|
+
- 支持单节点多锚点共存并完善生命周期管理:以空格分隔列表管理 DOM 锚点 ID,移除引用时精准清理 DOM 属性,降级跳转算法严格对齐会话独立轮次计数规则 (#15)。
|
|
20
|
+
- 统一术语规范并增加总量上限:将 UI 概念统一为「引用」与「批注」,新增 16,000 字符引用总量上限控制并支持界面多语言提示,彻底清理已废弃的死参数 (#15)。
|
|
21
|
+
|
|
3
22
|
## [1.0.2] - 2026-10-21
|
|
4
23
|
|
|
5
24
|
- 阻断主会话上下文工具调用记录对旁问大模型的模式惯性污染:在最新一轮用户提问末尾注入最高优先级的反工具强约束,明确指示大模型严禁尝试发起工具调用或输出调用标记,要求直接使用纯文字解答 (#10)。
|