mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-25 20:02:47 +00:00
feat: update ESLint config with @typescript-eslint/consistent-type-imports (#4746)
Some checks failed
Deploy doc image to cf / deploy-production (push) Has been cancelled
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Has been cancelled
Deploy doc image by kubeconfig / update-docs-image (push) Has been cancelled
Some checks failed
Deploy doc image to cf / deploy-production (push) Has been cancelled
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Has been cancelled
Deploy doc image by kubeconfig / update-docs-image (push) Has been cancelled
* 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:
parent
5361674a2c
commit
2d3117c5da
|
|
@ -0,0 +1,25 @@
|
||||||
|
# 构建输出目录
|
||||||
|
dist/
|
||||||
|
build/
|
||||||
|
.next/
|
||||||
|
out/
|
||||||
|
|
||||||
|
# 依赖目录
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# 缓存和生成文件
|
||||||
|
coverage/
|
||||||
|
.coverage/
|
||||||
|
.nyc_output/
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# 其他不需要检查的文件
|
||||||
|
*.min.js
|
||||||
|
*.config.js
|
||||||
|
vitest.config.mts
|
||||||
|
|
||||||
|
# 特定目录
|
||||||
|
bin/
|
||||||
|
scripts/
|
||||||
|
deploy/
|
||||||
|
docSite/
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"root": true,
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"plugins": ["@typescript-eslint"],
|
||||||
|
"extends": ["next/core-web-vitals"],
|
||||||
|
"rules": {
|
||||||
|
"react-hooks/rules-of-hooks": 0,
|
||||||
|
"@typescript-eslint/consistent-type-imports": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"prefer": "type-imports",
|
||||||
|
"disallowTypeAnnotations": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ignorePatterns": ["node_modules/", "dist/", "build/", "coverage/"]
|
||||||
|
}
|
||||||
11
package.json
11
package.json
|
|
@ -13,12 +13,18 @@
|
||||||
"previewIcon": "node ./scripts/icon/index.js",
|
"previewIcon": "node ./scripts/icon/index.js",
|
||||||
"api:gen": "tsc ./scripts/openapi/index.ts && node ./scripts/openapi/index.js && npx @redocly/cli build-docs ./scripts/openapi/openapi.json -o ./projects/app/public/openapi/index.html",
|
"api:gen": "tsc ./scripts/openapi/index.ts && node ./scripts/openapi/index.js && npx @redocly/cli build-docs ./scripts/openapi/openapi.json -o ./projects/app/public/openapi/index.html",
|
||||||
"create:i18n": "node ./scripts/i18n/index.js",
|
"create:i18n": "node ./scripts/i18n/index.js",
|
||||||
|
"lint": "eslint \"**/*.{ts,tsx}\" --ignore-path .eslintignore",
|
||||||
|
"lint:fix": "eslint \"**/*.{ts,tsx}\" --fix --ignore-path .eslintignore",
|
||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
"test:workflow": "vitest run workflow"
|
"test:workflow": "vitest run workflow"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@chakra-ui/cli": "^2.4.1",
|
"@chakra-ui/cli": "^2.4.1",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
||||||
|
"@typescript-eslint/parser": "^6.21.0",
|
||||||
"@vitest/coverage-v8": "^3.0.9",
|
"@vitest/coverage-v8": "^3.0.9",
|
||||||
|
"eslint": "^8.57.0",
|
||||||
|
"eslint-config-next": "^14.1.0",
|
||||||
"husky": "^8.0.3",
|
"husky": "^8.0.3",
|
||||||
"i18next": "23.16.8",
|
"i18next": "23.16.8",
|
||||||
"lint-staged": "^13.3.0",
|
"lint-staged": "^13.3.0",
|
||||||
|
|
@ -31,7 +37,10 @@
|
||||||
"zhlint": "^0.7.4"
|
"zhlint": "^0.7.4"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"./**/**/*.{ts,tsx,scss}": "npm run format-code",
|
"./**/**/*.{ts,tsx,scss}": [
|
||||||
|
"npm run format-code",
|
||||||
|
"npm run lint:fix"
|
||||||
|
],
|
||||||
"./docSite/**/**/*.md": "npm run format-doc && npm run gen:llms"
|
"./docSite/**/**/*.md": "npm run format-doc && npm run gen:llms"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { ErrType } from '../errorCode';
|
import { type ErrType } from '../errorCode';
|
||||||
import { i18nT } from '../../../../web/i18n/utils';
|
import { i18nT } from '../../../../web/i18n/utils';
|
||||||
/* dataset: 502000 */
|
/* dataset: 502000 */
|
||||||
export enum AppErrEnum {
|
export enum AppErrEnum {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { ErrType } from '../errorCode';
|
import { type ErrType } from '../errorCode';
|
||||||
import { i18nT } from '../../../../web/i18n/utils';
|
import { i18nT } from '../../../../web/i18n/utils';
|
||||||
/* dataset: 504000 */
|
/* dataset: 504000 */
|
||||||
export enum ChatErrEnum {
|
export enum ChatErrEnum {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { i18nT } from '../../../../web/i18n/utils';
|
import { i18nT } from '../../../../web/i18n/utils';
|
||||||
import { ErrType } from '../errorCode';
|
import { type ErrType } from '../errorCode';
|
||||||
|
|
||||||
/* dataset: 507000 */
|
/* dataset: 507000 */
|
||||||
const startCode = 507000;
|
const startCode = 507000;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { i18nT } from '../../../../web/i18n/utils';
|
import { i18nT } from '../../../../web/i18n/utils';
|
||||||
import { ErrType } from '../errorCode';
|
import { type ErrType } from '../errorCode';
|
||||||
|
|
||||||
/* dataset: 501000 */
|
/* dataset: 501000 */
|
||||||
export enum DatasetErrEnum {
|
export enum DatasetErrEnum {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { ErrType } from '../errorCode';
|
import { type ErrType } from '../errorCode';
|
||||||
import { i18nT } from '../../../../web/i18n/utils';
|
import { i18nT } from '../../../../web/i18n/utils';
|
||||||
/* dataset: 506000 */
|
/* dataset: 506000 */
|
||||||
export enum OpenApiErrEnum {
|
export enum OpenApiErrEnum {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { ErrType } from '../errorCode';
|
import { type ErrType } from '../errorCode';
|
||||||
import { i18nT } from '../../../../web/i18n/utils';
|
import { i18nT } from '../../../../web/i18n/utils';
|
||||||
/* dataset: 505000 */
|
/* dataset: 505000 */
|
||||||
export enum OutLinkErrEnum {
|
export enum OutLinkErrEnum {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { ErrType } from '../errorCode';
|
import { type ErrType } from '../errorCode';
|
||||||
import { i18nT } from '../../../../web/i18n/utils';
|
import { i18nT } from '../../../../web/i18n/utils';
|
||||||
/* dataset: 508000 */
|
/* dataset: 508000 */
|
||||||
export enum PluginErrEnum {
|
export enum PluginErrEnum {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { ErrType } from '../errorCode';
|
import { type ErrType } from '../errorCode';
|
||||||
import { i18nT } from '../../../../web/i18n/utils';
|
import { i18nT } from '../../../../web/i18n/utils';
|
||||||
/* dataset: 509000 */
|
/* dataset: 509000 */
|
||||||
export enum SystemErrEnum {
|
export enum SystemErrEnum {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { ErrType } from '../errorCode';
|
import { type ErrType } from '../errorCode';
|
||||||
import { i18nT } from '../../../../web/i18n/utils';
|
import { i18nT } from '../../../../web/i18n/utils';
|
||||||
/* team: 503000 */
|
/* team: 503000 */
|
||||||
export enum UserErrEnum {
|
export enum UserErrEnum {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { OutLinkChatAuthProps } from '../../support/permission/chat.d';
|
import type { OutLinkChatAuthProps } from '../../support/permission/chat.d';
|
||||||
|
|
||||||
export type preUploadImgProps = OutLinkChatAuthProps & {
|
export type preUploadImgProps = OutLinkChatAuthProps & {
|
||||||
// expiredTime?: Date;
|
// expiredTime?: Date;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { detect } from 'jschardet';
|
import { detect } from 'jschardet';
|
||||||
import { documentFileType } from './constants';
|
import { documentFileType } from './constants';
|
||||||
import { ChatFileTypeEnum } from '../../core/chat/constants';
|
import { ChatFileTypeEnum } from '../../core/chat/constants';
|
||||||
import { UserChatItemValueItemType } from '../../core/chat/type';
|
import { type UserChatItemValueItemType } from '../../core/chat/type';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
|
|
||||||
export const formatFileSize = (bytes: number): string => {
|
export const formatFileSize = (bytes: number): string => {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { BucketNameEnum } from './constants';
|
import type { BucketNameEnum } from './constants';
|
||||||
|
|
||||||
export type FileTokenQuery = {
|
export type FileTokenQuery = {
|
||||||
bucketName: `${BucketNameEnum}`;
|
bucketName: `${BucketNameEnum}`;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { TrackEnum } from './constants';
|
import type { TrackEnum } from './constants';
|
||||||
import { OAuthEnum } from '../../../support/user/constant';
|
import { OAuthEnum } from '../../../support/user/constant';
|
||||||
import { AppTypeEnum } from '../../../core/app/constants';
|
import { AppTypeEnum } from '../../../core/app/constants';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { ParentIdType } from './type';
|
import { type ParentIdType } from './type';
|
||||||
|
|
||||||
export const parseParentIdInMongo = (parentId: ParentIdType) => {
|
export const parseParentIdInMongo = (parentId: ParentIdType) => {
|
||||||
if (parentId === undefined) return {};
|
if (parentId === undefined) return {};
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import { SystemConfigsTypeEnum } from "./constants";
|
import type { SystemConfigsTypeEnum } from './constants';
|
||||||
|
|
||||||
export type SystemConfigsType = {
|
export type SystemConfigsType = {
|
||||||
_id: string;
|
_id: string;
|
||||||
type: `${SystemConfigsTypeEnum}`;
|
type: `${SystemConfigsTypeEnum}`;
|
||||||
value: Record<string, any>;
|
value: Record<string, any>;
|
||||||
createTime: Date;
|
createTime: Date;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { StandSubPlanLevelMapType, SubPlanType } from '../../../support/wallet/sub/type';
|
import type { SubPlanType } from '../../../support/wallet/sub/type';
|
||||||
|
import { StandSubPlanLevelMapType } from '../../../support/wallet/sub/type';
|
||||||
import type {
|
import type {
|
||||||
ChatModelItemType,
|
ChatModelItemType,
|
||||||
FunctionModelItemType,
|
FunctionModelItemType,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { ModelTypeEnum } from './model';
|
import type { ModelTypeEnum } from './model';
|
||||||
import type { ModelProviderIdType } from './provider';
|
import type { ModelProviderIdType } from './provider';
|
||||||
|
|
||||||
type PriceType = {
|
type PriceType = {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { i18nT } from '../../../web/i18n/utils';
|
import { i18nT } from '../../../web/i18n/utils';
|
||||||
import type { LLMModelItemType, STTModelType, EmbeddingModelItemType } from './model.d';
|
import type { LLMModelItemType, STTModelType, EmbeddingModelItemType } from './model.d';
|
||||||
import { getModelProvider, ModelProviderIdType } from './provider';
|
import { getModelProvider, type ModelProviderIdType } from './provider';
|
||||||
|
|
||||||
export enum ModelTypeEnum {
|
export enum ModelTypeEnum {
|
||||||
llm = 'llm',
|
llm = 'llm',
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { PromptTemplateItem } from '../type.d';
|
import { type PromptTemplateItem } from '../type.d';
|
||||||
import { i18nT } from '../../../../web/i18n/utils';
|
import { i18nT } from '../../../../web/i18n/utils';
|
||||||
import { getPromptByVersion } from './utils';
|
import { getPromptByVersion } from './utils';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ import type {
|
||||||
ChatCompletionAssistantMessageParam as SdkChatCompletionAssistantMessageParam
|
ChatCompletionAssistantMessageParam as SdkChatCompletionAssistantMessageParam
|
||||||
} from 'openai/resources';
|
} from 'openai/resources';
|
||||||
import { ChatMessageTypeEnum } from './constants';
|
import { ChatMessageTypeEnum } from './constants';
|
||||||
import { WorkflowInteractiveResponseType } from '../workflow/template/system/interactive/type';
|
import type { WorkflowInteractiveResponseType } from '../workflow/template/system/interactive/type';
|
||||||
import { Stream } from 'openai/streaming';
|
import type { Stream } from 'openai/streaming';
|
||||||
export * from 'openai/resources';
|
export * from 'openai/resources';
|
||||||
|
|
||||||
// Extension of ChatCompletionMessageParam, Add file url type
|
// Extension of ChatCompletionMessageParam, Add file url type
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import {
|
import {
|
||||||
AppTTSConfigType,
|
type AppTTSConfigType,
|
||||||
AppFileSelectConfigType,
|
type AppFileSelectConfigType,
|
||||||
AppWhisperConfigType,
|
type AppWhisperConfigType,
|
||||||
AppAutoExecuteConfigType,
|
type AppAutoExecuteConfigType,
|
||||||
AppQGConfigType
|
type AppQGConfigType
|
||||||
} from './type';
|
} from './type';
|
||||||
|
|
||||||
export enum AppTypeEnum {
|
export enum AppTypeEnum {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { ParentIdType } from 'common/parentFolder/type';
|
import type { ParentIdType } from 'common/parentFolder/type';
|
||||||
import { AppSchema } from './type';
|
import type { AppSchema } from './type';
|
||||||
import { AppTypeEnum } from './constants';
|
import type { AppTypeEnum } from './constants';
|
||||||
|
|
||||||
export type CreateAppProps = {
|
export type CreateAppProps = {
|
||||||
parentId?: ParentIdType;
|
parentId?: ParentIdType;
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
import { getNanoid } from '../../../common/string/tools';
|
import { getNanoid } from '../../../common/string/tools';
|
||||||
import { OpenApiJsonSchema } from './type';
|
import { type OpenApiJsonSchema } from './type';
|
||||||
import yaml from 'js-yaml';
|
import yaml from 'js-yaml';
|
||||||
import { OpenAPIV3 } from 'openapi-types';
|
import type { OpenAPIV3 } from 'openapi-types';
|
||||||
import { FlowNodeInputItemType, FlowNodeOutputItemType } from '../../workflow/type/io';
|
import { type FlowNodeInputItemType, type FlowNodeOutputItemType } from '../../workflow/type/io';
|
||||||
import { FlowNodeInputTypeEnum, FlowNodeOutputTypeEnum } from '../../workflow/node/constant';
|
import { FlowNodeInputTypeEnum, FlowNodeOutputTypeEnum } from '../../workflow/node/constant';
|
||||||
import { WorkflowIOValueTypeEnum } from '../../workflow/constants';
|
import { WorkflowIOValueTypeEnum } from '../../workflow/constants';
|
||||||
import { PluginInputModule } from '../../workflow/template/system/pluginInput';
|
import { PluginInputModule } from '../../workflow/template/system/pluginInput';
|
||||||
import { PluginOutputModule } from '../../workflow/template/system/pluginOutput';
|
import { PluginOutputModule } from '../../workflow/template/system/pluginOutput';
|
||||||
import { HttpNode468 } from '../../workflow/template/system/http468';
|
import { HttpNode468 } from '../../workflow/template/system/http468';
|
||||||
import { HttpParamAndHeaderItemType } from '../../workflow/api';
|
import { type HttpParamAndHeaderItemType } from '../../workflow/api';
|
||||||
import { StoreNodeItemType } from '../../workflow/type/node';
|
import { type StoreNodeItemType } from '../../workflow/type/node';
|
||||||
import { HttpImgUrl } from '../../../common/file/image/constants';
|
import { HttpImgUrl } from '../../../common/file/image/constants';
|
||||||
import SwaggerParser from '@apidevtools/swagger-parser';
|
import SwaggerParser from '@apidevtools/swagger-parser';
|
||||||
import { getHandleId } from '../../workflow/utils';
|
import { getHandleId } from '../../workflow/utils';
|
||||||
import { CreateHttpPluginChildrenPros } from '../controller';
|
import { type CreateHttpPluginChildrenPros } from '../controller';
|
||||||
import { AppTypeEnum } from '../constants';
|
import { AppTypeEnum } from '../constants';
|
||||||
import type { StoreEdgeItemType } from '../../workflow/type/edge';
|
import type { StoreEdgeItemType } from '../../workflow/type/edge';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@ import {
|
||||||
FlowNodeTypeEnum
|
FlowNodeTypeEnum
|
||||||
} from '../../workflow/node/constant';
|
} from '../../workflow/node/constant';
|
||||||
import { nanoid } from 'nanoid';
|
import { nanoid } from 'nanoid';
|
||||||
import { ToolType } from '../type';
|
import { type ToolType } from '../type';
|
||||||
import { i18nT } from '../../../../web/i18n/utils';
|
import { i18nT } from '../../../../web/i18n/utils';
|
||||||
import { RuntimeNodeItemType } from '../../workflow/runtime/type';
|
import { type RuntimeNodeItemType } from '../../workflow/runtime/type';
|
||||||
|
|
||||||
export const getMCPToolSetRuntimeNode = ({
|
export const getMCPToolSetRuntimeNode = ({
|
||||||
url,
|
url,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { StoreNodeItemType } from '../../workflow/type/node';
|
import { type StoreNodeItemType } from '../../workflow/type/node';
|
||||||
import { FlowNodeInputItemType } from '../../workflow/type/io';
|
import { type FlowNodeInputItemType } from '../../workflow/type/io';
|
||||||
import { FlowNodeTypeEnum } from '../../workflow/node/constant';
|
import { FlowNodeTypeEnum } from '../../workflow/node/constant';
|
||||||
|
|
||||||
export const getPluginInputsFromStoreNodes = (nodes: StoreNodeItemType[]) => {
|
export const getPluginInputsFromStoreNodes = (nodes: StoreNodeItemType[]) => {
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,20 @@
|
||||||
import type { FlowNodeTemplateType, StoreNodeItemType } from '../workflow/type/node';
|
import type { FlowNodeTemplateType, StoreNodeItemType } from '../workflow/type/node';
|
||||||
import { AppTypeEnum } from './constants';
|
import type { AppTypeEnum } from './constants';
|
||||||
import { PermissionTypeEnum } from '../../support/permission/constant';
|
import { PermissionTypeEnum } from '../../support/permission/constant';
|
||||||
import {
|
import type {
|
||||||
NodeInputKeyEnum,
|
NodeInputKeyEnum,
|
||||||
VariableInputEnum,
|
VariableInputEnum,
|
||||||
WorkflowIOValueTypeEnum
|
WorkflowIOValueTypeEnum
|
||||||
} from '../workflow/constants';
|
} from '../workflow/constants';
|
||||||
import { SelectedDatasetType } from '../workflow/api';
|
import type { SelectedDatasetType } from '../workflow/api';
|
||||||
import { DatasetSearchModeEnum } from '../dataset/constants';
|
import type { DatasetSearchModeEnum } from '../dataset/constants';
|
||||||
import { TeamTagSchema as TeamTagsSchemaType } from '@fastgpt/global/support/user/team/type.d';
|
import { TeamTagSchema as TeamTagsSchemaType } from '@fastgpt/global/support/user/team/type.d';
|
||||||
import { StoreEdgeItemType } from '../workflow/type/edge';
|
import type { StoreEdgeItemType } from '../workflow/type/edge';
|
||||||
import { AppPermission } from '../../support/permission/app/controller';
|
import type { AppPermission } from '../../support/permission/app/controller';
|
||||||
import { ParentIdType } from '../../common/parentFolder/type';
|
import type { ParentIdType } from '../../common/parentFolder/type';
|
||||||
import { FlowNodeInputTypeEnum } from '../../core/workflow/node/constant';
|
import { FlowNodeInputTypeEnum } from '../../core/workflow/node/constant';
|
||||||
import { WorkflowTemplateBasicType } from '@fastgpt/global/core/workflow/type';
|
import type { WorkflowTemplateBasicType } from '@fastgpt/global/core/workflow/type';
|
||||||
import { SourceMemberType } from '../../support/user/type';
|
import type { SourceMemberType } from '../../support/user/type';
|
||||||
|
|
||||||
export type ToolType = {
|
export type ToolType = {
|
||||||
name: string;
|
name: string;
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@ import { FlowNodeTypeEnum } from '../workflow/node/constant';
|
||||||
import { NodeInputKeyEnum, FlowNodeTemplateTypeEnum } from '../workflow/constants';
|
import { NodeInputKeyEnum, FlowNodeTemplateTypeEnum } from '../workflow/constants';
|
||||||
import type { FlowNodeInputItemType } from '../workflow/type/io.d';
|
import type { FlowNodeInputItemType } from '../workflow/type/io.d';
|
||||||
import { getAppChatConfig } from '../workflow/utils';
|
import { getAppChatConfig } from '../workflow/utils';
|
||||||
import { StoreNodeItemType } from '../workflow/type/node';
|
import { type StoreNodeItemType } from '../workflow/type/node';
|
||||||
import { DatasetSearchModeEnum } from '../dataset/constants';
|
import { DatasetSearchModeEnum } from '../dataset/constants';
|
||||||
import { WorkflowTemplateBasicType } from '../workflow/type';
|
import { type WorkflowTemplateBasicType } from '../workflow/type';
|
||||||
import { AppTypeEnum } from './constants';
|
import { AppTypeEnum } from './constants';
|
||||||
import { AppErrEnum } from '../../common/error/code/app';
|
import { AppErrEnum } from '../../common/error/code/app';
|
||||||
import { PluginErrEnum } from '../../common/error/code/plugin';
|
import { PluginErrEnum } from '../../common/error/code/plugin';
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
import { TeamMemberStatusEnum } from 'support/user/team/constant';
|
import { TeamMemberStatusEnum } from 'support/user/team/constant';
|
||||||
import { StoreEdgeItemType } from '../workflow/type/edge';
|
import { StoreEdgeItemType } from '../workflow/type/edge';
|
||||||
import { AppChatConfigType, AppSchema } from './type';
|
import type { AppSchema } from './type';
|
||||||
import { SourceMemberType } from 'support/user/type';
|
import { AppChatConfigType } from './type';
|
||||||
|
import type { SourceMemberType } from 'support/user/type';
|
||||||
|
|
||||||
export type AppVersionSchemaType = {
|
export type AppVersionSchemaType = {
|
||||||
_id: string;
|
_id: string;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { OutLinkChatAuthProps } from '../../support/permission/chat';
|
import type { OutLinkChatAuthProps } from '../../support/permission/chat';
|
||||||
|
|
||||||
export type UpdateChatFeedbackProps = OutLinkChatAuthProps & {
|
export type UpdateChatFeedbackProps = OutLinkChatAuthProps & {
|
||||||
appId: string;
|
appId: string;
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,23 @@
|
||||||
import { ClassifyQuestionAgentItemType } from '../workflow/template/system/classifyQuestion/type';
|
import { ClassifyQuestionAgentItemType } from '../workflow/template/system/classifyQuestion/type';
|
||||||
import { SearchDataResponseItemType } from '../dataset/type';
|
import type { SearchDataResponseItemType } from '../dataset/type';
|
||||||
import {
|
import type {
|
||||||
ChatFileTypeEnum,
|
ChatFileTypeEnum,
|
||||||
ChatItemValueTypeEnum,
|
ChatItemValueTypeEnum,
|
||||||
ChatRoleEnum,
|
ChatRoleEnum,
|
||||||
ChatSourceEnum,
|
ChatSourceEnum,
|
||||||
ChatStatusEnum
|
ChatStatusEnum
|
||||||
} from './constants';
|
} from './constants';
|
||||||
import { FlowNodeTypeEnum } from '../workflow/node/constant';
|
import type { FlowNodeTypeEnum } from '../workflow/node/constant';
|
||||||
import { NodeOutputKeyEnum } from '../workflow/constants';
|
import type { NodeOutputKeyEnum } from '../workflow/constants';
|
||||||
import { DispatchNodeResponseKeyEnum } from '../workflow/runtime/constants';
|
import type { DispatchNodeResponseKeyEnum } from '../workflow/runtime/constants';
|
||||||
import { AppChatConfigType, AppSchema, VariableItemType } from '../app/type';
|
import type { AppSchema, VariableItemType } from '../app/type';
|
||||||
|
import { AppChatConfigType } from '../app/type';
|
||||||
import type { AppSchema as AppType } from '@fastgpt/global/core/app/type.d';
|
import type { AppSchema as AppType } from '@fastgpt/global/core/app/type.d';
|
||||||
import { DatasetSearchModeEnum } from '../dataset/constants';
|
import { DatasetSearchModeEnum } from '../dataset/constants';
|
||||||
import { DispatchNodeResponseType } from '../workflow/runtime/type.d';
|
import type { DispatchNodeResponseType } from '../workflow/runtime/type.d';
|
||||||
import { ChatBoxInputType } from '../../../../projects/app/src/components/core/chat/ChatContainer/ChatBox/type';
|
import type { ChatBoxInputType } from '../../../../projects/app/src/components/core/chat/ChatContainer/ChatBox/type';
|
||||||
import { WorkflowInteractiveResponseType } from '../workflow/template/system/interactive/type';
|
import type { WorkflowInteractiveResponseType } from '../workflow/template/system/interactive/type';
|
||||||
import { FlowNodeInputItemType } from '../workflow/type/io';
|
import type { FlowNodeInputItemType } from '../workflow/type/io';
|
||||||
|
|
||||||
export type ChatSchema = {
|
export type ChatSchema = {
|
||||||
_id: string;
|
_id: string;
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
import { DispatchNodeResponseType } from '../workflow/runtime/type';
|
import { type DispatchNodeResponseType } from '../workflow/runtime/type';
|
||||||
import { FlowNodeTypeEnum } from '../workflow/node/constant';
|
import { FlowNodeTypeEnum } from '../workflow/node/constant';
|
||||||
import { ChatItemValueTypeEnum, ChatRoleEnum, ChatSourceEnum } from './constants';
|
import { ChatItemValueTypeEnum, ChatRoleEnum, ChatSourceEnum } from './constants';
|
||||||
import {
|
import {
|
||||||
AIChatItemValueItemType,
|
type AIChatItemValueItemType,
|
||||||
ChatHistoryItemResType,
|
type ChatHistoryItemResType,
|
||||||
ChatItemType,
|
type ChatItemType,
|
||||||
UserChatItemValueItemType
|
type UserChatItemValueItemType
|
||||||
} from './type.d';
|
} from './type.d';
|
||||||
import { sliceStrStartEnd } from '../../common/string/tools';
|
import { sliceStrStartEnd } from '../../common/string/tools';
|
||||||
import { PublishChannelEnum } from '../../support/outLink/constant';
|
import { PublishChannelEnum } from '../../support/outLink/constant';
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
import { DatasetDataIndexItemType, DatasetSchemaType } from './type';
|
import type { DatasetDataIndexItemType, DatasetSchemaType } from './type';
|
||||||
import {
|
import type {
|
||||||
DatasetCollectionTypeEnum,
|
DatasetCollectionTypeEnum,
|
||||||
DatasetCollectionDataProcessModeEnum,
|
DatasetCollectionDataProcessModeEnum,
|
||||||
ChunkSettingModeEnum,
|
ChunkSettingModeEnum,
|
||||||
DataChunkSplitModeEnum
|
DataChunkSplitModeEnum
|
||||||
} from './constants';
|
} from './constants';
|
||||||
import type { LLMModelItemType } from '../ai/model.d';
|
import type { LLMModelItemType } from '../ai/model.d';
|
||||||
import { ParentIdType } from 'common/parentFolder/type';
|
import type { ParentIdType } from 'common/parentFolder/type';
|
||||||
|
|
||||||
/* ================= dataset ===================== */
|
/* ================= dataset ===================== */
|
||||||
export type DatasetUpdateBody = {
|
export type DatasetUpdateBody = {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { UpdateClbPermissionProps } from '../../support/permission/collaborator';
|
import type { UpdateClbPermissionProps } from '../../support/permission/collaborator';
|
||||||
import { PermissionValueType } from '../../support/permission/type';
|
import { PermissionValueType } from '../../support/permission/type';
|
||||||
import { RequireOnlyOne } from '../../common/type/utils';
|
import type { RequireOnlyOne } from '../../common/type/utils';
|
||||||
|
|
||||||
export type UpdateDatasetCollaboratorBody = UpdateClbPermissionProps & {
|
export type UpdateDatasetCollaboratorBody = UpdateClbPermissionProps & {
|
||||||
datasetId: string;
|
datasetId: string;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { DatasetCollectionTypeEnum } from '../constants';
|
import { DatasetCollectionTypeEnum } from '../constants';
|
||||||
import { DatasetCollectionSchemaType } from '../type';
|
import { type DatasetCollectionSchemaType } from '../type';
|
||||||
|
|
||||||
export const getCollectionSourceData = (collection?: DatasetCollectionSchemaType) => {
|
export const getCollectionSourceData = (collection?: DatasetCollectionSchemaType) => {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { SearchScoreTypeEnum } from '../constants';
|
import { SearchScoreTypeEnum } from '../constants';
|
||||||
import { SearchDataResponseItemType } from '../type';
|
import { type SearchDataResponseItemType } from '../type';
|
||||||
|
|
||||||
/* dataset search result concat */
|
/* dataset search result concat */
|
||||||
export const datasetSearchResultConcat = (
|
export const datasetSearchResultConcat = (
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { PushDatasetDataChunkProps } from '../api';
|
import type { PushDatasetDataChunkProps } from '../api';
|
||||||
import { TrainingModeEnum } from '../constants';
|
import type { TrainingModeEnum } from '../constants';
|
||||||
|
|
||||||
export type PushDataToTrainingQueueProps = {
|
export type PushDataToTrainingQueueProps = {
|
||||||
teamId: string;
|
teamId: string;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { EmbeddingModelItemType, LLMModelItemType } from '../../../core/ai/model.d';
|
import { type EmbeddingModelItemType, type LLMModelItemType } from '../../../core/ai/model.d';
|
||||||
import {
|
import {
|
||||||
ChunkSettingModeEnum,
|
ChunkSettingModeEnum,
|
||||||
DataChunkSplitModeEnum,
|
DataChunkSplitModeEnum,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { LLMModelItemType, EmbeddingModelItemType } from '../../core/ai/model.d';
|
import type { LLMModelItemType, EmbeddingModelItemType } from '../../core/ai/model.d';
|
||||||
import { PermissionTypeEnum } from '../../support/permission/constant';
|
import { PermissionTypeEnum } from '../../support/permission/constant';
|
||||||
import { PushDatasetDataChunkProps } from './api';
|
import { PushDatasetDataChunkProps } from './api';
|
||||||
import {
|
import type {
|
||||||
DataChunkSplitModeEnum,
|
DataChunkSplitModeEnum,
|
||||||
DatasetCollectionDataProcessModeEnum,
|
DatasetCollectionDataProcessModeEnum,
|
||||||
DatasetCollectionTypeEnum,
|
DatasetCollectionTypeEnum,
|
||||||
|
|
@ -10,12 +10,12 @@ import {
|
||||||
SearchScoreTypeEnum,
|
SearchScoreTypeEnum,
|
||||||
TrainingModeEnum
|
TrainingModeEnum
|
||||||
} from './constants';
|
} from './constants';
|
||||||
import { DatasetPermission } from '../../support/permission/dataset/controller';
|
import type { DatasetPermission } from '../../support/permission/dataset/controller';
|
||||||
import { Permission } from '../../support/permission/controller';
|
import { Permission } from '../../support/permission/controller';
|
||||||
import { APIFileServer, FeishuServer, YuqueServer } from './apiDataset';
|
import type { APIFileServer, FeishuServer, YuqueServer } from './apiDataset';
|
||||||
import { SourceMemberType } from 'support/user/type';
|
import type { SourceMemberType } from 'support/user/type';
|
||||||
import { DatasetDataIndexTypeEnum } from './data/constants';
|
import type { DatasetDataIndexTypeEnum } from './data/constants';
|
||||||
import { ChunkSettingModeEnum } from './constants';
|
import type { ChunkSettingModeEnum } from './constants';
|
||||||
|
|
||||||
export type ChunkSettingsType = {
|
export type ChunkSettingsType = {
|
||||||
trainingType: DatasetCollectionDataProcessModeEnum;
|
trainingType: DatasetCollectionDataProcessModeEnum;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { StoreEdgeItemType } from 'core/workflow/type/edge';
|
import type { StoreEdgeItemType } from 'core/workflow/type/edge';
|
||||||
import type { StoreNodeItemType } from '../workflow/type/node';
|
import type { StoreNodeItemType } from '../workflow/type/node';
|
||||||
import { PluginTypeEnum } from './constants';
|
import type { PluginTypeEnum } from './constants';
|
||||||
import { HttpAuthMethodType } from '../app/httpPlugin/type';
|
import { HttpAuthMethodType } from '../app/httpPlugin/type';
|
||||||
|
|
||||||
export type CreateOnePluginParams = {
|
export type CreateOnePluginParams = {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import { StoreEdgeItemType } from 'core/workflow/type/edge';
|
import type { StoreEdgeItemType } from 'core/workflow/type/edge';
|
||||||
import { ModuleTemplateTypeEnum } from '../workflow/constants';
|
import { ModuleTemplateTypeEnum } from '../workflow/constants';
|
||||||
import type { StoreNodeItemType } from '../workflow/type/node';
|
import type { StoreNodeItemType } from '../workflow/type/node';
|
||||||
import { PluginSourceEnum, PluginTypeEnum } from './constants';
|
import type { PluginSourceEnum, PluginTypeEnum } from './constants';
|
||||||
import { MethodType } from './controller';
|
import { MethodType } from './controller';
|
||||||
import { FlowNodeTemplateType } from '../workflow/type/node';
|
import type { FlowNodeTemplateType } from '../workflow/type/node';
|
||||||
|
|
||||||
export type PluginItemSchema = {
|
export type PluginItemSchema = {
|
||||||
_id: string;
|
_id: string;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { EmbeddingModelItemType } from '../ai/model.d';
|
import type { EmbeddingModelItemType } from '../ai/model.d';
|
||||||
import { NodeInputKeyEnum } from './constants';
|
import { NodeInputKeyEnum } from './constants';
|
||||||
|
|
||||||
export type SelectedDatasetType = {
|
export type SelectedDatasetType = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { FlowNodeInputItemType } from '../../type/io';
|
import { type FlowNodeInputItemType } from '../../type/io';
|
||||||
|
|
||||||
export const getInputComponentProps = (input: FlowNodeInputItemType) => {
|
export const getInputComponentProps = (input: FlowNodeInputItemType) => {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,32 @@
|
||||||
import { ChatNodeUsageType } from '../../../support/wallet/bill/type';
|
import type { ChatNodeUsageType } from '../../../support/wallet/bill/type';
|
||||||
import {
|
import type {
|
||||||
ChatItemType,
|
ChatItemType,
|
||||||
UserChatItemValueItemType,
|
UserChatItemValueItemType,
|
||||||
ToolRunResponseItemType,
|
ToolRunResponseItemType,
|
||||||
NodeOutputItemType,
|
|
||||||
AIChatItemValueItemType
|
AIChatItemValueItemType
|
||||||
} from '../../chat/type';
|
} from '../../chat/type';
|
||||||
import { FlowNodeInputItemType, FlowNodeOutputItemType } from '../type/io.d';
|
import { NodeOutputItemType } from '../../chat/type';
|
||||||
import { StoreNodeItemType } from '../type/node';
|
import type { FlowNodeInputItemType, FlowNodeOutputItemType } from '../type/io.d';
|
||||||
import { DispatchNodeResponseKeyEnum } from './constants';
|
import type { StoreNodeItemType } from '../type/node';
|
||||||
import { StoreEdgeItemType } from '../type/edge';
|
import type { DispatchNodeResponseKeyEnum } from './constants';
|
||||||
import { NodeInputKeyEnum } from '../constants';
|
import type { StoreEdgeItemType } from '../type/edge';
|
||||||
import { ClassifyQuestionAgentItemType } from '../template/system/classifyQuestion/type';
|
import type { NodeInputKeyEnum } from '../constants';
|
||||||
import { NextApiResponse } from 'next';
|
import type { ClassifyQuestionAgentItemType } from '../template/system/classifyQuestion/type';
|
||||||
|
import type { NextApiResponse } from 'next';
|
||||||
import { UserModelSchema } from '../../../support/user/type';
|
import { UserModelSchema } from '../../../support/user/type';
|
||||||
import { AppDetailType, AppSchema } from '../../app/type';
|
import type { AppSchema } from '../../app/type';
|
||||||
import { RuntimeNodeItemType } from '../runtime/type';
|
import { AppDetailType } from '../../app/type';
|
||||||
import { RuntimeEdgeItemType } from './edge';
|
import type { RuntimeNodeItemType } from '../runtime/type';
|
||||||
import { ReadFileNodeResponse } from '../template/system/readFiles/type';
|
import type { RuntimeEdgeItemType } from './edge';
|
||||||
|
import type { ReadFileNodeResponse } from '../template/system/readFiles/type';
|
||||||
import { UserSelectOptionType } from '../template/system/userSelect/type';
|
import { UserSelectOptionType } from '../template/system/userSelect/type';
|
||||||
import { WorkflowResponseType } from '../../../../service/core/workflow/dispatch/type';
|
import type { WorkflowResponseType } from '../../../../service/core/workflow/dispatch/type';
|
||||||
import { AiChatQuoteRoleType } from '../template/system/aiChat/type';
|
import type { AiChatQuoteRoleType } from '../template/system/aiChat/type';
|
||||||
import { LafAccountType, OpenaiAccountType } from '../../../support/user/team/type';
|
import type { OpenaiAccountType } from '../../../support/user/team/type';
|
||||||
import { CompletionFinishReason } from '../../ai/type';
|
import { LafAccountType } from '../../../support/user/team/type';
|
||||||
import { WorkflowInteractiveResponseType } from '../template/system/interactive/type';
|
import type { CompletionFinishReason } from '../../ai/type';
|
||||||
import { SearchDataResponseItemType } from '../../dataset/type';
|
import type { WorkflowInteractiveResponseType } from '../template/system/interactive/type';
|
||||||
|
import type { SearchDataResponseItemType } from '../../dataset/type';
|
||||||
export type ExternalProviderType = {
|
export type ExternalProviderType = {
|
||||||
openaiAccount?: OpenaiAccountType;
|
openaiAccount?: OpenaiAccountType;
|
||||||
externalWorkflowVariables?: Record<string, string>;
|
externalWorkflowVariables?: Record<string, string>;
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
import { ChatCompletionRequestMessageRoleEnum } from '../../ai/constants';
|
import { ChatCompletionRequestMessageRoleEnum } from '../../ai/constants';
|
||||||
import { NodeInputKeyEnum, NodeOutputKeyEnum, WorkflowIOValueTypeEnum } from '../constants';
|
import { NodeInputKeyEnum, NodeOutputKeyEnum, WorkflowIOValueTypeEnum } from '../constants';
|
||||||
import { FlowNodeTypeEnum } from '../node/constant';
|
import { FlowNodeTypeEnum } from '../node/constant';
|
||||||
import { StoreNodeItemType } from '../type/node';
|
import { type StoreNodeItemType } from '../type/node';
|
||||||
import { StoreEdgeItemType } from '../type/edge';
|
import { type StoreEdgeItemType } from '../type/edge';
|
||||||
import { RuntimeEdgeItemType, RuntimeNodeItemType } from './type';
|
import { type RuntimeEdgeItemType, type RuntimeNodeItemType } from './type';
|
||||||
import { VARIABLE_NODE_ID } from '../constants';
|
import { VARIABLE_NODE_ID } from '../constants';
|
||||||
import { isValidReferenceValueFormat } from '../utils';
|
import { isValidReferenceValueFormat } from '../utils';
|
||||||
import { FlowNodeOutputItemType, ReferenceValueType } from '../type/io';
|
import { type FlowNodeOutputItemType, type ReferenceValueType } from '../type/io';
|
||||||
import { ChatItemType, NodeOutputItemType } from '../../../core/chat/type';
|
import { type ChatItemType, type NodeOutputItemType } from '../../../core/chat/type';
|
||||||
import { ChatItemValueTypeEnum, ChatRoleEnum } from '../../../core/chat/constants';
|
import { ChatItemValueTypeEnum, ChatRoleEnum } from '../../../core/chat/constants';
|
||||||
import { replaceVariable, valToStr } from '../../../common/string/tools';
|
import { replaceVariable, valToStr } from '../../../common/string/tools';
|
||||||
import json5 from 'json5';
|
import json5 from 'json5';
|
||||||
import {
|
import {
|
||||||
InteractiveNodeResponseType,
|
type InteractiveNodeResponseType,
|
||||||
WorkflowInteractiveResponseType
|
type WorkflowInteractiveResponseType
|
||||||
} from '../template/system/interactive/type';
|
} from '../template/system/interactive/type';
|
||||||
|
|
||||||
export const extractDeepestInteractive = (
|
export const extractDeepestInteractive = (
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { NodeInputKeyEnum } from '../constants';
|
||||||
import { FlowNodeInputTypeEnum } from '../node/constant';
|
import { FlowNodeInputTypeEnum } from '../node/constant';
|
||||||
import { WorkflowIOValueTypeEnum } from '../constants';
|
import { WorkflowIOValueTypeEnum } from '../constants';
|
||||||
import { chatNodeSystemPromptTip, systemPromptTip } from './tip';
|
import { chatNodeSystemPromptTip, systemPromptTip } from './tip';
|
||||||
import { FlowNodeInputItemType } from '../type/io';
|
import { type FlowNodeInputItemType } from '../type/io';
|
||||||
import { i18nT } from '../../../../web/i18n/utils';
|
import { i18nT } from '../../../../web/i18n/utils';
|
||||||
|
|
||||||
export const Input_Template_History: FlowNodeInputItemType = {
|
export const Input_Template_History: FlowNodeInputItemType = {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import {
|
||||||
FlowNodeOutputTypeEnum,
|
FlowNodeOutputTypeEnum,
|
||||||
FlowNodeTypeEnum
|
FlowNodeTypeEnum
|
||||||
} from '../../../../node/constant';
|
} from '../../../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../../../type/node';
|
import { type FlowNodeTemplateType } from '../../../../type/node';
|
||||||
import {
|
import {
|
||||||
WorkflowIOValueTypeEnum,
|
WorkflowIOValueTypeEnum,
|
||||||
NodeInputKeyEnum,
|
NodeInputKeyEnum,
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import {
|
||||||
FlowNodeOutputTypeEnum,
|
FlowNodeOutputTypeEnum,
|
||||||
FlowNodeTypeEnum
|
FlowNodeTypeEnum
|
||||||
} from '../../../node/constant';
|
} from '../../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../../type/node';
|
import { type FlowNodeTemplateType } from '../../../type/node';
|
||||||
import {
|
import {
|
||||||
WorkflowIOValueTypeEnum,
|
WorkflowIOValueTypeEnum,
|
||||||
NodeInputKeyEnum,
|
NodeInputKeyEnum,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { FlowNodeInputTypeEnum, FlowNodeTypeEnum } from '../../node/constant';
|
import { FlowNodeInputTypeEnum, FlowNodeTypeEnum } from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node.d';
|
import { type FlowNodeTemplateType } from '../../type/node.d';
|
||||||
import {
|
import {
|
||||||
WorkflowIOValueTypeEnum,
|
WorkflowIOValueTypeEnum,
|
||||||
NodeInputKeyEnum,
|
NodeInputKeyEnum,
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import {
|
||||||
FlowNodeOutputTypeEnum,
|
FlowNodeOutputTypeEnum,
|
||||||
FlowNodeTypeEnum
|
FlowNodeTypeEnum
|
||||||
} from '../../../node/constant';
|
} from '../../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../../type/node';
|
import { type FlowNodeTemplateType } from '../../../type/node';
|
||||||
import {
|
import {
|
||||||
WorkflowIOValueTypeEnum,
|
WorkflowIOValueTypeEnum,
|
||||||
NodeInputKeyEnum,
|
NodeInputKeyEnum,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { FlowNodeTypeEnum } from '../../node/constant';
|
import { FlowNodeTypeEnum } from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node.d';
|
import { type FlowNodeTemplateType } from '../../type/node.d';
|
||||||
import {
|
import {
|
||||||
FlowNodeTemplateTypeEnum,
|
FlowNodeTemplateTypeEnum,
|
||||||
NodeInputKeyEnum,
|
NodeInputKeyEnum,
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import {
|
||||||
FlowNodeOutputTypeEnum,
|
FlowNodeOutputTypeEnum,
|
||||||
FlowNodeTypeEnum
|
FlowNodeTypeEnum
|
||||||
} from '../../../node/constant';
|
} from '../../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../../type/node';
|
import { type FlowNodeTemplateType } from '../../../type/node';
|
||||||
import {
|
import {
|
||||||
WorkflowIOValueTypeEnum,
|
WorkflowIOValueTypeEnum,
|
||||||
NodeInputKeyEnum,
|
NodeInputKeyEnum,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { WorkflowIOValueTypeEnum } from '../../../constants';
|
import type { WorkflowIOValueTypeEnum } from '../../../constants';
|
||||||
|
|
||||||
export type ContextExtractAgentItemType = {
|
export type ContextExtractAgentItemType = {
|
||||||
valueType:
|
valueType:
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { FlowNodeInputTypeEnum, FlowNodeTypeEnum } from '../../node/constant';
|
import { FlowNodeInputTypeEnum, FlowNodeTypeEnum } from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node.d';
|
import { type FlowNodeTemplateType } from '../../type/node.d';
|
||||||
import {
|
import {
|
||||||
WorkflowIOValueTypeEnum,
|
WorkflowIOValueTypeEnum,
|
||||||
FlowNodeTemplateTypeEnum,
|
FlowNodeTemplateTypeEnum,
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import {
|
||||||
FlowNodeOutputTypeEnum,
|
FlowNodeOutputTypeEnum,
|
||||||
FlowNodeTypeEnum
|
FlowNodeTypeEnum
|
||||||
} from '../../node/constant';
|
} from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node';
|
import { type FlowNodeTemplateType } from '../../type/node';
|
||||||
import {
|
import {
|
||||||
WorkflowIOValueTypeEnum,
|
WorkflowIOValueTypeEnum,
|
||||||
NodeInputKeyEnum,
|
NodeInputKeyEnum,
|
||||||
|
|
@ -13,7 +13,7 @@ import {
|
||||||
} from '../../constants';
|
} from '../../constants';
|
||||||
import { getNanoid } from '../../../../common/string/tools';
|
import { getNanoid } from '../../../../common/string/tools';
|
||||||
import { getHandleConfig } from '../utils';
|
import { getHandleConfig } from '../utils';
|
||||||
import { FlowNodeInputItemType } from '../../type/io.d';
|
import { type FlowNodeInputItemType } from '../../type/io.d';
|
||||||
import { i18nT } from '../../../../../web/i18n/utils';
|
import { i18nT } from '../../../../../web/i18n/utils';
|
||||||
|
|
||||||
export const getOneQuoteInputTemplate = ({
|
export const getOneQuoteInputTemplate = ({
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import {
|
||||||
FlowNodeOutputTypeEnum,
|
FlowNodeOutputTypeEnum,
|
||||||
FlowNodeTypeEnum
|
FlowNodeTypeEnum
|
||||||
} from '../../node/constant';
|
} from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node';
|
import { type FlowNodeTemplateType } from '../../type/node';
|
||||||
import {
|
import {
|
||||||
WorkflowIOValueTypeEnum,
|
WorkflowIOValueTypeEnum,
|
||||||
NodeInputKeyEnum,
|
NodeInputKeyEnum,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { FlowNodeTypeEnum } from '../../node/constant';
|
import { FlowNodeTypeEnum } from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node';
|
import { type FlowNodeTemplateType } from '../../type/node';
|
||||||
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
||||||
import { getHandleConfig } from '../utils';
|
import { getHandleConfig } from '../utils';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import {
|
||||||
FlowNodeOutputTypeEnum,
|
FlowNodeOutputTypeEnum,
|
||||||
FlowNodeTypeEnum
|
FlowNodeTypeEnum
|
||||||
} from '../../node/constant';
|
} from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node.d';
|
import { type FlowNodeTemplateType } from '../../type/node.d';
|
||||||
import {
|
import {
|
||||||
WorkflowIOValueTypeEnum,
|
WorkflowIOValueTypeEnum,
|
||||||
NodeInputKeyEnum,
|
NodeInputKeyEnum,
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import {
|
||||||
FlowNodeOutputTypeEnum,
|
FlowNodeOutputTypeEnum,
|
||||||
FlowNodeTypeEnum
|
FlowNodeTypeEnum
|
||||||
} from '../../../node/constant';
|
} from '../../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../../type/node';
|
import { type FlowNodeTemplateType } from '../../../type/node';
|
||||||
import { getHandleConfig } from '../../utils';
|
import { getHandleConfig } from '../../utils';
|
||||||
|
|
||||||
export const IfElseNode: FlowNodeTemplateType = {
|
export const IfElseNode: FlowNodeTemplateType = {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { ReferenceItemValueType } from '../../../type/io';
|
import type { ReferenceItemValueType } from '../../../type/io';
|
||||||
import { VariableConditionEnum } from './constant';
|
import type { VariableConditionEnum } from './constant';
|
||||||
|
|
||||||
export type IfElseConditionType = 'AND' | 'OR';
|
export type IfElseConditionType = 'AND' | 'OR';
|
||||||
export type ConditionListItemType = {
|
export type ConditionListItemType = {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import {
|
||||||
FlowNodeOutputTypeEnum,
|
FlowNodeOutputTypeEnum,
|
||||||
FlowNodeTypeEnum
|
FlowNodeTypeEnum
|
||||||
} from '../../../node/constant';
|
} from '../../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../../type/node';
|
import { type FlowNodeTemplateType } from '../../../type/node';
|
||||||
import { getHandleConfig } from '../../utils';
|
import { getHandleConfig } from '../../utils';
|
||||||
|
|
||||||
export const FormInputNode: FlowNodeTemplateType = {
|
export const FormInputNode: FlowNodeTemplateType = {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { NodeOutputItemType } from '../../../../chat/type';
|
import type { NodeOutputItemType } from '../../../../chat/type';
|
||||||
import type { FlowNodeOutputItemType } from '../../../type/io';
|
import type { FlowNodeOutputItemType } from '../../../type/io';
|
||||||
import { FlowNodeInputTypeEnum } from 'core/workflow/node/constant';
|
import type { FlowNodeInputTypeEnum } from 'core/workflow/node/constant';
|
||||||
import { WorkflowIOValueTypeEnum } from 'core/workflow/constants';
|
import type { WorkflowIOValueTypeEnum } from 'core/workflow/constants';
|
||||||
import type { ChatCompletionMessageParam } from '../../../../ai/type';
|
import type { ChatCompletionMessageParam } from '../../../../ai/type';
|
||||||
|
|
||||||
type InteractiveBasicType = {
|
type InteractiveBasicType = {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import {
|
||||||
FlowNodeOutputTypeEnum,
|
FlowNodeOutputTypeEnum,
|
||||||
FlowNodeTypeEnum
|
FlowNodeTypeEnum
|
||||||
} from '../../../node/constant';
|
} from '../../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../../type/node.d';
|
import { type FlowNodeTemplateType } from '../../../type/node.d';
|
||||||
import { getHandleConfig } from '../../utils';
|
import { getHandleConfig } from '../../utils';
|
||||||
|
|
||||||
export const UserSelectNode: FlowNodeTemplateType = {
|
export const UserSelectNode: FlowNodeTemplateType = {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import {
|
||||||
FlowNodeOutputTypeEnum,
|
FlowNodeOutputTypeEnum,
|
||||||
FlowNodeTypeEnum
|
FlowNodeTypeEnum
|
||||||
} from '../../node/constant';
|
} from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node.d';
|
import { type FlowNodeTemplateType } from '../../type/node.d';
|
||||||
import {
|
import {
|
||||||
WorkflowIOValueTypeEnum,
|
WorkflowIOValueTypeEnum,
|
||||||
NodeInputKeyEnum,
|
NodeInputKeyEnum,
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import {
|
||||||
FlowNodeOutputTypeEnum,
|
FlowNodeOutputTypeEnum,
|
||||||
FlowNodeTypeEnum
|
FlowNodeTypeEnum
|
||||||
} from '../../../node/constant';
|
} from '../../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../../type/node';
|
import { type FlowNodeTemplateType } from '../../../type/node';
|
||||||
import {
|
import {
|
||||||
FlowNodeTemplateTypeEnum,
|
FlowNodeTemplateTypeEnum,
|
||||||
NodeInputKeyEnum,
|
NodeInputKeyEnum,
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import {
|
||||||
WorkflowIOValueTypeEnum
|
WorkflowIOValueTypeEnum
|
||||||
} from '../../../constants';
|
} from '../../../constants';
|
||||||
import { FlowNodeInputTypeEnum, FlowNodeTypeEnum } from '../../../node/constant';
|
import { FlowNodeInputTypeEnum, FlowNodeTypeEnum } from '../../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../../type/node';
|
import { type FlowNodeTemplateType } from '../../../type/node';
|
||||||
import { getHandleConfig } from '../../utils';
|
import { getHandleConfig } from '../../utils';
|
||||||
|
|
||||||
export const LoopEndNode: FlowNodeTemplateType = {
|
export const LoopEndNode: FlowNodeTemplateType = {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import {
|
||||||
FlowNodeOutputTypeEnum,
|
FlowNodeOutputTypeEnum,
|
||||||
FlowNodeTypeEnum
|
FlowNodeTypeEnum
|
||||||
} from '../../../node/constant';
|
} from '../../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../../type/node.d';
|
import { type FlowNodeTemplateType } from '../../../type/node.d';
|
||||||
import {
|
import {
|
||||||
FlowNodeTemplateTypeEnum,
|
FlowNodeTemplateTypeEnum,
|
||||||
NodeInputKeyEnum,
|
NodeInputKeyEnum,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { FlowNodeTypeEnum } from '../../node/constant';
|
import { FlowNodeTypeEnum } from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node.d';
|
import { type FlowNodeTemplateType } from '../../type/node.d';
|
||||||
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
||||||
import { getHandleConfig } from '../utils';
|
import { getHandleConfig } from '../utils';
|
||||||
import { i18nT } from '../../../../../web/i18n/utils';
|
import { i18nT } from '../../../../../web/i18n/utils';
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { i18nT } from '../../../../../web/i18n/utils';
|
import { i18nT } from '../../../../../web/i18n/utils';
|
||||||
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
||||||
import { FlowNodeTypeEnum } from '../../node/constant';
|
import { FlowNodeTypeEnum } from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node';
|
import { type FlowNodeTemplateType } from '../../type/node';
|
||||||
import { getHandleConfig } from '../utils';
|
import { getHandleConfig } from '../utils';
|
||||||
|
|
||||||
export const PluginInputModule: FlowNodeTemplateType = {
|
export const PluginInputModule: FlowNodeTemplateType = {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { i18nT } from '../../../../../web/i18n/utils';
|
import { i18nT } from '../../../../../web/i18n/utils';
|
||||||
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
||||||
import { FlowNodeTypeEnum } from '../../node/constant';
|
import { FlowNodeTypeEnum } from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node';
|
import { type FlowNodeTemplateType } from '../../type/node';
|
||||||
import { getHandleConfig } from '../utils';
|
import { getHandleConfig } from '../utils';
|
||||||
|
|
||||||
export const PluginOutputModule: FlowNodeTemplateType = {
|
export const PluginOutputModule: FlowNodeTemplateType = {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import {
|
||||||
FlowNodeOutputTypeEnum,
|
FlowNodeOutputTypeEnum,
|
||||||
FlowNodeTypeEnum
|
FlowNodeTypeEnum
|
||||||
} from '../../node/constant';
|
} from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node.d';
|
import { type FlowNodeTemplateType } from '../../type/node.d';
|
||||||
import {
|
import {
|
||||||
WorkflowIOValueTypeEnum,
|
WorkflowIOValueTypeEnum,
|
||||||
NodeInputKeyEnum,
|
NodeInputKeyEnum,
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import {
|
||||||
FlowNodeOutputTypeEnum,
|
FlowNodeOutputTypeEnum,
|
||||||
FlowNodeTypeEnum
|
FlowNodeTypeEnum
|
||||||
} from '../../../node/constant';
|
} from '../../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../../type/node';
|
import { type FlowNodeTemplateType } from '../../../type/node';
|
||||||
import { getHandleConfig } from '../../utils';
|
import { getHandleConfig } from '../../utils';
|
||||||
|
|
||||||
export const ReadFilesNode: FlowNodeTemplateType = {
|
export const ReadFilesNode: FlowNodeTemplateType = {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
||||||
import { FlowNodeTypeEnum } from '../../node/constant';
|
import { FlowNodeTypeEnum } from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node';
|
import { type FlowNodeTemplateType } from '../../type/node';
|
||||||
import { getHandleConfig } from '../utils';
|
import { getHandleConfig } from '../utils';
|
||||||
|
|
||||||
export const RunAppNode: FlowNodeTemplateType = {
|
export const RunAppNode: FlowNodeTemplateType = {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
||||||
import { FlowNodeTypeEnum } from '../../node/constant';
|
import { FlowNodeTypeEnum } from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node';
|
import { type FlowNodeTemplateType } from '../../type/node';
|
||||||
import { getHandleConfig } from '../utils';
|
import { getHandleConfig } from '../utils';
|
||||||
|
|
||||||
export const RunPluginModule: FlowNodeTemplateType = {
|
export const RunPluginModule: FlowNodeTemplateType = {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
||||||
import { FlowNodeTypeEnum } from '../../node/constant';
|
import { FlowNodeTypeEnum } from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node';
|
import { type FlowNodeTemplateType } from '../../type/node';
|
||||||
import { getHandleConfig } from '../utils';
|
import { getHandleConfig } from '../utils';
|
||||||
|
|
||||||
export const RunToolNode: FlowNodeTemplateType = {
|
export const RunToolNode: FlowNodeTemplateType = {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
||||||
import { FlowNodeTypeEnum } from '../../node/constant';
|
import { FlowNodeTypeEnum } from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node';
|
import { type FlowNodeTemplateType } from '../../type/node';
|
||||||
import { getHandleConfig } from '../utils';
|
import { getHandleConfig } from '../utils';
|
||||||
|
|
||||||
export const RunToolSetNode: FlowNodeTemplateType = {
|
export const RunToolSetNode: FlowNodeTemplateType = {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import {
|
||||||
FlowNodeOutputTypeEnum,
|
FlowNodeOutputTypeEnum,
|
||||||
FlowNodeTypeEnum
|
FlowNodeTypeEnum
|
||||||
} from '../../../node/constant';
|
} from '../../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../../type/node';
|
import { type FlowNodeTemplateType } from '../../../type/node';
|
||||||
import { getHandleConfig } from '../../utils';
|
import { getHandleConfig } from '../../utils';
|
||||||
import { Input_Template_DynamicInput } from '../../input';
|
import { Input_Template_DynamicInput } from '../../input';
|
||||||
import { Output_Template_AddOutput } from '../../output';
|
import { Output_Template_AddOutput } from '../../output';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { FlowNodeTypeEnum } from '../../node/constant';
|
import { FlowNodeTypeEnum } from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node';
|
import { type FlowNodeTemplateType } from '../../type/node';
|
||||||
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
||||||
import { getHandleConfig } from '../utils';
|
import { getHandleConfig } from '../utils';
|
||||||
import { i18nT } from '../../../../../web/i18n/utils';
|
import { i18nT } from '../../../../../web/i18n/utils';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { FlowNodeTypeEnum } from '../../node/constant';
|
import { FlowNodeTypeEnum } from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node.d';
|
import { type FlowNodeTemplateType } from '../../type/node.d';
|
||||||
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
||||||
import { getHandleConfig } from '../utils';
|
import { getHandleConfig } from '../utils';
|
||||||
import { i18nT } from '../../../../../web/i18n/utils';
|
import { i18nT } from '../../../../../web/i18n/utils';
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import {
|
||||||
FlowNodeOutputTypeEnum,
|
FlowNodeOutputTypeEnum,
|
||||||
FlowNodeTypeEnum
|
FlowNodeTypeEnum
|
||||||
} from '../../node/constant';
|
} from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node.d';
|
import { type FlowNodeTemplateType } from '../../type/node.d';
|
||||||
import {
|
import {
|
||||||
WorkflowIOValueTypeEnum,
|
WorkflowIOValueTypeEnum,
|
||||||
NodeOutputKeyEnum,
|
NodeOutputKeyEnum,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { FlowNodeTypeEnum } from '../../node/constant';
|
import { FlowNodeTypeEnum } from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node';
|
import { type FlowNodeTemplateType } from '../../type/node';
|
||||||
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
import { FlowNodeTemplateTypeEnum } from '../../constants';
|
||||||
import { getHandleConfig } from '../utils';
|
import { getHandleConfig } from '../utils';
|
||||||
import { i18nT } from '../../../../../web/i18n/utils';
|
import { i18nT } from '../../../../../web/i18n/utils';
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import {
|
||||||
FlowNodeOutputTypeEnum,
|
FlowNodeOutputTypeEnum,
|
||||||
FlowNodeTypeEnum
|
FlowNodeTypeEnum
|
||||||
} from '../../node/constant';
|
} from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node.d';
|
import { type FlowNodeTemplateType } from '../../type/node.d';
|
||||||
import {
|
import {
|
||||||
WorkflowIOValueTypeEnum,
|
WorkflowIOValueTypeEnum,
|
||||||
NodeOutputKeyEnum,
|
NodeOutputKeyEnum,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { FlowNodeInputTypeEnum, FlowNodeTypeEnum } from '../../../node/constant';
|
import { FlowNodeInputTypeEnum, FlowNodeTypeEnum } from '../../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../../type/node.d';
|
import { type FlowNodeTemplateType } from '../../../type/node.d';
|
||||||
import {
|
import {
|
||||||
FlowNodeTemplateTypeEnum,
|
FlowNodeTemplateTypeEnum,
|
||||||
NodeInputKeyEnum,
|
NodeInputKeyEnum,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { FlowNodeInputTypeEnum } from '../../../node/constant';
|
import type { FlowNodeInputTypeEnum } from '../../../node/constant';
|
||||||
import { ReferenceItemValueType, ReferenceValueType } from '../../..//type/io';
|
import type { ReferenceItemValueType, ReferenceValueType } from '../../..//type/io';
|
||||||
import { WorkflowIOValueTypeEnum } from '../../../constants';
|
import type { WorkflowIOValueTypeEnum } from '../../../constants';
|
||||||
|
|
||||||
export type TUpdateListItem = {
|
export type TUpdateListItem = {
|
||||||
variable?: ReferenceItemValueType;
|
variable?: ReferenceItemValueType;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { FlowNodeOutputTypeEnum, FlowNodeTypeEnum } from '../../node/constant';
|
import { FlowNodeOutputTypeEnum, FlowNodeTypeEnum } from '../../node/constant';
|
||||||
import { FlowNodeTemplateType } from '../../type/node.d';
|
import { type FlowNodeTemplateType } from '../../type/node.d';
|
||||||
import {
|
import {
|
||||||
WorkflowIOValueTypeEnum,
|
WorkflowIOValueTypeEnum,
|
||||||
NodeOutputKeyEnum,
|
NodeOutputKeyEnum,
|
||||||
|
|
@ -8,7 +8,7 @@ import {
|
||||||
import { getHandleConfig } from '../utils';
|
import { getHandleConfig } from '../utils';
|
||||||
import { Input_Template_UserChatInput } from '../input';
|
import { Input_Template_UserChatInput } from '../input';
|
||||||
import { i18nT } from '../../../../../web/i18n/utils';
|
import { i18nT } from '../../../../../web/i18n/utils';
|
||||||
import { FlowNodeOutputItemType } from '../../type/io';
|
import { type FlowNodeOutputItemType } from '../../type/io';
|
||||||
|
|
||||||
export const userFilesInput: FlowNodeOutputItemType = {
|
export const userFilesInput: FlowNodeOutputItemType = {
|
||||||
id: NodeOutputKeyEnum.userFiles,
|
id: NodeOutputKeyEnum.userFiles,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { RuntimeEdgeStatusEnum } from '../constants';
|
import type { RuntimeEdgeStatusEnum } from '../constants';
|
||||||
|
|
||||||
export type StoreEdgeItemType = {
|
export type StoreEdgeItemType = {
|
||||||
source: string;
|
source: string;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { FlowNodeInputItemType, FlowNodeOutputItemType } from './io';
|
import type { FlowNodeInputItemType, FlowNodeOutputItemType } from './io';
|
||||||
|
|
||||||
export type FlowNodeChangeProps = { nodeId: string } & (
|
export type FlowNodeChangeProps = { nodeId: string } & (
|
||||||
| {
|
| {
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,12 @@ import {
|
||||||
} from '../../chat/type';
|
} from '../../chat/type';
|
||||||
import { ChatNodeUsageType } from '../../../support/wallet/bill/type';
|
import { ChatNodeUsageType } from '../../../support/wallet/bill/type';
|
||||||
import { PluginTypeEnum } from '../../plugin/constants';
|
import { PluginTypeEnum } from '../../plugin/constants';
|
||||||
import { StoreEdgeItemType } from './edge';
|
import type { StoreEdgeItemType } from './edge';
|
||||||
import { AppChatConfigType } from '../../app/type';
|
import type { AppChatConfigType } from '../../app/type';
|
||||||
import { ParentIdType } from 'common/parentFolder/type';
|
import type { ParentIdType } from 'common/parentFolder/type';
|
||||||
import { AppTypeEnum } from 'core/app/constants';
|
import type { AppTypeEnum } from 'core/app/constants';
|
||||||
import { FlowNodeTemplateType, StoreNodeItemType } from './node';
|
import type { StoreNodeItemType } from './node';
|
||||||
|
import { FlowNodeTemplateType } from './node';
|
||||||
|
|
||||||
export type WorkflowTemplateBasicType = {
|
export type WorkflowTemplateBasicType = {
|
||||||
nodes: StoreNodeItemType[];
|
nodes: StoreNodeItemType[];
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { LLMModelItemType } from '../../ai/model.d';
|
import type { LLMModelItemType } from '../../ai/model.d';
|
||||||
import { LLMModelTypeEnum } from '../../ai/constants';
|
import type { LLMModelTypeEnum } from '../../ai/constants';
|
||||||
import { WorkflowIOValueTypeEnum, NodeInputKeyEnum, NodeOutputKeyEnum } from '../constants';
|
import type { WorkflowIOValueTypeEnum, NodeInputKeyEnum, NodeOutputKeyEnum } from '../constants';
|
||||||
import { FlowNodeInputTypeEnum, FlowNodeOutputTypeEnum } from '../node/constant';
|
import type { FlowNodeInputTypeEnum, FlowNodeOutputTypeEnum } from '../node/constant';
|
||||||
|
|
||||||
// Dynamic input field configuration
|
// Dynamic input field configuration
|
||||||
export type CustomFieldConfigType = {
|
export type CustomFieldConfigType = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { FlowNodeTypeEnum } from '../node/constant';
|
import type { FlowNodeTypeEnum } from '../node/constant';
|
||||||
import {
|
import {
|
||||||
WorkflowIOValueTypeEnum,
|
WorkflowIOValueTypeEnum,
|
||||||
NodeOutputKeyEnum,
|
NodeOutputKeyEnum,
|
||||||
|
|
@ -6,10 +6,10 @@ import {
|
||||||
VariableInputEnum
|
VariableInputEnum
|
||||||
} from '../constants';
|
} from '../constants';
|
||||||
import { DispatchNodeResponseKeyEnum } from '../runtime/constants';
|
import { DispatchNodeResponseKeyEnum } from '../runtime/constants';
|
||||||
import { FlowNodeInputItemType, FlowNodeOutputItemType } from './io.d';
|
import type { FlowNodeInputItemType, FlowNodeOutputItemType } from './io.d';
|
||||||
import { UserModelSchema } from '../../../support/user/type';
|
import { UserModelSchema } from '../../../support/user/type';
|
||||||
|
import type { ChatHistoryItemResType } from '../../chat/type';
|
||||||
import {
|
import {
|
||||||
ChatHistoryItemResType,
|
|
||||||
ChatItemType,
|
ChatItemType,
|
||||||
ChatItemValueItemType,
|
ChatItemValueItemType,
|
||||||
ToolRunResponseItemType,
|
ToolRunResponseItemType,
|
||||||
|
|
@ -21,9 +21,9 @@ import { PluginTypeEnum } from '../../plugin/constants';
|
||||||
import { RuntimeEdgeItemType, StoreEdgeItemType } from './edge';
|
import { RuntimeEdgeItemType, StoreEdgeItemType } from './edge';
|
||||||
import { NextApiResponse } from 'next';
|
import { NextApiResponse } from 'next';
|
||||||
import { AppDetailType, AppSchema } from '../../app/type';
|
import { AppDetailType, AppSchema } from '../../app/type';
|
||||||
import { ParentIdType } from 'common/parentFolder/type';
|
import type { ParentIdType } from 'common/parentFolder/type';
|
||||||
import { AppTypeEnum } from 'core/app/constants';
|
import { AppTypeEnum } from 'core/app/constants';
|
||||||
import { WorkflowInteractiveResponseType } from '../template/system/interactive/type';
|
import type { WorkflowInteractiveResponseType } from '../template/system/interactive/type';
|
||||||
|
|
||||||
export type FlowNodeCommonType = {
|
export type FlowNodeCommonType = {
|
||||||
parentNodeId?: string;
|
parentNodeId?: string;
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,12 @@ import {
|
||||||
NodeOutputKeyEnum
|
NodeOutputKeyEnum
|
||||||
} from './constants';
|
} from './constants';
|
||||||
import {
|
import {
|
||||||
FlowNodeInputItemType,
|
type FlowNodeInputItemType,
|
||||||
FlowNodeOutputItemType,
|
type FlowNodeOutputItemType,
|
||||||
ReferenceArrayValueType,
|
type ReferenceArrayValueType,
|
||||||
ReferenceItemValueType
|
type ReferenceItemValueType
|
||||||
} from './type/io.d';
|
} from './type/io.d';
|
||||||
import { StoreNodeItemType } from './type/node';
|
import { type StoreNodeItemType } from './type/node';
|
||||||
import type {
|
import type {
|
||||||
VariableItemType,
|
VariableItemType,
|
||||||
AppTTSConfigType,
|
AppTTSConfigType,
|
||||||
|
|
@ -29,7 +29,7 @@ import type {
|
||||||
AppAutoExecuteConfigType,
|
AppAutoExecuteConfigType,
|
||||||
AppQGConfigType
|
AppQGConfigType
|
||||||
} from '../app/type';
|
} from '../app/type';
|
||||||
import { EditorVariablePickerType } from '../../../web/components/common/Textarea/PromptEditor/type';
|
import { type EditorVariablePickerType } from '../../../web/components/common/Textarea/PromptEditor/type';
|
||||||
import {
|
import {
|
||||||
defaultAutoExecuteConfig,
|
defaultAutoExecuteConfig,
|
||||||
defaultChatInputGuideConfig,
|
defaultChatInputGuideConfig,
|
||||||
|
|
@ -38,7 +38,7 @@ import {
|
||||||
defaultWhisperConfig
|
defaultWhisperConfig
|
||||||
} from '../app/constants';
|
} from '../app/constants';
|
||||||
import { IfElseResultEnum } from './template/system/ifElse/constant';
|
import { IfElseResultEnum } from './template/system/ifElse/constant';
|
||||||
import { RuntimeNodeItemType } from './runtime/type';
|
import { type RuntimeNodeItemType } from './runtime/type';
|
||||||
import {
|
import {
|
||||||
Input_Template_File_Link,
|
Input_Template_File_Link,
|
||||||
Input_Template_History,
|
Input_Template_History,
|
||||||
|
|
@ -46,7 +46,7 @@ import {
|
||||||
Input_Template_UserChatInput
|
Input_Template_UserChatInput
|
||||||
} from './template/input';
|
} from './template/input';
|
||||||
import { i18nT } from '../../../web/i18n/utils';
|
import { i18nT } from '../../../web/i18n/utils';
|
||||||
import { RuntimeUserPromptType, UserChatItemType } from '../../core/chat/type';
|
import { type RuntimeUserPromptType, type UserChatItemType } from '../../core/chat/type';
|
||||||
import { getNanoid } from '../../common/string/tools';
|
import { getNanoid } from '../../common/string/tools';
|
||||||
import { ChatRoleEnum } from '../../core/chat/constants';
|
import { ChatRoleEnum } from '../../core/chat/constants';
|
||||||
import { runtimePrompt2ChatsValue } from '../../core/chat/adapt';
|
import { runtimePrompt2ChatsValue } from '../../core/chat/adapt';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { SourceMemberType } from '../user/type';
|
import type { SourceMemberType } from '../user/type';
|
||||||
import { OperationLogEventEnum } from './constants';
|
import type { OperationLogEventEnum } from './constants';
|
||||||
|
|
||||||
export type OperationLogSchema = {
|
export type OperationLogSchema = {
|
||||||
_id: string;
|
_id: string;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import type { HistoryItemType } from '../../core/chat/type.d';
|
import type { HistoryItemType } from '../../core/chat/type.d';
|
||||||
import { OutLinkSchema } from './type.d';
|
import type { OutLinkSchema } from './type.d';
|
||||||
|
|
||||||
export type AuthOutLinkInitProps = {
|
export type AuthOutLinkInitProps = {
|
||||||
outLinkUid: string;
|
outLinkUid: string;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { AppSchema } from '../../core/app/type';
|
import { AppSchema } from '../../core/app/type';
|
||||||
import { PublishChannelEnum } from './constant';
|
import type { PublishChannelEnum } from './constant';
|
||||||
import { RequireOnlyOne } from '../../common/type/utils';
|
import { RequireOnlyOne } from '../../common/type/utils';
|
||||||
|
|
||||||
// Feishu Config interface
|
// Feishu Config interface
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { NullPermission, PermissionKeyEnum, PermissionList } from '../constant';
|
import { NullPermission, PermissionKeyEnum, PermissionList } from '../constant';
|
||||||
import { PermissionListType } from '../type';
|
import { type PermissionListType } from '../type';
|
||||||
import { i18nT } from '../../../../web/i18n/utils';
|
import { i18nT } from '../../../../web/i18n/utils';
|
||||||
export enum AppPermissionKeyEnum {}
|
export enum AppPermissionKeyEnum {}
|
||||||
export const AppPermissionList: PermissionListType = {
|
export const AppPermissionList: PermissionListType = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { PerConstructPros, Permission } from '../controller';
|
import { type PerConstructPros, Permission } from '../controller';
|
||||||
import { AppDefaultPermissionVal } from './constant';
|
import { AppDefaultPermissionVal } from './constant';
|
||||||
|
|
||||||
export class AppPermission extends Permission {
|
export class AppPermission extends Permission {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import { RequireAtLeastOne, RequireOnlyOne } from '../../common/type/utils';
|
import type { RequireOnlyOne } from '../../common/type/utils';
|
||||||
import { Permission } from './controller';
|
import { RequireAtLeastOne } from '../../common/type/utils';
|
||||||
import { PermissionValueType } from './type';
|
import type { Permission } from './controller';
|
||||||
|
import type { PermissionValueType } from './type';
|
||||||
|
|
||||||
export type CollaboratorItemType = {
|
export type CollaboratorItemType = {
|
||||||
teamId: string;
|
teamId: string;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { PermissionListType } from './type';
|
import { type PermissionListType } from './type';
|
||||||
import { i18nT } from '../../../web/i18n/utils';
|
import { i18nT } from '../../../web/i18n/utils';
|
||||||
export enum AuthUserTypeEnum {
|
export enum AuthUserTypeEnum {
|
||||||
token = 'token',
|
token = 'token',
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue