AIA V2.0 Major Updates: - Add StreamingService with OpenAI Compatible format (backend/common/streaming) - Upgrade Chat component V2 with Ant Design X deep integration - Implement 12 intelligent agents (5 phases: topic/design/review/data/writing) - Create AgentHub with 100% prototype V11 restoration - Create ChatWorkspace with fullscreen immersive experience - Add ThinkingBlock for deep thinking display - Add useAIStream Hook for stream handling - Add ConversationList for conversation management Backend (~1300 lines): - common/streaming: OpenAI adapter and streaming service - modules/aia: 12 agents config, conversation service, attachment service - Unified API routes to /api/v1 (RVW, PKB, AIA modules) - Update authentication and permission helpers Frontend (~3500 lines): - modules/aia: AgentHub + ChatWorkspace + AgentCard components - shared/Chat: AIStreamChat, ThinkingBlock, useAIStream, useConversations - Update all modules API endpoints to v1 - Modern design with theme colors (blue/yellow/teal/purple) Documentation (~2500 lines): - AIA module status and development guide - Universal capabilities catalog (11 services) - Quick reference card - System overview updates - All module documentation synchronization Other Updates: - DC Tool C: Python operations and frontend components - IIT Manager: session memory and wechat service - PKB/RVW/ASL: API route updates - Docker configs and deployment scripts - Database migrations and scripts - Test files and documentation Tested: AIA streaming verified, authentication working, core features functional Status: AIA V2.0 completed (85%), all changes synchronized
77 lines
3.0 KiB
TypeScript
77 lines
3.0 KiB
TypeScript
import { PrismaClient } from '@prisma/client';
|
|
|
|
const prisma = new PrismaClient();
|
|
|
|
async function main() {
|
|
console.log('🔍 检查 IIT 和 ASL 模块的数据\n');
|
|
console.log('=' .repeat(60));
|
|
|
|
// IIT 模块
|
|
console.log('\n📋 IIT 模块 (iit_schema):\n');
|
|
|
|
const iitTables = [
|
|
{ name: 'projects', query: 'SELECT COUNT(*) as count FROM iit_schema.projects' },
|
|
{ name: 'audit_logs', query: 'SELECT COUNT(*) as count FROM iit_schema.audit_logs' },
|
|
{ name: 'pending_actions', query: 'SELECT COUNT(*) as count FROM iit_schema.pending_actions' },
|
|
{ name: 'task_runs', query: 'SELECT COUNT(*) as count FROM iit_schema.task_runs' },
|
|
{ name: 'user_mappings', query: 'SELECT COUNT(*) as count FROM iit_schema.user_mappings' },
|
|
];
|
|
|
|
for (const t of iitTables) {
|
|
const result: any = await prisma.$queryRawUnsafe(t.query);
|
|
const count = Number(result[0].count);
|
|
console.log(` ${t.name}: ${count} 条记录 ${count > 0 ? '✅' : '(空)'}`);
|
|
}
|
|
|
|
// 如果有数据,显示一些详情
|
|
const iitProjects: any[] = await prisma.$queryRaw`SELECT id, name, status, created_at FROM iit_schema.projects LIMIT 5`;
|
|
if (iitProjects.length > 0) {
|
|
console.log('\n 最近的 IIT 项目:');
|
|
iitProjects.forEach(p => console.log(` - ${p.name} (${p.status}) @ ${p.created_at}`));
|
|
}
|
|
|
|
// ASL 模块(智能文献筛选)
|
|
console.log('\n\n📋 ASL 模块 - 智能文献筛选 (asl_schema):\n');
|
|
|
|
const aslTables = [
|
|
{ name: 'screening_projects', query: 'SELECT COUNT(*) as count FROM asl_schema.screening_projects' },
|
|
{ name: 'literatures', query: 'SELECT COUNT(*) as count FROM asl_schema.literatures' },
|
|
{ name: 'screening_tasks', query: 'SELECT COUNT(*) as count FROM asl_schema.screening_tasks' },
|
|
{ name: 'screening_results', query: 'SELECT COUNT(*) as count FROM asl_schema.screening_results' },
|
|
{ name: 'fulltext_screening_tasks', query: 'SELECT COUNT(*) as count FROM asl_schema.fulltext_screening_tasks' },
|
|
{ name: 'fulltext_screening_results', query: 'SELECT COUNT(*) as count FROM asl_schema.fulltext_screening_results' },
|
|
];
|
|
|
|
for (const t of aslTables) {
|
|
const result: any = await prisma.$queryRawUnsafe(t.query);
|
|
const count = Number(result[0].count);
|
|
console.log(` ${t.name}: ${count} 条记录 ${count > 0 ? '✅' : '(空)'}`);
|
|
}
|
|
|
|
// 如果有数据,显示一些详情
|
|
const aslProjects: any[] = await prisma.$queryRaw`SELECT id, project_name, status, created_at FROM asl_schema.screening_projects LIMIT 5`;
|
|
if (aslProjects.length > 0) {
|
|
console.log('\n 最近的 ASL 项目:');
|
|
aslProjects.forEach(p => console.log(` - ${p.project_name} (${p.status}) @ ${p.created_at}`));
|
|
}
|
|
|
|
const literatures: any[] = await prisma.$queryRaw`SELECT id, title, stage FROM asl_schema.literatures LIMIT 5`;
|
|
if (literatures.length > 0) {
|
|
console.log('\n 最近的文献:');
|
|
literatures.forEach(l => console.log(` - ${l.title?.substring(0, 50)}... (${l.stage})`));
|
|
}
|
|
|
|
console.log('\n' + '=' .repeat(60));
|
|
}
|
|
|
|
main()
|
|
.catch(console.error)
|
|
.finally(() => prisma.$disconnect());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|