Fix: Every variable in the chat settings is required. (#17727)

This commit is contained in:
balibabu
2026-08-03 16:41:47 +08:00
committed by GitHub
parent 8494f242d7
commit 10db22c756
4 changed files with 4 additions and 2 deletions

View File

@@ -33,7 +33,7 @@ export function DynamicVariableForm({
const add = useCallback(() => {
append({
key: undefined,
key: '',
optional: false,
});
}, [append]);

View File

@@ -26,7 +26,7 @@ export function useChatSettingSchema() {
parameters: z
.array(
z.object({
key: z.string(),
key: z.string().min(1, { message: t('variableKeyMessage') }),
optional: z.boolean(),
}),
)