dsh-drawai 0.3.1 → 0.3.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/index.js +2 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -4165,7 +4165,8 @@ function sanitizeNewName(raw) {
|
|
|
4165
4165
|
// (format v4 message requires a producer-owned source kind)。
|
|
4166
4166
|
// 目标形是 `{ kind: 'plugin:<名>' }`(V3→V4 迁移对旧 wrapper 也写成这样),
|
|
4167
4167
|
// 对 user/message 注入在 V3/V4 都可过;不带 form —— 它只是"环境事实"。
|
|
4168
|
-
|
|
4168
|
+
// 消息 id 会落到 user/message 的 data.id;缺失会导致持久化后的会话读取校验失败。
|
|
4169
|
+
agent.inject({ id: randomUUID(), role: 'user', content: [{ type: 'text', text: text }], source: { kind: 'plugin:' + name } })
|
|
4169
4170
|
} catch (error) {
|
|
4170
4171
|
// 注入失败不该影响画布本身:工具那条回退链还在。
|
|
4171
4172
|
}
|