diff --git a/website/next.config.js b/website/next.config.js index d04423f6..c1c1519d 100644 --- a/website/next.config.js +++ b/website/next.config.js @@ -4,6 +4,6 @@ const nextConfig = { experimental: { scrollRestoration: true, }, -} +}; -module.exports = nextConfig +module.exports = nextConfig; diff --git a/website/postcss.config.js b/website/postcss.config.js index 33ad091d..12a703d9 100644 --- a/website/postcss.config.js +++ b/website/postcss.config.js @@ -3,4 +3,4 @@ module.exports = { tailwindcss: {}, autoprefixer: {}, }, -} +}; diff --git a/website/public/images/logos/CHAT-THOUGHT-CONVO.svg b/website/public/images/logos/CHAT-THOUGHT-CONVO.svg index 758899d8..3c14ab57 100644 --- a/website/public/images/logos/CHAT-THOUGHT-CONVO.svg +++ b/website/public/images/logos/CHAT-THOUGHT-CONVO.svg @@ -45,4 +45,4 @@ - \ No newline at end of file + diff --git a/website/public/images/logos/CHAT-THOUGHT-LOGO.svg b/website/public/images/logos/CHAT-THOUGHT-LOGO.svg index dc0b32df..7657e0a4 100644 --- a/website/public/images/logos/CHAT-THOUGHT-LOGO.svg +++ b/website/public/images/logos/CHAT-THOUGHT-LOGO.svg @@ -10,4 +10,4 @@ - \ No newline at end of file + diff --git a/website/src/.prettierignore b/website/src/.prettierignore index 8b137891..e69de29b 100644 --- a/website/src/.prettierignore +++ b/website/src/.prettierignore @@ -1 +0,0 @@ - diff --git a/website/src/.prettierrc.json b/website/src/.prettierrc.json index 0967ef42..3665c446 100644 --- a/website/src/.prettierrc.json +++ b/website/src/.prettierrc.json @@ -1 +1,12 @@ -{} +{ + "tabWidth": 2, + "printWidth": 120, + "overrides": [ + { + "files": "*.css", + "options": { + "tabWidth": 4 + } + } + ] +} diff --git a/website/src/components/AuthLayout.tsx b/website/src/components/AuthLayout.tsx index 7b4e2e4d..428ce6ea 100644 --- a/website/src/components/AuthLayout.tsx +++ b/website/src/components/AuthLayout.tsx @@ -2,13 +2,7 @@ import Link from "next/link"; function BackgroundIllustration(props) { return ( - + @@ -30,12 +24,8 @@ export function AuthLayout({ title, subtitle, children }) { height="1090" className="absolute -top-7 left-1/2 -z-10 h-[788px] -translate-x-1/2 stroke-gray-300/30 [mask-image:linear-gradient(to_bottom,white_20%,transparent_75%)] sm:-top-9 sm:h-auto" /> - - {title} - - {subtitle && ( - {subtitle} - )} + {title} + {subtitle && {subtitle}} {children} diff --git a/website/src/components/CallToAction.tsx b/website/src/components/CallToAction.tsx index e0867bd2..61f11540 100644 --- a/website/src/components/CallToAction.tsx +++ b/website/src/components/CallToAction.tsx @@ -3,23 +3,17 @@ import { Container } from "./Container"; export function CallToAction() { return ( - + - - Join Us - + Join Us - All open source projects begin with people like you. Open source is - the belief that if we collaborate we can together gift our - knoweledge and technology to the world for the benefit of humanity. - Are you in? Find us here: + All open source projects begin with people like you. Open source is the belief that if we collaborate we can + together gift our knoweledge and technology to the world for the benefit of humanity. Are you in? Find us + here: @@ -27,11 +21,7 @@ export function CallToAction() { type="button" className="mb-2 ml-6 flex items-center rounded-md border border-transparent bg-blue-600 px-6 py-3 text-base font-medium text-white shadow-sm hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2" > - + - + + - + @@ -35,11 +16,7 @@ export function CircleBackground({ d="M1 279C1 125.465 125.465 1 279 1s278 124.465 278 278-124.465 278-278 278S1 432.535 1 279Z" stroke={color} /> - + ); } diff --git a/website/src/components/Container.tsx b/website/src/components/Container.tsx index ab67fb41..f65ed282 100644 --- a/website/src/components/Container.tsx +++ b/website/src/components/Container.tsx @@ -1,10 +1,5 @@ import clsx from "clsx"; export function Container({ className, ...props }) { - return ( - - ); + return ; } diff --git a/website/src/components/Faq.tsx b/website/src/components/Faq.tsx index 1ffb8f7d..d7c2eae9 100644 --- a/website/src/components/Faq.tsx +++ b/website/src/components/Faq.tsx @@ -28,17 +28,10 @@ const faqs = [ export function Faq() { return ( - + - + Frequently Asked Questions {/* @@ -61,9 +54,7 @@ export function Faq() { {column.map((faq, faqIndex) => ( - - {faq.question} - + {faq.question} {faq.answer} ))} diff --git a/website/src/components/Fields.tsx b/website/src/components/Fields.tsx index 7b64adf9..2233318e 100644 --- a/website/src/components/Fields.tsx +++ b/website/src/components/Fields.tsx @@ -5,10 +5,7 @@ const formClasses = function Label({ id, children }) { return ( - + {children} ); diff --git a/website/src/components/Header.tsx b/website/src/components/Header.tsx index b4facdf4..d22373b4 100644 --- a/website/src/components/Header.tsx +++ b/website/src/components/Header.tsx @@ -9,12 +9,7 @@ import { NavLinks } from "./NavLinks"; function MenuIcon(props) { return ( - + ); } @@ -22,12 +17,7 @@ function MenuIcon(props) { function ChevronUpIcon(props) { return ( - + ); } @@ -73,13 +63,7 @@ export function Header() { className="relative z-10 -m-2 inline-flex items-center rounded-lg stroke-gray-900 p-2 hover:bg-gray-200/50 hover:stroke-gray-600 active:stroke-gray-900 [&:not(:focus-visible)]:focus:outline-none" aria-label="Toggle site navigation" > - {({ open }) => - open ? ( - - ) : ( - - ) - } + {({ open }) => (open ? : )} {open && ( @@ -105,9 +89,7 @@ export function Header() { className="absolute inset-x-0 top-0 z-0 origin-top rounded-b-2xl bg-gray-50 px-6 pb-6 pt-32 shadow-2xl shadow-gray-900/20" > - - Join Us - + Join Us FAQs diff --git a/website/src/components/Hero.tsx b/website/src/components/Hero.tsx index a3ed5135..574fb94a 100644 --- a/website/src/components/Hero.tsx +++ b/website/src/components/Hero.tsx @@ -19,20 +19,9 @@ function BackgroundIllustration(props) { stroke="#D4D4D4" strokeOpacity="0.7" /> - + - + @@ -49,20 +38,9 @@ function BackgroundIllustration(props) { stroke="#D4D4D4" strokeOpacity="0.7" /> - + - + @@ -78,19 +56,14 @@ export function Hero() { - - Open Assistant - + Open Assistant Conversational AI for everyone. + We believe we can create a revolution. - We believe we can create a revolution. - - - In the same way that Stable Diffusion helped the world make art - and images in new ways, we want to improve the world by providing - amazing conversational AI. + In the same way that Stable Diffusion helped the world make art and images in new ways, we want to improve + the world by providing amazing conversational AI. diff --git a/website/src/pages/_app.tsx b/website/src/pages/_app.tsx index 9d8f8b6d..cf9cfe34 100644 --- a/website/src/pages/_app.tsx +++ b/website/src/pages/_app.tsx @@ -14,10 +14,7 @@ function MyApp({ Component, pageProps }) { use(); }, []); return ( - + ); diff --git a/website/src/pages/_document.tsx b/website/src/pages/_document.tsx index e1fd448c..ee9ff0c3 100644 --- a/website/src/pages/_document.tsx +++ b/website/src/pages/_document.tsx @@ -4,11 +4,7 @@ export default function Document() { return ( - + diff --git a/website/src/pages/grading/grade-output.tsx b/website/src/pages/grading/grade-output.tsx index a88528a0..25e5543a 100644 --- a/website/src/pages/grading/grade-output.tsx +++ b/website/src/pages/grading/grade-output.tsx @@ -11,9 +11,7 @@ export default function OutputDetail(): JSX.Element { Instruction - - {SAMPLE_PROMPT} - + {SAMPLE_PROMPT} @@ -21,18 +19,12 @@ export default function OutputDetail(): JSX.Element { Output - - {SAMPLE_OUTPUT} - + {SAMPLE_OUTPUT} {/* Form wrap*/} - - Rating - - - (1 = worst, 7 = best) - + Rating + (1 = worst, 7 = best) {/* Rating buttons */} @@ -85,12 +77,7 @@ export default function OutputDetail(): JSX.Element { {ANNOTATION_FLAGS.map((option, i) => { - return ( - - ); + return ; })} @@ -150,10 +137,7 @@ function AnnotationCheckboxLi(props: { option: annotationBool }): JSX.Element { if (props.option.additionalExplanation) { AdditionalExplanation = ( - + ); } @@ -167,13 +151,8 @@ function AnnotationCheckboxLi(props: { option: annotationBool }): JSX.Element { value="" id={props.option.attributeName} /> - - - {props.option.labelText} - + + {props.option.labelText} {AdditionalExplanation} @@ -210,8 +189,7 @@ const ANNOTATION_FLAGS: annotationBool[] = [ }, { attributeName: "encourages_violence", - labelText: - "Encourages or fails to discourage violence/abuse/terrorism/self-harm", + labelText: "Encourages or fails to discourage violence/abuse/terrorism/self-harm", }, { attributeName: "denigrates_a_protected_class", @@ -229,8 +207,7 @@ const ANNOTATION_FLAGS: annotationBool[] = [ }, ]; -const SAMPLE_PROMPT = - "Please make a list of aspects of a good pull request. Briefly describe each aspect."; +const SAMPLE_PROMPT = "Please make a list of aspects of a good pull request. Briefly describe each aspect."; const SAMPLE_OUTPUT = `Here are some aspects of a good pull request, which you may use to help your pull requests be good contributions and get accepted: diff --git a/website/src/pages/login.jsx b/website/src/pages/login.jsx index c3e840fd..a0fef60b 100644 --- a/website/src/pages/login.jsx +++ b/website/src/pages/login.jsx @@ -14,14 +14,7 @@ export default function Login() { >}> - + { - const newTask = await data.json(); - // This is the more efficient way to update a react state array. - setTasks((oldTasks) => [...oldTasks, newTask]); - }, - } - ); + const { trigger, isMutating } = useSWRMutation("/api/update_task", sendRequest, { + onSuccess: async (data) => { + const newTask = await data.json(); + // This is the more efficient way to update a react state array. + setTasks((oldTasks) => [...oldTasks, newTask]); + }, + }); // Trigger a mutation that updates the current task. We should probably // signal somewhere that this interaction is being processed. diff --git a/website/src/styles/globals.css b/website/src/styles/globals.css index 4b708c87..f3d01a75 100644 --- a/website/src/styles/globals.css +++ b/website/src/styles/globals.css @@ -29,20 +29,20 @@ a { } } */ @font-face { - font-family: "Inter"; - font-weight: 100 900; - font-display: block; - font-style: normal; - font-named-instance: "Regular"; - src: url("/fonts/Inter-roman.var.woff2") format("woff2"); + font-family: "Inter"; + font-weight: 100 900; + font-display: block; + font-style: normal; + font-named-instance: "Regular"; + src: url("/fonts/Inter-roman.var.woff2") format("woff2"); } @font-face { - font-family: "Inter"; - font-weight: 100 900; - font-display: block; - font-style: italic; - font-named-instance: "Italic"; - src: url("/fonts/Inter-italic.var.woff2") format("woff2"); + font-family: "Inter"; + font-weight: 100 900; + font-display: block; + font-style: italic; + font-named-instance: "Italic"; + src: url("/fonts/Inter-italic.var.woff2") format("woff2"); } @tailwind base; @@ -50,5 +50,5 @@ a { @tailwind utilities; #__next { - min-height: 100%; + min-height: 100%; } diff --git a/website/tailwind.config.js b/website/tailwind.config.js index 268c7934..e6622da1 100644 --- a/website/tailwind.config.js +++ b/website/tailwind.config.js @@ -1,77 +1,77 @@ -const defaultTheme = require('tailwindcss/defaultTheme') +const defaultTheme = require("tailwindcss/defaultTheme"); /** @type {import('tailwindcss').Config} */ module.exports = { content: [ - './src/**/*.{html,js,ts,jsx,tsx,svg}', - './node_modules/tw-elements/dist/js/**/*.js'], - theme: { - fontSize: { - xs: ['0.75rem', { lineHeight: '1rem' }], - sm: ['0.875rem', { lineHeight: '1.5rem' }], - base: ['1rem', { lineHeight: '1.5rem' }], - lg: ['1.125rem', { lineHeight: '2rem' }], - xl: ['1.25rem', { lineHeight: '1.75rem' }], - '2xl': ['1.5rem', { lineHeight: '2rem' }], - '3xl': ['2rem', { lineHeight: '3rem' }], - '4xl': ['2.5rem', { lineHeight: '3rem' }], - '5xl': ['3rem', { lineHeight: '1' }], - '6xl': ['3.75rem', { lineHeight: '1' }], - '7xl': ['4.5rem', { lineHeight: '1' }], - '8xl': ['6rem', { lineHeight: '1' }], - '9xl': ['8rem', { lineHeight: '1' }], + "./src/**/*.{html,js,ts,jsx,tsx,svg}", + "./node_modules/tw-elements/dist/js/**/*.js", + ], + theme: { + fontSize: { + xs: ["0.75rem", { lineHeight: "1rem" }], + sm: ["0.875rem", { lineHeight: "1.5rem" }], + base: ["1rem", { lineHeight: "1.5rem" }], + lg: ["1.125rem", { lineHeight: "2rem" }], + xl: ["1.25rem", { lineHeight: "1.75rem" }], + "2xl": ["1.5rem", { lineHeight: "2rem" }], + "3xl": ["2rem", { lineHeight: "3rem" }], + "4xl": ["2.5rem", { lineHeight: "3rem" }], + "5xl": ["3rem", { lineHeight: "1" }], + "6xl": ["3.75rem", { lineHeight: "1" }], + "7xl": ["4.5rem", { lineHeight: "1" }], + "8xl": ["6rem", { lineHeight: "1" }], + "9xl": ["8rem", { lineHeight: "1" }], + }, + extend: { + screens: { + "lt-lg": { max: "1023px" }, + "lt-md": { max: "767px" }, + "gt-sm": { min: "641px" }, + "gt-md": { min: "768px" }, }, - extend: { - screens: { - 'lt-lg': { max: '1023px' }, - 'lt-md': { max: '767px' }, - 'gt-sm': { min: '641px' }, - 'gt-md': { min: '768px' }, - }, - animation: { - 'fade-in': 'fade-in 0.5s linear forwards', - marquee: 'marquee var(--marquee-duration) linear infinite', - 'spin-slow': 'spin 4s linear infinite', - 'spin-slower': 'spin 6s linear infinite', - 'spin-reverse': 'spin-reverse 1s linear infinite', - 'spin-reverse-slow': 'spin-reverse 4s linear infinite', - 'spin-reverse-slower': 'spin-reverse 6s linear infinite', - }, - borderRadius: { - '4xl': '2rem', - '5xl': '2.5rem', - }, - colors: ({ colors }) => ({ - gray: colors.neutral, - }), - fontFamily: { - sans: ['Inter', ...defaultTheme.fontFamily.sans], - }, - keyframes: { - 'fade-in': { - from: { - opacity: 0, - }, - to: { - opacity: 1, - }, + animation: { + "fade-in": "fade-in 0.5s linear forwards", + marquee: "marquee var(--marquee-duration) linear infinite", + "spin-slow": "spin 4s linear infinite", + "spin-slower": "spin 6s linear infinite", + "spin-reverse": "spin-reverse 1s linear infinite", + "spin-reverse-slow": "spin-reverse 4s linear infinite", + "spin-reverse-slower": "spin-reverse 6s linear infinite", + }, + borderRadius: { + "4xl": "2rem", + "5xl": "2.5rem", + }, + colors: ({ colors }) => ({ + gray: colors.neutral, + }), + fontFamily: { + sans: ["Inter", ...defaultTheme.fontFamily.sans], + }, + keyframes: { + "fade-in": { + from: { + opacity: 0, }, - marquee: { - '100%': { - transform: 'translateY(-50%)', - }, - }, - 'spin-reverse': { - to: { - transform: 'rotate(-360deg)', - }, + to: { + opacity: 1, }, }, - maxWidth: { - '2xl': '40rem', + marquee: { + "100%": { + transform: "translateY(-50%)", + }, }, + "spin-reverse": { + to: { + transform: "rotate(-360deg)", + }, + }, + }, + maxWidth: { + "2xl": "40rem", }, }, - plugins: [require('@tailwindcss/forms')], - } - \ No newline at end of file + }, + plugins: [require("@tailwindcss/forms")], +}; diff --git a/website/tsconfig.json b/website/tsconfig.json index 6db37c02..1563f3e8 100644 --- a/website/tsconfig.json +++ b/website/tsconfig.json @@ -1,11 +1,7 @@ { "compilerOptions": { "target": "es5", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": false, @@ -19,12 +15,6 @@ "isolatedModules": true, "jsx": "preserve" }, - "include": [ - "next-env.d.ts", - "**/*.ts", - "**/*.tsx" - ], - "exclude": [ - "node_modules" - ] + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], + "exclude": ["node_modules"] }
{subtitle}
- All open source projects begin with people like you. Open source is - the belief that if we collaborate we can together gift our - knoweledge and technology to the world for the benefit of humanity. - Are you in? Find us here: + All open source projects begin with people like you. Open source is the belief that if we collaborate we can + together gift our knoweledge and technology to the world for the benefit of humanity. Are you in? Find us + here:
@@ -61,9 +54,7 @@ export function Faq() {
{faq.answer}
Conversational AI for everyone.
We believe we can create a revolution.
- We believe we can create a revolution. -
- In the same way that Stable Diffusion helped the world make art - and images in new ways, we want to improve the world by providing - amazing conversational AI. + In the same way that Stable Diffusion helped the world make art and images in new ways, we want to improve + the world by providing amazing conversational AI.
- (1 = worst, 7 = best) -
(1 = worst, 7 = best)