mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-10 21:50:14 -07:00
Lints
This commit is contained in:
Generated
+2
-2
@@ -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
@@ -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) {
|
||||
|
||||
@@ -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' };
|
||||
@@ -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 } = {
|
||||
|
||||
@@ -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
@@ -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[];
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user