chore: replace all cn comments of fe to en version by volc api (#320)

This commit is contained in:
tecvan
2025-07-31 10:32:15 +08:00
committed by GitHub
parent 716ec0cba8
commit 71f6245a01
2960 changed files with 15545 additions and 15545 deletions

View File

@@ -18,7 +18,7 @@
import { StandardNodeType } from '@coze-workflow/base';
/**
* 使用 V2 版本异常设置的节点
* Nodes using V2 version exception settings
*/
export const SETTING_ON_ERROR_V2_NODES = [
StandardNodeType.Code,
@@ -35,17 +35,17 @@ export const SETTING_ON_ERROR_V2_NODES = [
];
/**
* 使用V1的版本异常设置
* Version exception settings using V1
*/
export const SETTING_ON_ERROR_V1_NODES = [StandardNodeType.Http];
/**
* 有动态port的节点
* Nodes with dynamic ports
*/
export const SETTING_ON_ERROR_DYNAMIC_PORT_NODES = [StandardNodeType.Intent];
/**
* 开启异常的节点
* Open abnormal node
*/
export const SETTING_ON_ERROR_NODES = [
...SETTING_ON_ERROR_V1_NODES,
@@ -53,17 +53,17 @@ export const SETTING_ON_ERROR_NODES = [
];
/**
* 异常端口
* abnormal port
*/
export const SETTING_ON_ERROR_PORT = 'branch_error';
/**
* 超时最小100ms
* Timeout minimum 100ms;
*/
export const SETTING_ON_ERROR_MIN_TIMEOUT = 100;
/**
* 其他节点默认1分钟最大1分钟
* Other nodes: default 1 minute, maximum 1 minute;
*/
export const SETTING_ON_ERROR_DEFAULT_TIMEOUT = {
default: 60 * 1000,
@@ -71,9 +71,9 @@ export const SETTING_ON_ERROR_DEFAULT_TIMEOUT = {
};
/**
* 节点配置
* LLM默认3分钟最大10分钟
* 插件默认3分钟最大3分钟
* Node configuration
* LLM: Default 3 minutes, maximum 10 minutes;
* Plugin: Default 3 minutes, maximum 3 minutes;
*/
export const SETTING_ON_ERROR_NODES_CONFIG = {
[StandardNodeType.LLM]: {

View File

@@ -63,8 +63,8 @@ const settingOnErrorInitV2 = (
const timeoutConfig = getTimeoutConfig(context?.node);
if (!timeoutMs) {
// 如果没有设置超时时间,且有初始值配置,则设置初始值
// 如LLM后端默认是10min历史数据需要设置为init的10min新加的节点显示默认的default的3min
// If no timeout is set and there is an initial value configuration, set the initial value
// For example, the default of the LLM backend is 10min, the historical data needs to be set to 10min of init, and the newly added node displays the default default 3min.
if (value && timeoutConfig?.init) {
timeoutMs = timeoutConfig.init;
} else {

View File

@@ -19,7 +19,7 @@ import { useCurrentEntity } from '@flowgram-adapter/free-layout-editor';
import { getTimeoutConfig } from '../utils/get-timeout-config';
/**
* 获取超时配置
* Get timeout configuration
* @returns
*/
export const useTimeoutConfig = (): {

View File

@@ -17,10 +17,10 @@
import { type ViewVariableTreeNode } from '@coze-workflow/base';
/**
* 异常处理类型
* 1 直接中断
* 2 返回设定内容,
* 3 执行异常流程
* exception handling type
* 1 Direct interruption
* 2 Return to the setting content,
* 3 Execute abnormal flow
*/
export enum SettingOnErrorProcessType {
BREAK = 1,
@@ -29,11 +29,11 @@ export enum SettingOnErrorProcessType {
}
/**
* 异常处理额外数据
* Exception handling extra data
*/
export interface SettingOnErrorExt {
/**
* LLM节点重试的备选模型
* Alternative Model for LLM Node Retry
*/
backupLLmParam?: {
modelName?: string;
@@ -49,34 +49,34 @@ export interface SettingOnErrorExt {
interface SettingOnErrorBase {
/**
* 处理类型
* processing type
*/
processType?: SettingOnErrorProcessType;
/**
* 超时时间 毫秒
* Timeout, milliseconds
*/
timeoutMs?: number;
/**
* 重试次数 0 表示不重试
* Number of retries 0 means no retries
*/
retryTimes?: number;
}
/**
* 异常处理前端结构
* Exception handling front-end architecture
*/
export interface SettingOnErrorVO extends SettingOnErrorBase {
/**
* 是否开启异常处理
* Whether to enable exception handling
*/
settingOnErrorIsOpen?: boolean;
/**
* 发生异常处理的默认值
* Default value for exception handling to occur
*/
settingOnErrorJSON?: string;
/**
* 其他设置
* Other settings
*/
ext?: SettingOnErrorExt;
}
@@ -84,19 +84,19 @@ export interface SettingOnErrorVO extends SettingOnErrorBase {
export type SettingOnErrorValue = SettingOnErrorVO;
/**
* 异常处理后端结构
* exception handling backend structure
*/
export interface SettingOnErrorDTO extends SettingOnErrorBase {
/**
* 是否开启异常处理
* Whether to enable exception handling
*/
switch: boolean;
/**
* 发生异常处理的默认值
* Default value for exception handling to occur
*/
dataOnErr: string;
/**
* 其他设置
* Other settings
*/
ext?: {
backupLLmParam?: string;
@@ -104,7 +104,7 @@ export interface SettingOnErrorDTO extends SettingOnErrorBase {
}
/**
* 有异常设置的后端节点数据
* Backend node data with abnormal settings
*/
export interface NodeValueWithSettingOnErrorDTO {
inputs?: {
@@ -117,7 +117,7 @@ export interface NodeValueWithSettingOnErrorDTO {
}
/**
* 有异常设置的前端节点数据
* Front-end node data with exception settings
*/
export interface NodeValueWithSettingOnErrorVO {
settingOnError?: SettingOnErrorVO;

View File

@@ -23,7 +23,7 @@ import {
} from './constants';
/**
* 是不是v2版本的节点
* Is it a node of the v2 version?
* @param type
* @returns
*/
@@ -31,7 +31,7 @@ export const isSettingOnErrorV2 = (type?: StandardNodeType) =>
type && SETTING_ON_ERROR_V2_NODES.includes(type);
/**
* 是不是开启异常设置的节点
* Is it the node with the abnormal setting turned on?
* @param type
* @returns
*/
@@ -39,7 +39,7 @@ export const isSettingOnError = (type?: StandardNodeType) =>
type && SETTING_ON_ERROR_NODES.includes(type);
/**
* 是不是动态通道的节点
* Is it a node of the dynamic channel?
* @param type
* @returns
*/

View File

@@ -26,7 +26,7 @@ import {
import { WorkflowNodeData } from '../../entity-datas';
/**
* 是不是端插件
* Is it a side plug-in?
* @param node
* @returns
*/
@@ -45,7 +45,7 @@ const isLocalPlugin = (node?: WorkflowNodeEntity) => {
};
/**
* 获取节点超时配置
* Get node timeout configuration
*/
export const getTimeoutConfig = (
node?: WorkflowNodeEntity,

View File

@@ -31,7 +31,7 @@ const includeFn = isSettingOnErrorV2 => v =>
settingOnErrorNames(isSettingOnErrorV2).includes(v.name);
/**
* 向 output 中添加/剔除 errorBody
* Add/remove errorBody to output
*/
export const getOutputsWithErrorBody = ({
value,
@@ -47,9 +47,9 @@ export const getOutputsWithErrorBody = ({
if (!value) {
return value;
}
// 添加 errorBody
// Add errorBody
if (isOpen) {
// batch 模式下,在第一层的 children 里追加 errorBody
// In batch mode, append errorBody to children in the first layer
if (isBatch) {
return [
{
@@ -61,7 +61,7 @@ export const getOutputsWithErrorBody = ({
],
},
];
// single 模式下,在第一层追加 errorBody
// In single mode, append an errorBody to the first layer
} else {
return [
...(value ?? []).filter(excludeFn(isSettingOnErrorV2)),
@@ -69,9 +69,9 @@ export const getOutputsWithErrorBody = ({
...(isSettingOnErrorV2 ? [generateIsSuccessMeta()] : []),
];
}
// 剔除 errorBody
// errorBody
} else {
// batch 模式下,从第一层的 children 中剔除
// In batch mode, remove children from the first layer
if (isBatch) {
const [one, ...rest] = value;
return [
@@ -83,7 +83,7 @@ export const getOutputsWithErrorBody = ({
},
...rest,
];
// single 模式下,从第一层的 children 中剔除
// In single mode, remove children from the first layer
} else {
return [...(value ?? []).filter(excludeFn(isSettingOnErrorV2))];
}
@@ -91,7 +91,7 @@ export const getOutputsWithErrorBody = ({
};
/**
* output 属性排序,保证 errorBody 在最下面
* The output property is sorted to ensure that errorBody is at the bottom
*/
export const sortErrorBody = ({
value,
@@ -126,7 +126,7 @@ export const sortErrorBody = ({
};
/**
* 把 value 中的 errorBody 删除掉
* Remove the errorBody from the value
*/
export const getExcludeErrorBody = ({
value,