From e28959505452e4270f0cfe3a952e94b57ea1a636 Mon Sep 17 00:00:00 2001 From: "myheart99@126.com" Date: Tue, 21 Jul 2026 07:30:57 +0800 Subject: [PATCH] fix(types): use correct GORM tag separator in Message.KnowledgeReferences Multiple GORM tag options must be separated by ';', not ','. The comma was parsed as part of the type value, producing malformed DDL that causes AutoMigrate(&Message{}) to fail on SQLite with a syntax error. --- internal/types/message.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/types/message.go b/internal/types/message.go index 89dd1028..c352b267 100644 --- a/internal/types/message.go +++ b/internal/types/message.go @@ -213,7 +213,7 @@ type Message struct { // Message role: "user", "assistant", "system" Role string `json:"role"` // References to knowledge chunks used in the response - KnowledgeReferences References `json:"knowledge_references" gorm:"type:json,column:knowledge_references"` + KnowledgeReferences References `json:"knowledge_references" gorm:"type:json;column:knowledge_references"` // Agent execution steps (only for assistant messages generated by agent) // This contains the detailed reasoning process and tool calls made by the agent // Stored for user history display, but NOT included in LLM context to avoid redundancy