From e3bf67d25d33749f2b4c7ea04a51359b08ff6864 Mon Sep 17 00:00:00 2001 From: JOJO <1498581755@qq.com> Date: Sat, 11 Apr 2026 18:59:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(mobile):=20=E5=BE=85=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E6=97=B6=E8=87=AA=E5=8A=A8=E5=BC=B9=E5=87=BA=E5=B9=B6=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E5=90=8E=E6=94=B6=E5=9B=9E=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/src/app/methods/taskPolling.ts | 6 ++++++ static/src/app/methods/ui.ts | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/static/src/app/methods/taskPolling.ts b/static/src/app/methods/taskPolling.ts index f51947f..9faf473 100644 --- a/static/src/app/methods/taskPolling.ts +++ b/static/src/app/methods/taskPolling.ts @@ -824,6 +824,9 @@ export const taskPollingMethods = { if (this.rightWidth < this.minPanelWidth) { this.rightWidth = this.minPanelWidth; } + if (this.isMobileViewport && this.activeMobileOverlay !== 'approval') { + this.openMobileOverlay('approval'); + } this.$forceUpdate(); }, @@ -837,6 +840,9 @@ export const taskPollingMethods = { ); if (!this.pendingToolApprovals.length) { this.rightCollapsed = true; + if (this.isMobileViewport && this.activeMobileOverlay === 'approval') { + this.closeMobileOverlay(); + } } this.$forceUpdate(); }, diff --git a/static/src/app/methods/ui.ts b/static/src/app/methods/ui.ts index 8ada1dc..8ff8d05 100644 --- a/static/src/app/methods/ui.ts +++ b/static/src/app/methods/ui.ts @@ -689,6 +689,9 @@ export const uiMethods = { async fetchPendingToolApprovals() { if (!this.currentConversationId) { this.pendingToolApprovals = []; + if (this.isMobileViewport && this.activeMobileOverlay === 'approval') { + this.closeMobileOverlay(); + } return; } try { @@ -706,6 +709,11 @@ export const uiMethods = { if (this.rightWidth < this.minPanelWidth) { this.rightWidth = this.minPanelWidth; } + if (this.isMobileViewport && this.activeMobileOverlay !== 'approval') { + this.openMobileOverlay('approval'); + } + } else if (this.isMobileViewport && this.activeMobileOverlay === 'approval') { + this.closeMobileOverlay(); } } catch (_error) { // ignore @@ -740,6 +748,9 @@ export const uiMethods = { ); if (!this.pendingToolApprovals.length) { this.rightCollapsed = true; + if (this.isMobileViewport && this.activeMobileOverlay === 'approval') { + this.closeMobileOverlay(); + } } } catch (error) { const msg = error instanceof Error ? error.message : String(error || '审批失败');