* @brief Writes the conversation's current state back to the active chat file. */
| 718 | * @brief Writes the conversation's current state back to the active chat file. |
| 719 | */ |
| 720 | void AI::Assistant::persistActiveChat() |
| 721 | { |
| 722 | if (!m_conversation || m_activeChatId.isEmpty()) |
| 723 | return; |
| 724 | |
| 725 | m_chats.saveChat(m_activeChatId, |
| 726 | m_conversation->snapshot(), |
| 727 | m_conversation->firstUserText().left(kTitleLimit), |
| 728 | m_conversation->messageCount()); |
| 729 | Q_EMIT chatListChanged(); |
| 730 | } |
| 731 | |
| 732 | /** |
| 733 | * @brief Loads each provider's previously-selected model from QSettings. |
nothing calls this directly
no test coverage detected