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>
This commit is contained in:
@@ -69,13 +69,6 @@ export default function CourseContentPage() {
|
||||
setIsLoading(true);
|
||||
setError(null);
|
||||
const structure = await courseContentAPI.getCourseContent();
|
||||
console.log("加载的书籍结构:", structure);
|
||||
console.log("章节数量:", structure?.chapters?.length || 0);
|
||||
if (structure?.chapters) {
|
||||
structure.chapters.forEach((chapter, index) => {
|
||||
console.log(`章节 ${index + 1}:`, chapter.title, "节数:", chapter.sections?.length || 0);
|
||||
});
|
||||
}
|
||||
setBookStructure(structure);
|
||||
} catch (err) {
|
||||
console.error("加载课程内容失败:", err);
|
||||
|
||||
Reference in New Issue
Block a user