* @brief Returns a serializable snapshot of the current history and UI rows. */
| 2462 | * @brief Returns a serializable snapshot of the current history and UI rows. |
| 2463 | */ |
| 2464 | QJsonObject AI::Conversation::snapshot() const |
| 2465 | { |
| 2466 | QJsonObject doc; |
| 2467 | doc[QStringLiteral("schema")] = 1; |
| 2468 | doc[QStringLiteral("history")] = m_history; |
| 2469 | doc[QStringLiteral("messages")] = QJsonArray::fromVariantList(m_uiMessages); |
| 2470 | return doc; |
| 2471 | } |
| 2472 | |
| 2473 | /** |
| 2474 | * @brief Loads a captured snapshot into memory, resetting all in-flight turn state and |
no outgoing calls
no test coverage detected