HTTP support jsonPath; System plugin support save file. (#2969)

* perf: system plugin auto save file

* feat: http support jsonPath

* fix: assistant response

* reset milvus version

* fix: textarea register

* fix: global variable

* delete tip

* doc
This commit is contained in:
Archer
2024-10-23 00:40:54 +08:00
committed by shilin66
parent 036bdabe5d
commit ab08fc80d3
30 changed files with 374 additions and 163 deletions

View File

@@ -59,7 +59,7 @@ export const useDebug = () => {
const filteredVar = useMemo(() => {
const variables = appDetail.chatConfig?.variables;
return variables?.filter((item) => item.type !== VariableInputEnum.custom) || [];
}, [appDetail.chatConfig.variables]);
}, [appDetail.chatConfig?.variables]);
const [defaultGlobalVariables, setDefaultGlobalVariables] = useState<Record<string, any>>(
filteredVar.reduce(
@@ -272,14 +272,13 @@ export const useDebug = () => {
return (
<MyTextarea
autoHeight
minH={40}
minH={60}
maxH={160}
bg={'myGray.50'}
placeholder={t(input.placeholder || ('' as any))}
value={getValues(`nodeVariables.${input.key}`)}
onChange={(e) => {
setValue(`nodeVariables.${input.key}`, e.target.value);
}}
{...register(`nodeVariables.${input.key}`, {
required: input.required
})}
/>
);
}

View File

@@ -142,7 +142,7 @@ const FieldModal = ({
{/* key */}
<Flex mt={3} alignItems={'center'}>
<FormLabel flex={'0 0 70px'} required>
{t('common:core.module.Field Name')}
{t('workflow:Variable_name')}
</FormLabel>
<Input
bg={'myGray.50'}

View File

@@ -78,7 +78,7 @@ const RenderOutput = ({
position={'relative'}
>
<Box position={'relative'} fontWeight={'medium'}>
{t('common:core.workflow.Custom outputs')}
{t((addOutput.label || 'common:core.workflow.Custom outputs') as any)}
</Box>
{addOutput.description && <QuestionTip ml={1} label={addOutput.description} />}
<Box flex={'1 0 0'} />

View File

@@ -176,7 +176,15 @@ const AppContextProvider = ({ children }: { children: ReactNode }) => {
errorToast: t('common:common.Delete Failed')
}
);
const onDelApp = useCallback(() => openConfirmDel(deleteApp)(), [deleteApp, openConfirmDel]);
const onDelApp = useCallback(
() =>
openConfirmDel(
deleteApp,
undefined,
t('app:confirm_del_app_tip', { name: appDetail.name })
)(),
[appDetail.name, deleteApp, openConfirmDel, t]
);
const contextValue: AppContextType = {
appId,