feat(chat,todo): 小埃同学对话窗口与待办窗口

Chat:
- DTK2 窗口:左侧会话列表 + 右侧对话区 + 输入框
- DeepSeek / 自定义 API,SSE 流式输出,首字即显示
- 会话持久化到 chat.json,新建/切换/标题自动生成
- 设置对话框:API Key、API 地址、模型、系统提示,含开通指引
- 拖放:左侧空白=新建对话,左侧会话=指定会话,右侧对话区=当前会话
- Ctrl+Enter 发送,错误以消息形式回显

Todo:
- 待办窗口(layer-shell,不抢焦点、不进 dock),复选框/删除/新建
- 待办持久化 todo.json,--todo 打开,独立 desktop 入口

其他:
- desktop 入口改为打开对话窗口,--chat 参数
- 单实例消息支持 show/todo/chat
This commit is contained in:
2026-10-30 20:12:31 +08:00
parent 150a49af2f
commit e3c8da1a3f
12 changed files with 1363 additions and 10 deletions
+7 -1
View File
@@ -5,9 +5,11 @@
#include <QObject>
class ChatWindow;
class PortalPanel;
class QLocalServer;
class StagingModel;
class TodoWindow;
/**
* Application controller: owns the staging model, the panel and the single
@@ -25,14 +27,18 @@ public:
* @param forceShow always show the panel on startup
* @return false when another instance is already running
*/
bool init(bool daemon, bool forceShow);
bool init(bool daemon, bool forceShow, bool showTodo = false, bool showChat = false);
private:
void ensurePanel();
void showPanel();
void showTodoWindow();
void showChatWindow();
StagingModel *m_model = nullptr;
PortalPanel *m_panel = nullptr;
TodoWindow *m_todoWindow = nullptr;
ChatWindow *m_chatWindow = nullptr;
QLocalServer *m_server = nullptr;
bool m_daemon = false;
bool m_dragging = false;