rename openchat branding to chatbot on demo (#1421)

This commit is contained in:
dancer 2026-02-23 17:24:17 -08:00 committed by GitHub
parent 72597d6f68
commit e7ef7d8f9c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 161 additions and 127 deletions

View file

@ -8,7 +8,7 @@ import { type ClassValue, clsx } from 'clsx';
import { formatISO } from 'date-fns';
import { twMerge } from 'tailwind-merge';
import type { DBMessage, Document } from '@/lib/db/schema';
import { OpenChatError, type ErrorCode } from './errors';
import { ChatbotError, type ErrorCode } from './errors';
import type { ChatMessage, ChatTools, CustomUIDataTypes } from './types';
export function cn(...inputs: ClassValue[]) {
@ -20,7 +20,7 @@ export const fetcher = async (url: string) => {
if (!response.ok) {
const { code, cause } = await response.json();
throw new OpenChatError(code as ErrorCode, cause);
throw new ChatbotError(code as ErrorCode, cause);
}
return response.json();
@ -35,13 +35,13 @@ export async function fetchWithErrorHandlers(
if (!response.ok) {
const { code, cause } = await response.json();
throw new OpenChatError(code as ErrorCode, cause);
throw new ChatbotError(code as ErrorCode, cause);
}
return response;
} catch (error: unknown) {
if (typeof navigator !== 'undefined' && !navigator.onLine) {
throw new OpenChatError('offline:chat');
throw new ChatbotError('offline:chat');
}
throw error;