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:
parent
9ca1ae506f
commit
d9ec4f60e0
|
|
@ -90,7 +90,7 @@ export const Configuration = () => {
|
|||
onClick={handleSwitchExpand}
|
||||
/>
|
||||
</div>
|
||||
{/* The community version does not currently support conversation management in project, for future expansion */}
|
||||
{/* will support soon */}
|
||||
{IS_OPEN_SOURCE ? null : (
|
||||
<div
|
||||
className={classnames(
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ const ProjectIDE: React.FC<ProjectIDEProps> = memo(
|
|||
() => ({
|
||||
view: {
|
||||
widgetRegistries: [
|
||||
// The community version does not currently support conversation management in project, for future expansion
|
||||
// will support soon
|
||||
...(IS_OPEN_SOURCE ? [] : [ConversationRegistry]),
|
||||
WorkflowWidgetRegistry,
|
||||
DatabaseWidgetRegistry,
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@ import React, { type FC, useContext, useState } from 'react';
|
|||
|
||||
import { WorkflowMode, BindBizType } from '@coze-arch/idl/workflow_api';
|
||||
import { I18n } from '@coze-arch/i18n';
|
||||
import { CustomError } from '@coze-arch/bot-error';
|
||||
import {
|
||||
IconCozWorkflow,
|
||||
IconCozChat,
|
||||
IconCozArrowDown,
|
||||
} from '@coze-arch/coze-design/icons';
|
||||
import { Menu, Button } from '@coze-arch/coze-design';
|
||||
import { CustomError } from '@coze-arch/bot-error';
|
||||
|
||||
import WorkflowModalContext from '../workflow-modal-context';
|
||||
import { WorkflowModalFrom, type WorkFlowModalModeProps } from '../type';
|
||||
|
|
@ -80,7 +80,7 @@ export const CreateWorkflowBtn: FC<
|
|||
|
||||
return (
|
||||
<>
|
||||
{/* The community version does not currently support chatflow, for future expansion */}
|
||||
{/* will support soon */}
|
||||
{showSingleButton || IS_OPEN_SOURCE ? (
|
||||
<Button
|
||||
className={className}
|
||||
|
|
|
|||
|
|
@ -28,14 +28,14 @@ import { useQuery } from '@tanstack/react-query';
|
|||
import { WorkflowMode } from '@coze-workflow/base/api';
|
||||
import { workflowApi, isGeneralWorkflow } from '@coze-workflow/base';
|
||||
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 {
|
||||
IconCozAllFill,
|
||||
IconCozFireFill,
|
||||
IconCozKnowledgeFill,
|
||||
} 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 {
|
||||
|
|
@ -97,7 +97,6 @@ const WorkflowFilter = forwardRef<
|
|||
FLAGS['bot.community.store_imageflow'] ||
|
||||
isGeneralWorkflow(context?.flowMode || WorkflowMode.Workflow)
|
||||
) {
|
||||
// The community version does not currently support workflow template tags for future expansion
|
||||
if (IS_OPEN_SOURCE) {
|
||||
return {
|
||||
type: 'PublicGetProductCategoryList',
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ const schema = {
|
|||
'x-component-props': {
|
||||
title: I18n.t('devops_publish_multibranch_BotInfo.OnboardingInfo'),
|
||||
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 />,
|
||||
},
|
||||
properties: {
|
||||
|
|
@ -152,7 +152,7 @@ const schema = {
|
|||
},
|
||||
voices: {
|
||||
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-decorator': 'FormSection',
|
||||
'x-decorator-props': {
|
||||
|
|
@ -173,7 +173,7 @@ const schema = {
|
|||
},
|
||||
input: {
|
||||
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-component': 'FormSection',
|
||||
'x-component-props': {
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@
|
|||
import { useRef, useState } from 'react';
|
||||
|
||||
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 { 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 customUploadRequest from './utils/custom-upload-request';
|
||||
|
|
@ -139,7 +139,7 @@ export const RoleAvatarUpload = (props: PackageUploadProps) => {
|
|||
</div>
|
||||
</Upload>
|
||||
|
||||
{/* The community version does not support AI-generated avatar, for future expansion */}
|
||||
{/* will support soon */}
|
||||
{!disabled && !IS_OPEN_SOURCE ? (
|
||||
<AutoGenerate
|
||||
generateInfo={generateInfo}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export const TestFormHeader: React.FC = () => {
|
|||
const { open } = useOpenTraceListPanel();
|
||||
|
||||
const handleOpenTraceBottomSheet = useCallback(() => {
|
||||
// The community version does not currently support trace, for future expansion
|
||||
// will support soon
|
||||
if (IS_OPEN_SOURCE) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -55,7 +55,7 @@ export const TestFormHeader: React.FC = () => {
|
|||
hiddenStateText
|
||||
onClick={handleOpenTraceBottomSheet}
|
||||
extra={
|
||||
// The community version does not currently support trace, for future expansion
|
||||
// will support soon
|
||||
!IS_OPEN_SOURCE && (
|
||||
<span className={'cursor-pointer font-medium'}>
|
||||
{I18n.t('workflow_testset_view_log')}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ export const NodeFieldCollapse: React.FC<React.PropsWithChildren> = ({
|
|||
<div className={css.extra}>
|
||||
<ModeSwitch />
|
||||
|
||||
{/* The community version does not support AI-generated test-run inputs, for future expansion */}
|
||||
{/* will support soon */}
|
||||
{IS_OPEN_SOURCE ? null : (
|
||||
<AIGenerateButton
|
||||
schema={schema}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ export const AIGenerateButton: React.FC<AIGenerateButtonProps> = ({
|
|||
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) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ export const TestFormSheetHeaderV2 = () => {
|
|||
const { open } = useOpenTraceListPanel();
|
||||
|
||||
const handleOpenTraceBottomSheet = useCallback(() => {
|
||||
// The community version does not currently support trace, for future expansion
|
||||
// will support soon
|
||||
if (IS_OPEN_SOURCE) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -61,7 +61,7 @@ export const TestFormSheetHeaderV2 = () => {
|
|||
onClick={handleOpenTraceBottomSheet}
|
||||
hiddenStateText
|
||||
extra={
|
||||
// The community version does not currently support trace, for future expansion
|
||||
// will support soon
|
||||
!IS_OPEN_SOURCE && (
|
||||
<span className={cls('cursor-pointer font-medium')}>
|
||||
{I18n.t('workflow_testset_view_log')}
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ const TestNodeFormCore: React.FC<TestNodeFormBaseProps> = ({
|
|||
const { open } = useOpenTraceListPanel();
|
||||
|
||||
const handleOpenTraceBottomSheet = useCallback(() => {
|
||||
// The community version does not currently support trace, for future expansion
|
||||
// will support soon
|
||||
if (IS_OPEN_SOURCE) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -222,7 +222,7 @@ const TestNodeFormCore: React.FC<TestNodeFormBaseProps> = ({
|
|||
onClick={handleOpenTraceBottomSheet}
|
||||
hiddenStateText
|
||||
extra={
|
||||
// The community version does not currently support trace, for future expansion
|
||||
// will support soon
|
||||
!IS_OPEN_SOURCE && (
|
||||
<span className={'font-medium cursor-pointer'}>
|
||||
{I18n.t('workflow_testset_view_log')}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ export const Tools = (props: ITool) => {
|
|||
margin={3}
|
||||
/>
|
||||
) : null}
|
||||
{/* The community version does not currently support trace, for future expansion */}
|
||||
{/* will support soon */}
|
||||
{!IS_OPEN_SOURCE && <OpenTraceButton />}
|
||||
<StartTestRunButton />
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -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} />}
|
||||
|
||||
{renderBtn()}
|
||||
|
|
|
|||
|
|
@ -59,10 +59,9 @@ const WorkFlowHeader: React.FC = () => {
|
|||
</div>
|
||||
|
||||
<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} />}
|
||||
|
||||
{/** The community version does not currently provide features such as billing, collaboration, history, and workspaces to allow for future expansion. */}
|
||||
{IS_OPEN_SOURCE ? null : (
|
||||
<>
|
||||
{!readonly && <CreditButton />}
|
||||
|
|
|
|||
|
|
@ -722,7 +722,7 @@ export class WorkflowGlobalStateEntity extends ConfigEntity<WorkflowGlobalState>
|
|||
this.spaceId !== PUBLIC_SPACE_ID &&
|
||||
!this.projectId &&
|
||||
!IS_BOT_OP &&
|
||||
// The community version does not support the mockset yet, for future expansion
|
||||
// will support soon
|
||||
!IS_OPEN_SOURCE
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ export const ModelSelectV2: React.FC<ModelSelectV2Props> = ({
|
|||
const { spaceId, projectId, isBindDouyin } = useGlobalState();
|
||||
return (
|
||||
<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 }}
|
||||
className={classNames(styles.select, className)}
|
||||
popoverClassName={classNames(
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ const Sql = () => {
|
|||
|
||||
return (
|
||||
<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 ? (
|
||||
<AutoGenerate
|
||||
className={styles['auto-generate']}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import { I18n } from '@coze-arch/i18n';
|
|||
import { INTENT_MODE } from '@/node-registries/intent/constants';
|
||||
import { RadioSetterField } from '@/node-registries/common/fields';
|
||||
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) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ export const transformOnInit = (
|
|||
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)
|
||||
// - The community version does not support the fast mode of intent recognition for future expansion
|
||||
// - will support soon
|
||||
const intentModeInInit =
|
||||
isNewCreateInInit && !IS_OPEN_SOURCE
|
||||
? INTENT_NODE_MODE.MINIMAL
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export const transformOnInit = (
|
|||
|
||||
let trigger;
|
||||
|
||||
// The community version does not support the project trigger feature, for future expansion
|
||||
// will support soon
|
||||
if (projectId && !IS_OPEN_SOURCE) {
|
||||
const triggerService =
|
||||
context.node.getService<TriggerService>(TriggerService);
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@
|
|||
import { TriggerForm } from '@coze-workflow/nodes';
|
||||
import { FILE_TYPES, ViewVariableType } from '@coze-workflow/base';
|
||||
import { I18n } from '@coze-arch/i18n';
|
||||
import { useFlags } from '@coze-arch/bot-flags';
|
||||
import { Switch } from '@coze-arch/coze-design';
|
||||
import { useFlags } from '@coze-arch/bot-flags';
|
||||
|
||||
import { withNodeConfigForm } from '@/node-registries/common/hocs';
|
||||
import { useGlobalState } from '@/hooks';
|
||||
|
|
@ -41,7 +41,6 @@ export const FormRender = withNodeConfigForm(() => {
|
|||
|
||||
let hiddenTypes = isBindDouyin ? FILE_TYPES : [];
|
||||
|
||||
// The community version does not support the Voice feature, for future expansion
|
||||
if (IS_OPEN_SOURCE) {
|
||||
hiddenTypes = [ViewVariableType.Voice, ViewVariableType.ArrayVoice];
|
||||
}
|
||||
|
|
@ -71,7 +70,7 @@ export const FormRender = withNodeConfigForm(() => {
|
|||
/>
|
||||
) : null}
|
||||
|
||||
{/* The community version does not support the project trigger feature, for future expansion */}
|
||||
{/* will support soon */}
|
||||
{(projectId || IS_BOT_OP) && !IS_OPEN_SOURCE ? (
|
||||
<RadioSetterField
|
||||
name={'trigger.tab'}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ export const START_NODE_REGISTRY: WorkflowNodeRegistry<NodeTestMeta> = {
|
|||
copyDisable: true,
|
||||
headerReadonly: true,
|
||||
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,
|
||||
nodeMetaPath: DEFAULT_NODE_META_PATH,
|
||||
outputsPath: DEFAULT_OUTPUTS_PATH,
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ export const ExpandSheetEditor: FC<ExpandSheetEditorProps> = props => {
|
|||
></Button>
|
||||
</Tooltip>
|
||||
|
||||
{/* The community version does not support the AI-generated system prompt feature, for future expansion */}
|
||||
{/* will support soon */}
|
||||
{IS_OPEN_SOURCE ? null : (
|
||||
<NLPromptButton disabled={props?.readonly} onlyIcon />
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import { PublicScopeProvider } from '@coze-workflow/variable';
|
|||
import { NLPromptButton } from '@coze-workflow/resources-adapter';
|
||||
import { PromptEditorProvider } from '@coze-common/prompt-kit-base/editor';
|
||||
import { I18n } from '@coze-arch/i18n';
|
||||
import { UIIconButton } from '@coze-arch/bot-semi';
|
||||
import {
|
||||
IconCozExpand,
|
||||
IconCozLightbulb,
|
||||
|
|
@ -28,6 +27,7 @@ import {
|
|||
IconCozTrayArrowUp,
|
||||
} from '@coze-arch/coze-design/icons';
|
||||
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 { CopyButton } from '@/components/copy-button';
|
||||
|
|
@ -112,7 +112,7 @@ export const PromptKitBar = props => {
|
|||
</Tooltip>
|
||||
|
||||
<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 : (
|
||||
<NLPromptButton
|
||||
disabled={readonly}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ export class RelatedCaseDataService {
|
|||
node => node.type === StandardNodeType.Start,
|
||||
);
|
||||
|
||||
/* The community version does not currently support testset, for future expansion */
|
||||
/* will support soon */
|
||||
if (IS_OPEN_SOURCE) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ export class TriggerService {
|
|||
protected subWorkflowInfos: Record<string, WorkflowDetailInfoData> = {};
|
||||
protected startNodeFormValues: Record<string, unknown> = {};
|
||||
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) {
|
||||
const meta = await fetchTriggerFormMeta({
|
||||
spaceId: this.globalState.spaceId,
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ import {
|
|||
} from '@coze-workflow/test-run-next';
|
||||
import { PUBLIC_SPACE_ID } from '@coze-workflow/base';
|
||||
|
||||
import type { WorkflowNodeEntity } from '../types';
|
||||
import { getTestsetField } from './generate-form-schema/testset-field';
|
||||
import type { WorkflowNodeEntity } from '../types';
|
||||
import { generateFormRelatedField } from './generate-form-related-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 (
|
||||
!IS_OPEN_SOURCE &&
|
||||
spaceId !== PUBLIC_SPACE_ID &&
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ export class WorkflowPlaygroundContext implements PlaygroundContext {
|
|||
pageNum: number;
|
||||
pageSize?: number;
|
||||
}): Promise<GetUserFavoriteListData | undefined> {
|
||||
// The community version does not currently support plugin favorite function, for future expansion
|
||||
// will support soon
|
||||
if (IS_OPEN_SOURCE) {
|
||||
return {
|
||||
favorite_products: [],
|
||||
|
|
|
|||
Loading…
Reference in New Issue