fix: persist model on conversation send, fallback resolution, carry model on new conversation
This commit is contained in:
+2
-2
@@ -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) =>
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user