feat: Day 10-11 - Agent Configuration System completed
Backend: - Create agents.yaml config file with 12 agents definition - Create Prompt templates for topic-evaluation agent - Implement agentService.ts for loading and managing agent configs - Create agentController.ts with CRUD operations - Create agent routes (GET /agents, /agents/:id, etc.) - Register agent routes in main server Frontend: - Create agentApi.ts service module - Update AgentChatPage to dynamically load agent config from API - Add loading state and error handling - Display agent details (description, category, model) Build: Both frontend and backend build successfully
This commit is contained in:
@@ -3,6 +3,7 @@ import cors from '@fastify/cors';
|
||||
import { config } from './config/env.js';
|
||||
import { testDatabaseConnection, prisma } from './config/database.js';
|
||||
import { projectRoutes } from './routes/projects.js';
|
||||
import { agentRoutes } from './routes/agents.js';
|
||||
|
||||
const fastify = Fastify({
|
||||
logger: {
|
||||
@@ -55,6 +56,9 @@ fastify.get('/api/v1', async () => {
|
||||
// 注册项目管理路由
|
||||
await fastify.register(projectRoutes, { prefix: '/api/v1' });
|
||||
|
||||
// 注册智能体管理路由
|
||||
await fastify.register(agentRoutes, { prefix: '/api/v1' });
|
||||
|
||||
// 启动服务器
|
||||
const start = async () => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user