From f99877b3fd9436b2812f3798d826dea9381e8217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=A6Ltorio?= Date: Fri, 18 Oct 2024 19:15:47 +0200 Subject: [PATCH] refactor --- src/aipane/components/App.tsx | 2 +- src/aipane/components/TextInsertion.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/aipane/components/App.tsx b/src/aipane/components/App.tsx index 50ebf4f..d18433a 100644 --- a/src/aipane/components/App.tsx +++ b/src/aipane/components/App.tsx @@ -196,7 +196,7 @@ const App: React.FC = (props: AppProps): React.JSX.Element => { - + )} diff --git a/src/aipane/components/TextInsertion.tsx b/src/aipane/components/TextInsertion.tsx index db51b4c..83e95c3 100644 --- a/src/aipane/components/TextInsertion.tsx +++ b/src/aipane/components/TextInsertion.tsx @@ -24,7 +24,7 @@ interface TextInsertionProps { * @param {string} text - The text to be processed by the AI. * @returns {Promise} - The AI-generated answer. */ - insertAIAnswer: (text: string) => Promise; + getAIAnswer: (text: string) => Promise; /** * Optional base prompt text. @@ -97,7 +97,7 @@ const TextInsertion: React.FC = (props: TextInsertionProps): */ const requestAI = async (querytext: string) => { setSkeletonVisibility(true); - const answer = await props.insertAIAnswer(querytext); + const answer = await props.getAIAnswer(querytext); setSkeletonVisibility(false); if (answer.error) { let error =