增加聊天历史配置与持久化

This commit is contained in:
2026-05-30 12:39:38 +08:00
parent 46c4f6092b
commit 37b43624a7
14 changed files with 581 additions and 8 deletions
+5
View File
@@ -21,6 +21,7 @@ class ChatBubble;
class ChatHistoryPanel;
class ChatInputDialog;
class ConversationManager;
class ConversationStore;
class PetView;
class PetWindow : public QWidget
@@ -56,6 +57,9 @@ private:
void cancelActiveAIRequest();
void showConversationHistory();
void refreshChatHistoryPanel();
void configureConversation(bool loadPersistedHistory);
void loadConversationHistoryIfNeeded();
void saveConversationHistoryIfNeeded();
void handleChatStreamDelta(const QString &delta);
void flushStreamingBubble(bool finalUpdate);
void finishStreamingChat();
@@ -83,6 +87,7 @@ private:
std::unique_ptr<ChatHistoryPanel> m_chatHistoryPanel;
std::unique_ptr<ChatInputDialog> m_chatInputDialog;
std::unique_ptr<ConversationManager> m_conversationManager;
std::unique_ptr<ConversationStore> m_conversationStore;
PetView *m_petView;
QTimer m_idleBehaviorTimer;
QTimer m_behaviorReturnTimer;