浏览代码

fix: typo of PublishConfig (#3540)

tags/0.6.4
Bowen Liang 1年前
父节点
当前提交
6269e011db
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3
    3
      web/app/components/app/configuration/index.tsx

+ 3
- 3
web/app/components/app/configuration/index.tsx 查看文件

import { type Collection } from '@/app/components/tools/types' import { type Collection } from '@/app/components/tools/types'
import { useStore as useAppStore } from '@/app/components/app/store' import { useStore as useAppStore } from '@/app/components/app/store'


type PublichConfig = {
type PublishConfig = {
modelConfig: ModelConfig modelConfig: ModelConfig
completionParams: FormValue completionParams: FormValue
} }
const matched = pathname.match(/\/app\/([^/]+)/) const matched = pathname.match(/\/app\/([^/]+)/)
const appId = (matched?.length && matched[1]) ? matched[1] : '' const appId = (matched?.length && matched[1]) ? matched[1] : ''
const [mode, setMode] = useState('') const [mode, setMode] = useState('')
const [publishedConfig, setPublishedConfig] = useState<PublichConfig | null>(null)
const [publishedConfig, setPublishedConfig] = useState<PublishConfig | null>(null)


const modalConfig = useMemo(() => appDetail?.model_config || {} as BackendModelConfig, [appDetail]) const modalConfig = useMemo(() => appDetail?.model_config || {} as BackendModelConfig, [appDetail])
const [conversationId, setConversationId] = useState<string | null>('') const [conversationId, setConversationId] = useState<string | null>('')


const [isShowHistoryModal, { setTrue: showHistoryModal, setFalse: hideHistoryModal }] = useBoolean(false) const [isShowHistoryModal, { setTrue: showHistoryModal, setFalse: hideHistoryModal }] = useBoolean(false)


const syncToPublishedConfig = (_publishedConfig: PublichConfig) => {
const syncToPublishedConfig = (_publishedConfig: PublishConfig) => {
const modelConfig = _publishedConfig.modelConfig const modelConfig = _publishedConfig.modelConfig
setModelConfig(_publishedConfig.modelConfig) setModelConfig(_publishedConfig.modelConfig)
setCompletionParams(_publishedConfig.completionParams) setCompletionParams(_publishedConfig.completionParams)

正在加载...
取消
保存