Skip to content

Commit e3b4b5f

Browse files
committed
fix(jev): sanitize generated JSON inputs
1 parent 5ad36fc commit e3b4b5f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎apps/sim/blocks/blocks/jev.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export const JevBlock: BlockConfig<
7373
prompt:
7474
'Create Jev Choice options from the user request. Return an object with 1–255 option names mapped to clear descriptions, for example {"billing":"Payments and refunds","technical":"Bugs and outages"}. Return ONLY the JSON object.',
7575
placeholder: 'Describe the categories Jev should choose between...',
76+
generationType: 'json-object',
7677
},
7778
},
7879
{
@@ -88,6 +89,7 @@ export const JevBlock: BlockConfig<
8889
prompt:
8990
'Create an ordered Jev Score rubric with 2–10 level descriptions, from lowest to highest, for example ["Low","Medium","High"]. Return ONLY the JSON array.',
9091
placeholder: 'Describe what to score and the levels to use...',
92+
generationType: 'json-array',
9193
},
9294
},
9395
{
@@ -103,6 +105,7 @@ export const JevBlock: BlockConfig<
103105
prompt:
104106
'Define the meaning of yes and no for a Jev Noul question using true and false keys, for example {"true":"Explicitly urgent","false":"No urgency expressed"}. Return ONLY the JSON object.',
105107
placeholder: 'Describe what should count as yes or no...',
108+
generationType: 'json-object',
106109
},
107110
},
108111
{
@@ -118,6 +121,7 @@ export const JevBlock: BlockConfig<
118121
prompt:
119122
'Create named Jev questions as an object keyed by question ID. Each question requires type and instructions. Choice uses type "choice" and criteria with 1–255 named options; Score uses type "score" and criteria with 2–10 ordered levels; Noul uses type "noul" and optional true/false criteria. Example: {"urgent":{"type":"noul","instructions":"Is this urgent?"}}. Return ONLY the JSON object.',
120123
placeholder: 'Describe the decisions to evaluate together...',
124+
generationType: 'json-object',
121125
},
122126
},
123127
{

0 commit comments

Comments
 (0)