Skip to content

Commit

Permalink
[Obs AI Assistant] Update variable (#206673)
Browse files Browse the repository at this point in the history
  • Loading branch information
viduni94 committed Jan 16, 2025
1 parent 3f2b042 commit 7303a9b
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -404,15 +404,11 @@ export function Insight({
</>
);
} else if (isEditingPrompt) {
const instructionToEdit = getPromptToEdit();
const promptToEdit = getPromptToEdit();

if (messages.status === FETCH_STATUS.SUCCESS && instructionToEdit) {
if (messages.status === FETCH_STATUS.SUCCESS && promptToEdit) {
children = (
<PromptEdit
initialPrompt={instructionToEdit}
onSend={onEditPrompt}
onCancel={handleCancel}
/>
<PromptEdit initialPrompt={promptToEdit} onSend={onEditPrompt} onCancel={handleCancel} />
);
} else {
children = <EuiLoadingSpinner size="m" />;
Expand Down

0 comments on commit 7303a9b

Please sign in to comment.