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

@ -22,6 +22,7 @@ import type {
import type { ExternalDataTool } from '@/models/common'
import type { DataSet } from '@/models/datasets'
import type { VisionSettings } from '@/types/app'
import { AppModeEnum } from '@/types/app'
import { ModelModeType, RETRIEVE_TYPE, Resolution, TransferMethod } from '@/types/app'
import { ANNOTATION_DEFAULT, DEFAULT_AGENT_SETTING, DEFAULT_CHAT_PROMPT_CONFIG, DEFAULT_COMPLETION_PROMPT_CONFIG } from '@/config'
import type { FormValue } from '@/app/components/header/account-setting/model-provider-page/declarations'
@ -32,7 +33,7 @@ type IDebugConfiguration = {
appId: string
isAPIKeySet: boolean
isTrailFinished: boolean
mode: string
mode: AppModeEnum
modelModeType: ModelModeType
promptMode: PromptMode
setPromptMode: (promptMode: PromptMode) => void
@ -111,7 +112,7 @@ const DebugConfigurationContext = createContext<IDebugConfiguration>({
appId: '',
isAPIKeySet: false,
isTrailFinished: false,
mode: '',
mode: AppModeEnum.CHAT,
modelModeType: ModelModeType.chat,
promptMode: PromptMode.simple,
setPromptMode: noop,