Files
Momento/memento-note/app/(main)/agents/page.tsx
Sepehr Ramezani e4d4e23dc7 chore: clean up repo for public release
- Remove BMAD framework, IDE configs, dev screenshots, test files,
  internal docs, and backup files
- Rename keep-notes/ to memento-note/
- Update all references from keep-notes to memento-note
- Add Apache 2.0 license with Commons Clause (non-commercial restriction)
- Add clean .gitignore and .env.docker.example
2026-04-20 22:48:06 +02:00

34 lines
866 B
TypeScript

import { auth } from '@/auth'
import { redirect } from 'next/navigation'
import { prisma } from '@/lib/prisma'
import { getAgents } from '@/app/actions/agent-actions'
import { AgentsPageClient } from './agents-page-client'
export default async function AgentsPage() {
const session = await auth()
if (!session?.user?.id) redirect('/login')
const userId = session.user.id
const [agents, notebooks] = await Promise.all([
getAgents(),
prisma.notebook.findMany({
where: { userId },
orderBy: { order: 'asc' }
})
])
return (
<div className="flex-1 flex flex-col h-full bg-background">
<div className="flex-1 p-8 overflow-y-auto">
<div className="max-w-6xl mx-auto">
<AgentsPageClient
agents={agents}
notebooks={notebooks}
/>
</div>
</div>
</div>
)
}