From 2e5841aa07b2f9f3cdcca7d6768644b0917bb921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=B0=B8=E8=B5=AB?= <1259085392@qq.com> Date: Tue, 10 Feb 2026 15:23:54 +0900 Subject: [PATCH] fix: replace native confirm dialogs in dashboard - Add shared confirm helper in dashboard/src/utils/confirmDialog.ts for async dialog usage with safe fallback. - Migrate provider, chat, config, session, platform, persona, MCP, backup, and knowledge-base delete/close confirmations to use the shared helper. - Remove scattered inline confirm handling to keep behavior consistent and avoid native blocking dialog focus/caret issues in Electron. --- .../components/chat/ConversationSidebar.vue | 10 ++++--- dashboard/src/components/chat/ProjectList.vue | 9 ++++-- dashboard/src/components/chat/ProjectView.vue | 8 +++-- .../extension/McpServersSection.vue | 24 ++++++++------- .../src/components/shared/BackupDialog.vue | 9 ++++-- .../src/components/shared/PersonaForm.vue | 5 ++-- .../src/composables/useProviderSources.ts | 18 ++---------- dashboard/src/utils/confirmDialog.ts | 29 +++++++++++++++++++ dashboard/src/views/ConfigPage.vue | 8 +++-- dashboard/src/views/ConversationPage.vue | 7 +++-- dashboard/src/views/PlatformPage.vue | 20 ++++++++----- dashboard/src/views/SessionManagementPage.vue | 4 ++- .../views/knowledge-base/DocumentDetail.vue | 7 +++-- .../src/views/persona/PersonaManager.vue | 4 ++- 14 files changed, 104 insertions(+), 58 deletions(-) create mode 100644 dashboard/src/utils/confirmDialog.ts diff --git a/dashboard/src/components/chat/ConversationSidebar.vue b/dashboard/src/components/chat/ConversationSidebar.vue index fe25ef34c..2fee050af 100644 --- a/dashboard/src/components/chat/ConversationSidebar.vue +++ b/dashboard/src/components/chat/ConversationSidebar.vue @@ -141,9 +141,10 @@