Merge branch 'main' into feat-mcp

This commit is contained in:
Kadxy
2025-01-19 23:28:12 +08:00
committed by GitHub
37 changed files with 896 additions and 206 deletions

View File

@@ -244,7 +244,11 @@ export const useChatStore = createPersistStore(
const newSession = createEmptySession();
newSession.topic = currentSession.topic;
newSession.messages = [...currentSession.messages];
// 深拷贝消息
newSession.messages = currentSession.messages.map(msg => ({
...msg,
id: nanoid(), // 生成新的消息 ID
}));
newSession.mask = {
...currentSession.mask,
modelConfig: {