- 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>
- Auto-create system KBs from data/knowledge_base/ subdirectories on startup
- Upgrade existing user KBs to system KBs when matching directory found
- Admin can upload to system KBs (saved to knowledge_base dir)
- Regular users see only their own KBs on knowledge page
- Fix API permission checks for system KBs (list, detail, documents, update, delete)
- Add is_superuser to UserResponse and frontend User type
- Fix sidebar session menu visibility for long titles
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Sidebar: restore DropdownMenu for session actions, fix long titles
pushing button off-screen (add w-0 flex-1, w-full on content div)
- Model selector: remove SiliconFlow models, DeepSeek only
(deepseek-reasoner default, deepseek-chat alternative)
- Message timestamp: change from HH:mm to yyyy/M/d HH:mm format
- Default model changed to deepseek-reasoner
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Remove redundant status steps (understanding, preparing, generating)
from SSE stream — only emit retrieved docs and reasoning content
- ThinkingProcess: only show when there's actual reasoning or docs
- Collapse header shows concise state: thinking count or doc count
- Clean up unused icon imports
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add DeepSeek provider routing: deepseek-chat/deepseek-reasoner use
api.deepseek.com, other models use SiliconFlow
- Add stream_with_reasoning() using raw OpenAI SDK to capture
reasoning_content (langchain_openai strips this field)
- RAG chain and conversation chain both use stream_with_reasoning
for proper reasoning display in thinking models
- Frontend model selector: grouped by provider (DeepSeek official +
SiliconFlow), default changed to deepseek-chat
- Regenerate message converted to streaming with reasoning capture
- Minor UI: globals.css additions, chat store refactoring
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- 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>
- 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>
- 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>
- 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>
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>
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>