-
-
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 ? (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ) : (
-
-
-
- Description
- - {agent.description || '-'}
-
-
-
- UID
- - {agent.uid}
-
-
-
- Temperature
- - {agent.temperature}
-
-
-
- Context Messages
- - {agent.maxMessagesInContext}
-
-
-
- System Prompt
- -
- {agent.systemPrompt || '(No system prompt)'}
-
-
-
- )}
-
-
- {/* Danger Zone */}
-
-
Danger Zone
-
- Once you delete an agent, there is no going back. Please be certain.
-
-
-
+
+ {/* Tools Section */}
+
+
+
Tools
+ {agentTools.length} attached
+
+
+ {/* Current Tools */}
+ {agentTools.length > 0 && (
+
+ {agentTools.map((at) => (
+
+
+
+
+
{at.tool.name}
+
+ {at.tool.npmPackageName}
+
+
+
+
removeTool(at.toolId)}
+ className="p-1 text-foreground-tertiary hover:text-red-500 transition-colors flex-shrink-0"
+ title="Remove tool"
+ >
+
+
+
+ ))}
+
+ )}
+
+ {/* 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) => (
+
addTool(tool.id)}
+ className="w-full px-3 py-2 text-left hover:bg-surface-secondary transition-colors first:rounded-t-lg last:rounded-b-lg"
+ >
+ {tool.name}
+
+ {tool.npmPackageName}
+
+
+ ))
+ ) : !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
+
+
+
+
removeCollection(ac.collectionId)}
+ className="p-1 text-foreground-tertiary hover:text-red-500 transition-colors flex-shrink-0"
+ title="Remove collection"
+ >
+
+
+
+ ))}
+
+ )}
+
+ {/* 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) => (
+
addCollection(collection.id)}
+ className="w-full px-3 py-2 text-left hover:bg-surface-secondary transition-colors first:rounded-t-lg last:rounded-b-lg"
+ >
+ {collection.name}
+ {collection.toolCount} tools
+
+ ))
+ ) : !isSearchingCollections ? (
+
+ No collections found
+
+ ) : null}
+
+ )}
+
+
+
+ {/* Configuration */}
+
+
+
Configuration
+ {!isEditing && (
+ setIsEditing(true)}>
+
+ Edit
+
+ )}
+
+
+ {isEditing ? (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ setIsEditing(false);
+ setFormData({
+ name: agent.name,
+ uid: agent.uid,
+ description: agent.description || '',
+ provider: agent.provider,
+ modelId: agent.modelId,
+ systemPrompt: agent.systemPrompt || '',
+ temperature: agent.temperature,
+ maxToolCallsPerTurn: agent.maxToolCallsPerTurn,
+ maxMessagesInContext: agent.maxMessagesInContext,
+ });
+ }}
+ >
+ Cancel
+
+
+ {isSaving ? 'Saving...' : 'Save Changes'}
+
+
+
+ ) : (
+
+
+
- Description
+ - {agent.description || '-'}
+
+
+
- UID
+ - {agent.uid}
+
+
+
- Temperature
+ - {agent.temperature}
+
+
+
- Context Messages
+ - {agent.maxMessagesInContext}
+
+
+
- System Prompt
+ -
+ {agent.systemPrompt || '(No system prompt)'}
+
+
+
+ )}
+
+
+ {/* Danger Zone */}
+
+
Danger Zone
+
+ Once you delete an agent, there is no going back. Please be certain.
+
+
+
+ Delete Agent
+
+
+
);
}
diff --git a/apps/web/src/app/dashboard/collections/[id]/page.tsx b/apps/web/src/app/dashboard/collections/[id]/page.tsx
index 9fcd374..325f806 100644
--- a/apps/web/src/app/dashboard/collections/[id]/page.tsx
+++ b/apps/web/src/app/dashboard/collections/[id]/page.tsx
@@ -6,10 +6,10 @@ import { Icon } from '@tpmjs/ui/Icon/Icon';
import Link from 'next/link';
import { useParams, useRouter } from 'next/navigation';
import { useCallback, useEffect, useState } from 'react';
-import { AppHeader } from '~/components/AppHeader';
import { AddToolSearch } from '~/components/collections/AddToolSearch';
import { CollectionForm } from '~/components/collections/CollectionForm';
import { CollectionToolList } from '~/components/collections/CollectionToolList';
+import { DashboardLayout } from '~/components/dashboard/DashboardLayout';
function McpUrlSection({ collectionId }: { collectionId: string }) {
const [copiedUrl, setCopiedUrl] = useState<'http' | 'sse' | null>(null);
@@ -351,145 +351,118 @@ export default function CollectionDetailPage(): React.ReactElement {
if (isLoading) {
return (
-
-
-
-
-
-
-
-
- {[1, 2, 3].map((i) => (
-
- ))}
-
+
+
+
+
+
+
+ {[1, 2, 3].map((i) => (
+
+ ))}
-
+
);
}
if (error || !collection) {
return (
-
-
-
-
-
-
Error
-
{error || 'Collection not found'}
-
-
Back to Collections
-
-
+
+
+
+
Error
+
{error || 'Collection not found'}
+
+
Back to Collections
+
-
+
);
}
const existingToolIds = collection.tools.map((t) => t.toolId);
return (
-
-
-
- {/* Header */}
-
-
-
-
-
- {isEditing ? (
-
-
Edit Collection
- setIsEditing(false)}
- isSubmitting={isUpdating}
- submitLabel="Save Changes"
- />
-
- ) : (
- <>
-
-
{collection.name}
- {collection.isPublic && (
-
-
- Public
-
- )}
-
- {collection.description && (
-
{collection.description}
- )}
- >
- )}
+
+ setIsEditing(true)}>
+
+ Edit
+
+
+
+ Delete
+
- {collection.isOwner && !isEditing && (
-
- setIsEditing(true)}>
-
- Edit
-
-
-
- Delete
-
-
- )}
-
-
- {/* Stats */}
-
-
-
- {collection.toolCount} {collection.toolCount === 1 ? 'tool' : 'tools'}
-
- Updated {new Date(collection.updatedAt).toLocaleDateString()}
-
-
- {/* MCP URLs - only for public collections */}
- {collection.isPublic &&
}
-
- {/* Add Tool Search */}
- {collection.isOwner && (
-
- )}
-
- {/* Tools List */}
-
-
Tools in this Collection
-
+ {/* Edit Form */}
+ {isEditing && (
+
+ setIsEditing(false)}
+ isSubmitting={isUpdating}
+ submitLabel="Save Changes"
/>
+ )}
+
+ {/* Description */}
+ {!isEditing && collection.description && (
+ {collection.description}
+ )}
+
+ {/* MCP URLs - only for public collections */}
+ {collection.isPublic && }
+
+ {/* Add Tool Search */}
+ {collection.isOwner && (
+
+ )}
+
+ {/* Tools List */}
+
+
Tools in this Collection
+
-
+
);
}