LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
ui::qt::AIChatPanel Class Reference

Interactive chat panel for asking questions about logs. More...

#include <AIChatPanel.hpp>

Inheritance diagram for ui::qt::AIChatPanel:
Inheritance graph
Collaboration diagram for ui::qt::AIChatPanel:
Collaboration graph

Signals

void MessageSent (const QString &message)
 
void ResponseReceived (const QString &response)
 

Public Member Functions

 AIChatPanel (std::shared_ptr< ai::AIServiceWrapper > aiService, QWidget *parent=nullptr)
 

Private Slots

void OnSendClicked ()
 
void OnClearClicked ()
 
void OnContextSizeChanged (int value)
 

Private Member Functions

void BuildUi ()
 
void AppendMessage (const QString &sender, const QString &message, const QString &color)
 
void SendMessage (const QString &message)
 
std::string FormatEventsForContext (size_t maxEvents) const
 

Private Attributes

std::shared_ptr< ai::AIServiceWrapper > m_aiService
 
QTextEdit * m_chatHistory {nullptr}
 
QLineEdit * m_messageInput {nullptr}
 
QPushButton * m_sendButton {nullptr}
 
QPushButton * m_clearButton {nullptr}
 
QSpinBox * m_contextSizeSpinBox {nullptr}
 
int m_maxContextEvents {50}
 

Detailed Description

Interactive chat panel for asking questions about logs.

Constructor & Destructor Documentation

◆ AIChatPanel()

ui::qt::AIChatPanel::AIChatPanel ( std::shared_ptr< ai::AIServiceWrapper >  aiService,
QWidget *  parent = nullptr 
)
explicit
Here is the call graph for this function:

Member Function Documentation

◆ AppendMessage()

void ui::qt::AIChatPanel::AppendMessage ( const QString &  sender,
const QString &  message,
const QString &  color 
)
private
Here is the caller graph for this function:

◆ BuildUi()

void ui::qt::AIChatPanel::BuildUi ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FormatEventsForContext()

std::string ui::qt::AIChatPanel::FormatEventsForContext ( size_t  maxEvents) const
private
Here is the caller graph for this function:

◆ MessageSent

void ui::qt::AIChatPanel::MessageSent ( const QString &  message)
signal
Here is the caller graph for this function:

◆ OnClearClicked

void ui::qt::AIChatPanel::OnClearClicked ( )
privateslot
Here is the caller graph for this function:

◆ OnContextSizeChanged

void ui::qt::AIChatPanel::OnContextSizeChanged ( int  value)
privateslot
Here is the caller graph for this function:

◆ OnSendClicked

void ui::qt::AIChatPanel::OnSendClicked ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ResponseReceived

void ui::qt::AIChatPanel::ResponseReceived ( const QString &  response)
signal
Here is the caller graph for this function:

◆ SendMessage()

void ui::qt::AIChatPanel::SendMessage ( const QString &  message)
private
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_aiService

std::shared_ptr<ai::AIServiceWrapper> ui::qt::AIChatPanel::m_aiService
private

◆ m_chatHistory

QTextEdit* ui::qt::AIChatPanel::m_chatHistory {nullptr}
private

◆ m_clearButton

QPushButton* ui::qt::AIChatPanel::m_clearButton {nullptr}
private

◆ m_contextSizeSpinBox

QSpinBox* ui::qt::AIChatPanel::m_contextSizeSpinBox {nullptr}
private

◆ m_maxContextEvents

int ui::qt::AIChatPanel::m_maxContextEvents {50}
private

◆ m_messageInput

QLineEdit* ui::qt::AIChatPanel::m_messageInput {nullptr}
private

◆ m_sendButton

QPushButton* ui::qt::AIChatPanel::m_sendButton {nullptr}
private

The documentation for this class was generated from the following files: