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

@@ -690,3 +690,5 @@ private async processMessageAsync(xmlData: any) {

View File

@@ -1084,3 +1084,5 @@ async function testIntegration() {

View File

@@ -223,5 +223,7 @@ Content-Type: application/json

View File

@@ -645,3 +645,5 @@ REDCap API: exportRecords success { recordCount: 1 }

View File

@@ -651,3 +651,5 @@ backend/src/modules/iit-manager/

View File

@@ -801,3 +801,5 @@ CREATE TABLE iit_schema.wechat_tokens (

View File

@@ -558,3 +558,5 @@ Day 3 的开发工作虽然遇到了多个技术问题,但最终成功完成

View File

@@ -325,3 +325,5 @@ AI: "出生日期2017-01-04

View File

@@ -267,5 +267,7 @@ Day 4: REDCap EMWebhook推送← 作为增强,而非核心

View File

@@ -683,3 +683,5 @@ const answer = `根据研究方案[1]和CRF表格[2],纳入标准包括: