App template market (#2337)

* feat: add app template market (#2012)

* feat: add app template market

* fix

* fix

* i18n

* fix

* perf: template market ux

* perf: simple mode app ui

* perf: tempalte modal ui

* perf: tempalte market ui

* perf: template position

* feat: create app modal

* regiter default app

* perf: icon

* change templates position (#2331)

* change templates position

* fix

* perf: template market ux

---------

Co-authored-by: heheer <heheer@sealos.io>
This commit is contained in:
Archer
2024-08-12 16:21:21 +08:00
committed by GitHub
parent 231afc4ac5
commit 2196930005
58 changed files with 5934 additions and 3165 deletions

View File

@@ -37,6 +37,7 @@ export type FastGPTFeConfigsType = {
chatbotUrl?: string;
openAPIDocUrl?: string;
systemPluginCourseUrl?: string;
appTemplateCourse?: string;
systemTitle?: string;
systemDescription?: string;

View File

@@ -29,3 +29,12 @@ export const defaultAppSelectFileConfig: AppFileSelectConfigType = {
canSelectImg: false,
maxFiles: 10
};
export enum AppTemplateTypeEnum {
recommendation = 'recommendation',
writing = 'writing',
imageGeneration = 'image-generation',
webSearch = 'web-search',
roleplay = 'roleplay',
officeServices = 'office-services'
}

View File

@@ -24,7 +24,7 @@ import { FlowNodeTemplateType, StoreNodeItemType } from './node';
export type WorkflowTemplateBasicType = {
nodes: StoreNodeItemType[];
edges: StoreEdgeItemType[];
chatConfigs?: AppChatConfigType;
chatConfig?: AppChatConfigType;
};
export type WorkflowTemplateType = {
id: string;
@@ -46,7 +46,18 @@ export type WorkflowTemplateType = {
// template market
export type TemplateMarketItemType = WorkflowTemplateType & {
tags?: { id: string; label: string }[];
tags: string[];
type: AppTypeEnum.simple | AppTypeEnum.workflow | AppTypeEnum.plugin;
};
// template market list
export type TemplateMarketListItemType = {
id: string;
name: string;
intro?: string;
author?: string;
tags: string[];
type: AppTypeEnum.simple | AppTypeEnum.workflow | AppTypeEnum.plugin;
avatar: string;
};
// system plugin