fix(webui): sync model badge after preset switch
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
committed by
Xubin Ren
co-authored by
Cursor
parent
b61c6304c3
commit
c92345bbb1
@@ -32,6 +32,7 @@ interface ThreadShellProps {
|
||||
onNewChat?: () => void;
|
||||
onCreateChat?: () => Promise<string | null>;
|
||||
onTurnEnd?: () => void;
|
||||
onModelNameChange?: (modelName: string | null) => void;
|
||||
theme?: "light" | "dark";
|
||||
onToggleTheme?: () => void;
|
||||
hideSidebarToggleOnDesktop?: boolean;
|
||||
@@ -75,6 +76,7 @@ export function ThreadShell({
|
||||
onToggleSidebar,
|
||||
onCreateChat,
|
||||
onTurnEnd,
|
||||
onModelNameChange,
|
||||
theme = "light",
|
||||
onToggleTheme = () => {},
|
||||
hideSidebarToggleOnDesktop = false,
|
||||
@@ -103,7 +105,7 @@ export function ThreadShell({
|
||||
setMessages,
|
||||
streamError,
|
||||
dismissStreamError,
|
||||
} = useNanobotStream(chatId, initial, hasPendingToolCalls, onTurnEnd);
|
||||
} = useNanobotStream(chatId, initial, hasPendingToolCalls, onTurnEnd, onModelNameChange);
|
||||
const showHeroComposer = messages.length === 0 && !loading;
|
||||
const pendingAsk = useMemo(() => {
|
||||
for (let index = messages.length - 1; index >= 0; index -= 1) {
|
||||
|
||||
Reference in New Issue
Block a user