chore: format all frontend files (#430)

This commit is contained in:
tecvan
2025-07-31 23:15:48 +08:00
committed by GitHub
parent 8b078ff013
commit 6995cec404
8787 changed files with 11975 additions and 10924 deletions

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type FlowNodeEntity } from '@flowgram-adapter/free-layout-editor';
import { NODE_TEST_ID_PREFIX } from '../constants';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { cloneDeep } from 'lodash-es';
import { isFormV2 } from '@flowgram-adapter/free-layout-editor';
import { FlowNodeFormData } from '@flowgram-adapter/free-layout-editor';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ViewVariableType } from '../types/view-variable-type';
export const ACCEPT_MAP = {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export {
SchemaExtractorParserName,
SchemaExtractor,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { WorkflowMode } from '@coze-arch/bot-api/workflow_api';
/**

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type WorkflowJSON } from '../../types';
import { type NodeResult } from '../../api';
import {

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 */
import { isString } from 'lodash-es';
@@ -95,8 +95,8 @@ const parseData = (
const rawOutputData = textHasRawout
? rawOutput?.toString?.()
: rawOutput
? typeSafeJSONParse(rawOutput) || rawOutput?.toString?.()
: undefined;
? typeSafeJSONParse(rawOutput) || rawOutput?.toString?.()
: undefined;
/** Code, Llm nodes need to display raw */
const hasRawOutput =
@@ -121,8 +121,8 @@ const parseData = (
const outputTitle = inputAsOutput
? '输出变量'
: rawOutputData
? '最终输出'
: '输出';
? '最终输出'
: '输出';
outputData &&
dataList.push({
title: outputTitle,

View File

@@ -13,5 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { defaultParser } from './default-parser';

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 { type StandardNodeType, type WorkflowJSON } from '../../types';
import { type NodeResult } from '../../api';

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 { flatten, get } from 'lodash-es';
import { type WorkflowNodeJSON } from '@flowgram-adapter/free-layout-editor';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { describe, expect, it } from 'vitest';
import { StandardNodeType, type WorkflowJSON } from '../../../types';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { expect, it } from 'vitest';
import { SchemaExtractorParserName } from '../constant';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { expect, it } from 'vitest';
import { StandardNodeType } from '../../../types';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { expect, it } from 'vitest';
import { SchemaExtractorParserName } from '../constant';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { expect, it } from 'vitest';
import { SchemaExtractorParserName } from '../constant';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { expect, it } from 'vitest';
import { StandardNodeType } from '../../../types';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { expect, it } from 'vitest';
import { SchemaExtractorParserName } from '../constant';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { expect, it } from 'vitest';
import { SchemaExtractorParserName } from '../constant';

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-deep-relative-import */
import { type SchemaExtractorConfig } from '../../type';
import { SchemaExtractorParserName } from '../../constant';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const imageflowSchemaJSON = {
nodes: [
{

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type SchemaExtractorConfig } from '../../type';
import { SchemaExtractorParserName } from '../../constant';
import { StandardNodeType } from '../../../../types';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const workflowSchemaJSON = {
nodes: [
{

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { expect, it } from 'vitest';
import { SchemaExtractor } from '..';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { expect, it } from 'vitest';
import { SchemaExtractor } from '..';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export enum SchemaExtractorParserName {
DEFAULT = 'default',
INPUT_PARAMETERS = 'inputParameters',

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { get, cloneDeep } from 'lodash-es';
import type { WorkflowEdgeJSON } from '@flowgram-adapter/free-layout-editor';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { get } from 'lodash-es';
import { type SchemaExtractorConcatResultParser } from '../type';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { get } from 'lodash-es';
import { type SchemaExtractorArrayConcatCharParser } from '../type';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { get } from 'lodash-es';
import { type SchemaExtractorSplitCharParser } from '../type';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { get } from 'lodash-es';
import { type SchemaExtractorDatasetParamParser } from '../type';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type SchemaExtractorDbConditionsParser } from '../type';
import { inputParametersParser } from './input-parameters';
export const dbConditionsParser: SchemaExtractorDbConditionsParser =

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { parseExpression } from '../utils';
import { type SchemaExtractorDbFieldsParser } from '../type';
export const dbFieldsParser: SchemaExtractorDbFieldsParser = dbFields =>

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { parseExpression } from '../utils';
import { type SchemaExtractorExpressionParser } from '../type';
import type { ValueExpressionDTO } from '../../../types';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { SchemaExtractorImageReferenceParser } from '../type';
import { inputParametersParser } from './input-parameters';
export const imageReferenceParser: SchemaExtractorImageReferenceParser =

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type SchemaExtractorParser } from '../type';
import { SchemaExtractorParserName } from '../constant';
import { variableMergeGroupsParser } from './variable-merge-groups-parser';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { get } from 'lodash-es';
import { parseExpression } from '../utils';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type SchemaExtractorIntentsParamParser } from '../type';
export const intentsParser: SchemaExtractorIntentsParamParser = intents => ({

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type SchemaExtractorJSONStringParser } from '../type';
export const jsonStringParser: SchemaExtractorJSONStringParser = (

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { get } from 'lodash-es';
import { type SchemaExtractorLLMParamParser } from '../type';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { isWorkflowImageTypeURL } from '../utils';
import { type SchemaExtractorOutputsParser } from '../type';
import { AssistTypeDTO, VariableTypeDTO } from '../../../types/dto';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { get, isPlainObject } from 'lodash-es';
import { isWorkflowImageTypeURL } from '../utils';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type SchemaExtractorVariableAssignParser } from '../type';
import { type ValueExpressionDTO, type DTODefine } from '../../../types';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type SchemaExtractorVariableMergeGroupsParser } from '../type';
import { expressionParser } from './expression-parser';
export const variableMergeGroupsParser: SchemaExtractorVariableMergeGroupsParser =

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { DatasetParams } from '../../types/data-set';
import type {
InputValueDTO,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { get } from 'lodash-es';
import { type ValueExpressionDTO } from '../../types';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { reporter as infraReporter } from '@coze-arch/logger';
const namespace = 'workflow';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { BOT_USER_INPUT, CONVERSATION_NAME, USER_INPUT } from '../constants';
/**
* Whether to preset the input parameters of the start node

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable security/detect-object-injection -- no-need */
/* eslint-disable @typescript-eslint/no-namespace -- no-need */
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- no-need