diff --git a/package-lock.json b/package-lock.json index 80ffd8eeb..a40d54473 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "big-agi", - "version": "0.9.1", + "version": "1.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "big-agi", - "version": "0.9.1", + "version": "1.2.0", "dependencies": { "@dqbd/tiktoken": "^1.0.7", "@emotion/cache": "^11.11.0", diff --git a/pages/_document.tsx b/pages/_document.tsx index 18b4ad737..bb35a65cb 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -11,7 +11,7 @@ import { MyAppProps } from './_app'; interface MyDocumentProps extends DocumentProps { - emotionStyleTags: JSX.Element[]; + emotionStyleTags: React.JSX.Element[]; } export default function MyDocument({ emotionStyleTags }: MyDocumentProps) { diff --git a/pages/api/openai/stream-chat.ts b/pages/api/openai/stream-chat.ts index f2963963f..bfb7b658c 100644 --- a/pages/api/openai/stream-chat.ts +++ b/pages/api/openai/stream-chat.ts @@ -129,6 +129,5 @@ export default async function handler(req: NextRequest): Promise { } } -export const config = { - runtime: 'edge', -}; \ No newline at end of file +// noinspection JSUnusedGlobalSymbols +export const config = { runtime: 'edge' }; \ No newline at end of file diff --git a/pages/api/trpc/[trpc].ts b/pages/api/trpc/[trpc].ts index bbe331222..ca9fe160d 100644 --- a/pages/api/trpc/[trpc].ts +++ b/pages/api/trpc/[trpc].ts @@ -22,6 +22,7 @@ export default createNextApiHandler({ */ // Vercel Edge API handler +// noinspection JSUnusedGlobalSymbols export const config = { runtime: 'edge' }; export default async function handler(req: NextRequest) { diff --git a/src/apps/chat/components/message/ChatMessageSelectable.tsx b/src/apps/chat/components/message/ChatMessageSelectable.tsx index 11acecac2..733c5525a 100644 --- a/src/apps/chat/components/message/ChatMessageSelectable.tsx +++ b/src/apps/chat/components/message/ChatMessageSelectable.tsx @@ -60,7 +60,7 @@ export function ChatMessageSelectable(props: { message: DMessage, isBottom: bool const background = messageBackground(theme, messageRole, !!messageUpdated, isAssistantError); - const avatarEl: JSX.Element | null = React.useMemo(() => + const avatarEl: React.JSX.Element | null = React.useMemo(() => makeAvatar(messageAvatar, messageRole, messageOriginLLM, messagePurposeId, messageSender, messageTyping, 'sm'), [messageAvatar, messageOriginLLM, messagePurposeId, messageRole, messageSender, messageTyping], ); diff --git a/src/apps/chat/components/message/OpenInCodepen.tsx b/src/apps/chat/components/message/OpenInCodepen.tsx index 224d2b53e..6f2f5676d 100644 --- a/src/apps/chat/components/message/OpenInCodepen.tsx +++ b/src/apps/chat/components/message/OpenInCodepen.tsx @@ -1,3 +1,5 @@ +import * as React from 'react'; + import { Button, Tooltip } from '@mui/joy'; interface CodeBlockProps { @@ -7,7 +9,7 @@ interface CodeBlockProps { }; } -export function OpenInCodepen({ codeBlock }: CodeBlockProps): JSX.Element { +export function OpenInCodepen({ codeBlock }: CodeBlockProps): React.JSX.Element { const { code, language } = codeBlock; const hasCSS = language === 'css'; const hasJS = ['javascript', 'json', 'typescript'].includes(language || ''); diff --git a/src/apps/chat/components/message/OpenInReplit.tsx b/src/apps/chat/components/message/OpenInReplit.tsx index 28715fd29..0573d7b31 100644 --- a/src/apps/chat/components/message/OpenInReplit.tsx +++ b/src/apps/chat/components/message/OpenInReplit.tsx @@ -1,3 +1,5 @@ +import * as React from 'react'; + import { Button, Tooltip } from '@mui/joy'; interface CodeBlockProps { @@ -7,7 +9,7 @@ interface CodeBlockProps { }; } -export function OpenInReplit({ codeBlock }: CodeBlockProps): JSX.Element { +export function OpenInReplit({ codeBlock }: CodeBlockProps): React.JSX.Element { const { language } = codeBlock; const replitLanguageMap: { [key: string]: string } = { diff --git a/src/common/components/ConfirmationModal.tsx b/src/common/components/ConfirmationModal.tsx index b3bb8d848..5befe5fc5 100644 --- a/src/common/components/ConfirmationModal.tsx +++ b/src/common/components/ConfirmationModal.tsx @@ -8,7 +8,7 @@ import WarningRoundedIcon from '@mui/icons-material/WarningRounded'; * A confirmation dialog (Joy Modal) * Pass the question and the positive answer, and get called when it's time to close the dialog, or when the positive action is taken */ -export function ConfirmationModal(props: { open: boolean, onClose: () => void, onPositive: () => void, confirmationText: string | JSX.Element, positiveActionText: string }) { +export function ConfirmationModal(props: { open: boolean, onClose: () => void, onPositive: () => void, confirmationText: string | React.JSX.Element, positiveActionText: string }) { return ( diff --git a/src/common/layouts/appbar/SupportMenuItem.tsx b/src/common/layouts/appbar/SupportMenuItem.tsx index 505b57875..4efe0a764 100644 --- a/src/common/layouts/appbar/SupportMenuItem.tsx +++ b/src/common/layouts/appbar/SupportMenuItem.tsx @@ -17,7 +17,7 @@ function DiscordIcon(props: { sx?: SxProps }) { ; } -function BringTheLove(props: { text: string, link: string, icon: JSX.Element }) { +function BringTheLove(props: { text: string, link: string, icon: React.JSX.Element }) { const [loved, setLoved] = React.useState(false); const icon = loved ? '❤️' : props.icon; // '❤️' : '🤍'; return