From d9ec4f60e0d24dec1e2fb38b748a4b3bed6c1d4a Mon Sep 17 00:00:00 2001 From: tecvan <84165678+Tecvan-fe@users.noreply.github.com> Date: Sat, 26 Jul 2025 13:51:05 +0800 Subject: [PATCH] docs(frontend): use new doc styles (#17) * docs: use new doc styles * docs: use new doc styles * docs: use new doc styles --- .../main/src/components/configuration/index.tsx | 4 ++-- frontend/packages/project-ide/main/src/index.tsx | 4 ++-- .../src/workflow-modal/sider/create-workflow-btn.tsx | 6 +++--- .../src/workflow-modal/sider/workflow-filter.tsx | 9 ++++----- .../flow-role/role-config-form/config-form.tsx | 8 ++++---- .../role-avatar-upload/picture-upload.tsx | 8 ++++---- .../test-run/test-form-header/test-form-header.tsx | 6 +++--- .../test-form-materials/node-field-collapse/collapse.tsx | 4 ++-- .../test-form-sheet-v2/ai-generate/generate-button.tsx | 4 ++-- .../components/test-run/test-form-sheet-v2/header.tsx | 6 +++--- .../test-run/test-form-sheet-v2/test-node-form.tsx | 6 +++--- .../src/components/toolbar/components/tools.tsx | 4 ++-- .../publish-button-v2/publish-with-version-v2.tsx | 4 ++-- .../playground/src/components/workflow-header/index.tsx | 5 ++--- .../src/entities/workflow-global-state-entity.ts | 4 ++-- .../model-select/components/selector/model-select-v2.tsx | 4 ++-- .../database/database-base/components/sql-field.tsx | 4 ++-- .../intent/components/mode-radio/index.tsx | 4 ++-- .../src/node-registries/intent/data-transformer.ts | 4 ++-- .../src/node-registries/start/data-transformer.ts | 4 ++-- .../playground/src/node-registries/start/form.tsx | 7 +++---- .../src/node-registries/start/node-registry.ts | 4 ++-- .../components/system-prompt/expand-sheet-editor.tsx | 4 ++-- .../nodes-v2/components/system-prompt/prompt-kit-bar.tsx | 6 +++--- .../playground/src/services/related-case-data-service.ts | 4 ++-- .../workflow/playground/src/services/trigger-service.ts | 4 ++-- .../src/test-run-kit/utils/generate-form-schema.ts | 6 +++--- .../playground/src/workflow-playground-context.ts | 4 ++-- 28 files changed, 69 insertions(+), 72 deletions(-) diff --git a/frontend/packages/project-ide/main/src/components/configuration/index.tsx b/frontend/packages/project-ide/main/src/components/configuration/index.tsx index 7a5f43f5..c0f7cb21 100644 --- a/frontend/packages/project-ide/main/src/components/configuration/index.tsx +++ b/frontend/packages/project-ide/main/src/components/configuration/index.tsx @@ -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} /> - {/* The community version does not currently support conversation management in project, for future expansion */} + {/* will support soon */} {IS_OPEN_SOURCE ? null : (
= 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, diff --git a/frontend/packages/workflow/components/src/workflow-modal/sider/create-workflow-btn.tsx b/frontend/packages/workflow/components/src/workflow-modal/sider/create-workflow-btn.tsx index 8a1eae57..646f3952 100644 --- a/frontend/packages/workflow/components/src/workflow-modal/sider/create-workflow-btn.tsx +++ b/frontend/packages/workflow/components/src/workflow-modal/sider/create-workflow-btn.tsx @@ -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 ? (
- {/* The community version does not support AI-generated avatar, for future expansion */} + {/* will support soon */} {!disabled && !IS_OPEN_SOURCE ? ( { 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 && ( {I18n.t('workflow_testset_view_log')} diff --git a/frontend/packages/workflow/playground/src/components/test-run/test-form-materials/node-field-collapse/collapse.tsx b/frontend/packages/workflow/playground/src/components/test-run/test-form-materials/node-field-collapse/collapse.tsx index da58b84b..98e6f9fc 100644 --- a/frontend/packages/workflow/playground/src/components/test-run/test-form-materials/node-field-collapse/collapse.tsx +++ b/frontend/packages/workflow/playground/src/components/test-run/test-form-materials/node-field-collapse/collapse.tsx @@ -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 = ({
- {/* The community version does not support AI-generated test-run inputs, for future expansion */} + {/* will support soon */} {IS_OPEN_SOURCE ? null : ( = ({ 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; } diff --git a/frontend/packages/workflow/playground/src/components/test-run/test-form-sheet-v2/header.tsx b/frontend/packages/workflow/playground/src/components/test-run/test-form-sheet-v2/header.tsx index 2d411ce7..c46f7919 100644 --- a/frontend/packages/workflow/playground/src/components/test-run/test-form-sheet-v2/header.tsx +++ b/frontend/packages/workflow/playground/src/components/test-run/test-form-sheet-v2/header.tsx @@ -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 && ( {I18n.t('workflow_testset_view_log')} diff --git a/frontend/packages/workflow/playground/src/components/test-run/test-form-sheet-v2/test-node-form.tsx b/frontend/packages/workflow/playground/src/components/test-run/test-form-sheet-v2/test-node-form.tsx index 1b15bc4f..98a8e178 100644 --- a/frontend/packages/workflow/playground/src/components/test-run/test-form-sheet-v2/test-node-form.tsx +++ b/frontend/packages/workflow/playground/src/components/test-run/test-form-sheet-v2/test-node-form.tsx @@ -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 = ({ 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 = ({ onClick={handleOpenTraceBottomSheet} hiddenStateText extra={ - // The community version does not currently support trace, for future expansion + // will support soon !IS_OPEN_SOURCE && ( {I18n.t('workflow_testset_view_log')} diff --git a/frontend/packages/workflow/playground/src/components/toolbar/components/tools.tsx b/frontend/packages/workflow/playground/src/components/toolbar/components/tools.tsx index 3fbfd67e..eec47add 100644 --- a/frontend/packages/workflow/playground/src/components/toolbar/components/tools.tsx +++ b/frontend/packages/workflow/playground/src/components/toolbar/components/tools.tsx @@ -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 && } diff --git a/frontend/packages/workflow/playground/src/components/workflow-header/components/publish-button-v2/publish-with-version-v2.tsx b/frontend/packages/workflow/playground/src/components/workflow-header/components/publish-button-v2/publish-with-version-v2.tsx index 4a7628ee..3ea335bb 100644 --- a/frontend/packages/workflow/playground/src/components/workflow-header/components/publish-button-v2/publish-with-version-v2.tsx +++ b/frontend/packages/workflow/playground/src/components/workflow-header/components/publish-button-v2/publish-with-version-v2.tsx @@ -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 && } {renderBtn()} diff --git a/frontend/packages/workflow/playground/src/components/workflow-header/index.tsx b/frontend/packages/workflow/playground/src/components/workflow-header/index.tsx index 78e17d5d..162119fd 100644 --- a/frontend/packages/workflow/playground/src/components/workflow-header/index.tsx +++ b/frontend/packages/workflow/playground/src/components/workflow-header/index.tsx @@ -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 = () => {
- {/** The community version does not currently provide resource tree modal. Will allow for future expansion. */} + {/* will support soon */} {IS_OPEN_SOURCE ? null : } - {/** 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 && } diff --git a/frontend/packages/workflow/playground/src/entities/workflow-global-state-entity.ts b/frontend/packages/workflow/playground/src/entities/workflow-global-state-entity.ts index 87fad739..ad41cd39 100644 --- a/frontend/packages/workflow/playground/src/entities/workflow-global-state-entity.ts +++ b/frontend/packages/workflow/playground/src/entities/workflow-global-state-entity.ts @@ -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 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 ); } diff --git a/frontend/packages/workflow/playground/src/form-extensions/setters/model-select/components/selector/model-select-v2.tsx b/frontend/packages/workflow/playground/src/form-extensions/setters/model-select/components/selector/model-select-v2.tsx index f56da963..7b9d0cf9 100644 --- a/frontend/packages/workflow/playground/src/form-extensions/setters/model-select/components/selector/model-select-v2.tsx +++ b/frontend/packages/workflow/playground/src/form-extensions/setters/model-select/components/selector/model-select-v2.tsx @@ -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 = ({ const { spaceId, projectId, isBindDouyin } = useGlobalState(); return ( { return (
- {/* The community version does not currently support the AI-generated SQL function for future expansion */} + {/* will support soon */} {!readonly && !IS_OPEN_SOURCE ? ( (TriggerService); diff --git a/frontend/packages/workflow/playground/src/node-registries/start/form.tsx b/frontend/packages/workflow/playground/src/node-registries/start/form.tsx index 14f8d2aa..cfab8808 100644 --- a/frontend/packages/workflow/playground/src/node-registries/start/form.tsx +++ b/frontend/packages/workflow/playground/src/node-registries/start/form.tsx @@ -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 ? ( = { 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, diff --git a/frontend/packages/workflow/playground/src/nodes-v2/components/system-prompt/expand-sheet-editor.tsx b/frontend/packages/workflow/playground/src/nodes-v2/components/system-prompt/expand-sheet-editor.tsx index 35bc90f0..331e302f 100644 --- a/frontend/packages/workflow/playground/src/nodes-v2/components/system-prompt/expand-sheet-editor.tsx +++ b/frontend/packages/workflow/playground/src/nodes-v2/components/system-prompt/expand-sheet-editor.tsx @@ -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 = props => { > - {/* The community version does not support the AI-generated system prompt feature, for future expansion */} + {/* will support soon */} {IS_OPEN_SOURCE ? null : ( )} diff --git a/frontend/packages/workflow/playground/src/nodes-v2/components/system-prompt/prompt-kit-bar.tsx b/frontend/packages/workflow/playground/src/nodes-v2/components/system-prompt/prompt-kit-bar.tsx index 697bbe93..81cf005f 100644 --- a/frontend/packages/workflow/playground/src/nodes-v2/components/system-prompt/prompt-kit-bar.tsx +++ b/frontend/packages/workflow/playground/src/nodes-v2/components/system-prompt/prompt-kit-bar.tsx @@ -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 => {
- {/* The community version does not support the AI-generated system prompt feature, for future expansion */} + {/* will support soon */} {IS_OPEN_SOURCE ? null : ( node.type === StandardNodeType.Start, ); - /* The community version does not currently support testset, for future expansion */ + /* will support soon */ if (IS_OPEN_SOURCE) { return; } diff --git a/frontend/packages/workflow/playground/src/services/trigger-service.ts b/frontend/packages/workflow/playground/src/services/trigger-service.ts index e7912aca..9caf56ad 100644 --- a/frontend/packages/workflow/playground/src/services/trigger-service.ts +++ b/frontend/packages/workflow/playground/src/services/trigger-service.ts @@ -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 = {}; protected startNodeFormValues: Record = {}; 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, diff --git a/frontend/packages/workflow/playground/src/test-run-kit/utils/generate-form-schema.ts b/frontend/packages/workflow/playground/src/test-run-kit/utils/generate-form-schema.ts index 5745feee..bb27a9c6 100644 --- a/frontend/packages/workflow/playground/src/test-run-kit/utils/generate-form-schema.ts +++ b/frontend/packages/workflow/playground/src/test-run-kit/utils/generate-form-schema.ts @@ -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 && diff --git a/frontend/packages/workflow/playground/src/workflow-playground-context.ts b/frontend/packages/workflow/playground/src/workflow-playground-context.ts index cceb2338..00b8e58a 100644 --- a/frontend/packages/workflow/playground/src/workflow-playground-context.ts +++ b/frontend/packages/workflow/playground/src/workflow-playground-context.ts @@ -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 { - // The community version does not currently support plugin favorite function, for future expansion + // will support soon if (IS_OPEN_SOURCE) { return { favorite_products: [],