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

* docs: use new doc styles

* docs: use new doc styles

* docs: use new doc styles
main
tecvan 3 months ago committed by GitHub
parent 9ca1ae506f
commit d9ec4f60e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      frontend/packages/project-ide/main/src/components/configuration/index.tsx
  2. 4
      frontend/packages/project-ide/main/src/index.tsx
  3. 6
      frontend/packages/workflow/components/src/workflow-modal/sider/create-workflow-btn.tsx
  4. 9
      frontend/packages/workflow/components/src/workflow-modal/sider/workflow-filter.tsx
  5. 8
      frontend/packages/workflow/playground/src/components/flow-role/role-config-form/config-form.tsx
  6. 8
      frontend/packages/workflow/playground/src/components/flow-role/role-config-form/role-avatar-upload/picture-upload.tsx
  7. 6
      frontend/packages/workflow/playground/src/components/test-run/test-form-header/test-form-header.tsx
  8. 4
      frontend/packages/workflow/playground/src/components/test-run/test-form-materials/node-field-collapse/collapse.tsx
  9. 4
      frontend/packages/workflow/playground/src/components/test-run/test-form-sheet-v2/ai-generate/generate-button.tsx
  10. 6
      frontend/packages/workflow/playground/src/components/test-run/test-form-sheet-v2/header.tsx
  11. 6
      frontend/packages/workflow/playground/src/components/test-run/test-form-sheet-v2/test-node-form.tsx
  12. 4
      frontend/packages/workflow/playground/src/components/toolbar/components/tools.tsx
  13. 4
      frontend/packages/workflow/playground/src/components/workflow-header/components/publish-button-v2/publish-with-version-v2.tsx
  14. 5
      frontend/packages/workflow/playground/src/components/workflow-header/index.tsx
  15. 4
      frontend/packages/workflow/playground/src/entities/workflow-global-state-entity.ts
  16. 4
      frontend/packages/workflow/playground/src/form-extensions/setters/model-select/components/selector/model-select-v2.tsx
  17. 4
      frontend/packages/workflow/playground/src/node-registries/database/database-base/components/sql-field.tsx
  18. 4
      frontend/packages/workflow/playground/src/node-registries/intent/components/mode-radio/index.tsx
  19. 4
      frontend/packages/workflow/playground/src/node-registries/intent/data-transformer.ts
  20. 4
      frontend/packages/workflow/playground/src/node-registries/start/data-transformer.ts
  21. 7
      frontend/packages/workflow/playground/src/node-registries/start/form.tsx
  22. 4
      frontend/packages/workflow/playground/src/node-registries/start/node-registry.ts
  23. 4
      frontend/packages/workflow/playground/src/nodes-v2/components/system-prompt/expand-sheet-editor.tsx
  24. 6
      frontend/packages/workflow/playground/src/nodes-v2/components/system-prompt/prompt-kit-bar.tsx
  25. 4
      frontend/packages/workflow/playground/src/services/related-case-data-service.ts
  26. 4
      frontend/packages/workflow/playground/src/services/trigger-service.ts
  27. 6
      frontend/packages/workflow/playground/src/test-run-kit/utils/generate-form-schema.ts
  28. 4
      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 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(

@ -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,

@ -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}

@ -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',

@ -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': {

@ -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}

@ -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')}

@ -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}

@ -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;
}

@ -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')}

@ -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')}

@ -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 />
</>

@ -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()}

@ -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 />}

@ -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
);
}

@ -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(

@ -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']}

@ -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;
}

@ -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

@ -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);

@ -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'}

@ -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,

@ -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 />
)}

@ -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}

@ -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;
}

@ -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,

@ -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 &&

@ -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: [],

Loading…
Cancel
Save