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

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { useState, useCallback } from 'react';
import classnames from 'classnames';
@ -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(

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import 'reflect-metadata';
import { useNavigate } from 'react-router-dom';
import React, { useMemo, memo } from 'react';
@ -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,

View File

@ -13,18 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
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}

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @coze-arch/max-line-per-function */
import {
forwardRef,
@ -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',

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useMemo } from 'react';
import { type Form } from '@coze-workflow/test-run/formily';
@ -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': {

View File

@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
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}

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useCallback } from 'react';
import { I18n } from '@coze-arch/i18n';
@ -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')}

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @coze-arch/no-batch-import-or-export */
/* eslint-disable @typescript-eslint/no-explicit-any */
import {
@ -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}

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/no-explicit-any */
import { useState } from 'react';
@ -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;
}

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useCallback } from 'react';
import cls from 'classnames';
@ -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')}

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable complexity */
/**
@ -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')}

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useRef, type RefObject } from 'react';
import cls from 'classnames';
@ -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 />
</>

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { useState, useRef, useEffect } from 'react';
import semver from 'semver';
@ -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()}

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import { IconCozArrowLeft } from '@coze-arch/coze-design/icons';
@ -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 />}

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/consistent-type-assertions */
/* eslint-disable max-lines */
import { isFunction } from 'lodash-es';
@ -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
);
}

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import classNames from 'classnames';
@ -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(

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { useState } from 'react';
import { I18n } from '@coze-arch/i18n';
@ -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']}

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import { INTENT_NODE_MODE } from '@coze-workflow/nodes';
@ -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;
}

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { get, isNil, omit } from 'lodash-es';
import { type NodeFormContext } from '@flowgram-adapter/free-layout-editor';
import { variableUtils } from '@coze-workflow/variable';
@ -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

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/naming-convention */
/* eslint-disable @typescript-eslint/no-explicit-any */
import { omit, isUndefined } from 'lodash-es';
@ -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);

View File

@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
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'}

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
DEFAULT_NODE_META_PATH,
DEFAULT_OUTPUTS_PATH,
@ -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,

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type FC, useMemo } from 'react';
import { useGlobalVariableServiceState } from '@coze-workflow/variable';
@ -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 />
)}

View File

@ -13,14 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useEffect } from 'react';
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}

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { inject, injectable } from 'inversify';
import type { WorkflowJSON } from '@flowgram-adapter/free-layout-editor';
import { getTestDataByTestset, FieldName } from '@coze-workflow/test-run';
@ -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;
}

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { pick } from 'lodash-es';
import { inject, injectable } from 'inversify';
import { QueryClient } from '@tanstack/react-query';
@ -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,

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
type IFormSchema,
TestFormFieldName,
@ -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 &&

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { inject, injectable } from 'inversify';
import { EntityManager } from '@flowgram-adapter/free-layout-editor';
import {
@ -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: [],