mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-06-03 17:18:24 -04:00
Fix clear message history
This commit is contained in:
parent
aac58d6933
commit
9745997952
@ -103,6 +103,14 @@ void ChatClientInterface::sendMessage(const QString &message)
|
||||
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)
|
||||
{
|
||||
m_accumulatedResponse += response;
|
||||
|
@ -35,6 +35,7 @@ public:
|
||||
~ChatClientInterface();
|
||||
|
||||
void sendMessage(const QString &message);
|
||||
void clearMessages();
|
||||
|
||||
signals:
|
||||
void messageReceived(const QString &message);
|
||||
|
@ -134,6 +134,7 @@ void ChatWidget::clear()
|
||||
{
|
||||
m_chatDisplay->clear();
|
||||
m_currentAIResponse.clear();
|
||||
m_chatClient->clearMessages();
|
||||
}
|
||||
|
||||
void ChatWidget::scrollToBottom()
|
||||
|
@ -40,6 +40,7 @@ public:
|
||||
void setShowTimestamp(bool show);
|
||||
|
||||
void receiveMessage(const QString &message);
|
||||
|
||||
private slots:
|
||||
void sendMessage();
|
||||
void receivePartialMessage(const QString &partialMessage);
|
||||
|
Loading…
x
Reference in New Issue
Block a user