Summary: - Implement Prompt management infrastructure and core services - Build admin portal frontend with light theme - Integrate CodeMirror 6 editor for non-technical users Phase 3.5.1: Infrastructure Setup - Create capability_schema for Prompt storage - Add prompt_templates and prompt_versions tables - Add prompt:view/edit/debug/publish permissions - Migrate RVW prompts to database (RVW_EDITORIAL, RVW_METHODOLOGY) Phase 3.5.2: PromptService Core - Implement gray preview logic (DRAFT for debuggers, ACTIVE for users) - Module-level debug control (setDebugMode) - Handlebars template rendering - Variable extraction and validation (extractVariables, validateVariables) - Three-level disaster recovery (database -> cache -> hardcoded fallback) Phase 3.5.3: Management API - 8 RESTful endpoints (/api/admin/prompts/*) - Permission control (PROMPT_ENGINEER can edit, SUPER_ADMIN can publish) Phase 3.5.4: Frontend Management UI - Build admin portal architecture (AdminLayout, OrgLayout) - Add route system (/admin/*, /org/*) - Implement PromptListPage (filter, search, debug switch) - Implement PromptEditor (CodeMirror 6 simplified for clinical users) - Implement PromptEditorPage (edit, save, publish, test, version history) Technical Details: - Backend: 6 files, ~2044 lines (prompt.service.ts 596 lines) - Frontend: 9 files, ~1735 lines (PromptEditorPage.tsx 399 lines) - CodeMirror 6: Line numbers, auto-wrap, variable highlight, search, undo/redo - Chinese-friendly: 15px font, 1.8 line-height, system fonts Next Step: Phase 3.5.5 - Integrate RVW module with PromptService Tested: Backend API tests passed (8/8), Frontend pending user testing Status: Ready for Phase 3.5.5 RVW integration
65 lines
1.7 KiB
JSON
65 lines
1.7 KiB
JSON
{
|
|
"name": "frontend-v2",
|
|
"private": true,
|
|
"version": "0.0.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc -b && vite build",
|
|
"lint": "eslint .",
|
|
"preview": "vite preview"
|
|
},
|
|
"dependencies": {
|
|
"@ant-design/charts": "^2.6.6",
|
|
"@ant-design/icons": "^6.1.0",
|
|
"@ant-design/x": "^2.1.0",
|
|
"@ant-design/x-sdk": "^2.1.0",
|
|
"@codemirror/commands": "^6.10.1",
|
|
"@codemirror/language": "^6.12.1",
|
|
"@codemirror/search": "^6.5.11",
|
|
"@codemirror/state": "^6.5.3",
|
|
"@codemirror/view": "^6.39.9",
|
|
"@tanstack/react-query": "^5.90.7",
|
|
"@tanstack/react-table": "^8.21.3",
|
|
"ag-grid-community": "^34.3.1",
|
|
"ag-grid-react": "^34.3.1",
|
|
"antd": "^6.0.1",
|
|
"axios": "^1.13.2",
|
|
"codemirror": "^6.0.2",
|
|
"dayjs": "^1.11.19",
|
|
"dexie": "^4.2.1",
|
|
"diff-match-patch": "^1.0.5",
|
|
"docx": "^9.5.1",
|
|
"file-saver": "^2.0.5",
|
|
"immer": "^11.0.0",
|
|
"lodash": "^4.17.21",
|
|
"lucide-react": "^0.555.0",
|
|
"mathjs": "^15.1.0",
|
|
"prismjs": "^1.30.0",
|
|
"react": "^19.2.0",
|
|
"react-dom": "^19.2.0",
|
|
"react-router-dom": "^7.9.5",
|
|
"xlsx": "^0.18.5",
|
|
"zustand": "^5.0.8"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^9.39.1",
|
|
"@types/file-saver": "^2.0.7",
|
|
"@types/lodash": "^4.17.21",
|
|
"@types/node": "^24.10.0",
|
|
"@types/react": "^19.2.2",
|
|
"@types/react-dom": "^19.2.2",
|
|
"@vitejs/plugin-react": "^5.1.0",
|
|
"autoprefixer": "^10.4.22",
|
|
"eslint": "^9.39.1",
|
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
"eslint-plugin-react-refresh": "^0.4.24",
|
|
"globals": "^16.5.0",
|
|
"postcss": "^8.5.6",
|
|
"tailwindcss": "^3.4.18",
|
|
"typescript": "~5.9.3",
|
|
"typescript-eslint": "^8.46.3",
|
|
"vite": "^7.2.2"
|
|
}
|
|
}
|