mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: ai response not coming when using 'AI' button (#1091)
* fix: ai response not comming for page * fix: ai response not coming when using 'AI' button
This commit is contained in:
parent
ab273f6be3
commit
d9642eee82
@ -365,10 +365,15 @@ export const CreateUpdateBlockInline: React.FC<Props> = ({
|
||||
content={watch("description_html")}
|
||||
htmlContent={watch("description_html")}
|
||||
onResponse={(response) => {
|
||||
if (data && handleAiAssistance) handleAiAssistance(response);
|
||||
else {
|
||||
if (data && handleAiAssistance) {
|
||||
handleAiAssistance(response);
|
||||
editorRef.current?.setEditorValue(
|
||||
`${watch("description_html")}<p>${response}</p>` ?? ""
|
||||
);
|
||||
} else {
|
||||
setValue("description", {});
|
||||
setValue("description_html", `${watch("description_html")}<p>${response}</p>`);
|
||||
|
||||
editorRef.current?.setEditorValue(watch("description_html") ?? "");
|
||||
}
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user