mirror of
https://github.com/labring/FastGPT.git
synced 2026-05-06 01:02:54 +08:00
fix: index (#5458)
* doc * fix: home app name * fix: char init error status * fix: index * fix: secret input
This commit is contained in:
@@ -25,6 +25,7 @@ import { secretInputTypeToInputType } from '@/components/core/app/formRender/uti
|
||||
import { getSystemPlugTemplates } from '@/web/core/app/api/plugin';
|
||||
import type { NodeTemplateListItemType } from '@fastgpt/global/core/workflow/type/node';
|
||||
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
||||
import { InputTypeEnum } from '@/components/core/app/formRender/constant';
|
||||
|
||||
export type ToolParamsFormType = {
|
||||
type: SystemToolInputTypeEnum;
|
||||
@@ -262,18 +263,33 @@ const SecretInputModal = ({
|
||||
<Controller
|
||||
control={control}
|
||||
name={inputKey}
|
||||
rules={{ required: item.required }}
|
||||
render={({ field: { onChange, value }, fieldState: { error } }) => (
|
||||
<InputRender
|
||||
inputType={secretInputTypeToInputType(item.inputType)}
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
placeholder={item.description}
|
||||
bg={'myGray.50'}
|
||||
list={item.list}
|
||||
isInvalid={!!error}
|
||||
/>
|
||||
)}
|
||||
rules={{
|
||||
required:
|
||||
item.required &&
|
||||
secretInputTypeToInputType(item.inputType) !==
|
||||
InputTypeEnum.switch
|
||||
? true
|
||||
: false,
|
||||
validate:
|
||||
item.required &&
|
||||
secretInputTypeToInputType(item.inputType) ===
|
||||
InputTypeEnum.switch
|
||||
? (value) => value !== undefined && value !== null
|
||||
: undefined
|
||||
}}
|
||||
render={({ field: { onChange, value }, fieldState: { error } }) => {
|
||||
return (
|
||||
<InputRender
|
||||
inputType={secretInputTypeToInputType(item.inputType)}
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
placeholder={item.description}
|
||||
bg={'myGray.50'}
|
||||
list={item.list}
|
||||
isInvalid={!!error}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</Box>
|
||||
|
||||
@@ -217,7 +217,7 @@ const HomeChatWindow = ({ myApps }: Props) => {
|
||||
variables,
|
||||
responseChatItemId,
|
||||
appId,
|
||||
appName: t('chat:home.chat_app', { name: 'FastGPT' }),
|
||||
appName: t('chat:home.chat_app'),
|
||||
chatId,
|
||||
...form2AppWorkflow(formData, t)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user