feat/p02-dual-connections #3

已合并
YokiiroBW 已将来自 feat/p02-dual-connections 的 31 提交合并入 main 2026-07-21 14:40:19 +08:00
共有 3 个文件被更改,包括 8 次插入 和 1 次删除
仅显示提交 9f61578a73 的更改 - 显示所有提交

查看文件

@ -81,7 +81,8 @@ remote_username 用于远端聊天身份和会话命名,不作为本机权限
- 与主窗口共享 `ChatRuntime`、会话选择、消息缓存、未读数和发送队列。
- 设置中只提供一个快速聊天目标:`companion` 或 `operations`,二选一。
- 设置中提供气泡点击导向:主页面或快速聊天;不增加第三种导向模式。
- 处理主窗口关闭到托盘、快速窗口关闭、单实例和窗口重启恢复。
- 处理主窗口关闭到托盘、快速窗口关闭、单实例和窗口重启恢复。
- 已修复:快捷窗口关闭按钮现在正常销毁窗口;主窗口仍保持关闭到托盘。
验收:从主窗口和快速窗口发送的消息进入同一会话;任一窗口关闭不影响连接和另一个窗口。

查看文件

@ -163,3 +163,8 @@ Still not claimed complete: automatic startup activation, real Tauri multi-windo
- Fixed the remaining mojibake in status-bubble state labels and accessibility text.
- Validation: TypeScript, ESLint, and Vitest (6 tests) pass.
## 2026-07-20: quick-chat close behavior fix
- Fixed the global close handler so the quick-chat window can be closed normally instead of being intercepted and only hidden.
- The main window keeps the existing tray behavior; quick-chat geometry is saved before destruction and restored when reopened.
- Validation: Rust Clippy and `astrbot-desktop` unit tests (64) pass.

查看文件

@ -251,6 +251,7 @@ pub fn run() {
WindowEvent::CloseRequested { api, .. } => {
if window.label() == QUICK_WINDOW_ID {
save_quick_window_state(window, window.app_handle());
return;
}
api.prevent_close();
let _ = window.hide();