Skip to content

Commit

Permalink
Update chat.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
KSnow616 authored Feb 28, 2024
1 parent e705135 commit 9775660
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1102,9 +1102,9 @@ function _Chat() {
}, []);

const handlePaste = useCallback(
const currentModel = chatStore.currentSession().mask.modelConfig.model;
if(!isVisionModel(currentModel)){return;}
async (event: React.ClipboardEvent<HTMLTextAreaElement>) => {
const currentModel = chatStore.currentSession().mask.modelConfig.model;
if(!isVisionModel(currentModel)){return;}
const items = (event.clipboardData || window.clipboardData).items;
for (const item of items) {
if (item.kind === "file" && item.type.startsWith("image/")) {
Expand Down

0 comments on commit 9775660

Please sign in to comment.