feat(chat,panel): 对话增强与面板窗口管理;chore: debian 打包
Chat: - 消息操作:编辑用户消息、重试、从任意回复分支 - 上下文:条数设置 + 超出自动压缩(摘要旧消息) - 关于对话框;侧栏更多菜单 Panel: - 拖动边框移动、拖顶部调整高度,位置/高度持久化 - 右键菜单:固定位置、恢复默认位置、固定大小、全屏时隐藏(预留)、 开机自启与保活(写入 gxde-k9 .slimy)、清空暂存区、关于、退出 Packaging: - debian/(control/rules/changelog/copyright/source format) - README 构建与使用说明、CHANGELOG.md
This commit is contained in:
@@ -15,7 +15,10 @@ struct ChatMessage
|
||||
};
|
||||
|
||||
/**
|
||||
* Minimal streaming client for the DeepSeek (OpenAI compatible) chat API.
|
||||
* Minimal client for the DeepSeek (OpenAI compatible) chat API.
|
||||
*
|
||||
* \a send streams (SSE), \a sendOnce performs a non streaming request used for
|
||||
* context compression and other housekeeping calls.
|
||||
*/
|
||||
class ChatClient : public QObject
|
||||
{
|
||||
@@ -26,12 +29,15 @@ public:
|
||||
|
||||
bool busy() const { return m_reply != nullptr; }
|
||||
void send(const QVector<ChatMessage> &messages);
|
||||
void sendOnce(const QVector<ChatMessage> &messages);
|
||||
void cancel();
|
||||
|
||||
signals:
|
||||
void delta(const QString &text);
|
||||
void finished(const QString &text);
|
||||
void failed(const QString &error);
|
||||
void onceFinished(const QString &text);
|
||||
void onceFailed(const QString &error);
|
||||
|
||||
private:
|
||||
void handleReadyRead();
|
||||
@@ -40,6 +46,7 @@ private:
|
||||
|
||||
QNetworkAccessManager m_manager;
|
||||
class QNetworkReply *m_reply = nullptr;
|
||||
class QNetworkReply *m_onceReply = nullptr;
|
||||
QByteArray m_buffer;
|
||||
QString m_fullText;
|
||||
bool m_done = false;
|
||||
|
||||
Reference in New Issue
Block a user