diff --git a/web/components/core/modals/gpt-assistant-modal.tsx b/web/components/core/modals/gpt-assistant-modal.tsx index 98fd37904..10df4d8f8 100644 --- a/web/components/core/modals/gpt-assistant-modal.tsx +++ b/web/components/core/modals/gpt-assistant-modal.tsx @@ -9,7 +9,7 @@ import useToast from "hooks/use-toast"; // ui import { Button, Input } from "@plane/ui"; // components -import { RichReadOnlyEditor, RichReadOnlyEditorWithRef } from "@plane/rich-text-editor"; +import { RichReadOnlyEditorWithRef } from "@plane/rich-text-editor"; // types import { IIssue, IPageBlock } from "types"; @@ -42,6 +42,7 @@ export const GptAssistantModal: React.FC = (props) => { const { workspaceSlug } = router.query; const editorRef = useRef(null); + const responseRef = useRef(null); const { setToastAlert } = useToast(); @@ -115,6 +116,10 @@ export const GptAssistantModal: React.FC = (props) => { editorRef.current?.setEditorValue(htmlContent ?? `

${content}

`); }, [htmlContent, editorRef, content]); + useEffect(() => { + responseRef.current?.setEditorValue(`

${response}

`); + }, [response, responseRef]); + return (
= (props) => { {response !== "" && (
Response: - ${response}

`} customClassName="-mx-3 -my-3" noBorder borderOnFocus={false} + ref={responseRef} />
)}