rebrand ai-chatbot to openchat across app and api (#1418)
This commit is contained in:
parent
9d5d8a3ea7
commit
f7b6b55a8b
17 changed files with 90 additions and 90 deletions
|
|
@ -72,7 +72,7 @@ export function AppSidebar({ user }: { user: User | undefined }) {
|
|||
}}
|
||||
>
|
||||
<span className="cursor-pointer rounded-md px-2 font-semibold text-lg hover:bg-muted">
|
||||
Chatbot
|
||||
OpenChat
|
||||
</span>
|
||||
</Link>
|
||||
<div className="flex flex-row gap-1">
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ function PureChatHeader({
|
|||
className="order-3 hidden bg-zinc-900 px-2 text-zinc-50 hover:bg-zinc-800 md:ml-auto md:flex md:h-fit dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200"
|
||||
>
|
||||
<Link
|
||||
href={"https://vercel.com/templates/next.js/nextjs-ai-chatbot"}
|
||||
href={"https://vercel.com/templates/next.js/openchat"}
|
||||
rel="noreferrer"
|
||||
target="_noblank"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import { useArtifactSelector } from "@/hooks/use-artifact";
|
|||
import { useAutoResume } from "@/hooks/use-auto-resume";
|
||||
import { useChatVisibility } from "@/hooks/use-chat-visibility";
|
||||
import type { Vote } from "@/lib/db/schema";
|
||||
import { ChatSDKError } from "@/lib/errors";
|
||||
import { OpenChatError } from "@/lib/errors";
|
||||
import type { Attachment, ChatMessage } from "@/lib/types";
|
||||
import { fetcher, fetchWithErrorHandlers, generateUUID } from "@/lib/utils";
|
||||
import { Artifact } from "./artifact";
|
||||
|
|
@ -138,7 +138,7 @@ export function Chat({
|
|||
mutate(unstable_serialize(getChatHistoryPaginationKey));
|
||||
},
|
||||
onError: (error) => {
|
||||
if (error instanceof ChatSDKError) {
|
||||
if (error instanceof OpenChatError) {
|
||||
if (
|
||||
error.message?.includes("AI Gateway requires a valid credit card")
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -44,9 +44,9 @@ function PureMessages({
|
|||
useDataStream();
|
||||
|
||||
return (
|
||||
<div className="relative flex-1">
|
||||
<div className="relative flex-1 bg-background">
|
||||
<div
|
||||
className="absolute inset-0 touch-pan-y overflow-y-auto"
|
||||
className="absolute inset-0 touch-pan-y overflow-y-auto bg-background"
|
||||
ref={messagesContainerRef}
|
||||
>
|
||||
<div className="mx-auto flex min-w-0 max-w-4xl flex-col gap-4 px-2 py-4 md:gap-6 md:px-4">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue