Files
AIclinicalresearch/docs/08-项目管理/PKB迁移-阶段2进行中.md
HaHafeng 4ed67a8846 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
2026-01-13 22:22:10 +08:00

42 lines
625 B
Markdown

# PKB迁移 - 阶段2进行中
## 🔧 当前问题
**问题**: pkbRoutes导入错误
**原因**: 使用了命名导出而非默认导出
## ✅ 解决方案
修改 `src/index.ts` 的导入语句:
```typescript
// ❌ 错误(命名导出)
import { pkbRoutes } from './modules/pkb/index.js';
// ✅ 正确(默认导出)
import pkbRoutes from './modules/pkb/routes/index.js';
```
## 📝 已完成
- ✅ 创建PKB模块路由入口
- ✅ 添加健康检查端点
- ✅ 在主路由注册PKB模块
- ✅ 修复导入语句
## ⏭️ 下一步
- 重启服务器测试
- 验证新旧路由都可用