[WEB-438] fix: ai insertion behaviour (#3872)

* fixed ai insertion behaviour

* replaced all ai popover references to have similar behavior

* chore: removed debug statements
This commit is contained in:
M. Palanikannan 2024-03-06 20:38:57 +05:30 committed by GitHub
parent cb5198c883
commit 549f6d0943
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 45 additions and 21 deletions

View file

@ -180,8 +180,7 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
const handleAiAssistance = async (response: string) => {
if (!workspaceSlug || !projectId) return;
setValue("description_html", `${watch("description_html")}<p>${response}</p>`);
editorRef.current?.setEditorValue(`${watch("description_html")}`);
editorRef.current?.setEditorValueAtCursorPosition(response);
};
const handleAutoGenerateDescription = async () => {