diff --git a/web/src/components/AskAIDialog.tsx b/web/src/components/AskAIDialog.tsx index d0b9a99b..084dd616 100644 --- a/web/src/components/AskAIDialog.tsx +++ b/web/src/components/AskAIDialog.tsx @@ -1,5 +1,4 @@ import { Button, Textarea } from "@mui/joy"; -import { reverse } from "lodash-es"; import { useEffect, useState } from "react"; import * as api from "../helpers/api"; import useLoading from "../hooks/useLoading"; @@ -60,11 +59,11 @@ const AskAIDialog: React.FC = (props: Props) => { data: { data: answer }, } = await api.postChatCompletion(question); setHistoryList([ - ...historyList, { question, answer: answer.replace(/^\n\n/, ""), }, + ...historyList, ]); }; @@ -86,7 +85,7 @@ const AskAIDialog: React.FC = (props: Props) => {

)} - {reverse(historyList).map((history, index) => ( + {historyList.map((history, index) => (
{history.question}