mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 13:03:50 +00:00

* 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
112 lines
3.0 KiB
TypeScript
112 lines
3.0 KiB
TypeScript
import { FlowNodeTemplateTypeEnum } from '@fastgpt/global/core/workflow/constants';
|
|
import { i18nT } from '../../i18n/utils';
|
|
import type { PluginGroupSchemaType, TGroupType } from '../../../service/core/app/plugin/type';
|
|
import { AppTemplateTypeEnum } from '@fastgpt/global/core/app/constants';
|
|
import { type TemplateTypeSchemaType } from '@fastgpt/global/core/app/type';
|
|
|
|
export const workflowNodeTemplateList = [
|
|
{
|
|
type: FlowNodeTemplateTypeEnum.systemInput,
|
|
label: i18nT('common:core.module.template.System input module'),
|
|
list: []
|
|
},
|
|
{
|
|
type: FlowNodeTemplateTypeEnum.ai,
|
|
label: i18nT('common:core.module.template.AI function'),
|
|
list: []
|
|
},
|
|
{
|
|
type: FlowNodeTemplateTypeEnum.search,
|
|
label: i18nT('common:core.workflow.template.Search'),
|
|
list: []
|
|
},
|
|
{
|
|
type: FlowNodeTemplateTypeEnum.interactive,
|
|
label: i18nT('common:core.workflow.template.Interactive'),
|
|
list: []
|
|
},
|
|
{
|
|
type: FlowNodeTemplateTypeEnum.multimodal,
|
|
label: i18nT('common:core.workflow.template.Multimodal'),
|
|
list: []
|
|
},
|
|
{
|
|
type: FlowNodeTemplateTypeEnum.tools,
|
|
label: i18nT('common:core.module.template.Tool module'),
|
|
list: []
|
|
},
|
|
{
|
|
type: FlowNodeTemplateTypeEnum.communication,
|
|
label: i18nT('common:workflow.template.communication'),
|
|
list: []
|
|
},
|
|
{
|
|
type: FlowNodeTemplateTypeEnum.other,
|
|
label: i18nT('common:Other'),
|
|
list: []
|
|
},
|
|
{
|
|
type: FlowNodeTemplateTypeEnum.teamApp,
|
|
label: '',
|
|
list: []
|
|
}
|
|
];
|
|
|
|
export const systemPluginTemplateList: TGroupType[] = [
|
|
{
|
|
typeId: FlowNodeTemplateTypeEnum.tools,
|
|
typeName: i18nT('common:navbar.Tools')
|
|
},
|
|
{
|
|
typeId: FlowNodeTemplateTypeEnum.search,
|
|
typeName: i18nT('common:Search')
|
|
},
|
|
{
|
|
typeId: FlowNodeTemplateTypeEnum.multimodal,
|
|
typeName: i18nT('common:core.workflow.template.Multimodal')
|
|
},
|
|
{
|
|
typeId: FlowNodeTemplateTypeEnum.communication,
|
|
typeName: i18nT('common:workflow.template.communication')
|
|
},
|
|
{
|
|
typeId: FlowNodeTemplateTypeEnum.other,
|
|
typeName: i18nT('common:Other')
|
|
}
|
|
];
|
|
export const defaultGroup: PluginGroupSchemaType = {
|
|
groupId: 'systemPlugin',
|
|
groupAvatar: 'core/app/type/pluginLight',
|
|
groupName: i18nT('common:core.module.template.System Plugin'),
|
|
groupOrder: 0,
|
|
groupTypes: systemPluginTemplateList
|
|
};
|
|
|
|
export const defaultTemplateTypes: TemplateTypeSchemaType[] = [
|
|
{
|
|
typeName: i18nT('common:templateTags.Writing'),
|
|
typeId: AppTemplateTypeEnum.writing,
|
|
typeOrder: 0
|
|
},
|
|
{
|
|
typeName: i18nT('common:templateTags.Image_generation'),
|
|
typeId: AppTemplateTypeEnum.imageGeneration,
|
|
typeOrder: 1
|
|
},
|
|
{
|
|
typeName: i18nT('common:templateTags.Web_search'),
|
|
typeId: AppTemplateTypeEnum.webSearch,
|
|
typeOrder: 2
|
|
},
|
|
{
|
|
typeName: i18nT('common:templateTags.Roleplay'),
|
|
typeId: AppTemplateTypeEnum.roleplay,
|
|
typeOrder: 3
|
|
},
|
|
{
|
|
typeName: i18nT('common:templateTags.Office_services'),
|
|
typeId: AppTemplateTypeEnum.officeServices,
|
|
typeOrder: 4
|
|
}
|
|
];
|