fix(webui): preserve hero model preset on chat creation

This commit is contained in:
chengyongru authored and chengyongru committed 2026-09-04 10:41:01 +08:00
1 parent b04aeeac0e
commit 3d40ed8f76
5 files changed
+43 -7

No files matched your search

+2 -1
View File
@@ -336,6 +336,7 @@ interface ThreadShellProps {
onCreateChat?: (
workspaceScope?: WorkspaceScopePayload | null,
initialMessage?: string,
modelPreset?: string | null,
) => Promise<string | null>;
onForkChat?: (sourceChatId: string, beforeUserIndex: number) => Promise<string | null>;
onTurnEnd?: () => void;
@@ -1348,7 +1349,7 @@ export function ThreadShell({
setBooting(true);
pendingFirstRef.current = { content, images, options: withWorkspaceScope(options) };
setPendingFirstTargetChatId(null);
const newId = await onCreateChat?.(workspaceScope, content);
const newId = await onCreateChat?.(workspaceScope, content, localModelPreset);
if (!newId) {
pendingFirstRef.current = null;
setPendingFirstTargetChatId(null);