MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / serializeChat

Method serializeChat

ChatView/ChatSerializer.cpp:177–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177QJsonObject ChatSerializer::serializeChat(const ChatModel *model, const QString &chatFilePath)
178{
179 QJsonArray messagesArray;
180 for (const auto &message : model->getChatHistory()) {
181 messagesArray.append(serializeMessage(message, chatFilePath));
182 }
183
184 QJsonObject root;
185 root["version"] = VERSION;
186 root["messages"] = messagesArray;
187
188 return root;
189}
190
191bool ChatSerializer::deserializeChat(
192 ChatModel *model, const QJsonObject &json, const QString &chatFilePath)

Callers

nothing calls this directly

Calls 2

getChatHistoryMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected