26class UiChatMessageList;
27class UiChatMessageItem;
29class UiChatEventHandler;
31class UiToolCallTimeline;
66 void sendMessage(
const QString& message);
72 bool isBusy()
const {
return busy_; }
82 void onSendMessage(
const QString& message);
83 void onStopRequested();
86 void onHtmlChunk(
const QString& html);
88 void onContentComplete(
const QString& text);
89 void onReasoningChunk(
const QString& reasoning);
90 void onReasoningComplete(
const QString& reasoning);
91 void onToolCallRequest(
const QString& toolCallId,
92 const QString& functionName,
93 const QString& arguments);
94 void onToolCallResult(
const QString& toolCallId,
95 const QString& functionName,
96 const QString& result);
98 void onError(
const QString& error);
99 void onWorkerFinished(
int errorCode);
103 void setBusy(
bool busy);
109 QLabel* statusLabel_ =
nullptr;
114 QTimer* throttleTimer_ =
nullptr;
115 QString pendingHtml_{};
116 std::string accumulatedText_{};
聊天会话
定义 ChatSession.hpp:44
流式聊天事件的 Qt 信号桥接器
定义 UiChatEventHandler.hpp:44
单条聊天消息气泡部件
定义 UiChatMessageItem.hpp:34
聊天消息列表(可滚动区域)
定义 UiChatMessageList.hpp:33
聊天面板
定义 UiChatPanel.hpp:46
bool isBusy() const
是否正在等待回复
定义 UiChatPanel.hpp:72
void chatStarted()
对话开始(用户发送消息后)
ChatSession * session() const
获取关联的聊天会话
定义 UiChatPanel.hpp:60