fix: improve Feishu/Lark channel modal UX and refine default main agent naming (#551)

This commit is contained in:
Felix
2026-03-17 14:14:47 +08:00
committed by GitHub
Unverified
parent 3b9ecb72b4
commit b9231d6431
6 changed files with 14 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ import { expandPath, getOpenClawConfigDir } from './paths';
import * as logger from './logger'; import * as logger from './logger';
const MAIN_AGENT_ID = 'main'; const MAIN_AGENT_ID = 'main';
const MAIN_AGENT_NAME = 'Main'; const MAIN_AGENT_NAME = 'Main Agent';
const DEFAULT_ACCOUNT_ID = 'default'; const DEFAULT_ACCOUNT_ID = 'default';
const DEFAULT_WORKSPACE_PATH = '~/.openclaw/workspace'; const DEFAULT_WORKSPACE_PATH = '~/.openclaw/workspace';
const AGENT_BOOTSTRAP_FILES = [ const AGENT_BOOTSTRAP_FILES = [

View File

@@ -425,9 +425,17 @@ export function ChannelConfigModal({
}; };
return ( return (
<div className="fixed inset-0 z-50 bg-black/50 flex items-center justify-center p-4" onClick={onClose}> <div
className="fixed inset-0 z-50 bg-black/50 flex items-center justify-center p-4"
onMouseDown={(event) => {
if (event.target === event.currentTarget) {
onClose();
}
}}
>
<Card <Card
className="w-full max-w-3xl max-h-[90vh] flex flex-col rounded-3xl border-0 shadow-2xl bg-[#f3f1e9] dark:bg-card overflow-hidden" className="w-full max-w-3xl max-h-[90vh] flex flex-col rounded-3xl border-0 shadow-2xl bg-[#f3f1e9] dark:bg-card overflow-hidden"
onMouseDown={(event) => event.stopPropagation()}
onClick={(event) => event.stopPropagation()} onClick={(event) => event.stopPropagation()}
> >
<CardHeader className="flex flex-row items-start justify-between pb-2 shrink-0"> <CardHeader className="flex flex-row items-start justify-between pb-2 shrink-0">

View File

@@ -40,6 +40,7 @@
"deleteConfirm": "Are you sure you want to delete this account?", "deleteConfirm": "Are you sure you want to delete this account?",
"default": "Current Default", "default": "Current Default",
"setDefault": "Set as channel default", "setDefault": "Set as channel default",
"bindAgentLabel": "Bound Agent",
"unassigned": "Unassigned", "unassigned": "Unassigned",
"mainAccount": "Primary Account", "mainAccount": "Primary Account",
"customIdLabel": "Account ID", "customIdLabel": "Account ID",

View File

@@ -40,6 +40,7 @@
"deleteConfirm": "このアカウントを削除してもよろしいですか?", "deleteConfirm": "このアカウントを削除してもよろしいですか?",
"default": "現在の既定", "default": "現在の既定",
"setDefault": "チャンネル既定に設定", "setDefault": "チャンネル既定に設定",
"bindAgentLabel": "紐付け Agent",
"unassigned": "未割り当て", "unassigned": "未割り当て",
"mainAccount": "メインアカウント", "mainAccount": "メインアカウント",
"customIdLabel": "アカウント ID", "customIdLabel": "アカウント ID",

View File

@@ -40,6 +40,7 @@
"deleteConfirm": "确定要删除该账号吗?", "deleteConfirm": "确定要删除该账号吗?",
"default": "当前默认", "default": "当前默认",
"setDefault": "设为频道默认账号", "setDefault": "设为频道默认账号",
"bindAgentLabel": "绑定 Agent",
"unassigned": "未绑定", "unassigned": "未绑定",
"mainAccount": "主账号", "mainAccount": "主账号",
"customIdLabel": "账号 ID", "customIdLabel": "账号 ID",

View File

@@ -354,6 +354,7 @@ export function Channels() {
</div> </div>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<span className="text-xs text-muted-foreground">{t('account.bindAgentLabel')}</span>
<select <select
className="h-8 rounded-lg border border-black/10 dark:border-white/10 bg-background px-2 text-xs" className="h-8 rounded-lg border border-black/10 dark:border-white/10 bg-background px-2 text-xs"
value={account.agentId || ''} value={account.agentId || ''}