7a944afdb5
Fixes link color from hardcoded white to currentColor for proper theme support. Adds video and audio modality icons to ModelInfo. Registers anthropic, nvidia, and xiaomi in the provider icon map. Removes unused pagination validation from agents and topics endpoints. Adds convenience start script. Updates AGENTS.md.
25 lines
516 B
TypeScript
25 lines
516 B
TypeScript
import { db } from "~~/server/lib/db";
|
|
|
|
export default defineEventHandler(async (event) => {
|
|
await protectRoute(event);
|
|
const userId = event.context.user!.id as string;
|
|
|
|
const agents = await db.query.agents.findMany({
|
|
where: {
|
|
userId,
|
|
},
|
|
orderBy: {
|
|
createdAt: 'asc',
|
|
},
|
|
with: {
|
|
topics: {
|
|
orderBy: {
|
|
createdAt: 'desc',
|
|
},
|
|
}
|
|
}
|
|
});
|
|
|
|
return agents;
|
|
})
|