fix: index (#5458)

* doc

* fix: home app name

* fix: char init error status

* fix: index

* fix: secret input
This commit is contained in:
Archer
2025-08-14 18:54:47 +08:00
committed by GitHub
parent 9a9f094e15
commit eadf2fd54c
14 changed files with 64 additions and 43 deletions
@@ -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)
},