From e5e1d8b8cc77804be351ad94d1a324964796ea81 Mon Sep 17 00:00:00 2001 From: Xin Wang Date: Sun, 7 Jun 2026 22:21:03 +0800 Subject: [PATCH] Refactor AssistantPage to remove unused labels and enhance component flexibility Removed labels from TextAreaField and SelectField components in AssistantPage to streamline the interface. Updated the components to conditionally render labels, improving layout flexibility and user experience. This change simplifies the form fields while maintaining functionality. --- src/components/pages/AssistantPage.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/pages/AssistantPage.tsx b/src/components/pages/AssistantPage.tsx index b362ed1..bfc5e92 100644 --- a/src/components/pages/AssistantPage.tsx +++ b/src/components/pages/AssistantPage.tsx @@ -787,7 +787,6 @@ export function AssistantPage() { description="描述助手的角色、能力和回答要求" > updateForm("prompt", value)} placeholder="请输入提示词,描述助手的角色、能力和回答要求" @@ -827,7 +826,6 @@ export function AssistantPage() { description="当前模式下 ASR 与 TTS 由 Realtime 模型内置完成" > updateForm("realtimeModel", value)} options={["gpt-realtime-2", "gpt-realtime", "gpt-4o-realtime-preview"]} @@ -841,7 +839,6 @@ export function AssistantPage() { description="助手与用户首次对话时的开场语" > updateForm("greeting", value)} placeholder="请输入助手开场白" @@ -854,7 +851,6 @@ export function AssistantPage() { description="选择助手回答时可检索的业务知识来源" > updateForm("knowledgeBase", value)} options={["无", "政务政策知识库", "售后知识库", "教育课程知识库", "医疗问答知识库"]} @@ -1130,7 +1126,7 @@ function TextAreaField({ rows = 4, onChange, }: { - label: string; + label?: string; value: string; placeholder?: string; rows?: number; @@ -1138,7 +1134,9 @@ function TextAreaField({ }) { return (