feat: update providers (#881)
This commit is contained in:
parent
9058240e10
commit
7811c0f7fb
11 changed files with 122 additions and 108 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use client';
|
||||
|
||||
import type { ChatRequestOptions, CreateMessage, Message } from 'ai';
|
||||
import type { Message } from 'ai';
|
||||
import cx from 'classnames';
|
||||
import {
|
||||
AnimatePresence,
|
||||
|
|
@ -39,10 +39,7 @@ type ToolProps = {
|
|||
isToolbarVisible?: boolean;
|
||||
setIsToolbarVisible?: Dispatch<SetStateAction<boolean>>;
|
||||
isAnimating: boolean;
|
||||
append: (
|
||||
message: Message | CreateMessage,
|
||||
chatRequestOptions?: ChatRequestOptions,
|
||||
) => Promise<string | null | undefined>;
|
||||
append: UseChatHelpers['append'];
|
||||
onClick: ({
|
||||
appendMessage,
|
||||
}: {
|
||||
|
|
@ -143,10 +140,7 @@ const ReadingLevelSelector = ({
|
|||
}: {
|
||||
setSelectedTool: Dispatch<SetStateAction<string | null>>;
|
||||
isAnimating: boolean;
|
||||
append: (
|
||||
message: Message | CreateMessage,
|
||||
chatRequestOptions?: ChatRequestOptions,
|
||||
) => Promise<string | null | undefined>;
|
||||
append: UseChatHelpers['append'];
|
||||
}) => {
|
||||
const LEVELS = [
|
||||
'Elementary',
|
||||
|
|
@ -257,10 +251,7 @@ export const Tools = ({
|
|||
isToolbarVisible: boolean;
|
||||
selectedTool: string | null;
|
||||
setSelectedTool: Dispatch<SetStateAction<string | null>>;
|
||||
append: (
|
||||
message: Message | CreateMessage,
|
||||
chatRequestOptions?: ChatRequestOptions,
|
||||
) => Promise<string | null | undefined>;
|
||||
append: UseChatHelpers['append'];
|
||||
isAnimating: boolean;
|
||||
setIsToolbarVisible: Dispatch<SetStateAction<boolean>>;
|
||||
tools: Array<ArtifactToolbarItem>;
|
||||
|
|
@ -319,7 +310,7 @@ const PureToolbar = ({
|
|||
status: UseChatHelpers['status'];
|
||||
append: UseChatHelpers['append'];
|
||||
stop: UseChatHelpers['stop'];
|
||||
setMessages: Dispatch<SetStateAction<Message[]>>;
|
||||
setMessages: UseChatHelpers['setMessages'];
|
||||
artifactKind: ArtifactKind;
|
||||
}) => {
|
||||
const toolbarRef = useRef<HTMLDivElement>(null);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue