This commit is contained in:
2026-04-24 20:17:28 +02:00
parent 2db338a9f5
commit e592ed44af
3 changed files with 16 additions and 37 deletions

View File

@@ -1,4 +1,5 @@
import React, { useEffect, useMemo, useRef, useState } from 'react'
import professeurTopImage from './assets/professeur-top.png'
const API_BASE = '/api'
const AUTO_STOP_SILENCE_MS = 2500
@@ -37,15 +38,13 @@ function Avatar({ speaking }) {
return (
<div className="avatar-shell">
<div className={`avatar ${speaking ? 'speaking' : ''}`}>
<div className="face">
<div className="eyes">
<span />
<span />
</div>
<div className={`mouth ${speaking ? 'mouth-speaking' : ''}`} />
</div>
<img
className="avatar-image"
src={professeurTopImage}
alt="Professeur TOP"
/>
</div>
<div className="avatar-caption">ProfAmi</div>
<div className="avatar-caption">Professeur TOP</div>
</div>
)
}
@@ -646,7 +645,7 @@ export default function App() {
{messages.length === 0 && <p className="muted">Le dialogue apparaîtra ici.</p>}
{messages.map((message) => (
<div key={message.id} className={`message ${message.role}`}>
<strong>{message.role === 'assistant' ? 'ProfAmi' : 'Élève'}</strong>
<strong>{message.role === 'assistant' ? 'Professeur TOP' : 'Élève'}</strong>
<p>{message.content}</p>
</div>
))}