File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
ui/packages/platform/src/pages/Bot/Command Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import { theme } from "@postgres.ai/shared/styles/theme";
1616import { isMobileDevice } from "../../../utils/utils" ;
1717import { useAiBot } from "../hooks" ;
1818import { ReadyState } from "react-use-websocket" ;
19+ import { useFloatingIntercom } from "../../../hooks/useFloatingIntercom" ;
1920
2021
2122type Props = {
@@ -193,6 +194,11 @@ export const Command = React.memo((props: Props) => {
193194 setValue ( '' )
194195 } , [ threadId ] ) ;
195196
197+ // Floating intercom.
198+ const sendButtonRef = useRef < HTMLButtonElement | null > ( null )
199+
200+ useFloatingIntercom ( sendButtonRef )
201+
196202 return (
197203 < div className = { classes . root } >
198204 < TextField
@@ -216,6 +222,7 @@ export const Command = React.memo((props: Props) => {
216222 onClick = { triggerSend }
217223 className = { classes . iconButton }
218224 disabled = { sendDisabled || value . length === 0 }
225+ ref = { sendButtonRef }
219226 >
220227 < SendRoundedIcon />
221228 </ IconButton >
You can’t perform that action at this time.
0 commit comments