Fix#1524
Root cause
DeepSeek's reasoning models stream reasoning_content alongside content.
Answer ignored it, so follow-up requests failed with 400: The
reasoning_content in the thinking mode must be passed back to the API,
and the thinking text was never shown or saved.
Fix
- Capture reasoning_content from the stream and pass it back to theAPI
on subsequent rounds.
- Persist it with the conversation (new DB column via migrationv2.0.2).
- Render it in the chat UI as a collapsible "Thinking…/Thoughts"panel
above the answer.
Compatibility
Nullable column, omitempty field, UI hides the panel when empty — old
conversations and non-reasoning models behave exactly as before.
Demo
https://github.com/user-attachments/assets/49b1a2a1-9133-4ac2-bbeb-860215a50285
- base.ts: add replaceRange method to CodeMirror adapter
- file.tsx: use replaceSelection to insert loading text (fixes RangeError)
- file.tsx: use useState/useEffect for stable editorState reference in async callbacks
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Added a new vector search syncer to aggregate questions and answers with comments for vector embedding.
- Introduced a new VectorSearch interface and related structures for managing vector storage and similarity search.
- Refactored embedding service to delegate semantic search to the new vector search plugin.
- Removed embedding-related fields from SiteAIProvider and UI forms as part of the transition to the new vector search architecture.
- Updated plugin registration to include vector search capabilities.
- Cleaned up embedding service methods and removed unused dependencies.
- Upgraded all TipTap related dependencies in package.json and pnpm-lock.yaml to version 3.13.0 for improved functionality and compatibility.
- Ensured consistent versioning across all TipTap extensions and core packages.
- Introduced PluginSlot component for better plugin insertion in the editor.
- Updated MDEditor to default to 'markdown' mode for improved user experience.
- Refactored command methods in TipTap to use chaining for better selection handling.
- Enhanced PluginRender to load plugins asynchronously and prevent duplicate registrations.
- Added @tiptap/core version 3.13.0 to package.json and updated related dependencies in pnpm-lock.yaml.
- Refactored RichEditor to utilize new table extension with responsive wrapper and improved styling.
- Adjusted editor mode initialization in MDEditor to default to 'rich' for enhanced user experience.
- Removed redundant styles from index.scss to streamline the editor's appearance.
- Updated ToolItem component to ensure consistent return type for command functions.
- Modified heading toolbar to allow optional label parameter in handleClick function.
- Enhanced image component comments for clarity on editor state updates and event listener management.
- Cleaned up utility functions in htmlRender to remove unnecessary comments and improve readability.
- Introduced BaseEditorProps interface to standardize props across MarkdownEditor and RichEditor components.
- Improved initialization logic in RichEditor and MarkdownEditor to handle editor state more effectively.
- Updated useEditor hook to support initial values and prevent unnecessary updates during prop changes.
- Refactored command methods to utilize dispatch for state changes in CodeMirror editor.
- Updated the editor mode from WYSIWYG to Rich in the MDEditor component.
- Introduced a new RichEditor component utilizing TipTap for enhanced editing capabilities.
- Adjusted styles and references in the editor components to reflect the new naming convention.
- Removed unnecessary conditional rendering in the MDEditor component for the PluginRender.
- Simplified the MarkdownEditor component's useEffect hooks for better clarity.
- Refactored command methods to utilize self-referencing for improved maintainability.
## Summary
- Show success toast notification after user is added
- Refresh user list and navigate to 'normal' filter on page 1 to display
the newly added user
## Problem
When adding a user in Admin -> Users, the page had no feedback after
submission (as reported in #1457).
**Root cause:** The code only refreshed the user list if the current
filter was "all" or "staff", but the default filter is "normal".
Additionally, there was no success toast notification.
## Solution
1. Added toast notification to confirm successful user creation
2. After adding user, navigate to "normal" filter page 1 and refresh the
list so the new user is visible
## Test plan
1. Go to Admin -> Users
2. Click "Add User"
3. Submit user information
4. ✅ Success toast should appear
5. ✅ Page should navigate to "normal" filter
6. ✅ Newly added user should be visible in the list
Fixes#1457
---------
Co-authored-by: LinkinStars <linkinstar@foxmail.com>
- Added TipTap extensions for image, placeholder, table, and markdown support.
- Implemented WYSIWYG and Markdown editor components.
- Refactored editor context and tool items to utilize the new editor interface.
- Updated styles for the WYSIWYG editor.
- Removed deprecated utility functions and integrated new command methods for better editor interaction.