fix(webui): sync model badge after preset switch

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 b61c6304c3
commit c92345bbb1
9 files changed
+61 -4

No files matched your search

+3
View File
@@ -1471,6 +1471,9 @@ class WebSocketChannel(BaseChannel):
payload["kind"] = "tool_hint"
elif msg.metadata.get("_progress"):
payload["kind"] = "progress"
webui_model_name = msg.metadata.get("_webui_model_name")
if isinstance(webui_model_name, str) and webui_model_name.strip():
payload["model_name"] = webui_model_name.strip()
raw = json.dumps(payload, ensure_ascii=False)
for connection in conns:
await self._safe_send_to(connection, raw, label=" ")