Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
aeltorio committed Oct 18, 2024
1 parent ebc3555 commit f99877b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/aipane/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ const App: React.FC<AppProps> = (props: AppProps): React.JSX.Element => {
<HeroProviders onChange={handleProviderChange} />
<HeroModels onChange={handleModelChange} provider={provider} />
<HeroComboPrompts onChange={handlePromptChange} />
<TextInsertion insertAIAnswer={handlePromptSubmit} basePrompt={""} />
<TextInsertion getAIAnswer={handlePromptSubmit} basePrompt={""} />
</>
)}
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/aipane/components/TextInsertion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface TextInsertionProps {
* @param {string} text - The text to be processed by the AI.
* @returns {Promise<AIAnswer>} - The AI-generated answer.
*/
insertAIAnswer: (text: string) => Promise<AIAnswer>;
getAIAnswer: (text: string) => Promise<AIAnswer>;

/**
* Optional base prompt text.
Expand Down Expand Up @@ -97,7 +97,7 @@ const TextInsertion: React.FC<TextInsertionProps> = (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 =
Expand Down

0 comments on commit f99877b

Please sign in to comment.