File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
libs/remix-ui/remix-ai-assistant/src/components Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ export const RemixUiRemixAiAssistant = React.forwardRef<
52
52
const modelBtnRef = useRef ( null )
53
53
const contextBtnRef = useRef ( null )
54
54
const textareaRef = useRef < HTMLTextAreaElement > ( null )
55
+ const aiChatRef = useRef < HTMLDivElement > ( null )
55
56
56
57
useOnClickOutside ( [ modelBtnRef , contextBtnRef ] , ( ) => setShowAssistantOptions ( false ) )
57
58
useOnClickOutside ( [ modelBtnRef , contextBtnRef ] , ( ) => setShowContextOptions ( false ) )
@@ -468,9 +469,17 @@ export const RemixUiRemixAiAssistant = React.forwardRef<
468
469
}
469
470
} , [ messages ] )
470
471
472
+ const maximizePanel = async ( ) => {
473
+ await props . plugin . call ( 'layout' , 'maximisePinnedPanel' )
474
+ }
475
+
471
476
return (
472
477
< div
473
478
className = "d-flex flex-column h-100 w-100"
479
+ ref = { aiChatRef }
480
+ onBlur = { async ( ) => {
481
+ await props . plugin . call ( 'layout' , 'resetPinnedPanel' )
482
+ } }
474
483
>
475
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 } >
476
485
< div data-id = "remix-ai-assistant-ready" > </ div >
@@ -506,6 +515,7 @@ export const RemixUiRemixAiAssistant = React.forwardRef<
506
515
) }
507
516
< PromptArea
508
517
input = { input }
518
+ maximizePanel = { maximizePanel }
509
519
setInput = { setInput }
510
520
isStreaming = { isStreaming }
511
521
handleSend = { handleSend }
You can’t perform that action at this time.
0 commit comments