fix: persist model on conversation send, fallback resolution, carry model on new conversation

This commit is contained in:
Xianren Studio
2026-08-13 23:44:27 +08:00
parent 00624d81cf
commit 95d7ff1299
6 changed files with 36 additions and 12 deletions
+2 -2
View File
@@ -194,8 +194,8 @@ export const api = {
settingsSet: (key: string, value: string) =>
invoke<void>("settings_set", { key, value }),
listConversations: () => invoke<Conversation[]>("list_conversations"),
createConversation: (title: string) =>
invoke<Conversation>("create_conversation", { title }),
createConversation: (title: string, modelId?: string) =>
invoke<Conversation>("create_conversation", { title, modelId: modelId ?? null }),
deleteConversation: (id: string) =>
invoke<void>("delete_conversation", { id }),
getMessages: (conversationId: string) =>
+1 -1
View File
@@ -331,7 +331,7 @@ export default function ChatPage() {
}
async function handleNewConversation() {
const conv = await api.createConversation("新会话");
const conv = await api.createConversation("新会话", selectedModelId || undefined);
setActiveConvId(conv.id);
setMessages([]);
setError(null);