chore(server): add ai document link on admin panel (#13428)
close AF-2766 <img width="2082" height="654" alt="image" src="https://github.com/user-attachments/assets/efba776c-91cd-4d59-a2a6-e00f68c61be1" /> #### PR Dependency Tree * **PR #13428** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Configuration descriptions for the copilot plugin now include direct links to relevant documentation for easier access to more information. * **Style** * Improved display of configuration descriptions to support and render HTML content. * **Refactor** * The AI navigation item in the admin panel has been disabled and is no longer visible. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -664,7 +664,7 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"enabled": {
|
"enabled": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Whether to enable the copilot plugin.\n@default false",
|
"description": "Whether to enable the copilot plugin. <br> Document: <a href=\"https://docs.affine.pro/self-host-affine/administer/ai\" target=\"_blank\">https://docs.affine.pro/self-host-affine/administer/ai</a>\n@default false",
|
||||||
"default": false
|
"default": false
|
||||||
},
|
},
|
||||||
"scenarios": {
|
"scenarios": {
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ declare global {
|
|||||||
|
|
||||||
defineModuleConfig('copilot', {
|
defineModuleConfig('copilot', {
|
||||||
enabled: {
|
enabled: {
|
||||||
desc: 'Whether to enable the copilot plugin.',
|
desc: 'Whether to enable the copilot plugin. <br> Document: <a href="https://docs.affine.pro/self-host-affine/administer/ai" target="_blank">https://docs.affine.pro/self-host-affine/administer/ai</a>',
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
scenarios: {
|
scenarios: {
|
||||||
|
|||||||
@@ -254,7 +254,7 @@
|
|||||||
"copilot": {
|
"copilot": {
|
||||||
"enabled": {
|
"enabled": {
|
||||||
"type": "Boolean",
|
"type": "Boolean",
|
||||||
"desc": "Whether to enable the copilot plugin."
|
"desc": "Whether to enable the copilot plugin. <br> Document: <a href=\"https://docs.affine.pro/self-host-affine/administer/ai\" target=\"_blank\">https://docs.affine.pro/self-host-affine/administer/ai</a>"
|
||||||
},
|
},
|
||||||
"scenarios": {
|
"scenarios": {
|
||||||
"type": "Object",
|
"type": "Object",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { buttonVariants } from '@affine/admin/components/ui/button';
|
import { buttonVariants } from '@affine/admin/components/ui/button';
|
||||||
import { cn } from '@affine/admin/utils';
|
import { cn } from '@affine/admin/utils';
|
||||||
import { AccountIcon, AiOutlineIcon, SelfhostIcon } from '@blocksuite/icons/rc';
|
import { AccountIcon, SelfhostIcon } from '@blocksuite/icons/rc';
|
||||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||||
import { NavLink } from 'react-router-dom';
|
import { NavLink } from 'react-router-dom';
|
||||||
|
|
||||||
@@ -90,12 +90,12 @@ export function Nav({ isCollapsed = false }: NavProps) {
|
|||||||
label="Accounts"
|
label="Accounts"
|
||||||
isCollapsed={isCollapsed}
|
isCollapsed={isCollapsed}
|
||||||
/>
|
/>
|
||||||
<NavItem
|
{/* <NavItem
|
||||||
to="/admin/ai"
|
to="/admin/ai"
|
||||||
icon={<AiOutlineIcon fontSize={20} />}
|
icon={<AiOutlineIcon fontSize={20} />}
|
||||||
label="AI"
|
label="AI"
|
||||||
isCollapsed={isCollapsed}
|
isCollapsed={isCollapsed}
|
||||||
/>
|
/> */}
|
||||||
<SettingsItem isCollapsed={isCollapsed} />
|
<SettingsItem isCollapsed={isCollapsed} />
|
||||||
<NavItem
|
<NavItem
|
||||||
to="/admin/about"
|
to="/admin/about"
|
||||||
|
|||||||
@@ -132,7 +132,10 @@ export const ConfigRow = ({
|
|||||||
className={`flex justify-between flex-grow space-y-[10px]
|
className={`flex justify-between flex-grow space-y-[10px]
|
||||||
${type === 'Boolean' ? 'flex-row' : 'flex-col'}`}
|
${type === 'Boolean' ? 'flex-row' : 'flex-col'}`}
|
||||||
>
|
>
|
||||||
<div className="text-base font-bold flex-3">{desc}</div>
|
<div
|
||||||
|
className="text-base font-bold flex-3"
|
||||||
|
dangerouslySetInnerHTML={{ __html: desc }}
|
||||||
|
/>
|
||||||
<div className="flex flex-col items-end relative flex-1">
|
<div className="flex flex-col items-end relative flex-1">
|
||||||
<Input
|
<Input
|
||||||
defaultValue={defaultValue}
|
defaultValue={defaultValue}
|
||||||
|
|||||||
Reference in New Issue
Block a user