diff --git a/ui/admin/app/lib/nameGenerator.ts b/ui/admin/app/lib/nameGenerator.ts new file mode 100644 index 000000000..c2ba863b4 --- /dev/null +++ b/ui/admin/app/lib/nameGenerator.ts @@ -0,0 +1,23 @@ +const adjectives = [ + 'Smart', 'Clever', 'Intelligent', 'Adaptive', 'Intuitive', 'Helpful', 'Efficient', 'Responsive', + 'Quick', 'Analytical', 'Logical', 'Creative', 'Innovative', 'Insightful', 'Proactive', 'Versatile', + 'Agile', 'Brilliant', 'Capable', 'Diligent', 'Eloquent', 'Focused', 'Graceful', 'Harmonious', + 'Imaginative', 'Judicious', 'Knowledgeable', 'Luminous', 'Meticulous', 'Nimble', 'Observant', + 'Perceptive', 'Qualified', 'Reliable', 'Skillful', 'Thorough', 'Unstoppable', 'Vigilant', + 'Wise', 'Expert', 'Yielding', 'Zealous', 'Astute', 'Balanced', 'Competent', 'Dynamic' +]; + +const nouns = [ + 'Assistant', 'Copilot', 'Helper', 'Companion', 'Aide', 'Collaborator', 'Partner', 'Advisor', + 'Guide', 'Sidekick', 'Ally', 'Supporter', 'Mentor', 'Coach', 'Facilitator', 'Buddy', + 'Agent', 'Beacon', 'Counselor', 'Dynamo', 'Enhancer', 'Friend', 'Genius', 'Hotshot', + 'Innovator', 'Juggler', 'Keeper', 'Luminary', 'Mastermind', 'Navigator', 'Optimizer', + 'Pathfinder', 'Quartermaster', 'Resolver', 'Sage', 'Trailblazer', 'Utility', 'Virtuoso', + 'Whiz', 'Savant', 'Yoda', 'Zealot', 'Ace', 'Brainiac', 'Catalyst', 'Dynamo' +]; + +export function generateRandomName(): string { + const randomAdjective = adjectives[Math.floor(Math.random() * adjectives.length)]; + const randomNoun = nouns[Math.floor(Math.random() * nouns.length)]; + return `${randomAdjective} ${randomNoun}`; +} diff --git a/ui/admin/app/routes/_auth.agents._index.tsx b/ui/admin/app/routes/_auth.agents._index.tsx index ec75f545d..7bae71df5 100644 --- a/ui/admin/app/routes/_auth.agents._index.tsx +++ b/ui/admin/app/routes/_auth.agents._index.tsx @@ -21,6 +21,7 @@ import { TooltipTrigger, } from "~/components/ui/tooltip"; import { useAsync } from "~/hooks/useAsync"; +import { generateRandomName } from "~/lib/nameGenerator"; export default function Threads() { const navigate = useNavigate(); @@ -64,7 +65,9 @@ export default function Threads() { className="justify-start" onClick={() => { AgentService.createAgent({ - agent: {} as Agent, + agent: { + name: generateRandomName(), + } as Agent, }).then((agent) => { navigate( $path("/agents/:agent", {