Skip to content

Commit

Permalink
docs(v1): remove AI assistant (#10080)
Browse files Browse the repository at this point in the history
* docs(v1): remove AI assistant

* remove from api reference
  • Loading branch information
shahednasser authored Nov 13, 2024
1 parent 09b36ad commit c05e548
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 47 deletions.
23 changes: 0 additions & 23 deletions www/apps/api-reference/providers/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import {
usePageLoading,
SearchProvider as UiSearchProvider,
AiAssistantCommandIcon,
AiAssistantProvider,
searchFilters,
} from "docs-ui"
import { config } from "../config"
Expand Down Expand Up @@ -55,27 +53,6 @@ const SearchProvider = ({ children }: SearchProviderProps) => {
),
filterOptions: searchFilters,
}}
commands={[
{
name: "ai-assistant",
icon: <AiAssistantCommandIcon />,
component: (
<AiAssistantProvider
apiUrl={process.env.NEXT_PUBLIC_AI_ASSISTANT_URL || "temp"}
websiteId={process.env.NEXT_PUBLIC_AI_WEBSITE_ID || "temp"}
recaptchaSiteKey={
process.env.NEXT_PUBLIC_AI_API_ASSISTANT_RECAPTCHA_SITE_KEY ||
"temp"
}
/>
),
title: "AI Assistant",
badge: {
variant: "purple",
children: "Beta",
},
},
]}
>
{children}
</UiSearchProvider>
Expand Down
6 changes: 0 additions & 6 deletions www/apps/docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,6 @@ const config = {
analytics: {
apiKey: process.env.SEGMENT_API_KEY || "temp",
},
aiAssistant: {
apiUrl: process.env.AI_ASSISTANT_URL || "temp",
websiteId: process.env.AI_WEBSITE_ID || "temp",
recaptchaSiteKey:
process.env.AI_API_ASSISTANT_RECAPTCHA_SITE_KEY || "temp",
},
prism: {
defaultLanguage: "ts",
additionalLanguages: ["bash", "json"],
Expand Down
40 changes: 22 additions & 18 deletions www/apps/docs/src/providers/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,24 +67,28 @@ const SearchProvider = ({ children }: SearchProviderProps) => {
},
],
}}
commands={[
aiAssistant && {
name: "ai-assistant",
icon: <AiAssistantCommandIcon />,
component: (
<AiAssistantProvider
apiUrl={aiAssistant.apiUrl}
websiteId={aiAssistant.websiteId}
recaptchaSiteKey={aiAssistant.recaptchaSiteKey}
/>
),
title: "AI Assistant",
badge: {
variant: "purple",
children: "Beta",
},
},
]}
commands={
aiAssistant
? [
{
name: "ai-assistant",
icon: <AiAssistantCommandIcon />,
component: (
<AiAssistantProvider
apiUrl={aiAssistant.apiUrl}
websiteId={aiAssistant.websiteId}
recaptchaSiteKey={aiAssistant.recaptchaSiteKey}
/>
),
title: "AI Assistant",
badge: {
variant: "purple",
children: "Beta",
},
},
]
: []
}
initialDefaultFilters={defaultFilters}
modalClassName="z-[500]"
>
Expand Down

0 comments on commit c05e548

Please sign in to comment.