Skip to content

Commit

Permalink
fix upload image error
Browse files Browse the repository at this point in the history
  • Loading branch information
greywen committed Dec 6, 2024
1 parent 6c0a281 commit 16a4224
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/FE/components/Chat/ChatInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,10 @@ import {
IconLoader,
IconPaperclip,
IconSend,
IconSquarePlus,
IconStopFilled,
IconTrash,
} from '@/components/Icons/index';
import PasteUpload from '@/components/PasteUpload/PasteUpload';

import Spinner from '../Spinner';
import { Button } from '../ui/button';
import { PromptList } from './PromptList';
import { VariableModal } from './VariableModal';
Expand Down Expand Up @@ -283,10 +280,12 @@ export const ChatInput = ({
<button
onClick={() => {
setContent((pre) => {
const image = pre.fileIds?.filter((x) => x !== img);
const fileIds = pre.fileIds?.filter(
(x) => x !== img,
);
return {
text: pre.text,
image,
fileIds,
};
});
}}
Expand Down

0 comments on commit 16a4224

Please sign in to comment.