mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-28 09:03:53 +00:00
feat: update ESLint config with @typescript-eslint/consistent-type-imports (#4746)
* update: Add type * fix: update import statement for NextApiRequest type * fix: update imports to use type for LexicalEditor and EditorState * Refactor imports to use 'import type' for type-only imports across multiple files - Updated imports in various components and API files to use 'import type' for better clarity and to optimize TypeScript's type checking. - Ensured consistent usage of type imports in files related to chat, dataset, workflow, and user management. - Improved code readability and maintainability by distinguishing between value and type imports. * refactor: remove old ESLint configuration and add new rules - Deleted the old ESLint configuration file from the app project. - Added a new ESLint configuration file with updated rules and settings. - Changed imports to use type-only imports in various files for better clarity and performance. - Updated TypeScript configuration to remove unnecessary options. - Added an ESLint ignore file to exclude build and dependency directories from linting. * fix: update imports to use 'import type' for type-only imports in schema files
This commit is contained in:
42
packages/global/core/workflow/runtime/type.d.ts
vendored
42
packages/global/core/workflow/runtime/type.d.ts
vendored
@@ -1,30 +1,32 @@
|
||||
import { ChatNodeUsageType } from '../../../support/wallet/bill/type';
|
||||
import {
|
||||
import type { ChatNodeUsageType } from '../../../support/wallet/bill/type';
|
||||
import type {
|
||||
ChatItemType,
|
||||
UserChatItemValueItemType,
|
||||
ToolRunResponseItemType,
|
||||
NodeOutputItemType,
|
||||
AIChatItemValueItemType
|
||||
} from '../../chat/type';
|
||||
import { FlowNodeInputItemType, FlowNodeOutputItemType } from '../type/io.d';
|
||||
import { StoreNodeItemType } from '../type/node';
|
||||
import { DispatchNodeResponseKeyEnum } from './constants';
|
||||
import { StoreEdgeItemType } from '../type/edge';
|
||||
import { NodeInputKeyEnum } from '../constants';
|
||||
import { ClassifyQuestionAgentItemType } from '../template/system/classifyQuestion/type';
|
||||
import { NextApiResponse } from 'next';
|
||||
import { NodeOutputItemType } from '../../chat/type';
|
||||
import type { FlowNodeInputItemType, FlowNodeOutputItemType } from '../type/io.d';
|
||||
import type { StoreNodeItemType } from '../type/node';
|
||||
import type { DispatchNodeResponseKeyEnum } from './constants';
|
||||
import type { StoreEdgeItemType } from '../type/edge';
|
||||
import type { NodeInputKeyEnum } from '../constants';
|
||||
import type { ClassifyQuestionAgentItemType } from '../template/system/classifyQuestion/type';
|
||||
import type { NextApiResponse } from 'next';
|
||||
import { UserModelSchema } from '../../../support/user/type';
|
||||
import { AppDetailType, AppSchema } from '../../app/type';
|
||||
import { RuntimeNodeItemType } from '../runtime/type';
|
||||
import { RuntimeEdgeItemType } from './edge';
|
||||
import { ReadFileNodeResponse } from '../template/system/readFiles/type';
|
||||
import type { AppSchema } from '../../app/type';
|
||||
import { AppDetailType } from '../../app/type';
|
||||
import type { RuntimeNodeItemType } from '../runtime/type';
|
||||
import type { RuntimeEdgeItemType } from './edge';
|
||||
import type { ReadFileNodeResponse } from '../template/system/readFiles/type';
|
||||
import { UserSelectOptionType } from '../template/system/userSelect/type';
|
||||
import { WorkflowResponseType } from '../../../../service/core/workflow/dispatch/type';
|
||||
import { AiChatQuoteRoleType } from '../template/system/aiChat/type';
|
||||
import { LafAccountType, OpenaiAccountType } from '../../../support/user/team/type';
|
||||
import { CompletionFinishReason } from '../../ai/type';
|
||||
import { WorkflowInteractiveResponseType } from '../template/system/interactive/type';
|
||||
import { SearchDataResponseItemType } from '../../dataset/type';
|
||||
import type { WorkflowResponseType } from '../../../../service/core/workflow/dispatch/type';
|
||||
import type { AiChatQuoteRoleType } from '../template/system/aiChat/type';
|
||||
import type { OpenaiAccountType } from '../../../support/user/team/type';
|
||||
import { LafAccountType } from '../../../support/user/team/type';
|
||||
import type { CompletionFinishReason } from '../../ai/type';
|
||||
import type { WorkflowInteractiveResponseType } from '../template/system/interactive/type';
|
||||
import type { SearchDataResponseItemType } from '../../dataset/type';
|
||||
export type ExternalProviderType = {
|
||||
openaiAccount?: OpenaiAccountType;
|
||||
externalWorkflowVariables?: Record<string, string>;
|
||||
|
@@ -1,19 +1,19 @@
|
||||
import { ChatCompletionRequestMessageRoleEnum } from '../../ai/constants';
|
||||
import { NodeInputKeyEnum, NodeOutputKeyEnum, WorkflowIOValueTypeEnum } from '../constants';
|
||||
import { FlowNodeTypeEnum } from '../node/constant';
|
||||
import { StoreNodeItemType } from '../type/node';
|
||||
import { StoreEdgeItemType } from '../type/edge';
|
||||
import { RuntimeEdgeItemType, RuntimeNodeItemType } from './type';
|
||||
import { type StoreNodeItemType } from '../type/node';
|
||||
import { type StoreEdgeItemType } from '../type/edge';
|
||||
import { type RuntimeEdgeItemType, type RuntimeNodeItemType } from './type';
|
||||
import { VARIABLE_NODE_ID } from '../constants';
|
||||
import { isValidReferenceValueFormat } from '../utils';
|
||||
import { FlowNodeOutputItemType, ReferenceValueType } from '../type/io';
|
||||
import { ChatItemType, NodeOutputItemType } from '../../../core/chat/type';
|
||||
import { type FlowNodeOutputItemType, type ReferenceValueType } from '../type/io';
|
||||
import { type ChatItemType, type NodeOutputItemType } from '../../../core/chat/type';
|
||||
import { ChatItemValueTypeEnum, ChatRoleEnum } from '../../../core/chat/constants';
|
||||
import { replaceVariable, valToStr } from '../../../common/string/tools';
|
||||
import json5 from 'json5';
|
||||
import {
|
||||
InteractiveNodeResponseType,
|
||||
WorkflowInteractiveResponseType
|
||||
type InteractiveNodeResponseType,
|
||||
type WorkflowInteractiveResponseType
|
||||
} from '../template/system/interactive/type';
|
||||
|
||||
export const extractDeepestInteractive = (
|
||||
|
Reference in New Issue
Block a user