From 6431709669929cfa6d0e25be9395b1096dc69df6 Mon Sep 17 00:00:00 2001 From: ZhenYi <434836402@qq.com> Date: Fri, 17 Apr 2026 23:17:56 +0800 Subject: [PATCH] fix(room): show model name instead of UID in settings panel - Load model list on settings panel mount so names are always available. - SelectValue now displays the selected model's name by looking up availableModels, falling back to UID if name not found. - Existing AI configs list also shows model name instead of raw UID. --- src/components/room/RoomSettingsPanel.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/room/RoomSettingsPanel.tsx b/src/components/room/RoomSettingsPanel.tsx index 8363532..9008cb6 100644 --- a/src/components/room/RoomSettingsPanel.tsx +++ b/src/components/room/RoomSettingsPanel.tsx @@ -1,5 +1,5 @@ import { memo, useState, useEffect, useCallback } from 'react'; -import type { RoomResponse } from '@/client'; +import type { ModelResponse, RoomResponse } from '@/client'; import { aiList, aiUpsert, aiDelete, modelList } from '@/client'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; @@ -79,6 +79,7 @@ export const RoomSettingsPanel = memo(function RoomSettingsPanel({ useEffect(() => { loadAiConfigs(); + loadModels(); }, [loadAiConfigs]); // Load available models @@ -215,8 +216,8 @@ export const RoomSettingsPanel = memo(function RoomSettingsPanel({ >