Commit Graph

6 Commits

Author SHA1 Message Date
pengxiao bbf6b921af fix: adapt frontend image paths for backend port 8002 and use blob download
Backend port changed from 8000 to 8002 due to port conflict (frpc on Windows).
- Add resolveImageUrl() to convert relative image URLs to full backend URLs
- Fix all spatial page image src and download handlers to use backend address
- Fix chat message image rendering to use correct port
- Switch download to blob-based approach to support cross-origin file saving

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 20:52:48 +08:00
pengxiao 3f12e96ea0 fix: use hostname:8000 as API fallback for remote deployments
Replace hardcoded localhost:8000 with window.location.hostname:8000 so the
frontend auto-detects the correct backend address when deployed on a remote
server instead of always pointing to localhost.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 22:22:46 +08:00
pengxiao abcced35b8 feat: RAG inline citations, source highlighting, and admin panel
- Increase RAG retrieval from 5 to 50 docs with relevance threshold (0.15)
- LLM inline citations with [来源N] format and reference list
- Clickable citation links scroll to source cards with highlight animation
- Source previews with full chunk text and answer-matched highlighting
- Message-scoped source IDs to fix cross-round citation targeting
- Admin panel pages (knowledge, users, forum, course, settings)
- Add rehype-raw dependency for HTML-in-markdown rendering

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 20:51:28 +08:00
pengxiao 0251a5e3ff fix: propagate real message IDs via SSE and fix regenerate model parameter
- Add message_id and user_message_id to SSE done events so frontend
  can replace temp IDs with real DB IDs, fixing "消息不存在" on regenerate
- Replace Body(default=None) with RegenerateRequest Pydantic model for
  proper JSON body parsing, fixing 422 Unprocessable Content
- Frontend always sends model in regenerate request body
- Pass selected model through message-item → regenerateMessage chain
- Various UI refinements to chat sidebar, quick questions, and layout

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 09:00:31 +08:00
pengxiao 09621ef767 refactor: simplify homepage layout, consolidate landing page components
Merge hero/stats/features/footer sections into home-page-content.tsx,
remove separate landing-page.tsx. Update styles, layout, navbar, and
backend config.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 11:24:34 +08:00
pengxiao ddbb79b9f6 Initial commit: 国土空间规划课程智能体 v1.0
单容器 Docker 架构的国土空间规划课程智能问答系统,集成 FastAPI 后端与 Next.js 前端。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 09:40:18 +08:00