chat: reconcile history by canonical message identity

This commit is contained in:
2026-10-19 00:08:30 +01:00
parent 3187b0c06e
commit 7da3d54013
13 changed files with 189 additions and 15 deletions
+4
View File
@@ -231,6 +231,10 @@ type ChatPromptRequest struct {
Files []string `json:"files,omitempty"`
Client string `json:"client,omitempty"`
OperationID string `json:"operation_id,omitempty"`
// NativeMessageID is the caller-supplied OpenCode message identity. It is
// sent with the prompt so history can be reconciled without guessing from
// text, time, order or page boundaries.
NativeMessageID string `json:"native_message_id,omitempty"`
}
// ChatMessage is one stored turn returned by chat_messages. A user turn is a