docs(frontend): use new doc styles (#17)

* docs: use new doc styles

* docs: use new doc styles

* docs: use new doc styles
This commit is contained in:
tecvan 2025-07-26 13:51:05 +08:00 committed by GitHub
parent 9ca1ae506f
commit d9ec4f60e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
28 changed files with 69 additions and 72 deletions

View File

@ -90,7 +90,7 @@ export const Configuration = () => {
onClick={handleSwitchExpand} onClick={handleSwitchExpand}
/> />
</div> </div>
{/* The community version does not currently support conversation management in project, for future expansion */} {/* will support soon */}
{IS_OPEN_SOURCE ? null : ( {IS_OPEN_SOURCE ? null : (
<div <div
className={classnames( className={classnames(

View File

@ -73,7 +73,7 @@ const ProjectIDE: React.FC<ProjectIDEProps> = memo(
() => ({ () => ({
view: { view: {
widgetRegistries: [ widgetRegistries: [
// The community version does not currently support conversation management in project, for future expansion // will support soon
...(IS_OPEN_SOURCE ? [] : [ConversationRegistry]), ...(IS_OPEN_SOURCE ? [] : [ConversationRegistry]),
WorkflowWidgetRegistry, WorkflowWidgetRegistry,
DatabaseWidgetRegistry, DatabaseWidgetRegistry,

View File

@ -18,13 +18,13 @@ import React, { type FC, useContext, useState } from 'react';
import { WorkflowMode, BindBizType } from '@coze-arch/idl/workflow_api'; import { WorkflowMode, BindBizType } from '@coze-arch/idl/workflow_api';
import { I18n } from '@coze-arch/i18n'; import { I18n } from '@coze-arch/i18n';
import { CustomError } from '@coze-arch/bot-error';
import { import {
IconCozWorkflow, IconCozWorkflow,
IconCozChat, IconCozChat,
IconCozArrowDown, IconCozArrowDown,
} from '@coze-arch/coze-design/icons'; } from '@coze-arch/coze-design/icons';
import { Menu, Button } from '@coze-arch/coze-design'; import { Menu, Button } from '@coze-arch/coze-design';
import { CustomError } from '@coze-arch/bot-error';
import WorkflowModalContext from '../workflow-modal-context'; import WorkflowModalContext from '../workflow-modal-context';
import { WorkflowModalFrom, type WorkFlowModalModeProps } from '../type'; import { WorkflowModalFrom, type WorkFlowModalModeProps } from '../type';
@ -80,7 +80,7 @@ export const CreateWorkflowBtn: FC<
return ( return (
<> <>
{/* The community version does not currently support chatflow, for future expansion */} {/* will support soon */}
{showSingleButton || IS_OPEN_SOURCE ? ( {showSingleButton || IS_OPEN_SOURCE ? (
<Button <Button
className={className} className={className}

View File

@ -28,14 +28,14 @@ import { useQuery } from '@tanstack/react-query';
import { WorkflowMode } from '@coze-workflow/base/api'; import { WorkflowMode } from '@coze-workflow/base/api';
import { workflowApi, isGeneralWorkflow } from '@coze-workflow/base'; import { workflowApi, isGeneralWorkflow } from '@coze-workflow/base';
import { I18n } from '@coze-arch/i18n'; import { I18n } from '@coze-arch/i18n';
import { useFlags } from '@coze-arch/bot-flags';
import { ProductEntityType } from '@coze-arch/bot-api/product_api';
import { ProductApi } from '@coze-arch/bot-api';
import { import {
IconCozAllFill, IconCozAllFill,
IconCozFireFill, IconCozFireFill,
IconCozKnowledgeFill, IconCozKnowledgeFill,
} from '@coze-arch/coze-design/icons'; } from '@coze-arch/coze-design/icons';
import { useFlags } from '@coze-arch/bot-flags';
import { ProductEntityType } from '@coze-arch/bot-api/product_api';
import { ProductApi } from '@coze-arch/bot-api';
import WorkflowModalContext from '../workflow-modal-context'; import WorkflowModalContext from '../workflow-modal-context';
import { import {
@ -97,7 +97,6 @@ const WorkflowFilter = forwardRef<
FLAGS['bot.community.store_imageflow'] || FLAGS['bot.community.store_imageflow'] ||
isGeneralWorkflow(context?.flowMode || WorkflowMode.Workflow) isGeneralWorkflow(context?.flowMode || WorkflowMode.Workflow)
) { ) {
// The community version does not currently support workflow template tags for future expansion
if (IS_OPEN_SOURCE) { if (IS_OPEN_SOURCE) {
return { return {
type: 'PublicGetProductCategoryList', type: 'PublicGetProductCategoryList',

View File

@ -100,7 +100,7 @@ const schema = {
'x-component-props': { 'x-component-props': {
title: I18n.t('devops_publish_multibranch_BotInfo.OnboardingInfo'), title: I18n.t('devops_publish_multibranch_BotInfo.OnboardingInfo'),
collapsible: true, collapsible: true,
// The community version does not support AI-generated opening text for now, for future expansion // will support soon
action: IS_OPEN_SOURCE ? null : <AIGenerateBtn />, action: IS_OPEN_SOURCE ? null : <AIGenerateBtn />,
}, },
properties: { properties: {
@ -152,7 +152,7 @@ const schema = {
}, },
voices: { voices: {
type: 'object', type: 'object',
// The community version does not currently support the Agent voice configuration in Chatflow, for future expansion // will support soon
'x-visible': !IS_OVERSEA && !IS_OPEN_SOURCE, 'x-visible': !IS_OVERSEA && !IS_OPEN_SOURCE,
'x-decorator': 'FormSection', 'x-decorator': 'FormSection',
'x-decorator-props': { 'x-decorator-props': {
@ -173,7 +173,7 @@ const schema = {
}, },
input: { input: {
type: 'void', type: 'void',
// The community version does not support change user input method (typing, voice), for future expansion // will support soon
'x-visible': !IS_OVERSEA && !IS_OPEN_SOURCE, 'x-visible': !IS_OVERSEA && !IS_OPEN_SOURCE,
'x-component': 'FormSection', 'x-component': 'FormSection',
'x-component-props': { 'x-component-props': {

View File

@ -17,10 +17,10 @@
import { useRef, useState } from 'react'; import { useRef, useState } from 'react';
import { I18n } from '@coze-arch/i18n'; import { I18n } from '@coze-arch/i18n';
import { type FileItem, type UploadProps } from '@coze-arch/bot-semi/Upload';
import { FileBizType } from '@coze-arch/bot-api/developer_api';
import { IconCozEdit } from '@coze-arch/coze-design/icons'; import { IconCozEdit } from '@coze-arch/coze-design/icons';
import { CozAvatar, Toast, Upload } from '@coze-arch/coze-design'; import { CozAvatar, Toast, Upload } from '@coze-arch/coze-design';
import { type FileItem, type UploadProps } from '@coze-arch/bot-semi/Upload';
import { FileBizType } from '@coze-arch/bot-api/developer_api';
import { EmptyRoleAvatar } from '../../empty-role-avatar'; import { EmptyRoleAvatar } from '../../empty-role-avatar';
import customUploadRequest from './utils/custom-upload-request'; import customUploadRequest from './utils/custom-upload-request';
@ -139,7 +139,7 @@ export const RoleAvatarUpload = (props: PackageUploadProps) => {
</div> </div>
</Upload> </Upload>
{/* The community version does not support AI-generated avatar, for future expansion */} {/* will support soon */}
{!disabled && !IS_OPEN_SOURCE ? ( {!disabled && !IS_OPEN_SOURCE ? (
<AutoGenerate <AutoGenerate
generateInfo={generateInfo} generateInfo={generateInfo}

View File

@ -33,7 +33,7 @@ export const TestFormHeader: React.FC = () => {
const { open } = useOpenTraceListPanel(); const { open } = useOpenTraceListPanel();
const handleOpenTraceBottomSheet = useCallback(() => { const handleOpenTraceBottomSheet = useCallback(() => {
// The community version does not currently support trace, for future expansion // will support soon
if (IS_OPEN_SOURCE) { if (IS_OPEN_SOURCE) {
return; return;
} }
@ -55,7 +55,7 @@ export const TestFormHeader: React.FC = () => {
hiddenStateText hiddenStateText
onClick={handleOpenTraceBottomSheet} onClick={handleOpenTraceBottomSheet}
extra={ extra={
// The community version does not currently support trace, for future expansion // will support soon
!IS_OPEN_SOURCE && ( !IS_OPEN_SOURCE && (
<span className={'cursor-pointer font-medium'}> <span className={'cursor-pointer font-medium'}>
{I18n.t('workflow_testset_view_log')} {I18n.t('workflow_testset_view_log')}

View File

@ -63,7 +63,7 @@ export const NodeFieldCollapse: React.FC<React.PropsWithChildren> = ({
<div className={css.extra}> <div className={css.extra}>
<ModeSwitch /> <ModeSwitch />
{/* The community version does not support AI-generated test-run inputs, for future expansion */} {/* will support soon */}
{IS_OPEN_SOURCE ? null : ( {IS_OPEN_SOURCE ? null : (
<AIGenerateButton <AIGenerateButton
schema={schema} schema={schema}

View File

@ -83,7 +83,7 @@ export const AIGenerateButton: React.FC<AIGenerateButtonProps> = ({
i => i.name === FieldName.Node, i => i.name === FieldName.Node,
); );
// The community version does not support AI-generated test-run inputs, for future expansion // will support soon
if (IS_OPEN_SOURCE) { if (IS_OPEN_SOURCE) {
return null; return null;
} }

View File

@ -38,7 +38,7 @@ export const TestFormSheetHeaderV2 = () => {
const { open } = useOpenTraceListPanel(); const { open } = useOpenTraceListPanel();
const handleOpenTraceBottomSheet = useCallback(() => { const handleOpenTraceBottomSheet = useCallback(() => {
// The community version does not currently support trace, for future expansion // will support soon
if (IS_OPEN_SOURCE) { if (IS_OPEN_SOURCE) {
return; return;
} }
@ -61,7 +61,7 @@ export const TestFormSheetHeaderV2 = () => {
onClick={handleOpenTraceBottomSheet} onClick={handleOpenTraceBottomSheet}
hiddenStateText hiddenStateText
extra={ extra={
// The community version does not currently support trace, for future expansion // will support soon
!IS_OPEN_SOURCE && ( !IS_OPEN_SOURCE && (
<span className={cls('cursor-pointer font-medium')}> <span className={cls('cursor-pointer font-medium')}>
{I18n.t('workflow_testset_view_log')} {I18n.t('workflow_testset_view_log')}

View File

@ -204,7 +204,7 @@ const TestNodeFormCore: React.FC<TestNodeFormBaseProps> = ({
const { open } = useOpenTraceListPanel(); const { open } = useOpenTraceListPanel();
const handleOpenTraceBottomSheet = useCallback(() => { const handleOpenTraceBottomSheet = useCallback(() => {
// The community version does not currently support trace, for future expansion // will support soon
if (IS_OPEN_SOURCE) { if (IS_OPEN_SOURCE) {
return; return;
} }
@ -222,7 +222,7 @@ const TestNodeFormCore: React.FC<TestNodeFormBaseProps> = ({
onClick={handleOpenTraceBottomSheet} onClick={handleOpenTraceBottomSheet}
hiddenStateText hiddenStateText
extra={ extra={
// The community version does not currently support trace, for future expansion // will support soon
!IS_OPEN_SOURCE && ( !IS_OPEN_SOURCE && (
<span className={'font-medium cursor-pointer'}> <span className={'font-medium cursor-pointer'}>
{I18n.t('workflow_testset_view_log')} {I18n.t('workflow_testset_view_log')}

View File

@ -78,7 +78,7 @@ export const Tools = (props: ITool) => {
margin={3} margin={3}
/> />
) : null} ) : null}
{/* The community version does not currently support trace, for future expansion */} {/* will support soon */}
{!IS_OPEN_SOURCE && <OpenTraceButton />} {!IS_OPEN_SOURCE && <OpenTraceButton />}
<StartTestRunButton /> <StartTestRunButton />
</> </>

View File

@ -245,7 +245,7 @@ const VersionForm: React.FC<{
]} ]}
/> />
{/* The community version does not currently support testset, for future expansion */} {/* will support soon */}
{!IS_OPEN_SOURCE && <TestSetSelect onSelect={handleTestSetSelect} />} {!IS_OPEN_SOURCE && <TestSetSelect onSelect={handleTestSetSelect} />}
{renderBtn()} {renderBtn()}

View File

@ -59,10 +59,9 @@ const WorkFlowHeader: React.FC = () => {
</div> </div>
<div className={styles.right}> <div className={styles.right}>
{/** The community version does not currently provide resource tree modal. Will allow for future expansion. */} {/* will support soon */}
{IS_OPEN_SOURCE ? null : <ReferenceButton workflowId={workflowId} />} {IS_OPEN_SOURCE ? null : <ReferenceButton workflowId={workflowId} />}
{/** The community version does not currently provide features such as billing, collaboration, history, and workspaces to allow for future expansion. */}
{IS_OPEN_SOURCE ? null : ( {IS_OPEN_SOURCE ? null : (
<> <>
{!readonly && <CreditButton />} {!readonly && <CreditButton />}

View File

@ -722,7 +722,7 @@ export class WorkflowGlobalStateEntity extends ConfigEntity<WorkflowGlobalState>
this.spaceId !== PUBLIC_SPACE_ID && this.spaceId !== PUBLIC_SPACE_ID &&
!this.projectId && !this.projectId &&
!IS_BOT_OP && !IS_BOT_OP &&
// The community version does not support the mockset yet, for future expansion // will support soon
!IS_OPEN_SOURCE !IS_OPEN_SOURCE
); );
} }

View File

@ -48,7 +48,7 @@ export const ModelSelectV2: React.FC<ModelSelectV2Props> = ({
const { spaceId, projectId, isBindDouyin } = useGlobalState(); const { spaceId, projectId, isBindDouyin } = useGlobalState();
return ( return (
<ModelSelect <ModelSelect
// The community version does not currently support to view model detail, for future expansion // will support soon
enableJumpDetail={isBindDouyin || IS_OPEN_SOURCE ? false : { spaceId }} enableJumpDetail={isBindDouyin || IS_OPEN_SOURCE ? false : { spaceId }}
className={classNames(styles.select, className)} className={classNames(styles.select, className)}
popoverClassName={classNames( popoverClassName={classNames(

View File

@ -36,7 +36,7 @@ const Sql = () => {
return ( return (
<div className={styles.container}> <div className={styles.container}>
{/* The community version does not currently support the AI-generated SQL function for future expansion */} {/* will support soon */}
{!readonly && !IS_OPEN_SOURCE ? ( {!readonly && !IS_OPEN_SOURCE ? (
<AutoGenerate <AutoGenerate
className={styles['auto-generate']} className={styles['auto-generate']}

View File

@ -22,7 +22,7 @@ import { I18n } from '@coze-arch/i18n';
import { INTENT_MODE } from '@/node-registries/intent/constants'; import { INTENT_MODE } from '@/node-registries/intent/constants';
import { RadioSetterField } from '@/node-registries/common/fields'; import { RadioSetterField } from '@/node-registries/common/fields';
export default function ModeRadio() { export default function ModeRadio() {
// The community version does not support the fast mode of intent recognition for future expansion // will support soon
if (IS_OPEN_SOURCE) { if (IS_OPEN_SOURCE) {
return null; return null;
} }

View File

@ -54,7 +54,7 @@ export const transformOnInit = (
const inputParameters = get(inputs, 'inputParameters', []); const inputParameters = get(inputs, 'inputParameters', []);
// - If it is a new node, the default is fast mode, otherwise it is determined according to the backend return value (if there is no backend mode field, it means it is historical data, then it is standard mode) // - If it is a new node, the default is fast mode, otherwise it is determined according to the backend return value (if there is no backend mode field, it means it is historical data, then it is standard mode)
// - The community version does not support the fast mode of intent recognition for future expansion // - will support soon
const intentModeInInit = const intentModeInInit =
isNewCreateInInit && !IS_OPEN_SOURCE isNewCreateInInit && !IS_OPEN_SOURCE
? INTENT_NODE_MODE.MINIMAL ? INTENT_NODE_MODE.MINIMAL

View File

@ -45,7 +45,7 @@ export const transformOnInit = (
let trigger; let trigger;
// The community version does not support the project trigger feature, for future expansion // will support soon
if (projectId && !IS_OPEN_SOURCE) { if (projectId && !IS_OPEN_SOURCE) {
const triggerService = const triggerService =
context.node.getService<TriggerService>(TriggerService); context.node.getService<TriggerService>(TriggerService);

View File

@ -17,8 +17,8 @@
import { TriggerForm } from '@coze-workflow/nodes'; import { TriggerForm } from '@coze-workflow/nodes';
import { FILE_TYPES, ViewVariableType } from '@coze-workflow/base'; import { FILE_TYPES, ViewVariableType } from '@coze-workflow/base';
import { I18n } from '@coze-arch/i18n'; import { I18n } from '@coze-arch/i18n';
import { useFlags } from '@coze-arch/bot-flags';
import { Switch } from '@coze-arch/coze-design'; import { Switch } from '@coze-arch/coze-design';
import { useFlags } from '@coze-arch/bot-flags';
import { withNodeConfigForm } from '@/node-registries/common/hocs'; import { withNodeConfigForm } from '@/node-registries/common/hocs';
import { useGlobalState } from '@/hooks'; import { useGlobalState } from '@/hooks';
@ -41,7 +41,6 @@ export const FormRender = withNodeConfigForm(() => {
let hiddenTypes = isBindDouyin ? FILE_TYPES : []; let hiddenTypes = isBindDouyin ? FILE_TYPES : [];
// The community version does not support the Voice feature, for future expansion
if (IS_OPEN_SOURCE) { if (IS_OPEN_SOURCE) {
hiddenTypes = [ViewVariableType.Voice, ViewVariableType.ArrayVoice]; hiddenTypes = [ViewVariableType.Voice, ViewVariableType.ArrayVoice];
} }
@ -71,7 +70,7 @@ export const FormRender = withNodeConfigForm(() => {
/> />
) : null} ) : null}
{/* The community version does not support the project trigger feature, for future expansion */} {/* will support soon */}
{(projectId || IS_BOT_OP) && !IS_OPEN_SOURCE ? ( {(projectId || IS_BOT_OP) && !IS_OPEN_SOURCE ? (
<RadioSetterField <RadioSetterField
name={'trigger.tab'} name={'trigger.tab'}

View File

@ -39,7 +39,7 @@ export const START_NODE_REGISTRY: WorkflowNodeRegistry<NodeTestMeta> = {
copyDisable: true, copyDisable: true,
headerReadonly: true, headerReadonly: true,
showTrigger: ({ projectId }) => showTrigger: ({ projectId }) =>
// The community version does not support the project trigger feature, for future expansion // will support soon
(!!projectId || IS_BOT_OP) && !IS_OPEN_SOURCE, (!!projectId || IS_BOT_OP) && !IS_OPEN_SOURCE,
nodeMetaPath: DEFAULT_NODE_META_PATH, nodeMetaPath: DEFAULT_NODE_META_PATH,
outputsPath: DEFAULT_OUTPUTS_PATH, outputsPath: DEFAULT_OUTPUTS_PATH,

View File

@ -150,7 +150,7 @@ export const ExpandSheetEditor: FC<ExpandSheetEditorProps> = props => {
></Button> ></Button>
</Tooltip> </Tooltip>
{/* The community version does not support the AI-generated system prompt feature, for future expansion */} {/* will support soon */}
{IS_OPEN_SOURCE ? null : ( {IS_OPEN_SOURCE ? null : (
<NLPromptButton disabled={props?.readonly} onlyIcon /> <NLPromptButton disabled={props?.readonly} onlyIcon />
)} )}

View File

@ -20,7 +20,6 @@ import { PublicScopeProvider } from '@coze-workflow/variable';
import { NLPromptButton } from '@coze-workflow/resources-adapter'; import { NLPromptButton } from '@coze-workflow/resources-adapter';
import { PromptEditorProvider } from '@coze-common/prompt-kit-base/editor'; import { PromptEditorProvider } from '@coze-common/prompt-kit-base/editor';
import { I18n } from '@coze-arch/i18n'; import { I18n } from '@coze-arch/i18n';
import { UIIconButton } from '@coze-arch/bot-semi';
import { import {
IconCozExpand, IconCozExpand,
IconCozLightbulb, IconCozLightbulb,
@ -28,6 +27,7 @@ import {
IconCozTrayArrowUp, IconCozTrayArrowUp,
} from '@coze-arch/coze-design/icons'; } from '@coze-arch/coze-design/icons';
import { Tooltip, IconButton, Button } from '@coze-arch/coze-design'; import { Tooltip, IconButton, Button } from '@coze-arch/coze-design';
import { UIIconButton } from '@coze-arch/bot-semi';
import { useNodeFormPanelState } from '@/hooks/use-node-side-sheet-store'; import { useNodeFormPanelState } from '@/hooks/use-node-side-sheet-store';
import { CopyButton } from '@/components/copy-button'; import { CopyButton } from '@/components/copy-button';
@ -112,7 +112,7 @@ export const PromptKitBar = props => {
</Tooltip> </Tooltip>
<div className={styles['nl-prompt']}> <div className={styles['nl-prompt']}>
{/* The community version does not support the AI-generated system prompt feature, for future expansion */} {/* will support soon */}
{IS_OPEN_SOURCE ? null : ( {IS_OPEN_SOURCE ? null : (
<NLPromptButton <NLPromptButton
disabled={readonly} disabled={readonly}

View File

@ -70,7 +70,7 @@ export class RelatedCaseDataService {
node => node.type === StandardNodeType.Start, node => node.type === StandardNodeType.Start,
); );
/* The community version does not currently support testset, for future expansion */ /* will support soon */
if (IS_OPEN_SOURCE) { if (IS_OPEN_SOURCE) {
return; return;
} }

View File

@ -76,7 +76,7 @@ export class TriggerService {
protected subWorkflowInfos: Record<string, WorkflowDetailInfoData> = {}; protected subWorkflowInfos: Record<string, WorkflowDetailInfoData> = {};
protected startNodeFormValues: Record<string, unknown> = {}; protected startNodeFormValues: Record<string, unknown> = {};
async load() { async load() {
// The community version does not support the project trigger feature, for future expansion // will support soon
if (this.globalState.projectId && !IS_OPEN_SOURCE) { if (this.globalState.projectId && !IS_OPEN_SOURCE) {
const meta = await fetchTriggerFormMeta({ const meta = await fetchTriggerFormMeta({
spaceId: this.globalState.spaceId, spaceId: this.globalState.spaceId,

View File

@ -21,8 +21,8 @@ import {
} from '@coze-workflow/test-run-next'; } from '@coze-workflow/test-run-next';
import { PUBLIC_SPACE_ID } from '@coze-workflow/base'; import { PUBLIC_SPACE_ID } from '@coze-workflow/base';
import type { WorkflowNodeEntity } from '../types';
import { getTestsetField } from './generate-form-schema/testset-field'; import { getTestsetField } from './generate-form-schema/testset-field';
import type { WorkflowNodeEntity } from '../types';
import { generateFormRelatedField } from './generate-form-related-field'; import { generateFormRelatedField } from './generate-form-related-field';
import { generateFormNodeField } from './generate-form-node-field'; import { generateFormNodeField } from './generate-form-node-field';
@ -63,7 +63,7 @@ export const generateFormSchema = async (
/** /**
* *
*/ */
/* The community version does not currently support testset, for future expansion */ /* will support soon */
if ( if (
!IS_OPEN_SOURCE && !IS_OPEN_SOURCE &&
spaceId !== PUBLIC_SPACE_ID && spaceId !== PUBLIC_SPACE_ID &&

View File

@ -241,7 +241,7 @@ export class WorkflowPlaygroundContext implements PlaygroundContext {
pageNum: number; pageNum: number;
pageSize?: number; pageSize?: number;
}): Promise<GetUserFavoriteListData | undefined> { }): Promise<GetUserFavoriteListData | undefined> {
// The community version does not currently support plugin favorite function, for future expansion // will support soon
if (IS_OPEN_SOURCE) { if (IS_OPEN_SOURCE) {
return { return {
favorite_products: [], favorite_products: [],