diff --git a/apps/app/components/core/modals/gpt-assistant-modal.tsx b/apps/app/components/core/modals/gpt-assistant-modal.tsx index e8fd0812c..6b06256cf 100644 --- a/apps/app/components/core/modals/gpt-assistant-modal.tsx +++ b/apps/app/components/core/modals/gpt-assistant-modal.tsx @@ -145,7 +145,7 @@ export const GptAssistantModal: React.FC = ({ }`} > {((content && content !== "") || (htmlContent && htmlContent !== "

")) && ( -
+
Content: ${content}

`} diff --git a/apps/app/components/issues/form.tsx b/apps/app/components/issues/form.tsx index 20b06b7a8..d32c1e043 100644 --- a/apps/app/components/issues/form.tsx +++ b/apps/app/components/issues/form.tsx @@ -35,9 +35,15 @@ import { import { SparklesIcon, XMarkIcon } from "@heroicons/react/24/outline"; // types import type { ICurrentUserResponse, IIssue, ISearchIssueResponse } from "types"; -import Tiptap from "components/tiptap"; +import Tiptap, { ITiptapRichTextEditor } from "components/tiptap"; // rich-text-editor +const TiptapEditor = React.forwardRef( + (props, ref) => +); + +TiptapEditor.displayName = "TiptapEditor"; + const defaultValues: Partial = { project: "", name: "", @@ -158,6 +164,7 @@ export const IssueForm: FC = ({ const handleAiAssistance = async (response: string) => { if (!workspaceSlug || !projectId) return; + console.log(response) setValue("description", {}); setValue("description_html", `${watch("description_html")}

${response}

`); editorRef.current?.setEditorValue(`${watch("description_html")}`); @@ -365,7 +372,8 @@ export const IssueForm: FC = ({ if (!value && !watch("description_html")) return <>; return ( - { }, 500); }, 1000); - const editorClassNames = `relative w-full max-w-screen-lg sm:rounded-lg sm:border sm:shadow-lg mt-2 p-3 relative focus:outline-none rounded-md + const editorClassNames = `relative w-full max-w-screen-lg sm:rounded-lg sm:shadow-lg mt-2 p-3 relative focus:outline-none rounded-md ${noBorder ? '' : 'border border-custom-border-200' } ${borderOnFocus ? 'focus:border border-custom-border-300' : 'focus:border-0' } ${customClassName}`;