refactor(trigger): refactor app mode type to enum

This commit is contained in:
yessenia
2025-10-21 15:42:04 +08:00
parent d5e2649608
commit dc4801c014
59 changed files with 260 additions and 223 deletions

View File

@ -6,6 +6,7 @@ import { RiArrowRightUpLine } from '@remixicon/react'
import cn from '@/utils/classnames'
import AppIcon from '@/app/components/base/app-icon'
import type { RelatedApp } from '@/models/datasets'
import { AppModeEnum } from '@/types/app'
type ILikedItemProps = {
appStatus?: boolean
@ -14,11 +15,11 @@ type ILikedItemProps = {
}
const appTypeMap = {
'chat': 'Chatbot',
'completion': 'Completion',
'agent-chat': 'Agent',
'advanced-chat': 'Chatflow',
'workflow': 'Workflow',
[AppModeEnum.CHAT]: 'Chatbot',
[AppModeEnum.COMPLETION]: 'Completion',
[AppModeEnum.AGENT_CHAT]: 'Agent',
[AppModeEnum.ADVANCED_CHAT]: 'Chatflow',
[AppModeEnum.WORKFLOW]: 'Workflow',
}
const LikedItem = ({