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 (
<div className="flex min-h-screen bg-zinc-50 dark:bg-black font-sans transition-all duration-300">
<aside
className={`${
sideBarOpen ? "w-64" : "w-16"
className={`${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`}
>
<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>
<nav
className={`flex flex-col p-4 gap-3 text-zinc-700 dark:text-zinc-300 transition-opacity duration-200 ${
sideBarOpen ? "opacity-100" : "opacity-0"
className={`flex flex-col p-4 gap-3 text-zinc-700 dark:text-zinc-300 transition-opacity duration-200 ${sideBarOpen ? "opacity-100" : "opacity-0"
}`}
>
<Link
+1
View File
@@ -14,6 +14,7 @@ export interface GenerateConfig{
temperature: number;
topP: number;
responseMimeType: string;
maxOutputTokens?: number;
}
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";
:root {
@@ -14,12 +11,9 @@
/* 3. Assign fonts to Tailwind's theme */
/* --font-sans is for regular text (Concert One) */
--font-sans: var(--font-concert-one);
/* We add a new font family for headers (Pixelify Sans) */
/* This also creates a 'font-header' utility class */
--font-header: var(--font-pixelify);
/* Tell Tailwind to use the variables already defined in app/layout.tsx */
--font-sans: var(--font-sans);
--font-header: var(--font-header);
--font-mono: var(--font-geist-mono);
}
@@ -40,6 +34,11 @@ body {
}
/* 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);
}
-2
View File
@@ -1,5 +1,3 @@
// app/layout.tsx
import type { Metadata } from "next";
// 1. Import your two new fonts
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';
export default function Page() {
  return (
    <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">
        <Image
          className=""
          src="/logo.svg"
          alt="logo"
          width={100}
          height={20}
          priority
        />
        <div  className="flex items-center gap-4">
          <Link href = "/auth/login" className="hover:text-blue-600 dark:hover:text-blue-400 transition-colors">
            Sign in
          </Link>
          <Link href = "/auth/logout" className="hover:text-blue-600 dark:hover:text-blue-400 transition-colors">
            Log out
          </Link>
        </div>
      </header>
return (
<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">
<Image
className=""
src="/logo.svg"
alt="logo"
width={100}
height={20}
priority
/>
<div className="flex items-center gap-4">
<Link href="/auth/login" className="hover:text-blue-600 dark:hover:text-blue-400 transition-colors">
Sign in
</Link>
<Link href="/auth/logout" className="hover:text-blue-600 dark:hover:text-blue-400 transition-colors">
Log out
</Link>
</div>
</header>
      <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-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>
<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">
            <ProtectedNavButton>Get Started</ProtectedNavButton>
          </div>
<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>
          <div className="flex-1 flex justify-center">
            <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">
              Image Placeholder
            </div>
          </div>
        </div>
<ProtectedNavButton>Get Started</ProtectedNavButton>
</div>
        <section className="mt-32 w-full flex flex-col items-start gap-12">
          <div>
            <h2 className="text-[28px] font-semibold text-black dark:text-zinc-50 leading-9">
              Guide:
            </h2>
          </div>
<div className="flex-1 flex justify-center">
<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">
Image Placeholder
</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">
                First Text Block
              </h2>
              <p className="text-lg text-zinc-600 dark:text-zinc-400">
                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>
<section className="mt-32 w-full flex flex-col items-start gap-12">
<div>
<h2 className="text-[28px] font-semibold text-black dark:text-zinc-50 leading-9">
Guide:
</h2>
</div>
            <div className="flex w-full justify-end">
              <div className="w-full max-w-xl">
                <h2 className="text-2xl font-semibold text-black dark:text-zinc-50 mb-2">
                  Second Text Block
                </h2>
                <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.
                </p>
              </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">
First Text Block
</h2>
<p className="text-lg text-zinc-600 dark:text-zinc-400">
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="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>
  );
<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="w-full max-w-xl">
<h2 className="text-2xl font-semibold text-black dark:text-zinc-50 mb-2">
Second Text Block
</h2>
<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.
</p>
</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
className={`
p-2 rounded-full transition-all
${
message.trim()
${message.trim()
? "bg-purple-600 text-white hover:bg-purple-700"
: "bg-gray-200 text-gray-400 cursor-not-allowed"
}