feat: external knowledge base

This commit is contained in:
Yi
2024-09-27 00:33:56 +08:00
parent ff0260e564
commit 1c7cb3fbc0
22 changed files with 470 additions and 149 deletions

View File

@ -6,6 +6,7 @@ export type IAppBasicProps = {
iconType?: 'app' | 'api' | 'dataset' | 'webapp' | 'notion'
icon?: string
icon_background?: string | null
isExternal?: boolean
name: string
type: string | React.ReactNode
hoverTip?: string
@ -52,7 +53,7 @@ const ICON_MAP = {
notion: <AppIcon innerIcon={NotionSvg} className='!border-[0.5px] !border-indigo-100 !bg-white' />,
}
export default function AppBasic({ icon, icon_background, name, type, hoverTip, textStyle, mode = 'expand', iconType = 'app' }: IAppBasicProps) {
export default function AppBasic({ icon, icon_background, name, isExternal, type, hoverTip, textStyle, mode = 'expand', iconType = 'app' }: IAppBasicProps) {
return (
<div className="flex items-start p-1">
{icon && icon_background && iconType === 'app' && (
@ -83,6 +84,7 @@ export default function AppBasic({ icon, icon_background, name, type, hoverTip,
}
</div>
<div className={`text-xs font-normal text-gray-500 group-hover:text-gray-700 break-all ${textStyle?.extra ?? ''}`}>{type}</div>
<div className='text-text-tertiary system-2xs-medium-uppercase'>{isExternal ? 'External' : ''}</div>
</div>}
</div>
)