diff --git a/frontend/src/pages/Agents.tsx b/frontend/src/pages/Agents.tsx new file mode 100644 index 0000000..64b21e0 --- /dev/null +++ b/frontend/src/pages/Agents.tsx @@ -0,0 +1,109 @@ +import React, { useState } from 'react'; +import { NavLink, Outlet } from 'react-router-dom'; +import { useUIStore } from '@/store/uiStore'; +import { ChevronRight, ChevronDown, Bot, Zap, Brain, Cpu, Settings2, Activity, MessageSquare } from 'lucide-react'; + +interface AgentNode { + title: string; + path?: string; + icon?: React.ReactNode; + children?: AgentNode[]; +} + +const AGENT_TREE: AgentNode[] = [ + { + title: 'Agenten', + icon: , + children: [ + { title: 'Übersicht', path: '/agents/overview' }, + { title: 'Ausführungen', path: '/agents/runs' }, + { title: 'Versionen', path: '/agents/versions' }, + ], + }, + { + title: 'Automation', + icon: , + children: [ + { title: 'Übersicht', path: '/agents/automation' }, + { title: 'Einstellungen', path: '/agents/automation-settings' }, + ], + }, + { + title: 'KI', + icon: , + children: [ + { title: 'Assistent', path: '/agents/ai-assistant' }, + { title: 'Einstellungen', path: '/agents/ai-settings' }, + { title: 'Proactive AI', path: '/agents/ai-proactive' }, + ], + }, +]; + +function TreeItem({ node, depth }: { node: AgentNode; depth: number }) { + const [expanded, setExpanded] = useState(depth < 1); + const hasChildren = node.children && node.children.length > 0; + const paddingLeft = depth * 16 + 12; + + if (hasChildren) { + return ( +
+ + {expanded && ( +
+ {node.children!.map((child) => ( + + ))} +
+ )} +
+ ); + } + + return ( + + `flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-colors min-h-touch ${ + isActive + ? 'bg-primary-100 text-primary-700 font-medium' + : 'text-secondary-600 hover:bg-secondary-100 hover:text-secondary-900' + }` + } + style={{ paddingLeft: paddingLeft + 20 }} + > + {node.icon} + {node.title} + + ); +} + +export function AgentsPage() { + const sidebarOpen = useUIStore((state) => state.sidebarOpen); + + return ( +
+ +
+ +
+
+ ); +} diff --git a/frontend/src/pages/StartPage.tsx b/frontend/src/pages/StartPage.tsx index 32f576f..e784d3d 100644 --- a/frontend/src/pages/StartPage.tsx +++ b/frontend/src/pages/StartPage.tsx @@ -40,7 +40,7 @@ export function StartPage() { const menuItems = [ { id: 'workspaces', label: 'Workspaces', icon: , active: true }, { id: 'settings', label: 'Einstellungen', icon: , onClick: () => navigate('/settings') }, - { id: 'agents', label: 'Agenten', icon: , onClick: () => navigate('/agents') }, + { id: 'agents', label: 'Agenten', icon: , onClick: () => navigate('/agents/overview') }, { id: 'help', label: 'Hilfe', icon: , onClick: () => navigate('/help/welcome') }, ]; diff --git a/frontend/src/pages/agents/AgentsOverview.tsx b/frontend/src/pages/agents/AgentsOverview.tsx new file mode 100644 index 0000000..c6db5b5 --- /dev/null +++ b/frontend/src/pages/agents/AgentsOverview.tsx @@ -0,0 +1,35 @@ +import React from 'react'; + +export function AgentsOverviewPage() { + return ( +
+

Agenten Übersicht

+

+ Verwalten Sie KI-Agenten, führen Sie diese aus und überwachen Sie deren Ausführungen. +

+
+
+
+ +
+

Agenten

+

KI-Agenten erstellen, konfigurieren und ausführen

+
+
+
+ +
+

Automation

+

Automatisierte Workflows und Trigger

+
+
+
+ +
+

KI

+

KI-Assistent und Proactive AI

+
+
+
+ ); +} diff --git a/frontend/src/pages/agents/AgentsPlaceholder.tsx b/frontend/src/pages/agents/AgentsPlaceholder.tsx new file mode 100644 index 0000000..b2aca55 --- /dev/null +++ b/frontend/src/pages/agents/AgentsPlaceholder.tsx @@ -0,0 +1,12 @@ +import React from 'react'; + +export function AgentsPlaceholderPage() { + return ( +
+

Agenten

+

+ Diese Seite wird gerade erstellt. Wählen Sie ein Thema aus dem Menü links. +

+
+ ); +} diff --git a/frontend/src/routes/index.tsx b/frontend/src/routes/index.tsx index e340124..7ccf25c 100644 --- a/frontend/src/routes/index.tsx +++ b/frontend/src/routes/index.tsx @@ -77,6 +77,9 @@ const HelpNavigationPage = React.lazy(() => import('@/pages/help/HelpNavigation' const HelpContactsPage = React.lazy(() => import('@/pages/help/HelpContacts').then(m => ({ default: m.HelpContactsPage }))); const HelpMailSetupPage = React.lazy(() => import('@/pages/help/HelpMailSetup').then(m => ({ default: m.HelpMailSetupPage }))); const HelpPlaceholderPage = React.lazy(() => import('@/pages/help/HelpPlaceholder').then(m => ({ default: m.HelpPlaceholderPage }))); +const AgentsPage = React.lazy(() => import('@/pages/Agents').then(m => ({ default: m.AgentsPage }))); +const AgentsOverviewPage = React.lazy(() => import('@/pages/agents/AgentsOverview').then(m => ({ default: m.AgentsOverviewPage }))); +const AgentsPlaceholderPage = React.lazy(() => import('@/pages/agents/AgentsPlaceholder').then(m => ({ default: m.AgentsPlaceholderPage }))); const ApiDocsPage = React.lazy(() => import('@/pages/ApiDocs').then(m => ({ default: m.ApiDocsPage }))); /** Centered spinner fallback for lazy-loaded routes */ @@ -158,6 +161,19 @@ const router = createBrowserRouter([ { path: '*', element: withSuspense() }, ], }, + { + path: '/agents', + element: withSuspense(), + children: [ + { path: 'overview', element: withSuspense() }, + { path: 'automation', element: withSuspense() }, + { path: 'automation-settings', element: withSuspense() }, + { path: 'ai-assistant', element: withSuspense() }, + { path: 'ai-settings', element: withSuspense() }, + { path: 'ai-proactive', element: withSuspense() }, + { path: '*', element: withSuspense() }, + ], + }, { path: '/settings', element: {withSuspense()}, @@ -212,8 +228,6 @@ const router = createBrowserRouter([ { path: '/mail', element: {withSuspense()} }, { path: '/mail/settings', element: {withSuspense()} }, { path: '/ai-assistant', element: {withSuspense()} }, - { path: '/automation', element: {withSuspense()} }, - { path: '/agents', element: {withSuspense()} }, { path: '/reports', element: {withSuspense()} }, { path: '/tasks', element: {withSuspense()} }, { path: '/communication', element: {withSuspense()} },