diff --git a/frontend/src/components/ChatInterface.css b/frontend/src/components/ChatInterface.css index f49b94a6e1..d80e1c7a5b 100644 --- a/frontend/src/components/ChatInterface.css +++ b/frontend/src/components/ChatInterface.css @@ -12,16 +12,27 @@ margin-bottom: 20px; } - .message { + .message-layout { display: flex; margin-bottom: 10px; } - + .message{ + display: flex; + } + .user-message{ + display: flex; + flex-direction: row-reverse; + margin:10px 10px 0 auto + } + .user-message .message-content { + background-color: #007acc ; +} + .avatar { width: 40px; height: 40px; border-radius: 50%; - margin-right: 10px; + margin:0 10px; } .message-content { @@ -32,6 +43,7 @@ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); } + .input-container { display: flex; align-items: center; @@ -61,6 +73,8 @@ font-size: 16px; } + .input-container svg { height: 16px; - } \ No newline at end of file + } + diff --git a/frontend/src/components/ChatInterface.tsx b/frontend/src/components/ChatInterface.tsx index 1ce806ff5b..371bd0c243 100644 --- a/frontend/src/components/ChatInterface.tsx +++ b/frontend/src/components/ChatInterface.tsx @@ -45,13 +45,17 @@ function ChatInterface(): JSX.Element {
{messages.map((msg, index) => ( -
- {`${msg.sender} -
{msg.content}
+
+
+ {`${msg.sender} +
{msg.content}
+
))}
@@ -77,6 +81,11 @@ function ChatInterface(): JSX.Element { value={inputMessage} onChange={(e) => setInputMessage(e.target.value)} placeholder="Send a message (won't interrupt the Assistant)" + onKeyDown={(e) => { + if (e.key === "Enter") { + handleSendMessage(); + } + }} />