forked from supabase-community/vercel-ai-chatbot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from ChatCRM/outline-integration
outline-integration-001: added outline integration
- Loading branch information
Showing
7 changed files
with
72 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,45 @@ | ||
// @ts-nocheck | ||
import { KnowledgeBase } from "@/app/admin/knowledgebase" | ||
import { getVectorDataLogLocal } from "@/app/admin/actions" | ||
import { Separator } from "@/components/ui/separator" | ||
import { KnowledgeBaseTable } from "@/app/admin/knowledgebase-table" | ||
import { GetTranslation } from "@/components/translation-helper/ClientTranslations" | ||
import { KnowledgeBaseTable } from "@/app/admin/knowledgebase-details/knowledgebase-table" | ||
|
||
export const runtime = 'nodejs' | ||
export const preferredRegion = 'home' | ||
export const dynamic = 'force-dynamic'; | ||
export const fetchCache = 'force-no-store'; | ||
import { GetTranslation } from "@/components/translation-helper/ClientTranslations" | ||
|
||
const TextDirection = process.env.TEXT_DIRECTION | ||
import GlobalConfig from '@/app/app.config.js' | ||
import { Button } from "@/components/ui/button" | ||
import Link from 'next/link' | ||
import ArrowForwardIosOutlinedIcon from '@mui/icons-material/ArrowForwardIosOutlined'; | ||
import OutlineInstanceButton from "@/components/outline-instance-button" | ||
|
||
export default async function AdminPage() { | ||
// const vector_data_log = await getVectorDataLogLocal() | ||
|
||
// Language and Translation | ||
// var TranslationData = require(`@/translation/${process.env.BIZGPT_FRONTEND_LANGUAGE}.json`); | ||
export default async function KnowledgeBaseOverView() { | ||
|
||
// Language and Translation | ||
var TranslationData = require(`@/translation/${GlobalConfig.LANG}.json`); | ||
console.log(GlobalConfig.LANG) | ||
return ( | ||
<div className="space-y-6 w-full" dir={TextDirection}> | ||
<div className="space-y-6 w-full"> | ||
<div> | ||
<h3 className="text-lg font-medium" dir={TextDirection}> | ||
<GetTranslation text={"Knowledgebase Upload"} /> | ||
<GetTranslation text="Knowledgebase Details"/> | ||
</h3> | ||
<p className="text-sm text-muted-foreground" dir={TextDirection}> | ||
<GetTranslation text={"Add data to your knowledgebase"} /> | ||
<GetTranslation text="Examine the data you have inserted so far" /> | ||
|
||
</p> | ||
</div> | ||
<> </> | ||
<KnowledgeBase /> | ||
{/* <div> | ||
<Button asChild> | ||
<Link href={process.env.NEXT_PUBLIC_OUTLINE_ADDRESS} rel="noopener noreferrer" target="_blank">{TranslationData["Open Your Outline Instance"]} <ArrowForwardIosOutlinedIcon/></Link> | ||
</Button> | ||
</div> */} | ||
<OutlineInstanceButton /> | ||
</div> | ||
|
||
|
||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
'use client' | ||
|
||
import * as React from 'react' | ||
|
||
import { Button } from '@/components/ui/button' | ||
import Link from 'next/link' | ||
import GlobalConfig from '@/app/app.config.js' | ||
import ArrowForwardIosOutlinedIcon from '@mui/icons-material/ArrowForwardIosOutlined'; | ||
|
||
export default function OutlineInstanceButton() { | ||
var TranslationData = require(`@/translation/${GlobalConfig.LANG}.json`); | ||
return( | ||
<div> | ||
<Button asChild> | ||
<Link href={process.env.NEXT_PUBLIC_OUTLINE_ADDRESS!} rel="noopener noreferrer" target="_blank">{TranslationData["Open Your Outline Instance"]} <ArrowForwardIosOutlinedIcon/></Link> | ||
</Button> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters