From e45e57bcf9671186142629747b611fba005c50c5 Mon Sep 17 00:00:00 2001 From: zhengkunwang223 <1paneldev@sina.com> Date: Thu, 9 Apr 2026 18:40:55 +0800 Subject: [PATCH] style: change openclaw channel style --- frontend/src/api/modules/ai.ts | 2 +- .../tabs/channels/components/channel-bots.vue | 76 ++++++++++++------- 2 files changed, 50 insertions(+), 28 deletions(-) diff --git a/frontend/src/api/modules/ai.ts b/frontend/src/api/modules/ai.ts index 3981be67c543..72b6f8619465 100644 --- a/frontend/src/api/modules/ai.ts +++ b/frontend/src/api/modules/ai.ts @@ -131,7 +131,7 @@ export const updateAgentModelConfig = (req: AI.AgentModelConfigUpdateReq) => { }; export const getAgentOverview = (req: AI.AgentOverviewReq) => { - return http.post(`/ai/agents/overview`, req); + return http.post(`/ai/agents/overview`, req, TimeoutEnum.T_60S); }; export const createAgentRole = (req: AI.AgentRoleCreateReq) => { diff --git a/frontend/src/views/ai/agents/agent/config/tabs/channels/components/channel-bots.vue b/frontend/src/views/ai/agents/agent/config/tabs/channels/components/channel-bots.vue index 61bba0b0a850..0d2f32ef9e1e 100644 --- a/frontend/src/views/ai/agents/agent/config/tabs/channels/components/channel-bots.vue +++ b/frontend/src/views/ai/agents/agent/config/tabs/channels/components/channel-bots.vue @@ -32,43 +32,52 @@ /> - + @@ -282,6 +291,10 @@ const isBotActionDisabled = (bot: ChannelBotItem) => { return props.fields.some((field) => field.required && !bot[field.prop]); }; +const hasMoreActions = (bot: ChannelBotItem) => { + return (props.defaultable && !bot.isDefault) || props.approvable; +}; + const openCreate = () => { editIndex.value = -1; editingAccountId.value = ''; @@ -344,6 +357,16 @@ const updateEnabled = (index: number, enabled: boolean | string | number) => { emitBots(nextBots); emit('save', 'save'); }; + +const handleMoreCommand = (bot: ChannelBotItem, _index: number, command: string | number | object) => { + if (command === 'default') { + setDefault(bot.accountId); + return; + } + if (command === 'approve') { + emit('approve', bot); + } +};