This commit is contained in:
Enrico Ros
2023-06-13 16:24:02 -07:00
parent 8d6e7a8cfd
commit b2faa48f52
11 changed files with 18 additions and 18 deletions
+2 -2
View File
@@ -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",
+1 -1
View File
@@ -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) {
+2 -3
View File
@@ -129,6 +129,5 @@ export default async function handler(req: NextRequest): Promise<Response> {
}
}
export const config = {
runtime: 'edge',
};
// noinspection JSUnusedGlobalSymbols
export const config = { runtime: 'edge' };
+1
View File
@@ -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) {
@@ -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],
);
@@ -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 || '');
@@ -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 } = {
+1 -1
View File
@@ -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 (
<Modal open={props.open} onClose={props.onClose}>
<ModalDialog variant='outlined' color='neutral'>
@@ -17,7 +17,7 @@ function DiscordIcon(props: { sx?: SxProps }) {
</SvgIcon>;
}
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 <Button
+3 -1
View File
@@ -1,10 +1,12 @@
import * as React from 'react';
export type SystemPurposeId = 'Catalyst' | 'Custom' | 'Designer' | 'Developer' | 'Executive' | 'Generic' | 'Scientist';
export const defaultSystemPurposeId: SystemPurposeId = 'Generic';
type SystemPurposeData = {
title: string;
description: string | JSX.Element;
description: string | React.JSX.Element;
systemMessage: string;
symbol: string;
examples?: string[];
-6
View File
@@ -3,12 +3,6 @@ export namespace Search {
/// Client (Browser) -> Server (Next.js)
export namespace API {
export interface RequestParams {
query: string;
key?: string;
cx?: string;
}
export interface BriefResult {
title: string;
link: string;