From b9231d643185fd1e30b3eb97472c5030857a316b Mon Sep 17 00:00:00 2001 From: Felix <24791380+vcfgv@users.noreply.github.com> Date: Tue, 17 Mar 2026 14:14:47 +0800 Subject: [PATCH] fix: improve Feishu/Lark channel modal UX and refine default main agent naming (#551) --- electron/utils/agent-config.ts | 2 +- src/components/channels/ChannelConfigModal.tsx | 10 +++++++++- src/i18n/locales/en/channels.json | 1 + src/i18n/locales/ja/channels.json | 1 + src/i18n/locales/zh/channels.json | 1 + src/pages/Channels/index.tsx | 1 + 6 files changed, 14 insertions(+), 2 deletions(-) diff --git a/electron/utils/agent-config.ts b/electron/utils/agent-config.ts index 64637ac95..78a9f3118 100644 --- a/electron/utils/agent-config.ts +++ b/electron/utils/agent-config.ts @@ -7,7 +7,7 @@ import { expandPath, getOpenClawConfigDir } from './paths'; import * as logger from './logger'; const MAIN_AGENT_ID = 'main'; -const MAIN_AGENT_NAME = 'Main'; +const MAIN_AGENT_NAME = 'Main Agent'; const DEFAULT_ACCOUNT_ID = 'default'; const DEFAULT_WORKSPACE_PATH = '~/.openclaw/workspace'; const AGENT_BOOTSTRAP_FILES = [ diff --git a/src/components/channels/ChannelConfigModal.tsx b/src/components/channels/ChannelConfigModal.tsx index 10e1c6f71..b8217e9a7 100644 --- a/src/components/channels/ChannelConfigModal.tsx +++ b/src/components/channels/ChannelConfigModal.tsx @@ -425,9 +425,17 @@ export function ChannelConfigModal({ }; return ( -
+
{ + if (event.target === event.currentTarget) { + onClose(); + } + }} + > event.stopPropagation()} onClick={(event) => event.stopPropagation()} > diff --git a/src/i18n/locales/en/channels.json b/src/i18n/locales/en/channels.json index 55c34083b..6f461f3c0 100644 --- a/src/i18n/locales/en/channels.json +++ b/src/i18n/locales/en/channels.json @@ -40,6 +40,7 @@ "deleteConfirm": "Are you sure you want to delete this account?", "default": "Current Default", "setDefault": "Set as channel default", + "bindAgentLabel": "Bound Agent", "unassigned": "Unassigned", "mainAccount": "Primary Account", "customIdLabel": "Account ID", diff --git a/src/i18n/locales/ja/channels.json b/src/i18n/locales/ja/channels.json index a98b115ef..4fcc0eabf 100644 --- a/src/i18n/locales/ja/channels.json +++ b/src/i18n/locales/ja/channels.json @@ -40,6 +40,7 @@ "deleteConfirm": "このアカウントを削除してもよろしいですか?", "default": "現在の既定", "setDefault": "チャンネル既定に設定", + "bindAgentLabel": "紐付け Agent", "unassigned": "未割り当て", "mainAccount": "メインアカウント", "customIdLabel": "アカウント ID", diff --git a/src/i18n/locales/zh/channels.json b/src/i18n/locales/zh/channels.json index 82d99908b..2dcf8a455 100644 --- a/src/i18n/locales/zh/channels.json +++ b/src/i18n/locales/zh/channels.json @@ -40,6 +40,7 @@ "deleteConfirm": "确定要删除该账号吗?", "default": "当前默认", "setDefault": "设为频道默认账号", + "bindAgentLabel": "绑定 Agent", "unassigned": "未绑定", "mainAccount": "主账号", "customIdLabel": "账号 ID", diff --git a/src/pages/Channels/index.tsx b/src/pages/Channels/index.tsx index 67121b82a..a87f7f580 100644 --- a/src/pages/Channels/index.tsx +++ b/src/pages/Channels/index.tsx @@ -354,6 +354,7 @@ export function Channels() {
+ {t('account.bindAgentLabel')}