diff --git a/src/components/OutputsTable/NewScenarioButton.tsx b/src/components/OutputsTable/NewScenarioButton.tsx index ef9b1ed..3227874 100644 --- a/src/components/OutputsTable/NewScenarioButton.tsx +++ b/src/components/OutputsTable/NewScenarioButton.tsx @@ -1,5 +1,4 @@ -import { Button, type ButtonProps, Fade, HStack, Spinner, Icon } from "@chakra-ui/react"; -import { useState } from "react"; +import { Button, type ButtonProps, HStack, Spinner, Icon } from "@chakra-ui/react"; import { BsPlus } from "react-icons/bs"; import { api } from "~/utils/api"; import { useExperiment, useHandledAsyncCallback } from "~/utils/hooks"; diff --git a/src/components/PublicPlaygroundWarning.tsx b/src/components/PublicPlaygroundWarning.tsx index e01e1cc..8b4a6dd 100644 --- a/src/components/PublicPlaygroundWarning.tsx +++ b/src/components/PublicPlaygroundWarning.tsx @@ -3,7 +3,6 @@ import { BsExclamationTriangleFill } from "react-icons/bs"; import { env } from "~/env.mjs"; export default function PublicPlaygroundWarning() { - console.log(env); if (!env.NEXT_PUBLIC_IS_PUBLIC_PLAYGROUND) return null; return ( @@ -12,7 +11,7 @@ export default function PublicPlaygroundWarning() { Warning: this is a public playground. Anyone can see, edit or delete your experiments. For private use,{" "} - + run a local copy . diff --git a/src/components/nav/AppShell.tsx b/src/components/nav/AppShell.tsx index 4a47807..322fe3d 100644 --- a/src/components/nav/AppShell.tsx +++ b/src/components/nav/AppShell.tsx @@ -1,6 +1,5 @@ import { Box, - Flex, Heading, VStack, Icon, @@ -8,13 +7,16 @@ import { type BoxProps, forwardRef, Image, + Link, + Grid, + GridItem, } from "@chakra-ui/react"; import Head from "next/head"; import { api } from "~/utils/api"; -import { BsPlusSquare } from "react-icons/bs"; +import { BsGithub, BsPlusSquare, BsTwitter } from "react-icons/bs"; import { RiFlaskLine } from "react-icons/ri"; import { useRouter } from "next/router"; -import Link from "next/link"; +import NextLink from "next/link"; import { useHandledAsyncCallback } from "~/utils/hooks"; import PublicPlaygroundWarning from "../PublicPlaygroundWarning"; @@ -38,7 +40,9 @@ const ExperimentLink = forwardRef ; + +const NavSidebar = () => { const experiments = api.experiments.list.useQuery(); const router = useRouter(); const utils = api.useContext(); @@ -52,62 +56,88 @@ export default function AppShell(props: { children: React.ReactNode; title?: str }, [createMutation, router]); return ( - - - - - {props.title ? `${props.title} | Prompt Lab` : "Prompt Lab"} - - - - - - - Prompt Lab - - - - - - Experiments - - - - {experiments?.data?.map((exp) => ( - - - {exp.label} - - ))} - - - New Experiment - - - - - - {props.children} - - + + + + + Prompt Lab + + + + + + Experiments + + + + + New Experiment + + + {experiments?.data?.map((exp) => ( + + + {exp.label} + + ))} + + + + + + + + + + + + ); +}; + +export default function AppShell(props: { children: React.ReactNode; title?: string }) { + return ( + + + {props.title ? `${props.title} | Prompt Lab` : "Prompt Lab"} + + + + + + + + + {props.children} + + + ); } diff --git a/src/server/api/autogen.ts b/src/server/api/autogen.ts index ebe417c..392de4b 100644 --- a/src/server/api/autogen.ts +++ b/src/server/api/autogen.ts @@ -104,23 +104,6 @@ export const autogenerateScenarioValues = async ( return acc; }, {} as Record); - console.log({ - model: "gpt-3.5-turbo-0613", - messages, - functions: [ - { - name: "add_scenario", - parameters: { - type: "object", - properties: variableProperties, - }, - }, - ], - - function_call: { name: "add_scenario" }, - temperature: 0.5, - }); - try { const completion = await openai.createChatCompletion({ model: "gpt-3.5-turbo-0613", diff --git a/src/server/auth.ts b/src/server/auth.ts index e3f5444..4531237 100644 --- a/src/server/auth.ts +++ b/src/server/auth.ts @@ -1,12 +1,6 @@ import { PrismaAdapter } from "@next-auth/prisma-adapter"; import { type GetServerSidePropsContext } from "next"; -import { - getServerSession, - type NextAuthOptions, - type DefaultSession, -} from "next-auth"; -import DiscordProvider from "next-auth/providers/discord"; -import { env } from "~/env.mjs"; +import { getServerSession, type NextAuthOptions, type DefaultSession } from "next-auth"; import { prisma } from "~/server/db"; /** @@ -47,10 +41,10 @@ export const authOptions: NextAuthOptions = { }, adapter: PrismaAdapter(prisma), providers: [ - DiscordProvider({ - clientId: env.DISCORD_CLIENT_ID, - clientSecret: env.DISCORD_CLIENT_SECRET, - }), + // DiscordProvider({ + // clientId: env.DISCORD_CLIENT_ID, + // clientSecret: env.DISCORD_CLIENT_SECRET, + // }), /** * ...add more providers here. *