Switch to vercel's biome setup (#543)

This commit is contained in:
Jared Palmer 2024-11-15 13:00:15 -05:00 committed by GitHub
parent b8643353c0
commit 43aa1c6e58
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
52 changed files with 414 additions and 201 deletions

View file

@ -80,13 +80,13 @@ export function Block({
votes: Array<Vote> | undefined;
append: (
message: Message | CreateMessage,
chatRequestOptions?: ChatRequestOptions
chatRequestOptions?: ChatRequestOptions,
) => Promise<string | null | undefined>;
handleSubmit: (
event?: {
preventDefault?: () => void;
},
chatRequestOptions?: ChatRequestOptions
chatRequestOptions?: ChatRequestOptions,
) => void;
}) {
const [messagesContainerRef, messagesEndRef] =
@ -100,7 +100,7 @@ export function Block({
block && block.status !== 'streaming'
? `/api/document?id=${block.documentId}`
: null,
fetcher
fetcher,
);
const { data: suggestions } = useSWR<Array<Suggestion>>(
@ -110,7 +110,7 @@ export function Block({
fetcher,
{
dedupingInterval: 5000,
}
},
);
const [mode, setMode] = useState<'edit' | 'diff'>('edit');
@ -176,15 +176,15 @@ export function Block({
}
return currentDocuments;
},
{ revalidate: false }
{ revalidate: false },
);
},
[block, mutate]
[block, mutate],
);
const debouncedHandleContentChange = useDebounceCallback(
handleContentChange,
2000
2000,
);
const saveContent = useCallback(
@ -199,7 +199,7 @@ export function Block({
}
}
},
[document, debouncedHandleContentChange, handleContentChange]
[document, debouncedHandleContentChange, handleContentChange],
);
function getDocumentContentById(index: number) {
@ -430,7 +430,7 @@ export function Block({
new Date(),
{
addSuffix: true,
}
},
)}`}
</div>
) : (
@ -496,7 +496,7 @@ export function Block({
'p-2 h-fit !pointer-events-auto dark:hover:bg-zinc-700',
{
'bg-muted': mode === 'diff',
}
},
)}
onClick={() => {
handleVersionChange('toggle');