fix(admin): Fix Prompt management list not showing version info and add debug diagnostics

Summary:
- Fix Prompt list API response schema missing activeVersion and draftVersion fields
- Fastify was filtering out undefined schema fields, causing version columns to show empty
- Add detailed diagnostic logging for Prompt debug mode troubleshooting
- Verify debug mode works correctly (DRAFT version is used when debug enabled)

Changes:
- backend/src/common/prompt/prompt.routes.ts: Add activeVersion and draftVersion to response schema
- backend/src/common/prompt/prompt.service.ts: Add diagnostic logs for setDebugMode and get methods
- PKB module: Various authentication and document handling fixes from previous session

Tested: Debug mode verified working - v2 DRAFT version correctly loaded when debug enabled
This commit is contained in:
2026-01-13 22:22:10 +08:00
parent 4088275290
commit 4ed67a8846
272 changed files with 1382 additions and 161 deletions

View File

@@ -1038,6 +1038,8 @@ Redis 实例¥500/月

View File

@@ -496,6 +496,8 @@ import { ChatContainer } from '@/shared/components/Chat';

View File

@@ -205,3 +205,5 @@ VALUES ('user-mock-001', '13800000000', ..., 'tenant-mock-001', ...);

View File

@@ -417,3 +417,5 @@ frontend-v2/src/modules/pkb/

View File

@@ -279,3 +279,5 @@ npm run dev

View File

@@ -794,3 +794,5 @@ AIA智能问答模块

View File

@@ -936,6 +936,8 @@ CREATE INDEX idx_rvw_tasks_created_at ON rvw_schema.review_tasks(created_at);

View File

@@ -592,3 +592,5 @@ const typography = {

View File

@@ -904,3 +904,5 @@ app.use('/api/v1/knowledge', (req, res) => {

View File

@@ -218,3 +218,5 @@ rm -rf src/modules/pkb

View File

@@ -393,3 +393,5 @@ GET /api/v2/pkb/batch-tasks/batch/templates

View File

@@ -37,3 +37,5 @@ import pkbRoutes from './modules/pkb/routes/index.js';

View File

@@ -306,3 +306,5 @@ backend/

View File

@@ -517,3 +517,5 @@ const response = await fetch('/api/v2/pkb/batch-tasks/batch/execute', {