AI Coach fixed

This commit is contained in:
AG
2025-11-26 23:09:42 +02:00
parent 94f0a9a17a
commit be2670ed12
3 changed files with 24 additions and 11 deletions

View File

@@ -29,7 +29,7 @@ const AICoach: React.FC<AICoachProps> = ({ history, lang }) => {
useEffect(() => {
try {
const chat = createFitnessChat(history);
const chat = createFitnessChat(history, lang);
if (chat) {
chatSessionRef.current = chat;
} else {
@@ -108,8 +108,8 @@ const AICoach: React.FC<AICoachProps> = ({ history, lang }) => {
{messages.map((msg) => (
<div key={msg.id} className={`flex ${msg.role === 'user' ? 'justify-end' : 'justify-start'}`}>
<div className={`max-w-[85%] p-4 rounded-[20px] text-sm leading-relaxed shadow-sm ${msg.role === 'user'
? 'bg-primary text-on-primary rounded-br-none'
: 'bg-surface-container-high text-on-surface border border-outline-variant/20 rounded-bl-none'
? 'bg-primary text-on-primary rounded-br-none'
: 'bg-surface-container-high text-on-surface border border-outline-variant/20 rounded-bl-none'
}`}>
{msg.text}
</div>