Skip to content

Commit b7d1406

Browse files
authored
Merge pull request #6180 from ethereum/remixai-patch-002
AI Chat Patch
2 parents 28574ec + 4823fbe commit b7d1406

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

libs/remix-ui/remix-ai-assistant/src/components/chat.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const ChatHistoryComponent: React.FC<ChatHistoryComponentProps> = ({
7171
return (
7272
<div
7373
ref={historyRef}
74-
className="d-flex flex-column overflow-y-auto border-box-sizing preserve-wrap w-100"
74+
className="d-flex flex-column overflow-y-auto border-box-sizing preserve-wrap overflow-x-hidden"
7575
>
7676
{messages.length === 0 ? (
7777
<AiChatIntro sendPrompt={sendPrompt} />
@@ -81,7 +81,7 @@ export const ChatHistoryComponent: React.FC<ChatHistoryComponentProps> = ({
8181
msg.role === 'user' ? 'bubble-user bg-light' : 'bubble-assistant bg-light'
8282

8383
return (
84-
<div key={msg.id} className="chat-row d-flex mb-2 w-100">
84+
<div key={msg.id} className="chat-row d-flex mb-2" style={{ minWidth: '90%' }}>
8585
{/* Avatar for assistant */}
8686
{msg.role === 'assistant' && (
8787
<img
@@ -92,7 +92,7 @@ export const ChatHistoryComponent: React.FC<ChatHistoryComponentProps> = ({
9292
)}
9393

9494
{/* Bubble */}
95-
<div data-id="ai-response-chat-bubble-section" className="overflow-y-scroll w-100 mr-1">
95+
<div data-id="ai-response-chat-bubble-section" className="overflow-y-scroll" style={{ width: '90%' }}>
9696
<div className={`chat-bubble p-2 rounded ${bubbleClass}`} data-id="ai-user-chat-bubble">
9797
{msg.role === 'user' && (
9898
<small className="text-uppercase fw-bold text-secondary d-block mb-1">

libs/remix-ui/remix-ai-assistant/src/components/remix-ui-remix-ai-assistant.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -475,13 +475,10 @@ export const RemixUiRemixAiAssistant = React.forwardRef<
475475

476476
return (
477477
<div
478-
className="d-flex flex-column h-100 w-100"
478+
className="d-flex flex-column h-100 w-100 overflow-x-hidden"
479479
ref={aiChatRef}
480-
onBlur={async () => {
481-
await props.plugin.call('layout', 'resetPinnedPanel')
482-
}}
483480
>
484-
<section id="remix-ai-chat-history" className="h-83 d-flex flex-column align-items-center p-2 overflow-x-hidden" style={{ flex: 7, overflowY: 'scroll' }} ref={chatHistoryRef}>
481+
<section id="remix-ai-chat-history" className="h-83 d-flex flex-column p-2 overflow-x-hidden" style={{ flex: 7, overflowY: 'scroll' }} ref={chatHistoryRef}>
485482
<div data-id="remix-ai-assistant-ready"></div>
486483
{/* hidden hook for E2E tests: data-streaming="true|false" */}
487484
<div

0 commit comments

Comments
 (0)