fix(ui): 未开始会话时不切到文件树,空树直接退回会话列表

This commit is contained in:
2026-11-11 15:48:23 +08:00
parent 419e3fc914
commit 20824dc42e
2 changed files with 9 additions and 1 deletions
+2
View File
@@ -1239,6 +1239,8 @@
function setDrawerPane(files) {
// 窄屏没有文件树(只有输入行右侧的旧文件面板),任何调用方都不允许切过去
if (files && !drawerMQ.matches) return;
// 还没开始会话 = 没有任务目录:不切过去(否则只能切出一个写着「尚未开始会话」的空面板)
if (files && !state.sessionId) return;
// 文件树模块没加载成功时不要把一个空面板切出来
if (files && typeof window.showFileTree !== 'function') return;
const drawer = $('drawer');