说明 Direct 对话消息持久化边界

标注 messages 仅是乐观界面投影

说明 Direct 历史由 Rust 原始响应负责写入
This commit is contained in:
2026-09-05 13:06:59 +08:00
parent 1f2e9ed87a
commit 38d3789f29
+4
View File
@@ -1669,6 +1669,10 @@ export function App({
// DirectProject history is written by Rust from raw app-server items.
// The browser only renders that projection and must not append chat rows.
if (projectSupervisorOnly && directCodexProductRuntime) {
// `messages` is only an optimistic UI projection in Direct mode; it is
// intentionally not proof of durability. Rust owns the raw response
// history, so this effect must not route these rows through the generic
// browser conversation writer.
savedConversationCountRef.current = messages.length;
return;
}