Commit Graph

9 Commits

Author SHA1 Message Date
pengxiao 51d6fd22c0 feat: capture reasoning content from thinking models, improve thinking UI
- Backend: intercept reasoning_content from DeepSeek-R1/QwQ streaming
  chunks and emit as thinking events (stage=reasoning)
- RAG chain: show retrieved document titles/previews in thinking steps
- Conversation chain: directly stream from LLM to capture reasoning
- Frontend: collapsible thinking panel with reasoning section,
  document details, and time summary
- Replace relative time with HH:mm format for message timestamps

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 11:47:14 +08:00
pengxiao 62da8b3c58 fix: async document processing in background threads, improve chat UX
- Fix knowledge_base_service calling async process_document synchronously
  in background threads — use asyncio.new_event_loop().run_until_complete()
  instead of bare call that returned unawaited coroutine
- Same fix for _update_document and reindex_document
- Replace ModeSelector with auto-detect: RAG mode when knowledge bases selected
- Convert regenerateMessage to streaming (was synchronous API call)
- Show "知识库检索模式" indicator above input when KB selected
- Remove loadSessions side-effect from streaming onComplete
- Fix chat page loading state to avoid flash
- Improve forum page spacing and sizing

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 11:33:32 +08:00
pengxiao 50faf7ad4e feat: add forum seed categories, improve page layouts and navigation
- Seed default forum categories (announcements, learning, feedback) on startup
- Update forum pages with improved category/post/reply UI
- Refine navbar, mobile nav, and home page content layout
- Improve analytics, course-content, knowledge, profile, settings, spatial pages

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 10:02:30 +08:00
pengxiao 45e3da82e1 fix: count all documents for homepage stats, not just knowledge_base type
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 09:47:04 +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 53a9380d7a style: redesign knowledge graph to light academic theme
Switch from dark p5-style background to light slate theme with softer
indigo particles, white label pills, and reduced glow effects for
better readability in academic context.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 14:25:53 +08:00
pengxiao 90ab913ef9 fix: use config paths for static file mounts, redesign knowledge graph
- Fix generated images 404: use settings.generated_images_dir and
  settings.upload_dir instead of hardcoded relative paths in main.py
- Redesign knowledge graph with p5-style particle background, glow
  nodes, and curved gradient links
- Update course-content page border styling

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 14:20:28 +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