fix(chat): flatten runtime event payloads
这个提交存在于:
父节点
ceb7512bf2
当前提交
5de8bfab03
共有 2 个文件被更改,包括 8 次插入 和 1 次删除
|
|
@ -294,3 +294,9 @@ Still not claimed complete: automatic startup activation, real Tauri multi-windo
|
|||
- Reconciled final text with partial `plain` chunks and added support for text nested under `text`, `content`, or `message` fields.
|
||||
- Added protocol tests for complete-only replies and partial-stream reconciliation.
|
||||
- Validation: Rust format, Clippy with warnings denied, Rust workspace tests (67), TypeScript, ESLint, and NSIS bundle build pass.
|
||||
|
||||
## 2026-07-21: normalize runtime event payloads
|
||||
|
||||
- Fixed AstrBot runtime event dispatch to expose the inner payload directly instead of nesting it under the protocol envelope.
|
||||
- This restores frontend and database access to `delta`, `content`, and error `message` fields.
|
||||
- Validation: Rust workspace tests, Clippy with warnings denied, TypeScript, ESLint, and NSIS bundle build pass.
|
||||
|
|
|
|||
|
|
@ -468,8 +468,9 @@ impl AstrBotClient {
|
|||
}
|
||||
drop(seen);
|
||||
|
||||
let payload = serde_json::to_value(&event.body)
|
||||
let body = serde_json::to_value(&event.body)
|
||||
.map_err(|error| AstrBotClientError::Map(error.to_string()))?;
|
||||
let payload = body.get("payload").cloned().unwrap_or(body);
|
||||
let bound = BoundGatewayEvent {
|
||||
profile_id: self.config.profile_id.clone(),
|
||||
slot: protocol_slot(self.config.slot),
|
||||
|
|
|
|||
正在加载…
添加表格
在新工单中引用