From c77ab0c701b8a46b11192016a4f3dec070001a7b Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sun, 31 Aug 2025 13:17:12 +0000 Subject: [PATCH] json editor nit --- frontend/src/lib/components/EditableSchemaForm.svelte | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/src/lib/components/EditableSchemaForm.svelte b/frontend/src/lib/components/EditableSchemaForm.svelte index 529e99a1f9..181f4038ce 100644 --- a/frontend/src/lib/components/EditableSchemaForm.svelte +++ b/frontend/src/lib/components/EditableSchemaForm.svelte @@ -547,9 +547,13 @@ 'Arguments can be edited either using the wizard, or by editing their JSON Schema.' }} lightMode - on:change={() => { - schemaString = JSON.stringify(schema, null, '\t') - editor?.setCode(schemaString) + on:change={(e) => { + if (e.detail) { + schemaString = JSON.stringify(schema, null, '\t') + editor?.setCode(schemaString) + } else { + schema = JSON.parse(schemaString) + } }} />