fix(webui): broadcast runtime model updates

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Xubin RenandCursor authored and Xubin Ren committed 2026-05-12 20:06:22 +08:00
1 parent c92345bbb1
commit bcc4b97183
16 files changed
+152 -51

No files matched your search

+1 -3
View File
@@ -32,7 +32,6 @@ interface ThreadShellProps {
onNewChat?: () => void;
onCreateChat?: () => Promise<string | null>;
onTurnEnd?: () => void;
onModelNameChange?: (modelName: string | null) => void;
theme?: "light" | "dark";
onToggleTheme?: () => void;
hideSidebarToggleOnDesktop?: boolean;
@@ -76,7 +75,6 @@ export function ThreadShell({
onToggleSidebar,
onCreateChat,
onTurnEnd,
onModelNameChange,
theme = "light",
onToggleTheme = () => {},
hideSidebarToggleOnDesktop = false,
@@ -105,7 +103,7 @@ export function ThreadShell({
setMessages,
streamError,
dismissStreamError,
} = useNanobotStream(chatId, initial, hasPendingToolCalls, onTurnEnd, onModelNameChange);
} = useNanobotStream(chatId, initial, hasPendingToolCalls, onTurnEnd);
const showHeroComposer = messages.length === 0 && !loading;
const pendingAsk = useMemo(() => {
for (let index = messages.length - 1; index >= 0; index -= 1) {