feat(agents): 新增云端智能体入口与草稿编辑

This commit is contained in:
brother7 committed 2026-09-10 16:00:37 +08:00
1 parent 927a85fa22
commit 46fbae9dec
21 files changed
+921 -17

No files matched your search

+14 -2
View File
@@ -1,10 +1,10 @@
import type { LucideIcon } from 'lucide-react';
import { Bot, Code2, Paintbrush } from 'lucide-react';
import { Bot, Code2, Paintbrush, Sparkles } from 'lucide-react';
import type { ModuleAccess, ModuleAccessKey } from '../../shared/module-access';
export const AI_MODULE_SELECTION_PATH = '/module-select';
export type AiModuleId = 'programming' | 'painting' | 'robot';
export type AiModuleId = 'programming' | 'painting' | 'robot' | 'cloud_agents';
export type AiModuleDefinition = {
id: AiModuleId;
@@ -46,12 +46,23 @@ export const aiModules: readonly AiModuleDefinition[] = [
Icon: Bot,
switcherLabel: 'Robot 机器',
},
{
id: 'cloud_agents',
title: 'Makelore Agents',
subtitle: 'AI 智能体',
description: '配置专属智能体,从定义用途与角色开始',
route: '/cloud-agents',
enabled: true,
Icon: Sparkles,
switcherLabel: 'Agents 智能体',
},
];
const moduleAccessKeyById: Record<AiModuleId, ModuleAccessKey> = {
programming: 'programming',
painting: 'design',
robot: 'robot',
cloud_agents: 'cloud_agents',
};
const PROGRAMMING_ROUTE_PREFIXES = [
@@ -95,6 +106,7 @@ export function isProgrammingProviderRoute(pathname: string): boolean {
}
export function getGuardedAiModuleForPath(pathname: string): AiModuleId | null {
if (matchesRoute(pathname, '/cloud-agents')) return 'cloud_agents';
if (pathname === '/image-canvas'
|| pathname.startsWith('/image-canvas/')
|| pathname === '/image-prompts'