feat: harden ai agent admin workflow experience

This commit is contained in:
2026-06-22 04:50:11 +08:00
parent ae29c24529
commit 4ec846a702
385 changed files with 61461 additions and 5886 deletions
@@ -16,45 +16,6 @@ interface IconifyResponse {
const PENDING_REQUESTS: Recordable<Promise<string[]>> = {};
const LOCAL_ICONS_MAP: Recordable<string[]> = {
carbon: [
'carbon:agent-detached',
'carbon:align-box-middle-right',
'carbon:align-vertical-top',
'carbon:arrange',
'carbon:arrange-horizontal',
'carbon:checkmark',
'carbon:chevron-down',
'carbon:circle-dash',
'carbon:close',
'carbon:edit',
'carbon:email',
'carbon:renew',
'carbon:reset',
'carbon:user-multiple',
],
ep: [
'ep:caret-right',
'ep:delete',
'ep:edit',
'ep:plus',
'ep:refresh',
],
lucide: [
'lucide:bot',
'lucide:check-square',
'lucide:history',
'lucide:layout-grid',
'lucide:library-big',
'lucide:list',
'lucide:megaphone',
'lucide:settings',
'lucide:square-check-big',
'lucide:square-user',
'lucide:workflow',
],
};
/**
* 通过Iconify接口获取图标集数据。
* 同一时间多个图标选择器同时请求同一个图标集时,实际上只会发起一次请求(所有请求共享同一份结果)。
@@ -63,10 +24,6 @@ const LOCAL_ICONS_MAP: Recordable<string[]> = {
* @returns 图标集中包含的所有图标名称
*/
export async function fetchIconsData(prefix: string): Promise<string[]> {
if (LOCAL_ICONS_MAP[prefix]) {
ICONS_MAP[prefix] = LOCAL_ICONS_MAP[prefix];
return ICONS_MAP[prefix];
}
if (Reflect.has(ICONS_MAP, prefix) && ICONS_MAP[prefix]) {
return ICONS_MAP[prefix];
}