mirror of
				https://github.com/Palm1r/QodeAssist.git
				synced 2025-10-31 08:14:36 -04:00 
			
		
		
		
	Fix clear message history
This commit is contained in:
		| @ -103,6 +103,14 @@ void ChatClientInterface::sendMessage(const QString &message) | |||||||
|     m_requestHandler->sendLLMRequest(config, request); |     m_requestHandler->sendLLMRequest(config, request); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | void ChatClientInterface::clearMessages() | ||||||
|  | { | ||||||
|  |     m_chatHistory = {}; | ||||||
|  |     m_accumulatedResponse.clear(); | ||||||
|  |     m_pendingMessage.clear(); | ||||||
|  |     logMessage("Chat history cleared"); | ||||||
|  | } | ||||||
|  |  | ||||||
| void ChatClientInterface::handleLLMResponse(const QString &response, bool isComplete) | void ChatClientInterface::handleLLMResponse(const QString &response, bool isComplete) | ||||||
| { | { | ||||||
|     m_accumulatedResponse += response; |     m_accumulatedResponse += response; | ||||||
|  | |||||||
| @ -35,6 +35,7 @@ public: | |||||||
|     ~ChatClientInterface(); |     ~ChatClientInterface(); | ||||||
|  |  | ||||||
|     void sendMessage(const QString &message); |     void sendMessage(const QString &message); | ||||||
|  |     void clearMessages(); | ||||||
|  |  | ||||||
| signals: | signals: | ||||||
|     void messageReceived(const QString &message); |     void messageReceived(const QString &message); | ||||||
|  | |||||||
| @ -134,6 +134,7 @@ void ChatWidget::clear() | |||||||
| { | { | ||||||
|     m_chatDisplay->clear(); |     m_chatDisplay->clear(); | ||||||
|     m_currentAIResponse.clear(); |     m_currentAIResponse.clear(); | ||||||
|  |     m_chatClient->clearMessages(); | ||||||
| } | } | ||||||
|  |  | ||||||
| void ChatWidget::scrollToBottom() | void ChatWidget::scrollToBottom() | ||||||
|  | |||||||
| @ -40,6 +40,7 @@ public: | |||||||
|     void setShowTimestamp(bool show); |     void setShowTimestamp(bool show); | ||||||
|  |  | ||||||
|     void receiveMessage(const QString &message); |     void receiveMessage(const QString &message); | ||||||
|  |  | ||||||
| private slots: | private slots: | ||||||
|     void sendMessage(); |     void sendMessage(); | ||||||
|     void receivePartialMessage(const QString &partialMessage); |     void receivePartialMessage(const QString &partialMessage); | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user