got rid of the excess whitespaces and added the maxOutputTokens into the GenerateConfig in the types.ts

This commit is contained in:
Ivan Rudik
2025-11-09 05:42:16 +00:00
parent 3686ae72da
commit 73668377bf
16 changed files with 366 additions and 371 deletions
+2 -4
View File
@@ -21,8 +21,7 @@ export default function Dashboard() {
return ( return (
<div className="flex min-h-screen bg-zinc-50 dark:bg-black font-sans transition-all duration-300"> <div className="flex min-h-screen bg-zinc-50 dark:bg-black font-sans transition-all duration-300">
<aside <aside
className={`${ className={`${sideBarOpen ? "w-64" : "w-16"
sideBarOpen ? "w-64" : "w-16"
} bg-white dark:bg-zinc-900 border-r border-zinc-200 dark:border-zinc-800 transition-all duration-300 flex flex-col`} } bg-white dark:bg-zinc-900 border-r border-zinc-200 dark:border-zinc-800 transition-all duration-300 flex flex-col`}
> >
<div className="flex items-center justify-between p-4 border-b border-zinc-200 dark:border-zinc-800"> <div className="flex items-center justify-between p-4 border-b border-zinc-200 dark:border-zinc-800">
@@ -41,8 +40,7 @@ export default function Dashboard() {
</div> </div>
<nav <nav
className={`flex flex-col p-4 gap-3 text-zinc-700 dark:text-zinc-300 transition-opacity duration-200 ${ className={`flex flex-col p-4 gap-3 text-zinc-700 dark:text-zinc-300 transition-opacity duration-200 ${sideBarOpen ? "opacity-100" : "opacity-0"
sideBarOpen ? "opacity-100" : "opacity-0"
}`} }`}
> >
<Link <Link
+1
View File
@@ -14,6 +14,7 @@ export interface GenerateConfig{
temperature: number; temperature: number;
topP: number; topP: number;
responseMimeType: string; responseMimeType: string;
maxOutputTokens?: number;
} }
export interface ChatSetting { export interface ChatSetting {
+9 -10
View File
@@ -1,6 +1,3 @@
/* 1. Import BOTH fonts in one go */
@import url('https://fonts.googleapis.com/css2?family=Concert+One&family=Pixelify+Sans:wght@400;700&display=swap');
@import "tailwindcss"; @import "tailwindcss";
:root { :root {
@@ -14,12 +11,9 @@
/* 3. Assign fonts to Tailwind's theme */ /* 3. Assign fonts to Tailwind's theme */
/* --font-sans is for regular text (Concert One) */ /* Tell Tailwind to use the variables already defined in app/layout.tsx */
--font-sans: var(--font-concert-one); --font-sans: var(--font-sans);
--font-header: var(--font-header);
/* We add a new font family for headers (Pixelify Sans) */
/* This also creates a 'font-header' utility class */
--font-header: var(--font-pixelify);
--font-mono: var(--font-geist-mono); --font-mono: var(--font-geist-mono);
} }
@@ -40,6 +34,11 @@ body {
} }
/* 5. (Optional but helpful) Apply header font to h-tags by default */ /* 5. (Optional but helpful) Apply header font to h-tags by default */
h1, h2, h3, h4, h5, h6 { h1,
h2,
h3,
h4,
h5,
h6 {
font-family: var(--font-header); font-family: var(--font-header);
} }
-2
View File
@@ -1,5 +1,3 @@
// app/layout.tsx
import type { Metadata } from "next"; import type { Metadata } from "next";
// 1. Import your two new fonts // 1. Import your two new fonts
import { Concert_One, Pixelify_Sans } from "next/font/google"; import { Concert_One, Pixelify_Sans } from "next/font/google";
+110 -110
View File
@@ -7,121 +7,121 @@ import ProtectedNavButton from "../components/ProtectedNavButton";
import Link from 'next/link'; import Link from 'next/link';
export default function Page() { export default function Page() {
  return ( return (
    <div className="flex min-h-screen items-center justify-center bg-zinc-50 font-sans dark:bg-black"> <div className="flex min-h-screen items-center justify-center bg-zinc-50 font-sans dark:bg-black">
      <header className="absolute top-6 left-8 right-8 flex items-center justify-between text-sm font-medium text-zinc-700 dark:text-zinc-300"> <header className="absolute top-6 left-8 right-8 flex items-center justify-between text-sm font-medium text-zinc-700 dark:text-zinc-300">
        <Image <Image
          className="" className=""
          src="/logo.svg" src="/logo.svg"
          alt="logo" alt="logo"
          width={100} width={100}
          height={20} height={20}
          priority priority
        /> />
        <div  className="flex items-center gap-4"> <div className="flex items-center gap-4">
          <Link href = "/auth/login" className="hover:text-blue-600 dark:hover:text-blue-400 transition-colors"> <Link href="/auth/login" className="hover:text-blue-600 dark:hover:text-blue-400 transition-colors">
            Sign in Sign in
          </Link> </Link>
          <Link href = "/auth/logout" className="hover:text-blue-600 dark:hover:text-blue-400 transition-colors"> <Link href="/auth/logout" className="hover:text-blue-600 dark:hover:text-blue-400 transition-colors">
            Log out Log out
          </Link> </Link>
        </div> </div>
      </header> </header>
      <main className="flex min-h-screen w-full flex-col justify-between py-32 px-16 bg-white dark:bg-black"> <main className="flex min-h-screen w-full flex-col justify-between py-32 px-16 bg-white dark:bg-black">
        <div className="flex flex-col sm:flex-row items-start justify-between gap-12 text-left w-full"> <div className="flex flex-col sm:flex-row items-start justify-between gap-12 text-left w-full">
          
          <div className="flex-1 flex flex-col gap-5 justify-center">
            <h1 className="max-w-xs text-3xl font-semibold leading-10 tracking-tight text-black dark:text-zinc-50">
              (project name)
            </h1>
            <p className="max-w-md text-lg leading-8 text-zinc-600 dark:text-zinc-400">
              Looking for a starting point or more instructions? Head over to{" "}
              <Link
                href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
                className="font-medium text-zinc-950 dark:text-zinc-50"
              >
                Templates
              </Link>{" "}
              or the{" "}
              <Link
                href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
                className="font-medium text-zinc-950 dark:text-zinc-50"
              >
                Learning
              </Link>{" "}
              center.
            </p>
            <ProtectedNavButton>Get Started</ProtectedNavButton> <div className="flex-1 flex flex-col gap-5 justify-center">
          </div> <h1 className="max-w-xs text-3xl font-semibold leading-10 tracking-tight text-black dark:text-zinc-50">
(project name)
</h1>
<p className="max-w-md text-lg leading-8 text-zinc-600 dark:text-zinc-400">
Looking for a starting point or more instructions? Head over to{" "}
<Link
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
className="font-medium text-zinc-950 dark:text-zinc-50"
>
Templates
</Link>{" "}
or the{" "}
<Link
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
className="font-medium text-zinc-950 dark:text-zinc-50"
>
Learning
</Link>{" "}
center.
</p>
          <div className="flex-1 flex justify-center"> <ProtectedNavButton>Get Started</ProtectedNavButton>
            <div className="w-full max-w-[400px] h-[300px] bg-zinc-200 dark:bg-zinc-800 rounded-xl shadow-md flex items-center justify-center text-zinc-500"> </div>
              Image Placeholder
            </div>
          </div>
        </div>
        <section className="mt-32 w-full flex flex-col items-start gap-12"> <div className="flex-1 flex justify-center">
          <div> <div className="w-full max-w-[400px] h-[300px] bg-zinc-200 dark:bg-zinc-800 rounded-xl shadow-md flex items-center justify-center text-zinc-500">
            <h2 className="text-[28px] font-semibold text-black dark:text-zinc-50 leading-9"> Image Placeholder
              Guide: </div>
            </h2> </div>
          </div> </div>
          <div className="flex flex-col sm:flex-row items-start justify-between gap-8 w-full"> <section className="mt-32 w-full flex flex-col items-start gap-12">
            <div className="w-full max-w-xl"> <div>
              <h2 className="text-2xl font-semibold text-black dark:text-zinc-50 mb-2"> <h2 className="text-[28px] font-semibold text-black dark:text-zinc-50 leading-9">
                First Text Block Guide:
              </h2> </h2>
              <p className="text-lg text-zinc-600 dark:text-zinc-400"> </div>
                This is the content for the first text block. You can write anything here.
              </p>
            </div>
            <div className="sm:w-1/2 flex justify-center items-center">
              <div className="w-full max-w-[300px] h-[200px] bg-zinc-200 dark:bg-zinc-800 rounded-xl shadow-md flex items-center justify-center text-zinc-500">
                Image Placeholder
              </div>
            </div>
          </div>
          
          <div className="flex flex-col sm:flex-row items-start justify-between gap-8 w-full">
            <div className="sm:w-1/2 flex justify-center items-center">
              <div className="w-full max-w-[300px] h-[200px] bg-zinc-200 dark:bg-zinc-800 rounded-xl shadow-md flex items-center justify-center text-zinc-500">
                Image Placeholder
              </div>
            </div>
            <div className="flex w-full justify-end"> <div className="flex flex-col sm:flex-row items-start justify-between gap-8 w-full">
              <div className="w-full max-w-xl"> <div className="w-full max-w-xl">
                <h2 className="text-2xl font-semibold text-black dark:text-zinc-50 mb-2"> <h2 className="text-2xl font-semibold text-black dark:text-zinc-50 mb-2">
                  Second Text Block First Text Block
                </h2> </h2>
                <p className="text-lg text-zinc-600 dark:text-zinc-400"> <p className="text-lg text-zinc-600 dark:text-zinc-400">
                  This is the content for the second text block. You can write anything here. This is the content for the first text block. You can write anything here.
                </p> </p>
              </div> </div>
            </div> <div className="sm:w-1/2 flex justify-center items-center">
          </div> <div className="w-full max-w-[300px] h-[200px] bg-zinc-200 dark:bg-zinc-800 rounded-xl shadow-md flex items-center justify-center text-zinc-500">
Image Placeholder
</div>
</div>
</div>
          <div className="flex flex-col sm:flex-row items-start justify-between gap-8 w-full"> <div className="flex flex-col sm:flex-row items-start justify-between gap-8 w-full">
            <div className="w-full max-w-xl"> <div className="sm:w-1/2 flex justify-center items-center">
              <h2 className="text-2xl font-semibold text-black dark:text-zinc-50 mb-2"> <div className="w-full max-w-[300px] h-[200px] bg-zinc-200 dark:bg-zinc-800 rounded-xl shadow-md flex items-center justify-center text-zinc-500">
                Third Text Block Image Placeholder
              </h2> </div>
              <p className="text-lg text-zinc-600 dark:text-zinc-400"> </div>
                This is the content for the third text block. You can write anything here.
              </p> <div className="flex w-full justify-end">
            </div> <div className="w-full max-w-xl">
            <div className="sm:w-1/2 flex justify-center items-center"> <h2 className="text-2xl font-semibold text-black dark:text-zinc-50 mb-2">
              <div className="w-full max-w-[300px] h-[200px] bg-zinc-200 dark:bg-zinc-800 rounded-xl shadow-md flex items-center justify-center text-zinc-500"> Second Text Block
                  Image Placeholder </h2>
              </div> <p className="text-lg text-zinc-600 dark:text-zinc-400">
            </div> This is the content for the second text block. You can write anything here.
          </div> </p>
        </section> </div>
      </main> </div>
    </div> </div>
  );
<div className="flex flex-col sm:flex-row items-start justify-between gap-8 w-full">
<div className="w-full max-w-xl">
<h2 className="text-2xl font-semibold text-black dark:text-zinc-50 mb-2">
Third Text Block
</h2>
<p className="text-lg text-zinc-600 dark:text-zinc-400">
This is the content for the third text block. You can write anything here.
</p>
</div>
<div className="sm:w-1/2 flex justify-center items-center">
<div className="w-full max-w-[300px] h-[200px] bg-zinc-200 dark:bg-zinc-800 rounded-xl shadow-md flex items-center justify-center text-zinc-500">
Image Placeholder
</div>
</div>
</div>
</section>
</main>
</div>
);
} }
+1 -2
View File
@@ -77,8 +77,7 @@ export default function ChatInput({ onSend, onOpenSettings }: ChatInputProps) {
<button <button
className={` className={`
p-2 rounded-full transition-all p-2 rounded-full transition-all
${ ${message.trim()
message.trim()
? "bg-purple-600 text-white hover:bg-purple-700" ? "bg-purple-600 text-white hover:bg-purple-700"
: "bg-gray-200 text-gray-400 cursor-not-allowed" : "bg-gray-200 text-gray-400 cursor-not-allowed"
} }