mirror of
https://github.com/labring/FastGPT.git
synced 2026-05-07 01:02:55 +08:00
aaa7d17ef1
* feat: encapsulate logger (#6535) * feat: encapsulate logger * update engines --------- Co-authored-by: archer <545436317@qq.com> * next config * dev shell * Agent sandbox (#6532) * docs: switch to docs layout and apply black theme (#6533) * feat: add Gemini 3.1 models - Add gemini-3.1-pro-preview (released February 19, 2026) - Add gemini-3.1-flash-lite-preview (released March 3, 2026) Both models support: - 1M context window - 64k max response - Vision - Tool choice * docs: switch to docs layout and apply black theme - Change layout from notebook to docs - Update logo to icon + text format - Apply fumadocs black theme - Simplify global.css (keep only navbar and TOC styles) - Fix icon components to properly accept className props - Add mobile text overflow handling - Update Node engine requirement to >=20.x * doc * doc * lock * fix: ts * doc * doc --------- Co-authored-by: archer <archer@archerdeMac-mini.local> Co-authored-by: archer <545436317@qq.com> * Doc (#6493) * cloud doc * doc refactor * doc move * seo * remove doc * yml * doc * fix: tsconfig * fix: tsconfig * sandbox version (#6497) * sandbox version * add sandbox log * update lock * fix * fix: sandbox * doc * add console * i18n * sandbxo in agent * feat: agent sandbox * lock * feat: sandbox ui * sandbox check exists * env tempalte * doc * lock * sandbox in chat window * sandbox entry * fix: test * rename var * sandbox config tip * update sandbox lifecircle * update prompt * rename provider test * sandbox logger * yml --------- Co-authored-by: Archer <archer@fastgpt.io> Co-authored-by: archer <archer@archerdeMac-mini.local> * perf: sandbox error tip * Add sandbox limit and fix some issue (#6550) * sandbox in plan * fix: some issue * fix: test * editor default path * fix: comment * perf: sandbox worksapce * doc * perf: del sandbox * sandbox build * fix: test * fix: pr comment --------- Co-authored-by: Ryo <whoeverimf5@gmail.com> Co-authored-by: Archer <archer@fastgpt.io> Co-authored-by: archer <archer@archerdeMac-mini.local>
162 lines
5.2 KiB
TypeScript
162 lines
5.2 KiB
TypeScript
import { i18nT } from '../../../../web/i18n/utils';
|
|
import type { ErrType } from '../errorCode';
|
|
/* team: 500000 */
|
|
export enum TeamErrEnum {
|
|
notUser = 'notUser',
|
|
unAuthTeam = 'unAuthTeam',
|
|
|
|
teamOverSize = 'teamOverSize',
|
|
teamMemberOverSize = 'teamMemberOverSize',
|
|
aiPointsNotEnough = 'aiPointsNotEnough',
|
|
datasetSizeNotEnough = 'datasetSizeNotEnough',
|
|
datasetAmountNotEnough = 'datasetAmountNotEnough',
|
|
appAmountNotEnough = 'appAmountNotEnough',
|
|
pluginAmountNotEnough = 'pluginAmountNotEnough',
|
|
appFolderAmountNotEnough = 'appFolderAmountNotEnough',
|
|
websiteSyncNotEnough = 'websiteSyncNotEnough',
|
|
reRankNotEnough = 'reRankNotEnough',
|
|
ticketNotAvailable = 'ticketNotAvailable',
|
|
sandboxNotSupport = 'sandboxNotSupport',
|
|
|
|
groupNameEmpty = 'groupNameEmpty',
|
|
groupNameDuplicate = 'groupNameDuplicate',
|
|
groupNotExist = 'groupNotExist',
|
|
orgMemberNotExist = 'orgMemberNotExist',
|
|
orgMemberDuplicated = 'orgMemberDuplicated',
|
|
orgNotExist = 'orgNotExist',
|
|
orgParentNotExist = 'orgParentNotExist',
|
|
cannotMoveToSubPath = 'cannotMoveToSubPath',
|
|
cannotModifyRootOrg = 'cannotModifyRootOrg',
|
|
cannotDeleteNonEmptyOrg = 'cannotDeleteNonEmptyOrg',
|
|
cannotDeleteDefaultGroup = 'cannotDeleteDefaultGroup',
|
|
userNotActive = 'userNotActive',
|
|
invitationLinkInvalid = 'invitationLinkInvalid',
|
|
youHaveBeenInTheTeam = 'youHaveBeenInTheTeam',
|
|
tooManyInvitations = 'tooManyInvitations',
|
|
unPermission = 'unPermission'
|
|
}
|
|
|
|
const teamErr = [
|
|
{
|
|
statusText: TeamErrEnum.notUser,
|
|
message: i18nT('common:code_error.team_error.not_user')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.unPermission,
|
|
message: i18nT('common:error_un_permission')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.teamOverSize,
|
|
message: i18nT('common:code_error.team_error.over_size')
|
|
},
|
|
{ statusText: TeamErrEnum.unAuthTeam, message: i18nT('common:code_error.team_error.un_auth') },
|
|
{
|
|
statusText: TeamErrEnum.aiPointsNotEnough,
|
|
message: i18nT('common:code_error.team_error.ai_points_not_enough')
|
|
}, // 需要定义或留空
|
|
{
|
|
statusText: TeamErrEnum.datasetSizeNotEnough,
|
|
message: i18nT('common:code_error.team_error.dataset_size_not_enough')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.datasetAmountNotEnough,
|
|
message: i18nT('common:code_error.team_error.dataset_amount_not_enough')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.appAmountNotEnough,
|
|
message: i18nT('common:code_error.team_error.app_amount_not_enough')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.pluginAmountNotEnough,
|
|
message: i18nT('common:code_error.team_error.plugin_amount_not_enough')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.appFolderAmountNotEnough,
|
|
message: i18nT('common:code_error.team_error.app_folder_amount_not_enough')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.websiteSyncNotEnough,
|
|
message: i18nT('common:code_error.team_error.website_sync_not_enough')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.reRankNotEnough,
|
|
message: i18nT('common:code_error.team_error.re_rank_not_enough')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.ticketNotAvailable,
|
|
message: i18nT('common:code_error.team_error.ticket_not_available')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.groupNameEmpty,
|
|
message: i18nT('common:code_error.team_error.group_name_empty')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.groupNotExist,
|
|
message: i18nT('common:code_error.team_error.group_not_exist')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.cannotDeleteDefaultGroup,
|
|
message: i18nT('common:code_error.team_error.cannot_delete_default_group')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.groupNameDuplicate,
|
|
message: i18nT('common:code_error.team_error.group_name_duplicate')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.userNotActive,
|
|
message: i18nT('common:code_error.team_error.user_not_active')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.orgMemberNotExist,
|
|
message: i18nT('common:code_error.team_error.org_member_not_exist')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.orgMemberDuplicated,
|
|
message: i18nT('common:code_error.team_error.org_member_duplicated')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.orgNotExist,
|
|
message: i18nT('common:code_error.team_error.org_not_exist')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.orgParentNotExist,
|
|
message: i18nT('common:code_error.team_error.org_parent_not_exist')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.cannotMoveToSubPath,
|
|
message: i18nT('common:code_error.team_error.cannot_move_to_sub_path')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.cannotModifyRootOrg,
|
|
message: i18nT('common:code_error.team_error.cannot_modify_root_org')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.cannotDeleteNonEmptyOrg,
|
|
message: i18nT('common:code_error.team_error.cannot_delete_non_empty_org')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.invitationLinkInvalid,
|
|
message: i18nT('common:code_error.team_error.invitation_link_invalid')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.youHaveBeenInTheTeam,
|
|
message: i18nT('common:code_error.team_error.you_have_been_in_the_team')
|
|
},
|
|
{
|
|
statusText: TeamErrEnum.tooManyInvitations,
|
|
message: i18nT('common:code_error.team_error.too_many_invitations')
|
|
}
|
|
];
|
|
|
|
export default teamErr.reduce((acc, cur, index) => {
|
|
return {
|
|
...acc,
|
|
[cur.statusText]: {
|
|
code: 500000 + index,
|
|
statusText: cur.statusText,
|
|
message: cur.message,
|
|
data: null
|
|
}
|
|
};
|
|
}, {} as ErrType<`${TeamErrEnum}`>);
|