fix(webui): sync model badge after preset switch

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Xubin Ren
2026-05-12 20:06:22 +08:00
committed by Xubin Ren
co-authored by Cursor
parent b61c6304c3
commit c92345bbb1
9 changed files with 61 additions and 4 deletions
+2 -2
View File
@@ -225,7 +225,7 @@ async def cmd_model(ctx: CommandContext) -> OutboundMessage:
channel=ctx.msg.channel,
chat_id=ctx.msg.chat_id,
content=_model_command_status(loop),
metadata=metadata,
metadata={**metadata, "_webui_model_name": loop.model},
)
parts = args.split()
@@ -264,7 +264,7 @@ async def cmd_model(ctx: CommandContext) -> OutboundMessage:
channel=ctx.msg.channel,
chat_id=ctx.msg.chat_id,
content="\n".join(lines),
metadata=metadata,
metadata={**metadata, "_webui_model_name": loop.model},
)