feat: 优化情景切换功能

This commit is contained in:
2026-06-20 23:24:32 +08:00
parent ed95ce56a8
commit 2fb23852ef
11 changed files with 872 additions and 143 deletions

View File

@@ -106,6 +106,21 @@ export function ChatPanel({
return (
<div className="chat-panel">
<div className="chat-panel__messages" ref={containerRef}>
{/* 情景提示卡片(非空状态 + 非自由对话) */}
{messages.length > 0 && !isFreeChat && (
<div className="chat-panel__scenario-hint">
<div className="scenario-hint-card">
<span className="scenario-hint-card__icon">
{scenarios.find(s => s.id === activeScenario)?.icon}
</span>
<div className="scenario-hint-card__text">
<strong>{t(scenarios.find(s => s.id === activeScenario)?.nameKey || "")}</strong>
<p>{t(`scenario.${activeScenario}.hint`)}</p>
</div>
</div>
</div>
)}
{/* 空状态:情景选择 + 场景卡片 */}
{isEmpty && (
<div className="chat-panel__welcome">