- thought_signature aus delta.tool_calls[n].extra_content.google.thought_signature lesen (korrekter Pfad) - ThoughtSignature-Feld in MessageRecord + DB-Migration (ALTER TABLE messages ADD COLUMN thought_signature) - SaveMessage speichert ThoughtSignature pro Tool-Call - OpenAiService: toolCallAccumulators Tuple um ThoughtSignature erweitert - Tool-Calls mit thought_signature werden mit extra_content.google.thought_signature zurückgesendet (nicht function.thought_signature) - ConvertMessage (History-Rebuild) setzt thought_signature ebenfalls korrekt - ChatService.BuildApiMessages übergibt thought_signature aus DB-Record - Gemini-Modelle dynamisch laden statt hardcodiert - Tool-Call-Akkumulator nutzt id als primären Key (Gemini sendet parallele Calls ohne index) - content=null → content='' für Gemini-Kompatibilität
34 lines
1.7 KiB
C#
34 lines
1.7 KiB
C#
namespace Gott.Models;
|
|
|
|
public class MessageRecord
|
|
{
|
|
public long Id { get; set; }
|
|
public string ChainId { get; set; }
|
|
public string Role { get; set; } // user, assistant
|
|
public string Type { get; set; } // text, tool_use, tool_result
|
|
public string Content { get; set; } // Text oder JSON
|
|
public string ToolName { get; set; } // null bei text
|
|
public string ToolCallId { get; set; } // tool_use id
|
|
public bool IsError { get; set; }
|
|
public int Iteration { get; set; } // welche Loop-Iteration
|
|
public int AttachmentCount { get; set; } // Anzahl angehängter Dateien
|
|
public string AttachmentNames { get; set; } // JSON-Array mit Dateinamen
|
|
public string ThoughtSignature { get; set; } // Gemini thought_signature (nur bei tool_use)
|
|
public string Tag { get; set; } // null = normal, "preparer"/"review"/"finalizer" = Sub-Agent-Message
|
|
public bool IsMarked { get; set; } // als wichtig markiert
|
|
public string DeletedOn { get; set; } // null = aktiv, sonst Zeitstempel der Löschung
|
|
public string CreatedAt { get; set; }
|
|
public long SortKey { get; set; } // Computed: openclaw-import messages get id - 10B, else id
|
|
}
|
|
|
|
public class AttachmentRecord
|
|
{
|
|
public long Id { get; set; }
|
|
public long MessageId { get; set; } // FK auf messages.id
|
|
public string Type { get; set; } // image, document
|
|
public string MediaType { get; set; } // image/png, application/pdf, etc.
|
|
public string FileName { get; set; } // Original-Dateiname (optional)
|
|
public string Data { get; set; } // Base64-encoded Inhalt
|
|
public string CreatedAt { get; set; }
|
|
}
|