diff --git a/public/screenshots/cockpit_view.png b/public/screenshots/cockpit_view.png index dda9c6b..d70743f 100644 Binary files a/public/screenshots/cockpit_view.png and b/public/screenshots/cockpit_view.png differ diff --git a/public/screenshots/compact_widget.png b/public/screenshots/compact_widget.png index 26868ed..844d3a2 100644 Binary files a/public/screenshots/compact_widget.png and b/public/screenshots/compact_widget.png differ diff --git a/src/App.tsx b/src/App.tsx index fdde984..7590572 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1064,6 +1064,7 @@ export const App: React.FC = () => { // Références de services const audioServiceRef = useRef(null); const messagesEndRef = useRef(null); + const compactMessagesEndRef = useRef(null); const pollingServiceRef = useRef(null); // AppCallbacks for tools @@ -1223,7 +1224,8 @@ export const App: React.FC = () => { // Défilement automatique useEffect(() => { messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' }); - }, [messages, showSettings]); + compactMessagesEndRef.current?.scrollIntoView({ behavior: 'smooth' }); + }, [messages, showSettings, isFloatingMode]); @@ -2233,7 +2235,7 @@ export const App: React.FC = () => { )} {/* Rendu Canvas 3D */} -
+
{ )}
- {/* Contrôle micro en mode Widget */} + {/* Chat compact en bas en mode Widget */} {isFloatingMode && ( -
- -
- {isListening ? "À l'écoute..." : "Prête à t'écouter"} +
+ {/* Petite zone de messages défilable */} +
+ {messages.slice(-5).map((msg) => { + const isUser = msg.role === 'user'; + return ( +
+
+ {msg.content} +
+
+ ); + })} +
+
+ + {/* Barre de saisie compacte */} +
+ setInputText(e.target.value)} + onKeyDown={(e) => e.key === 'Enter' && handleSendMessage(inputText)} + placeholder="Message..." + className="glow-input" + disabled={isSending} + style={{ flex: 1, fontSize: '11px', padding: '6px 12px', height: '32px', borderRadius: '16px', border: '1px solid rgba(0, 242, 255, 0.2)', backgroundColor: '#050914', color: 'var(--text-primary)' }} + /> + + + +
)} diff --git a/src/index.css b/src/index.css index 1899286..4bb4293 100644 --- a/src/index.css +++ b/src/index.css @@ -293,11 +293,13 @@ body { .eve-section.floating-widget { width: 100%; height: 100%; - padding: 20px; + padding: 12px; background-color: var(--bg-glass-active); border: 4px solid var(--text-primary); border-radius: var(--radius-lg); box-shadow: var(--glow-cyan-active), 0 10px 25px rgba(255, 85, 0, 0.1); + justify-content: flex-start; + align-items: stretch; } .avatar-ambient-field {