feat: complete Day 21-24 knowledge base features
- Day 21-22: fix CORS and file upload issues - Day 23-24: implement @knowledge base search and conversation integration - Backend: integrate Dify RAG into conversation system - Frontend: load knowledge base list and @ reference feature
This commit is contained in:
@@ -8,12 +8,6 @@ import { agentRoutes } from './routes/agents.js';
|
||||
import { conversationRoutes } from './routes/conversations.js';
|
||||
import knowledgeBaseRoutes from './routes/knowledgeBases.js';
|
||||
|
||||
console.log('\n' + '='.repeat(60));
|
||||
console.log('🔧 正在加载修复后的服务器配置...');
|
||||
console.log('📅 修复版本: 2025-10-11 - CORS完整配置');
|
||||
console.log('='.repeat(60) + '\n');
|
||||
|
||||
console.log('🚨🚨🚨 测试日志: 文件已加载 🚨🚨🚨');
|
||||
|
||||
// 全局处理BigInt序列化
|
||||
(BigInt.prototype as any).toJSON = function() {
|
||||
@@ -54,10 +48,6 @@ await fastify.register(multipart, {
|
||||
});
|
||||
console.log('✅ 文件上传插件已配置: 最大文件大小 10MB');
|
||||
|
||||
// 添加请求日志钩子(用于调试)
|
||||
fastify.addHook('onRequest', async (request, _reply) => {
|
||||
console.log(`📥 ${request.method} ${request.url} - Origin: ${request.headers.origin || 'none'}`);
|
||||
});
|
||||
|
||||
// 健康检查路由
|
||||
fastify.get('/health', async () => {
|
||||
|
||||
Reference in New Issue
Block a user