mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 05:23:40 +00:00
Wire up full-text search and RAG chat for docs.hanzo.bot using the Hanzo Search cloud-api endpoints with store=bot-docs. Includes search dialog, page tree jump-to, and direct browser-to-API chat transport.
29 lines
702 B
TypeScript
29 lines
702 B
TypeScript
'use client';
|
|
|
|
import { RootProvider } from '@hanzo/docs/ui/provider/base';
|
|
import dynamic from 'next/dynamic';
|
|
import type { ReactNode } from 'react';
|
|
import { TooltipProvider } from '@radix-ui/react-tooltip';
|
|
import { AISearch } from '@/components/ai/search';
|
|
|
|
const SearchDialog = dynamic(() => import('@/components/layouts/search'), {
|
|
ssr: false,
|
|
});
|
|
|
|
export function Provider({ children }: { children: ReactNode }) {
|
|
return (
|
|
<RootProvider
|
|
search={{
|
|
SearchDialog,
|
|
}}
|
|
theme={{ defaultTheme: 'dark', enableSystem: false }}
|
|
>
|
|
<TooltipProvider>
|
|
<AISearch>
|
|
{children}
|
|
</AISearch>
|
|
</TooltipProvider>
|
|
</RootProvider>
|
|
);
|
|
}
|