Features:
- Backend: SystemKbService with full CRUD (knowledge bases + documents)
- Backend: 8 RESTful API endpoints (list/detail/create/update/delete/upload/download)
- Backend: OSS storage integration (system/knowledge-bases/{kbId}/{docId})
- Backend: RAG engine integration (document parsing, chunking, vectorization)
- Frontend: SystemKbListPage with card-based layout
- Frontend: SystemKbDetailPage with document management table
- Frontend: Master-Detail UX pattern for better user experience
- Document upload (single/batch), download (preserving original filename), delete
Technical:
- Database migration for system_knowledge_bases and system_kb_documents tables
- OSSAdapter.getSignedUrl with Content-Disposition for original filename
- Reuse RAG engine from common/rag for document processing
Tested: Local environment verified, all features working
23 lines
763 B
JavaScript
23 lines
763 B
JavaScript
const { PrismaClient } = require('@prisma/client');
|
|
const prisma = new PrismaClient();
|
|
|
|
async function main() {
|
|
const tables = await prisma.$queryRawUnsafe(`
|
|
SELECT table_name FROM information_schema.tables
|
|
WHERE table_schema = 'capability_schema' ORDER BY table_name
|
|
`);
|
|
console.log('=== capability_schema Tables ===');
|
|
tables.forEach(t => console.log('-', t.table_name));
|
|
|
|
const cols = await prisma.$queryRawUnsafe(`
|
|
SELECT column_name FROM information_schema.columns
|
|
WHERE table_schema = 'capability_schema' AND table_name = 'prompt_templates'
|
|
ORDER BY ordinal_position
|
|
`);
|
|
console.log('\n=== prompt_templates Columns ===');
|
|
cols.forEach(c => console.log('-', c.column_name));
|
|
|
|
await prisma.$disconnect();
|
|
}
|
|
main();
|