diff --git a/apps/web/src/app/dashboard/agents/[id]/page.tsx b/apps/web/src/app/dashboard/agents/[id]/page.tsx index e64ead3..c645150 100644 --- a/apps/web/src/app/dashboard/agents/[id]/page.tsx +++ b/apps/web/src/app/dashboard/agents/[id]/page.tsx @@ -7,7 +7,7 @@ import { Icon } from '@tpmjs/ui/Icon/Icon'; import Link from 'next/link'; import { useParams, useRouter } from 'next/navigation'; import { useCallback, useEffect, useRef, useState } from 'react'; -import { AppHeader } from '~/components/AppHeader'; +import { DashboardLayout } from '~/components/dashboard/DashboardLayout'; interface Agent { id: string; @@ -446,556 +446,524 @@ export default function AgentDetailPage(): React.ReactElement { if (isLoading) { return ( -
- -
-
-
-
-
+ +
+
+
-
+ ); } if (error || !agent) { return ( -
- -
-
- -

Error

-

{error || 'Agent not found'}

- - - -
+ +
+ +

Error

+

{error || 'Agent not found'}

+ + +
-
+ ); } return ( -
- -
- {/* Header */} -
-
- - - -
-
- -
-
-

{agent.name}

-

- {PROVIDER_DISPLAY_NAMES[agent.provider]} / {agent.modelId} -

-
-
-
-
- - - + + + + } + > + {/* Quick Stats */} +
+
+
+ + Tools
+

{agent.toolCount}

- - {/* Quick Stats */} -
-
-
- - Tools -
-

{agent.toolCount}

-
-
-
- - Collections -
-

{agent.collectionCount}

-
-
-
- - Max Tool Calls -
-

{agent.maxToolCallsPerTurn}

+
+
+ + Collections
+

{agent.collectionCount}

- - {/* API Endpoint */} -
-
-
-

API Endpoint

- - POST /api/agents/{agent.uid}/conversation/{''} - -
- +
+
+ + Max Tool Calls
+

{agent.maxToolCallsPerTurn}

+
- {/* Tools Section */} -
-
-

Tools

- {agentTools.length} attached + {/* API Endpoint */} +
+
+
+

API Endpoint

+ + POST /api/agents/{agent.uid}/conversation/{''} +
- - {/* Current Tools */} - {agentTools.length > 0 && ( -
- {agentTools.map((at) => ( -
-
- -
-

{at.tool.name}

-

- {at.tool.npmPackageName} -

-
-
- -
- ))} -
- )} - - {/* Add Tool Search */} -
-
- - { - setToolSearch(e.target.value); - setShowToolSearch(true); - }} - onFocus={() => setShowToolSearch(true)} - placeholder="Search tools to add..." - className="w-full pl-9 pr-3 py-2 bg-background border border-border rounded-lg text-foreground text-sm placeholder:text-foreground-tertiary focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary" - /> - {isSearchingTools && ( -
-
-
- )} -
- - {/* Search Results Dropdown */} - {showToolSearch && toolSearch && ( -
- {toolSearchResults.length > 0 ? ( - toolSearchResults.map((tool) => ( - - )) - ) : !isSearchingTools ? ( -
- No tools found -
- ) : null} -
- )} -
-
- - {/* Collections Section */} -
-
-

Collections

- - {agentCollections.length} attached - -
- - {/* Current Collections */} - {agentCollections.length > 0 && ( -
- {agentCollections.map((ac) => ( -
-
- -
-

- {ac.collection.name} -

-

- {ac.collection.toolCount} tools -

-
-
- -
- ))} -
- )} - - {/* Add Collection Search */} -
-
- - { - setCollectionSearch(e.target.value); - setShowCollectionSearch(true); - }} - onFocus={() => setShowCollectionSearch(true)} - placeholder="Search collections to add..." - className="w-full pl-9 pr-3 py-2 bg-background border border-border rounded-lg text-foreground text-sm placeholder:text-foreground-tertiary focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary" - /> - {isSearchingCollections && ( -
-
-
- )} -
- - {/* Search Results Dropdown */} - {showCollectionSearch && collectionSearch && ( -
- {collectionSearchResults.length > 0 ? ( - collectionSearchResults.map((collection) => ( - - )) - ) : !isSearchingCollections ? ( -
- No collections found -
- ) : null} -
- )} -
-
- - {/* Configuration */} -
-
-

Configuration

- {!isEditing && ( - - )} -
- - {isEditing ? ( -
-
-
- - -
-
- - -
-
- -
- -