Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update #656

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .env.example

This file was deleted.

30 changes: 15 additions & 15 deletions components/chat-header.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
'use client';
"use client";

import Link from 'next/link';
import { useRouter } from 'next/navigation';
import { useWindowSize } from 'usehooks-ts';
import Link from "next/link";
import { useRouter } from "next/navigation";
import { useWindowSize } from "usehooks-ts";

import { ModelSelector } from '@/components/model-selector';
import { SidebarToggle } from '@/components/sidebar-toggle';
import { Button } from '@/components/ui/button';
import { PlusIcon, VercelIcon } from './icons';
import { useSidebar } from './ui/sidebar';
import { memo } from 'react';
import { Tooltip, TooltipContent, TooltipTrigger } from './ui/tooltip';
import { VisibilityType, VisibilitySelector } from './visibility-selector';
import { ModelSelector } from "@/components/model-selector";
import { SidebarToggle } from "@/components/sidebar-toggle";
import { Button } from "@/components/ui/button";
import { PlusIcon, VercelIcon } from "./icons";
import { useSidebar } from "./ui/sidebar";
import { memo } from "react";
import { Tooltip, TooltipContent, TooltipTrigger } from "./ui/tooltip";
import { VisibilityType, VisibilitySelector } from "./visibility-selector";

function PureChatHeader({
chatId,
Expand Down Expand Up @@ -40,7 +40,7 @@ function PureChatHeader({
variant="outline"
className="order-2 md:order-1 md:px-2 px-2 md:h-fit ml-auto md:ml-0"
onClick={() => {
router.push('/');
router.push("/");
router.refresh();
}}
>
Expand All @@ -67,7 +67,7 @@ function PureChatHeader({
/>
)}

<Button
{/* <Button
className="bg-zinc-900 dark:bg-zinc-100 hover:bg-zinc-800 dark:hover:bg-zinc-200 text-zinc-50 dark:text-zinc-900 hidden md:flex py-1.5 px-2 h-fit md:h-[34px] order-4 md:ml-auto"
asChild
>
Expand All @@ -78,7 +78,7 @@ function PureChatHeader({
<VercelIcon size={16} />
Deploy with Vercel
</Link>
</Button>
</Button> */}
</header>
);
}
Expand Down
33 changes: 3 additions & 30 deletions components/overview.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { motion } from 'framer-motion';
import Link from 'next/link';
import { motion } from "framer-motion";
import Link from "next/link";

import { MessageIcon, VercelIcon } from './icons';
import { MessageIcon, VercelIcon } from "./icons";

export const Overview = () => {
return (
Expand All @@ -19,33 +19,6 @@ export const Overview = () => {
<span>+</span>
<MessageIcon size={32} />
</p>
<p>
This is an{' '}
<Link
className="font-medium underline underline-offset-4"
href="https://github.com/vercel/ai-chatbot"
target="_blank"
>
open source
</Link>{' '}
chatbot template built with Next.js and the AI SDK by Vercel. It uses
the{' '}
<code className="rounded-md bg-muted px-1 py-0.5">streamText</code>{' '}
function in the server and the{' '}
<code className="rounded-md bg-muted px-1 py-0.5">useChat</code> hook
on the client to create a seamless chat experience.
</p>
<p>
You can learn more about the AI SDK by visiting the{' '}
<Link
className="font-medium underline underline-offset-4"
href="https://sdk.vercel.ai/docs"
target="_blank"
>
docs
</Link>
.
</p>
</div>
</motion.div>
);
Expand Down
6 changes: 3 additions & 3 deletions middleware.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import NextAuth from 'next-auth';
import NextAuth from "next-auth";

import { authConfig } from '@/app/(auth)/auth.config';
import { authConfig } from "@/app/(auth)/auth.config";

export default NextAuth(authConfig).auth;

export const config = {
matcher: ['/', '/:id', '/api/:path*', '/login', '/register'],
matcher: ["/", "/:id", "/api/:path*", "/login", "/register"],
};
Loading