feat: update agent label for clarity in dashboard localization files and improve HomePage layout
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
},
|
||||
"currentAgentSummary": "Current Agent: {{name}}",
|
||||
"modelSummary": "Model: {{name}}",
|
||||
"agentLabel": "Agent",
|
||||
"agentLabel": "Current conversation target",
|
||||
"refresh": "Refresh"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
},
|
||||
"currentAgentSummary": "Agent ปัจจุบัน: {{name}}",
|
||||
"modelSummary": "โมเดล: {{name}}",
|
||||
"agentLabel": "Agent",
|
||||
"agentLabel": "คู่สนทนาปัจจุบัน",
|
||||
"refresh": "รีเฟรช"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
},
|
||||
"currentAgentSummary": "当前 Agent:{{name}}",
|
||||
"modelSummary": "模型:{{name}}",
|
||||
"agentLabel": "Agent",
|
||||
"agentLabel": "当前对话对象",
|
||||
"refresh": "刷新"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,7 +219,6 @@ function HomeChatComposerSection({
|
||||
export default function HomePage() {
|
||||
const { t, locale } = useI18n();
|
||||
const agents = useAgentsStore((state) => state.agents);
|
||||
const agentsLoading = useAgentsStore((state) => state.loading);
|
||||
const defaultAgentId = useAgentsStore((state) => state.defaultAgentId);
|
||||
const chatInitialized = useChatStore((state) => state.initialized);
|
||||
const chatMessages = useChatStore((state) => state.messages);
|
||||
@@ -471,26 +470,18 @@ export default function HomePage() {
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center gap-3">
|
||||
<label className="flex items-center gap-2 text-xs text-[#525866] dark:text-gray-300">
|
||||
<span>{t('dashboard.conversation.agentLabel')}</span>
|
||||
<select
|
||||
className="rounded-full border border-[#E5E8EE] bg-white px-3 py-1.5 text-xs text-[#525866] outline-none transition-colors hover:border-[#2B7FFF] dark:border-[#2a2a2d] dark:bg-[#232327] dark:text-gray-300"
|
||||
disabled={agentsLoading || agents.length === 0}
|
||||
value={selectedAgentId}
|
||||
onChange={(event) => {
|
||||
chatStore.selectAgent(event.target.value);
|
||||
}}
|
||||
<div className="rounded-full border border-[#E5E8EE] px-3 py-1.5 flex items-center gap-2 text-xs text-[#525866] dark:text-gray-300">
|
||||
<span>{t('dashboard.conversation.agentLabel')}:</span>
|
||||
<div
|
||||
className=" text-xs text-[#525866] dark:border-[#2a2a2d] dark:bg-[#232327] dark:text-gray-300"
|
||||
title={currentAgent?.name || selectedAgentId}
|
||||
>
|
||||
{agents.map((agent) => (
|
||||
<option key={agent.id} value={agent.id}>
|
||||
{agent.name}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</label>
|
||||
{currentAgent?.name || selectedAgentId || '--'}
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
className="rounded-full border border-[#E5E8EE] px-3 py-1.5 text-xs text-[#525866] transition-colors hover:border-[#2B7FFF] hover:text-[#2B7FFF] dark:border-[#2a2a2d] dark:text-gray-300"
|
||||
className="text-xs text-[#525866] transition-colors hover:border-[#2B7FFF] hover:text-[#2B7FFF] dark:border-[#2a2a2d] dark:text-gray-300"
|
||||
onClick={handleRefreshConversationData}
|
||||
title={t('dashboard.conversation.refresh')}
|
||||
aria-label={t('dashboard.conversation.refresh')}
|
||||
|
||||
Reference in New Issue
Block a user