Input: {"body":{"messages":[{"content":"You are a code patching assistant. Your task is to generate precise line-based patches using the Micropatch protocol.\n\n## Input Format\n\nYou will receive files in this XML format:\n\n```\n<FILE path=\"src/hello.ts\" name=\"hello.ts\">\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n</FILE>\n\n<FILE path=\"src/utils.ts\" name=\"utils.ts\">\n001|export function add(a, b) {\n002|  return a + b\n003|}\n</FILE>\n```\n\nEach file has:\n- **path**: Full file path\n- **name**: File name\n- **Numbered lines**: Format is `NNN|content` where NNN is the ORIGINAL line number (1-based)\n\n## Output Format\n\nGenerate patches for EACH file that needs modification using this EXACT XML format:\n\n```\n<FILE path=\"src/hello.ts\">\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n</FILE>\n\n<FILE path=\"src/utils.ts\">\n◼<1|/**\n * Adds two numbers\n */\n</FILE>\n```\n\n**CRITICAL RULES**:\n1. Each `<FILE>` tag MUST include the exact `path` attribute from the input\n2. Put patch operations for EACH file inside its own `<FILE>...</FILE>` block\n3. If a file doesn't need changes, omit its `<FILE>` block entirely\n4. DO NOT mix patches from different files\n5. DO NOT include line numbers or any text outside the patch operations\n\n## Micropatch Protocol\n\nThe Micropatch protocol uses line numbers to reference ORIGINAL lines (before any edits).\n\n### Operations\n\nEach operation starts with the marker `◼` at the beginning of a line:\n\n1. **Insert BEFORE line**: `◼<NNN|text`\n   - Inserts `text` as a new line BEFORE original line NNN\n   - Example: `◼<5|console.log('debug')`\n\n2. **Insert AFTER line**: `◼>NNN|text`\n   - Inserts `text` as a new line AFTER original line NNN\n   - Example: `◼>10|}`\n\n3. **Replace single line**: `◼=NNN|new text`\n   - Replaces original line NNN with `new text`\n   - Can span multiple lines (continue until next ◼ or end)\n   - Example:\n     ```\n     ◼=7|function newName() {\n       return 42\n     }\n     ```\n\n4. **Replace range**: `◼=NNN-MMM|replacement`\n   - Replaces lines NNN through MMM with replacement text\n   - Example: `◼=5-8|const combined = a + b + c + d`\n\n5. **Delete single line**: `◼-NNN`\n   - Deletes original line NNN\n   - Example: `◼-12`\n\n6. **Delete range**: `◼-NNN-MMM`\n   - Deletes lines NNN through MMM inclusive\n   - Example: `◼-5-10`\n\n### Escaping\n\n- To include a literal `◼` in your text, use `\\◼`\n- No other escape sequences are recognized\n\n### Important Rules\n\n1. **Use ORIGINAL line numbers**: Always reference the line numbers shown in the input (001, 002, etc.)\n2. **One operation per line**: Each operation must start on a new line with `◼`\n3. **No explanations**: Output ONLY patch operations inside `<FILE>` tags\n4. **Precise operations**: Use the minimal set of operations to achieve the goal\n5. **Verify line numbers**: Double-check that line numbers match the input\n\n## Example\n\n**Input:**\n```\n<FILE path=\"src/math.ts\" name=\"math.ts\">\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n004|\n005|export { x, y }\n</FILE>\n```\n\n**Task:** Change variable names from x,y to a,b\n\n**Output:**\n```\n<FILE path=\"src/math.ts\">\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n◼=5|export { a, b }\n</FILE>\n```\n\n## Your Task\n\nGenerate ONLY the `<FILE>` blocks with patch operations. Do not include explanations, comments, or any other text.","role":"system"},{"content":"Instructions: add try-catch error handling to all async functions that call fetch\n\n<FILE path=\"src/api1.ts\" name=\"api1.ts\">\n001|export async function fetchUser(id: number) {\n002|  const response = await fetch('/api/user/' + id)\n003|  return response.json()\n004|}\n</FILE>\n\n<FILE path=\"src/api2.ts\" name=\"api2.ts\">\n001|export async function saveData(data: any) {\n002|  const response = await fetch('/api/save', { method: 'POST', body: JSON.stringify(data) })\n003|  return response.json()\n004|}\n</FILE>\n\n<FILE path=\"src/utils.ts\" name=\"utils.ts\">\n001|export function formatName(first: string, last: string) {\n002|  return first + ' ' + last\n003|}\n</FILE>\n\n<FILE path=\"src/constants.ts\" name=\"constants.ts\">\n001|export const API_URL = 'https://api.example.com'\n002|export const TIMEOUT = 5000\n</FILE>\n\n<FILE path=\"config.json\" name=\"config.json\">\n001|{\n002|  \"name\": \"app\",\n003|  \"version\": \"1.0.0\"\n004|}\n</FILE>\n\nGenerate patches for each file that needs modification:","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.patch","promptSource":"zai:zai.patch:default"},"model":"fast","signal":{},"stopSequences":[]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
<FILE path="src/api1.ts">
◼=2-3|try {
  const response = await fetch('/api/user/' + id)
  return response.json()
} catch (error) {
  console.error('Error fetching user:', error)
  throw error
}
</FILE>

<FILE path="src/api2.ts">
◼=2-3|try {
  const response = await fetch('/api/save', { method: 'POST', body: JSON.stringify(data) })
  return response.json()
} catch (error) {
  console.error('Error saving data:', error)
  throw error
}
</FILE>


Input: {"body":{"messages":[{"content":"You are a code patching assistant. Your task is to generate precise line-based patches using the Micropatch protocol.\n\n## Input Format\n\nYou will receive files in this XML format:\n\n```\n<FILE path=\"src/hello.ts\" name=\"hello.ts\">\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n</FILE>\n\n<FILE path=\"src/utils.ts\" name=\"utils.ts\">\n001|export function add(a, b) {\n002|  return a + b\n003|}\n</FILE>\n```\n\nEach file has:\n- **path**: Full file path\n- **name**: File name\n- **Numbered lines**: Format is `NNN|content` where NNN is the ORIGINAL line number (1-based)\n\n## Output Format\n\nGenerate patches for EACH file that needs modification using this EXACT XML format:\n\n```\n<FILE path=\"src/hello.ts\">\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n</FILE>\n\n<FILE path=\"src/utils.ts\">\n◼<1|/**\n * Adds two numbers\n */\n</FILE>\n```\n\n**CRITICAL RULES**:\n1. Each `<FILE>` tag MUST include the exact `path` attribute from the input\n2. Put patch operations for EACH file inside its own `<FILE>...</FILE>` block\n3. If a file doesn't need changes, omit its `<FILE>` block entirely\n4. DO NOT mix patches from different files\n5. DO NOT include line numbers or any text outside the patch operations\n\n## Micropatch Protocol\n\nThe Micropatch protocol uses line numbers to reference ORIGINAL lines (before any edits).\n\n### Operations\n\nEach operation starts with the marker `◼` at the beginning of a line:\n\n1. **Insert BEFORE line**: `◼<NNN|text`\n   - Inserts `text` as a new line BEFORE original line NNN\n   - Example: `◼<5|console.log('debug')`\n\n2. **Insert AFTER line**: `◼>NNN|text`\n   - Inserts `text` as a new line AFTER original line NNN\n   - Example: `◼>10|}`\n\n3. **Replace single line**: `◼=NNN|new text`\n   - Replaces original line NNN with `new text`\n   - Can span multiple lines (continue until next ◼ or end)\n   - Example:\n     ```\n     ◼=7|function newName() {\n       return 42\n     }\n     ```\n\n4. **Replace range**: `◼=NNN-MMM|replacement`\n   - Replaces lines NNN through MMM with replacement text\n   - Example: `◼=5-8|const combined = a + b + c + d`\n\n5. **Delete single line**: `◼-NNN`\n   - Deletes original line NNN\n   - Example: `◼-12`\n\n6. **Delete range**: `◼-NNN-MMM`\n   - Deletes lines NNN through MMM inclusive\n   - Example: `◼-5-10`\n\n### Escaping\n\n- To include a literal `◼` in your text, use `\\◼`\n- No other escape sequences are recognized\n\n### Important Rules\n\n1. **Use ORIGINAL line numbers**: Always reference the line numbers shown in the input (001, 002, etc.)\n2. **One operation per line**: Each operation must start on a new line with `◼`\n3. **No explanations**: Output ONLY patch operations inside `<FILE>` tags\n4. **Precise operations**: Use the minimal set of operations to achieve the goal\n5. **Verify line numbers**: Double-check that line numbers match the input\n\n## Example\n\n**Input:**\n```\n<FILE path=\"src/math.ts\" name=\"math.ts\">\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n004|\n005|export { x, y }\n</FILE>\n```\n\n**Task:** Change variable names from x,y to a,b\n\n**Output:**\n```\n<FILE path=\"src/math.ts\">\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n◼=5|export { a, b }\n</FILE>\n```\n\n## Your Task\n\nGenerate ONLY the `<FILE>` blocks with patch operations. Do not include explanations, comments, or any other text.","role":"system"},{"content":"Instructions: replace all TODO comments with FIXME comments (keep the same text after the colon)\n\n<FILE path=\"src/large.ts\" name=\"large.ts\">\n001|function largeFunction() {\n002|  // TODO: implement feature 0\n003|  const var1 = 1\n004|  const var2 = 2\n005|  const var3 = 3\n006|  const var4 = 4\n007|  const var5 = 5\n008|  const var6 = 6\n009|  const var7 = 7\n010|  const var8 = 8\n011|  const var9 = 9\n012|  // TODO: implement feature 1\n013|  const var11 = 11\n014|  const var12 = 12\n015|  const var13 = 13\n016|  const var14 = 14\n017|  const var15 = 15\n018|  const var16 = 16\n019|  const var17 = 17\n020|  const var18 = 18\n021|  const var19 = 19\n022|  // TODO: implement feature 2\n023|  const var21 = 21\n024|  const var22 = 22\n025|  const var23 = 23\n026|  const var24 = 24\n027|  const var25 = 25\n028|  const var26 = 26\n029|  const var27 = 27\n030|  const var28 = 28\n031|  const var29 = 29\n032|  // TODO: implement feature 3\n033|  const var31 = 31\n034|  const var32 = 32\n035|  const var33 = 33\n036|  const var34 = 34\n037|  const var35 = 35\n038|  const var36 = 36\n039|  const var37 = 37\n040|  const var38 = 38\n041|  const var39 = 39\n042|  // TODO: implement feature 4\n043|  const var41 = 41\n044|  const var42 = 42\n045|  const var43 = 43\n046|  const var44 = 44\n047|  const var45 = 45\n048|  const var46 = 46\n049|  const var47 = 47\n050|  const var48 = 48\n051|  const var49 = 49\n052|  // TODO: implement feature 5\n053|  const var51 = 51\n054|  const var52 = 52\n055|  const var53 = 53\n056|  const var54 = 54\n057|  const var55 = 55\n058|  const var56 = 56\n059|  const var57 = 57\n060|  const var58 = 58\n061|  const var59 = 59\n062|  // TODO: implement feature 6\n063|  const var61 = 61\n064|  const var62 = 62\n065|  const var63 = 63\n066|  const var64 = 64\n067|  const var65 = 65\n068|  const var66 = 66\n069|  const var67 = 67\n070|  const var68 = 68\n071|  const var69 = 69\n072|  // TODO: implement feature 7\n073|  const var71 = 71\n074|  const var72 = 72\n075|  const var73 = 73\n076|  const var74 = 74\n077|  const var75 = 75\n078|  const var76 = 76\n079|  const var77 = 77\n080|  const var78 = 78\n081|  const var79 = 79\n082|  // TODO: implement feature 8\n083|  const var81 = 81\n084|  const var82 = 82\n085|  const var83 = 83\n086|  const var84 = 84\n087|  const var85 = 85\n088|  const var86 = 86\n089|  const var87 = 87\n090|  const var88 = 88\n091|  const var89 = 89\n092|  // TODO: implement feature 9\n093|  const var91 = 91\n094|  const var92 = 92\n095|  const var93 = 93\n096|  const var94 = 94\n097|  const var95 = 95\n098|  const var96 = 96\n099|  const var97 = 97\n100|  const var98 = 98\n101|  const var99 = 99\n102|  // TODO: implement feature 10\n103|  const var101 = 101\n104|  const var102 = 102\n105|  const var103 = 103\n106|  const var104 = 104\n107|  const var105 = 105\n108|  const var106 = 106\n109|  const var107 = 107\n110|  const var108 = 108\n111|  const var109 = 109\n112|  // TODO: implement feature 11\n113|  const var111 = 111\n114|  const var112 = 112\n115|  const var113 = 113\n116|  const var114 = 114\n117|  const var115 = 115\n118|  const var116 = 116\n119|  const var117 = 117\n120|  const var118 = 118\n121|  const var119 = 119\n122|  // TODO: implement feature 12\n123|  const var121 = 121\n124|  const var122 = 122\n125|  const var123 = 123\n126|  const var124 = 124\n127|  const var125 = 125\n128|  const var126 = 126\n129|  const var127 = 127\n130|  const var128 = 128\n131|  const var129 = 129\n132|  // TODO: implement feature 13\n133|  const var131 = 131\n134|  const var132 = 132\n135|  const var133 = 133\n136|  const var134 = 134\n137|  const var135 = 135\n138|  const var136 = 136\n139|  const var137 = 137\n140|  const var138 = 138\n141|  const var139 = 139\n142|  // TODO: implement feature 14\n143|  const var141 = 141\n144|  const var142 = 142\n145|  const var143 = 143\n146|  const var144 = 144\n147|  const var145 = 145\n148|  const var146 = 146\n149|  const var147 = 147\n150|  const var148 = 148\n151|  const var149 = 149\n152|  // TODO: implement feature 15\n153|  const var151 = 151\n154|  const var152 = 152\n155|  const var153 = 153\n156|  const var154 = 154\n157|  const var155 = 155\n158|  const var156 = 156\n159|  const var157 = 157\n160|  const var158 = 158\n161|  const var159 = 159\n162|  // TODO: implement feature 16\n163|  const var161 = 161\n164|  const var162 = 162\n165|  const var163 = 163\n166|  const var164 = 164\n167|  const var165 = 165\n168|  const var166 = 166\n169|  const var167 = 167\n170|  const var168 = 168\n171|  const var169 = 169\n172|  // TODO: implement feature 17\n173|  const var171 = 171\n174|  const var172 = 172\n175|  const var173 = 173\n176|  const var174 = 174\n177|  const var175 = 175\n178|  const var176 = 176\n179|  const var177 = 177\n180|  const var178 = 178\n181|  const var179 = 179\n182|  // TODO: implement feature 18\n183|  const var181 = 181\n184|  const var182 = 182\n185|  const var183 = 183\n186|  const var184 = 184\n187|  const var185 = 185\n188|  const var186 = 186\n189|  const var187 = 187\n190|  const var188 = 188\n191|  const var189 = 189\n192|  // TODO: implement feature 19\n193|  const var191 = 191\n194|  const var192 = 192\n195|  const var193 = 193\n196|  const var194 = 194\n197|  const var195 = 195\n198|  const var196 = 196\n199|  const var197 = 197\n200|  const var198 = 198\n201|  const var199 = 199\n202|  // TODO: implement feature 20\n203|  const var201 = 201\n204|  const var202 = 202\n205|  const var203 = 203\n206|  const var204 = 204\n207|  const var205 = 205\n208|  const var206 = 206\n209|  const var207 = 207\n210|  const var208 = 208\n211|  const var209 = 209\n212|  // TODO: implement feature 21\n213|  const var211 = 211\n214|  const var212 = 212\n215|  const var213 = 213\n216|  const var214 = 214\n217|  const var215 = 215\n218|  const var216 = 216\n219|  const var217 = 217\n220|  const var218 = 218\n221|  const var219 = 219\n222|  // TODO: implement feature 22\n223|  const var221 = 221\n224|  const var222 = 222\n225|  const var223 = 223\n226|  const var224 = 224\n227|  const var225 = 225\n228|  const var226 = 226\n229|  const var227 = 227\n230|  const var228 = 228\n231|  const var229 = 229\n232|  // TODO: implement feature 23\n233|  const var231 = 231\n234|  const var232 = 232\n235|  const var233 = 233\n236|  const var234 = 234\n237|  const var235 = 235\n238|  const var236 = 236\n239|  const var237 = 237\n240|  const var238 = 238\n241|  const var239 = 239\n242|  // TODO: implement feature 24\n243|  const var241 = 241\n244|  const var242 = 242\n245|  const var243 = 243\n246|  const var244 = 244\n247|  const var245 = 245\n248|  const var246 = 246\n249|  const var247 = 247\n250|  const var248 = 248\n251|  const var249 = 249\n252|  // TODO: implement feature 25\n253|  const var251 = 251\n254|  const var252 = 252\n255|  const var253 = 253\n256|  const var254 = 254\n257|  const var255 = 255\n258|  const var256 = 256\n259|  const var257 = 257\n260|  const var258 = 258\n261|  const var259 = 259\n262|  // TODO: implement feature 26\n263|  const var261 = 261\n264|  const var262 = 262\n265|  const var263 = 263\n266|  const var264 = 264\n267|  const var265 = 265\n268|  const var266 = 266\n269|  const var267 = 267\n270|  const var268 = 268\n271|  const var269 = 269\n272|  // TODO: implement feature 27\n273|  const var271 = 271\n274|  const var272 = 272\n275|  const var273 = 273\n276|  const var274 = 274\n277|  const var275 = 275\n278|  const var276 = 276\n279|  const var277 = 277\n280|  const var278 = 278\n281|  const var279 = 279\n282|  // TODO: implement feature 28\n283|  const var281 = 281\n284|  const var282 = 282\n285|  const var283 = 283\n286|  const var284 = 284\n287|  const var285 = 285\n288|  const var286 = 286\n289|  const var287 = 287\n290|  const var288 = 288\n291|  const var289 = 289\n292|  // TODO: implement feature 29\n293|  const var291 = 291\n294|  const var292 = 292\n295|  const var293 = 293\n296|  const var294 = 294\n297|  const var295 = 295\n298|  const var296 = 296\n299|  const var297 = 297\n300|  const var298 = 298\n301|  const var299 = 299\n302|  // TODO: implement feature 30\n303|  const var301 = 301\n304|  const var302 = 302\n305|  const var303 = 303\n306|  const var304 = 304\n307|  const var305 = 305\n308|  const var306 = 306\n309|  const var307 = 307\n310|  const var308 = 308\n311|  const var309 = 309\n312|  // TODO: implement feature 31\n313|  const var311 = 311\n314|  const var312 = 312\n315|  const var313 = 313\n316|  const var314 = 314\n317|  const var315 = 315\n318|  const var316 = 316\n319|  const var317 = 317\n320|  const var318 = 318\n321|  const var319 = 319\n322|  // TODO: implement feature 32\n323|  const var321 = 321\n324|  const var322 = 322\n325|  const var323 = 323\n326|  const var324 = 324\n327|  const var325 = 325\n328|  const var326 = 326\n329|  const var327 = 327\n330|  const var328 = 328\n331|  const var329 = 329\n332|  // TODO: implement feature 33\n333|  const var331 = 331\n334|  const var332 = 332\n335|  const var333 = 333\n336|  const var334 = 334\n337|  const var335 = 335\n338|  const var336 = 336\n339|  const var337 = 337\n340|  const var338 = 338\n341|  const var339 = 339\n342|  // TODO: implement feature 34\n343|  const var341 = 341\n344|  const var342 = 342\n345|  const var343 = 343\n346|  const var344 = 344\n347|  const var345 = 345\n348|  const var346 = 346\n349|  const var347 = 347\n350|  const var348 = 348\n351|  const var349 = 349\n352|  // TODO: implement feature 35\n353|  const var351 = 351\n354|  const var352 = 352\n355|  const var353 = 353\n356|  const var354 = 354\n357|  const var355 = 355\n358|  const var356 = 356\n359|  const var357 = 357\n360|  const var358 = 358\n361|  const var359 = 359\n362|  // TODO: implement feature 36\n363|  const var361 = 361\n364|  const var362 = 362\n365|  const var363 = 363\n366|  const var364 = 364\n367|  const var365 = 365\n368|  const var366 = 366\n369|  const var367 = 367\n370|  const var368 = 368\n371|  const var369 = 369\n372|  // TODO: implement feature 37\n373|  const var371 = 371\n374|  const var372 = 372\n375|  const var373 = 373\n376|  const var374 = 374\n377|  const var375 = 375\n378|  const var376 = 376\n379|  const var377 = 377\n380|  const var378 = 378\n381|  const var379 = 379\n382|  // TODO: implement feature 38\n383|  const var381 = 381\n384|  const var382 = 382\n385|  const var383 = 383\n386|  const var384 = 384\n387|  const var385 = 385\n388|  const var386 = 386\n389|  const var387 = 387\n390|  const var388 = 388\n391|  const var389 = 389\n392|  // TODO: implement feature 39\n393|  const var391 = 391\n394|  const var392 = 392\n395|  const var393 = 393\n396|  const var394 = 394\n397|  const var395 = 395\n398|  const var396 = 396\n399|  const var397 = 397\n400|  const var398 = 398\n401|  const var399 = 399\n402|  // TODO: implement feature 40\n403|  const var401 = 401\n404|  const var402 = 402\n405|  const var403 = 403\n406|  const var404 = 404\n407|  const var405 = 405\n408|  const var406 = 406\n409|  const var407 = 407\n410|  const var408 = 408\n411|  const var409 = 409\n412|  // TODO: implement feature 41\n413|  const var411 = 411\n414|  const var412 = 412\n415|  const var413 = 413\n416|  const var414 = 414\n417|  const var415 = 415\n418|  const var416 = 416\n419|  const var417 = 417\n420|  const var418 = 418\n421|  const var419 = 419\n422|  // TODO: implement feature 42\n423|  const var421 = 421\n424|  const var422 = 422\n425|  const var423 = 423\n426|  const var424 = 424\n427|  const var425 = 425\n428|  const var426 = 426\n429|  const var427 = 427\n430|  const var428 = 428\n431|  const var429 = 429\n432|  // TODO: implement feature 43\n433|  const var431 = 431\n434|  const var432 = 432\n435|  const var433 = 433\n436|  const var434 = 434\n437|  const var435 = 435\n438|  const var436 = 436\n439|  const var437 = 437\n440|  const var438 = 438\n441|  const var439 = 439\n442|  // TODO: implement feature 44\n443|  const var441 = 441\n444|  const var442 = 442\n445|  const var443 = 443\n446|  const var444 = 444\n447|  const var445 = 445\n448|  const var446 = 446\n449|  const var447 = 447\n450|  const var448 = 448\n451|  const var449 = 449\n452|  // TODO: implement feature 45\n453|  const var451 = 451\n454|  const var452 = 452\n455|  const var453 = 453\n456|  const var454 = 454\n457|  const var455 = 455\n458|  const var456 = 456\n459|  const var457 = 457\n460|  const var458 = 458\n461|  const var459 = 459\n462|  // TODO: implement feature 46\n463|  const var461 = 461\n464|  const var462 = 462\n465|  const var463 = 463\n466|  const var464 = 464\n467|  const var465 = 465\n468|  const var466 = 466\n469|  const var467 = 467\n470|  const var468 = 468\n471|  const var469 = 469\n472|  // TODO: implement feature 47\n473|  const var471 = 471\n474|  const var472 = 472\n475|  const var473 = 473\n476|  const var474 = 474\n477|  const var475 = 475\n478|  const var476 = 476\n479|  const var477 = 477\n480|  const var478 = 478\n481|  const var479 = 479\n482|  // TODO: implement feature 48\n483|  const var481 = 481\n484|  const var482 = 482\n485|  const var483 = 483\n486|  const var484 = 484\n487|  const var485 = 485\n488|  const var486 = 486\n489|  const var487 = 487\n490|  const var488 = 488\n491|  const var489 = 489\n492|  // TODO: implement feature 49\n493|  const var491 = 491\n494|  const var492 = 492\n495|  const var493 = 493\n496|  const var494 = 494\n497|  const var495 = 495\n498|  const var496 = 496\n499|  const var497 = 497\n500|  const var498 = 498\n501|  const var499 = 499\n502|}\n</FILE>\n\nGenerate patches for each file that needs modification:","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.patch","promptSource":"zai:zai.patch:default"},"model":"fast","signal":{},"stopSequences":[]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
<FILE path="src/large.ts">
◼=2|  // FIXME: implement feature 0
◼=12|  // FIXME: implement feature 1
◼=22|  // FIXME: implement feature 2
◼=32|  // FIXME: implement feature 3
◼=42|  // FIXME: implement feature 4
◼=52|  // FIXME: implement feature 5
◼=62|  // FIXME: implement feature 6
◼=72|  // FIXME: implement feature 7
◼=82|  // FIXME: implement feature 8
◼=92|  // FIXME: implement feature 9
◼=102|  // FIXME: implement feature 10
◼=112|  // FIXME: implement feature 11
◼=122|  // FIXME: implement feature 12
◼=132|  // FIXME: implement feature 13
◼=142|  // FIXME: implement feature 14
◼=152|  // FIXME: implement feature 15
◼=162|  // FIXME: implement feature 16
◼=172|  // FIXME: implement feature 17
◼=182|  // FIXME: implement feature 18
◼=192|  // FIXME: implement feature 19
◼=202|  // FIXME: implement feature 20
◼=212|  // FIXME: implement feature 21
◼=222|  // FIXME: implement feature 22
◼=232|  // FIXME: implement feature 23
◼=242|  // FIXME: implement feature 24
◼=252|  // FIXME: implement feature 25
◼=262|  // FIXME: implement feature 26
◼=272|  // FIXME: implement feature 27
◼=282|  // FIXME: implement feature 28
◼=292|  // FIXME: implement feature 29
◼=302|  // FIXME: implement feature 30
◼=312|  // FIXME: implement feature 31
◼=322|  // FIXME: implement feature 32
◼=332|  // FIXME: implement feature 33
◼=342|  // FIXME: implement feature 34
◼=352|  // FIXME: implement feature 35
◼=362|  // FIXME: implement feature 36
◼=372|  // FIXME: implement feature 37
◼=382|  // FIXME: implement feature 38
◼=392|  // FIXME: implement feature 39
◼=402|  // FIXME: implement feature 40
◼=412|  // FIXME: implement feature 41
◼=422|  // FIXME: implement feature 42
◼=432|  // FIXME: implement feature 43
◼=442|  // FIXME: implement feature 44
◼=452|  // FIXME: implement feature 45
◼=462|  // FIXME: implement feature 46
◼=472|  // FIXME: implement feature 47
◼=482|  // FIXME: implement feature 48
◼=492|  // FIXME: implement feature 49
</FILE>


Input: {"body":{"messages":[{"content":"You are a code patching assistant. Your task is to generate precise line-based patches using the Micropatch protocol.\n\n## Input Format\n\nYou will receive files in this XML format:\n\n```\n<FILE path=\"src/hello.ts\" name=\"hello.ts\">\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n</FILE>\n\n<FILE path=\"src/utils.ts\" name=\"utils.ts\">\n001|export function add(a, b) {\n002|  return a + b\n003|}\n</FILE>\n```\n\nEach file has:\n- **path**: Full file path\n- **name**: File name\n- **Numbered lines**: Format is `NNN|content` where NNN is the ORIGINAL line number (1-based)\n\n## Output Format\n\nGenerate patches for EACH file that needs modification using this EXACT XML format:\n\n```\n<FILE path=\"src/hello.ts\">\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n</FILE>\n\n<FILE path=\"src/utils.ts\">\n◼<1|/**\n * Adds two numbers\n */\n</FILE>\n```\n\n**CRITICAL RULES**:\n1. Each `<FILE>` tag MUST include the exact `path` attribute from the input\n2. Put patch operations for EACH file inside its own `<FILE>...</FILE>` block\n3. If a file doesn't need changes, omit its `<FILE>` block entirely\n4. DO NOT mix patches from different files\n5. DO NOT include line numbers or any text outside the patch operations\n\n## Micropatch Protocol\n\nThe Micropatch protocol uses line numbers to reference ORIGINAL lines (before any edits).\n\n### Operations\n\nEach operation starts with the marker `◼` at the beginning of a line:\n\n1. **Insert BEFORE line**: `◼<NNN|text`\n   - Inserts `text` as a new line BEFORE original line NNN\n   - Example: `◼<5|console.log('debug')`\n\n2. **Insert AFTER line**: `◼>NNN|text`\n   - Inserts `text` as a new line AFTER original line NNN\n   - Example: `◼>10|}`\n\n3. **Replace single line**: `◼=NNN|new text`\n   - Replaces original line NNN with `new text`\n   - Can span multiple lines (continue until next ◼ or end)\n   - Example:\n     ```\n     ◼=7|function newName() {\n       return 42\n     }\n     ```\n\n4. **Replace range**: `◼=NNN-MMM|replacement`\n   - Replaces lines NNN through MMM with replacement text\n   - Example: `◼=5-8|const combined = a + b + c + d`\n\n5. **Delete single line**: `◼-NNN`\n   - Deletes original line NNN\n   - Example: `◼-12`\n\n6. **Delete range**: `◼-NNN-MMM`\n   - Deletes lines NNN through MMM inclusive\n   - Example: `◼-5-10`\n\n### Escaping\n\n- To include a literal `◼` in your text, use `\\◼`\n- No other escape sequences are recognized\n\n### Important Rules\n\n1. **Use ORIGINAL line numbers**: Always reference the line numbers shown in the input (001, 002, etc.)\n2. **One operation per line**: Each operation must start on a new line with `◼`\n3. **No explanations**: Output ONLY patch operations inside `<FILE>` tags\n4. **Precise operations**: Use the minimal set of operations to achieve the goal\n5. **Verify line numbers**: Double-check that line numbers match the input\n\n## Example\n\n**Input:**\n```\n<FILE path=\"src/math.ts\" name=\"math.ts\">\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n004|\n005|export { x, y }\n</FILE>\n```\n\n**Task:** Change variable names from x,y to a,b\n\n**Output:**\n```\n<FILE path=\"src/math.ts\">\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n◼=5|export { a, b }\n</FILE>\n```\n\n## Your Task\n\nGenerate ONLY the `<FILE>` blocks with patch operations. Do not include explanations, comments, or any other text.","role":"system"},{"content":"Instructions: rename processItem to transformText and add a second parameter \"options: { uppercase: boolean }\" with default value { uppercase: true }. Update all function calls to use the new signature.\n\n<FILE path=\"src/processor.ts\" name=\"processor.ts\">\n001|// Utility functions\n002|function processItem(item: string): string {\n003|  return item.toUpperCase()\n004|}\n005|\n006|// Main code\n007|const result0 = processItem('value0')\n008|const data1 = 'some data 1'\n009|const data2 = 'some data 2'\n010|const data3 = 'some data 3'\n011|const data4 = 'some data 4'\n012|const data5 = 'some data 5'\n013|const data6 = 'some data 6'\n014|const data7 = 'some data 7'\n015|const data8 = 'some data 8'\n016|const data9 = 'some data 9'\n017|const data10 = 'some data 10'\n018|const data11 = 'some data 11'\n019|const data12 = 'some data 12'\n020|const data13 = 'some data 13'\n021|const data14 = 'some data 14'\n022|const data15 = 'some data 15'\n023|const data16 = 'some data 16'\n024|const data17 = 'some data 17'\n025|const data18 = 'some data 18'\n026|const data19 = 'some data 19'\n027|const result20 = processItem('value20')\n028|const data21 = 'some data 21'\n029|const data22 = 'some data 22'\n030|const data23 = 'some data 23'\n031|const data24 = 'some data 24'\n032|const data25 = 'some data 25'\n033|const data26 = 'some data 26'\n034|const data27 = 'some data 27'\n035|const data28 = 'some data 28'\n036|const data29 = 'some data 29'\n037|console.log(processItem('test30'))\n038|const data31 = 'some data 31'\n039|const data32 = 'some data 32'\n040|const data33 = 'some data 33'\n041|const data34 = 'some data 34'\n042|const data35 = 'some data 35'\n043|const data36 = 'some data 36'\n044|const data37 = 'some data 37'\n045|const data38 = 'some data 38'\n046|const data39 = 'some data 39'\n047|const result40 = processItem('value40')\n048|const data41 = 'some data 41'\n049|const data42 = 'some data 42'\n050|const data43 = 'some data 43'\n051|const data44 = 'some data 44'\n052|const data45 = 'some data 45'\n053|const data46 = 'some data 46'\n054|const data47 = 'some data 47'\n055|const data48 = 'some data 48'\n056|const data49 = 'some data 49'\n057|const data50 = 'some data 50'\n058|const data51 = 'some data 51'\n059|const data52 = 'some data 52'\n060|const data53 = 'some data 53'\n061|const data54 = 'some data 54'\n062|const data55 = 'some data 55'\n063|const data56 = 'some data 56'\n064|const data57 = 'some data 57'\n065|const data58 = 'some data 58'\n066|const data59 = 'some data 59'\n067|const result60 = processItem('value60')\n068|const data61 = 'some data 61'\n069|const data62 = 'some data 62'\n070|const data63 = 'some data 63'\n071|const data64 = 'some data 64'\n072|const data65 = 'some data 65'\n073|const data66 = 'some data 66'\n074|const data67 = 'some data 67'\n075|const data68 = 'some data 68'\n076|const data69 = 'some data 69'\n077|const data70 = 'some data 70'\n078|const data71 = 'some data 71'\n079|const data72 = 'some data 72'\n080|const data73 = 'some data 73'\n081|const data74 = 'some data 74'\n082|const data75 = 'some data 75'\n083|const data76 = 'some data 76'\n084|const data77 = 'some data 77'\n085|const data78 = 'some data 78'\n086|const data79 = 'some data 79'\n087|const result80 = processItem('value80')\n088|const data81 = 'some data 81'\n089|const data82 = 'some data 82'\n090|const data83 = 'some data 83'\n091|const data84 = 'some data 84'\n092|const data85 = 'some data 85'\n093|const data86 = 'some data 86'\n094|const data87 = 'some data 87'\n095|const data88 = 'some data 88'\n096|const data89 = 'some data 89'\n097|console.log(processItem('test90'))\n098|const data91 = 'some data 91'\n099|const data92 = 'some data 92'\n100|const data93 = 'some data 93'\n101|const data94 = 'some data 94'\n102|const data95 = 'some data 95'\n103|const data96 = 'some data 96'\n104|const data97 = 'some data 97'\n105|const data98 = 'some data 98'\n106|const data99 = 'some data 99'\n107|const result100 = processItem('value100')\n108|const data101 = 'some data 101'\n109|const data102 = 'some data 102'\n110|const data103 = 'some data 103'\n111|const data104 = 'some data 104'\n112|const data105 = 'some data 105'\n113|const data106 = 'some data 106'\n114|const data107 = 'some data 107'\n115|const data108 = 'some data 108'\n116|const data109 = 'some data 109'\n117|const data110 = 'some data 110'\n118|const data111 = 'some data 111'\n119|const data112 = 'some data 112'\n120|const data113 = 'some data 113'\n121|const data114 = 'some data 114'\n122|const data115 = 'some data 115'\n123|const data116 = 'some data 116'\n124|const data117 = 'some data 117'\n125|const data118 = 'some data 118'\n126|const data119 = 'some data 119'\n127|const result120 = processItem('value120')\n128|const data121 = 'some data 121'\n129|const data122 = 'some data 122'\n130|const data123 = 'some data 123'\n131|const data124 = 'some data 124'\n132|const data125 = 'some data 125'\n133|const data126 = 'some data 126'\n134|const data127 = 'some data 127'\n135|const data128 = 'some data 128'\n136|const data129 = 'some data 129'\n137|const data130 = 'some data 130'\n138|const data131 = 'some data 131'\n139|const data132 = 'some data 132'\n140|const data133 = 'some data 133'\n141|const data134 = 'some data 134'\n142|const data135 = 'some data 135'\n143|const data136 = 'some data 136'\n144|const data137 = 'some data 137'\n145|const data138 = 'some data 138'\n146|const data139 = 'some data 139'\n147|const result140 = processItem('value140')\n148|const data141 = 'some data 141'\n149|const data142 = 'some data 142'\n150|const data143 = 'some data 143'\n151|const data144 = 'some data 144'\n152|const data145 = 'some data 145'\n153|const data146 = 'some data 146'\n154|const data147 = 'some data 147'\n155|const data148 = 'some data 148'\n156|const data149 = 'some data 149'\n157|console.log(processItem('test150'))\n158|const data151 = 'some data 151'\n159|const data152 = 'some data 152'\n160|const data153 = 'some data 153'\n161|const data154 = 'some data 154'\n162|const data155 = 'some data 155'\n163|const data156 = 'some data 156'\n164|const data157 = 'some data 157'\n165|const data158 = 'some data 158'\n166|const data159 = 'some data 159'\n167|const result160 = processItem('value160')\n168|const data161 = 'some data 161'\n169|const data162 = 'some data 162'\n170|const data163 = 'some data 163'\n171|const data164 = 'some data 164'\n172|const data165 = 'some data 165'\n173|const data166 = 'some data 166'\n174|const data167 = 'some data 167'\n175|const data168 = 'some data 168'\n176|const data169 = 'some data 169'\n177|const data170 = 'some data 170'\n178|const data171 = 'some data 171'\n179|const data172 = 'some data 172'\n180|const data173 = 'some data 173'\n181|const data174 = 'some data 174'\n182|const data175 = 'some data 175'\n183|const data176 = 'some data 176'\n184|const data177 = 'some data 177'\n185|const data178 = 'some data 178'\n186|const data179 = 'some data 179'\n187|const result180 = processItem('value180')\n188|const data181 = 'some data 181'\n189|const data182 = 'some data 182'\n190|const data183 = 'some data 183'\n191|const data184 = 'some data 184'\n192|const data185 = 'some data 185'\n193|const data186 = 'some data 186'\n194|const data187 = 'some data 187'\n195|const data188 = 'some data 188'\n196|const data189 = 'some data 189'\n197|const data190 = 'some data 190'\n198|const data191 = 'some data 191'\n199|const data192 = 'some data 192'\n200|const data193 = 'some data 193'\n</FILE>\n\nGenerate patches for each file that needs modification:","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.patch","promptSource":"zai:zai.patch:default"},"model":"fast","signal":{},"stopSequences":[]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
<FILE path="src/processor.ts">
◼=2|function transformText(item: string, options: { uppercase: boolean } = { uppercase: true }): string {
◼=7|const result0 = transformText('value0')
◼=27|const result20 = transformText('value20')
◼=37|console.log(transformText('test30'))
◼=47|const result40 = transformText('value40')
◼=67|const result60 = transformText('value60')
◼=87|const result80 = transformText('value80')
◼=97|console.log(transformText('test90'))
◼=107|const result100 = transformText('value100')
◼=127|const result120 = transformText('value120')
◼=147|const result140 = transformText('value140')
◼=157|console.log(transformText('test150'))
◼=167|const result160 = transformText('value160')
◼=187|const result180 = transformText('value180')
</FILE>


Input: {"body":{"messages":[{"content":"You are a code patching assistant. Your task is to generate precise line-based patches using the Micropatch protocol.\n\n## Input Format\n\nYou will receive files in this XML format:\n\n```\n<FILE path=\"src/hello.ts\" name=\"hello.ts\">\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n</FILE>\n\n<FILE path=\"src/utils.ts\" name=\"utils.ts\">\n001|export function add(a, b) {\n002|  return a + b\n003|}\n</FILE>\n```\n\nEach file has:\n- **path**: Full file path\n- **name**: File name\n- **Numbered lines**: Format is `NNN|content` where NNN is the ORIGINAL line number (1-based)\n\n## Output Format\n\nGenerate patches for EACH file that needs modification using this EXACT XML format:\n\n```\n<FILE path=\"src/hello.ts\">\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n</FILE>\n\n<FILE path=\"src/utils.ts\">\n◼<1|/**\n * Adds two numbers\n */\n</FILE>\n```\n\n**CRITICAL RULES**:\n1. Each `<FILE>` tag MUST include the exact `path` attribute from the input\n2. Put patch operations for EACH file inside its own `<FILE>...</FILE>` block\n3. If a file doesn't need changes, omit its `<FILE>` block entirely\n4. DO NOT mix patches from different files\n5. DO NOT include line numbers or any text outside the patch operations\n\n## Micropatch Protocol\n\nThe Micropatch protocol uses line numbers to reference ORIGINAL lines (before any edits).\n\n### Operations\n\nEach operation starts with the marker `◼` at the beginning of a line:\n\n1. **Insert BEFORE line**: `◼<NNN|text`\n   - Inserts `text` as a new line BEFORE original line NNN\n   - Example: `◼<5|console.log('debug')`\n\n2. **Insert AFTER line**: `◼>NNN|text`\n   - Inserts `text` as a new line AFTER original line NNN\n   - Example: `◼>10|}`\n\n3. **Replace single line**: `◼=NNN|new text`\n   - Replaces original line NNN with `new text`\n   - Can span multiple lines (continue until next ◼ or end)\n   - Example:\n     ```\n     ◼=7|function newName() {\n       return 42\n     }\n     ```\n\n4. **Replace range**: `◼=NNN-MMM|replacement`\n   - Replaces lines NNN through MMM with replacement text\n   - Example: `◼=5-8|const combined = a + b + c + d`\n\n5. **Delete single line**: `◼-NNN`\n   - Deletes original line NNN\n   - Example: `◼-12`\n\n6. **Delete range**: `◼-NNN-MMM`\n   - Deletes lines NNN through MMM inclusive\n   - Example: `◼-5-10`\n\n### Escaping\n\n- To include a literal `◼` in your text, use `\\◼`\n- No other escape sequences are recognized\n\n### Important Rules\n\n1. **Use ORIGINAL line numbers**: Always reference the line numbers shown in the input (001, 002, etc.)\n2. **One operation per line**: Each operation must start on a new line with `◼`\n3. **No explanations**: Output ONLY patch operations inside `<FILE>` tags\n4. **Precise operations**: Use the minimal set of operations to achieve the goal\n5. **Verify line numbers**: Double-check that line numbers match the input\n\n## Example\n\n**Input:**\n```\n<FILE path=\"src/math.ts\" name=\"math.ts\">\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n004|\n005|export { x, y }\n</FILE>\n```\n\n**Task:** Change variable names from x,y to a,b\n\n**Output:**\n```\n<FILE path=\"src/math.ts\">\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n◼=5|export { a, b }\n</FILE>\n```\n\n## Your Task\n\nGenerate ONLY the `<FILE>` blocks with patch operations. Do not include explanations, comments, or any other text.","role":"system"},{"content":"Instructions: replace all TODO comments with FIXME comments\n\n<FILE path=\"src/large.ts\" name=\"large.ts\">\n001|function largeFunction() {\n002|  // TODO: implement feature 0\n003|  const var1 = 1\n004|  const var2 = 2\n005|  const var3 = 3\n006|  const var4 = 4\n007|  const var5 = 5\n008|  const var6 = 6\n009|  const var7 = 7\n010|  const var8 = 8\n011|  const var9 = 9\n012|  // TODO: implement feature 1\n013|  const var11 = 11\n014|  const var12 = 12\n015|  const var13 = 13\n016|  const var14 = 14\n017|  const var15 = 15\n018|  const var16 = 16\n019|  const var17 = 17\n020|  const var18 = 18\n021|  const var19 = 19\n022|  // TODO: implement feature 2\n023|  const var21 = 21\n024|  const var22 = 22\n025|  const var23 = 23\n026|  const var24 = 24\n027|  const var25 = 25\n028|  const var26 = 26\n029|  const var27 = 27\n030|  const var28 = 28\n031|  const var29 = 29\n032|  // TODO: implement feature 3\n033|  const var31 = 31\n034|  const var32 = 32\n035|  const var33 = 33\n036|  const var34 = 34\n037|  const var35 = 35\n038|  const var36 = 36\n039|  const var37 = 37\n040|  const var38 = 38\n041|  const var39 = 39\n042|  // TODO: implement feature 4\n043|  const var41 = 41\n044|  const var42 = 42\n045|  const var43 = 43\n046|  const var44 = 44\n047|  const var45 = 45\n048|  const var46 = 46\n049|  const var47 = 47\n050|  const var48 = 48\n051|  const var49 = 49\n052|  // TODO: implement feature 5\n053|  const var51 = 51\n054|  const var52 = 52\n055|  const var53 = 53\n056|  const var54 = 54\n057|  const var55 = 55\n058|  const var56 = 56\n059|  const var57 = 57\n060|  const var58 = 58\n061|  const var59 = 59\n062|  // TODO: implement feature 6\n063|  const var61 = 61\n064|  const var62 = 62\n065|  const var63 = 63\n066|  const var64 = 64\n067|  const var65 = 65\n068|  const var66 = 66\n069|  const var67 = 67\n070|  const var68 = 68\n071|  const var69 = 69\n072|  // TODO: implement feature 7\n073|  const var71 = 71\n074|  const var72 = 72\n075|  const var73 = 73\n076|  const var74 = 74\n077|  const var75 = 75\n078|  const var76 = 76\n079|  const var77 = 77\n080|  const var78 = 78\n081|  const var79 = 79\n082|  // TODO: implement feature 8\n083|  const var81 = 81\n084|  const var82 = 82\n085|  const var83 = 83\n086|  const var84 = 84\n087|  const var85 = 85\n088|  const var86 = 86\n089|  const var87 = 87\n090|  const var88 = 88\n091|  const var89 = 89\n092|  // TODO: implement feature 9\n093|  const var91 = 91\n094|  const var92 = 92\n095|  const var93 = 93\n096|  const var94 = 94\n097|  const var95 = 95\n098|  const var96 = 96\n099|  const var97 = 97\n100|  const var98 = 98\n101|  const var99 = 99\n102|  // TODO: implement feature 10\n103|  const var101 = 101\n104|  const var102 = 102\n105|  const var103 = 103\n106|  const var104 = 104\n107|  const var105 = 105\n108|  const var106 = 106\n109|  const var107 = 107\n110|  const var108 = 108\n111|  const var109 = 109\n112|  // TODO: implement feature 11\n113|  const var111 = 111\n114|  const var112 = 112\n115|  const var113 = 113\n116|  const var114 = 114\n117|  const var115 = 115\n118|  const var116 = 116\n119|  const var117 = 117\n120|  const var118 = 118\n121|  const var119 = 119\n122|  // TODO: implement feature 12\n123|  const var121 = 121\n124|  const var122 = 122\n125|  const var123 = 123\n126|  const var124 = 124\n127|  const var125 = 125\n128|  const var126 = 126\n129|  const var127 = 127\n130|  const var128 = 128\n131|  const var129 = 129\n132|  // TODO: implement feature 13\n133|  const var131 = 131\n134|  const var132 = 132\n135|  const var133 = 133\n136|  const var134 = 134\n137|  const var135 = 135\n138|  const var136 = 136\n139|  const var137 = 137\n140|  const var138 = 138\n141|  const var139 = 139\n142|  // TODO: implement feature 14\n143|  const var141 = 141\n144|  const var142 = 142\n145|  const var143 = 143\n146|  const var144 = 144\n147|  const var145 = 145\n148|  const var146 = 146\n149|  const var147 = 147\n150|  const var148 = 148\n151|  const var149 = 149\n152|  // TODO: implement feature 15\n153|  const var151 = 151\n154|  const var152 = 152\n155|  const var153 = 153\n156|  const var154 = 154\n157|  const var155 = 155\n158|  const var156 = 156\n159|  const var157 = 157\n160|  const var158 = 158\n161|  const var159 = 159\n162|  // TODO: implement feature 16\n163|  const var161 = 161\n164|  const var162 = 162\n165|  const var163 = 163\n166|  const var164 = 164\n167|  const var165 = 165\n168|  const var166 = 166\n169|  const var167 = 167\n170|  const var168 = 168\n171|  const var169 = 169\n172|  // TODO: implement feature 17\n173|  const var171 = 171\n174|  const var172 = 172\n175|  const var173 = 173\n176|  const var174 = 174\n177|  const var175 = 175\n178|  const var176 = 176\n179|  const var177 = 177\n180|  const var178 = 178\n181|  const var179 = 179\n182|  // TODO: implement feature 18\n183|  const var181 = 181\n184|  const var182 = 182\n185|  const var183 = 183\n186|  const var184 = 184\n187|  const var185 = 185\n188|  const var186 = 186\n189|  const var187 = 187\n190|  const var188 = 188\n191|  const var189 = 189\n192|  // TODO: implement feature 19\n193|  const var191 = 191\n194|  const var192 = 192\n195|  const var193 = 193\n196|  const var194 = 194\n197|  const var195 = 195\n198|  const var196 = 196\n199|  const var197 = 197\n200|  const var198 = 198\n201|  const var199 = 199\n202|  // TODO: implement feature 20\n203|  const var201 = 201\n204|  const var202 = 202\n205|  const var203 = 203\n206|  const var204 = 204\n207|  const var205 = 205\n208|  const var206 = 206\n209|  const var207 = 207\n210|  const var208 = 208\n211|  const var209 = 209\n212|  // TODO: implement feature 21\n213|  const var211 = 211\n214|  const var212 = 212\n215|  const var213 = 213\n216|  const var214 = 214\n217|  const var215 = 215\n218|  const var216 = 216\n219|  const var217 = 217\n220|  const var218 = 218\n221|  const var219 = 219\n222|  // TODO: implement feature 22\n223|  const var221 = 221\n224|  const var222 = 222\n225|  const var223 = 223\n226|  const var224 = 224\n227|  const var225 = 225\n228|  const var226 = 226\n229|  const var227 = 227\n230|  const var228 = 228\n231|  const var229 = 229\n232|  // TODO: implement feature 23\n233|  const var231 = 231\n234|  const var232 = 232\n235|  const var233 = 233\n236|  const var234 = 234\n237|  const var235 = 235\n238|  const var236 = 236\n239|  const var237 = 237\n240|  const var238 = 238\n241|  const var239 = 239\n242|  // TODO: implement feature 24\n243|  const var241 = 241\n244|  const var242 = 242\n245|  const var243 = 243\n246|  const var244 = 244\n247|  const var245 = 245\n248|  const var246 = 246\n249|  const var247 = 247\n250|  const var248 = 248\n251|  const var249 = 249\n252|  // TODO: implement feature 25\n253|  const var251 = 251\n254|  const var252 = 252\n255|  const var253 = 253\n256|  const var254 = 254\n257|  const var255 = 255\n258|  const var256 = 256\n259|  const var257 = 257\n260|  const var258 = 258\n261|  const var259 = 259\n262|  // TODO: implement feature 26\n263|  const var261 = 261\n264|  const var262 = 262\n265|  const var263 = 263\n266|  const var264 = 264\n267|  const var265 = 265\n268|  const var266 = 266\n269|  const var267 = 267\n270|  const var268 = 268\n271|  const var269 = 269\n272|  // TODO: implement feature 27\n273|  const var271 = 271\n274|  const var272 = 272\n275|  const var273 = 273\n276|  const var274 = 274\n277|  const var275 = 275\n278|  const var276 = 276\n279|  const var277 = 277\n280|  const var278 = 278\n281|  const var279 = 279\n282|  // TODO: implement feature 28\n283|  const var281 = 281\n284|  const var282 = 282\n285|  const var283 = 283\n286|  const var284 = 284\n287|  const var285 = 285\n288|  const var286 = 286\n289|  const var287 = 287\n290|  const var288 = 288\n291|  const var289 = 289\n292|  // TODO: implement feature 29\n293|  const var291 = 291\n294|  const var292 = 292\n295|  const var293 = 293\n296|  const var294 = 294\n297|  const var295 = 295\n298|  const var296 = 296\n299|  const var297 = 297\n300|  const var298 = 298\n301|  const var299 = 299\n302|  // TODO: implement feature 30\n303|  const var301 = 301\n304|  const var302 = 302\n305|  const var303 = 303\n306|  const var304 = 304\n307|  const var305 = 305\n308|  const var306 = 306\n309|  const var307 = 307\n310|  const var308 = 308\n311|  const var309 = 309\n312|  // TODO: implement feature 31\n313|  const var311 = 311\n314|  const var312 = 312\n315|  const var313 = 313\n316|  const var314 = 314\n317|  const var315 = 315\n318|  const var316 = 316\n319|  const var317 = 317\n320|  const var318 = 318\n321|  const var319 = 319\n322|  // TODO: implement feature 32\n323|  const var321 = 321\n324|  const var322 = 322\n325|  const var323 = 323\n326|  const var324 = 324\n327|  const var325 = 325\n328|  const var326 = 326\n329|  const var327 = 327\n330|  const var328 = 328\n331|  const var329 = 329\n332|  // TODO: implement feature 33\n333|  const var331 = 331\n334|  const var332 = 332\n335|  const var333 = 333\n336|  const var334 = 334\n337|  const var335 = 335\n338|  const var336 = 336\n339|  const var337 = 337\n340|  const var338 = 338\n341|  const var339 = 339\n342|  // TODO: implement feature 34\n343|  const var341 = 341\n344|  const var342 = 342\n345|  const var343 = 343\n346|  const var344 = 344\n347|  const var345 = 345\n348|  const var346 = 346\n349|  const var347 = 347\n350|  const var348 = 348\n351|  const var349 = 349\n352|  // TODO: implement feature 35\n353|  const var351 = 351\n354|  const var352 = 352\n355|  const var353 = 353\n356|  const var354 = 354\n357|  const var355 = 355\n358|  const var356 = 356\n359|  const var357 = 357\n360|  const var358 = 358\n361|  const var359 = 359\n362|  // TODO: implement feature 36\n363|  const var361 = 361\n364|  const var362 = 362\n365|  const var363 = 363\n366|  const var364 = 364\n367|  const var365 = 365\n368|  const var366 = 366\n369|  const var367 = 367\n370|  const var368 = 368\n371|  const var369 = 369\n372|  // TODO: implement feature 37\n373|  const var371 = 371\n374|  const var372 = 372\n375|  const var373 = 373\n376|  const var374 = 374\n377|  const var375 = 375\n378|  const var376 = 376\n379|  const var377 = 377\n380|  const var378 = 378\n381|  const var379 = 379\n382|  // TODO: implement feature 38\n383|  const var381 = 381\n384|  const var382 = 382\n385|  const var383 = 383\n386|  const var384 = 384\n387|  const var385 = 385\n388|  const var386 = 386\n389|  const var387 = 387\n390|  const var388 = 388\n391|  const var389 = 389\n392|  // TODO: implement feature 39\n393|  const var391 = 391\n394|  const var392 = 392\n395|  const var393 = 393\n396|  const var394 = 394\n397|  const var395 = 395\n398|  const var396 = 396\n399|  const var397 = 397\n400|  const var398 = 398\n401|  const var399 = 399\n402|  // TODO: implement feature 40\n403|  const var401 = 401\n404|  const var402 = 402\n405|  const var403 = 403\n406|  const var404 = 404\n407|  const var405 = 405\n408|  const var406 = 406\n409|  const var407 = 407\n410|  const var408 = 408\n411|  const var409 = 409\n412|  // TODO: implement feature 41\n413|  const var411 = 411\n414|  const var412 = 412\n415|  const var413 = 413\n416|  const var414 = 414\n417|  const var415 = 415\n418|  const var416 = 416\n419|  const var417 = 417\n420|  const var418 = 418\n421|  const var419 = 419\n422|  // TODO: implement feature 42\n423|  const var421 = 421\n424|  const var422 = 422\n425|  const var423 = 423\n426|  const var424 = 424\n427|  const var425 = 425\n428|  const var426 = 426\n429|  const var427 = 427\n430|  const var428 = 428\n431|  const var429 = 429\n432|  // TODO: implement feature 43\n433|  const var431 = 431\n434|  const var432 = 432\n435|  const var433 = 433\n436|  const var434 = 434\n437|  const var435 = 435\n438|  const var436 = 436\n439|  const var437 = 437\n440|  const var438 = 438\n441|  const var439 = 439\n442|  // TODO: implement feature 44\n443|  const var441 = 441\n444|  const var442 = 442\n445|  const var443 = 443\n446|  const var444 = 444\n447|  const var445 = 445\n448|  const var446 = 446\n449|  const var447 = 447\n450|  const var448 = 448\n451|  const var449 = 449\n452|  // TODO: implement feature 45\n453|  const var451 = 451\n454|  const var452 = 452\n455|  const var453 = 453\n456|  const var454 = 454\n457|  const var455 = 455\n458|  const var456 = 456\n459|  const var457 = 457\n460|  const var458 = 458\n461|  const var459 = 459\n462|  // TODO: implement feature 46\n463|  const var461 = 461\n464|  const var462 = 462\n465|  const var463 = 463\n466|  const var464 = 464\n467|  const var465 = 465\n468|  const var466 = 466\n469|  const var467 = 467\n470|  const var468 = 468\n471|  const var469 = 469\n472|  // TODO: implement feature 47\n473|  const var471 = 471\n474|  const var472 = 472\n475|  const var473 = 473\n476|  const var474 = 474\n477|  const var475 = 475\n478|  const var476 = 476\n479|  const var477 = 477\n480|  const var478 = 478\n481|  const var479 = 479\n482|  // TODO: implement feature 48\n483|  const var481 = 481\n484|  const var482 = 482\n485|  const var483 = 483\n486|  const var484 = 484\n487|  const var485 = 485\n488|  const var486 = 486\n489|  const var487 = 487\n490|  const var488 = 488\n491|  const var489 = 489\n492|  // TODO: implement feature 49\n493|  const var491 = 491\n494|  const var492 = 492\n495|  const var493 = 493\n496|  const var494 = 494\n497|  const var495 = 495\n498|  const var496 = 496\n499|  const var497 = 497\n500|  const var498 = 498\n501|  const var499 = 499\n502|}\n</FILE>\n\nGenerate patches for each file that needs modification:","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.patch","promptSource":"zai:zai.patch:default"},"model":"fast","signal":{},"stopSequences":[]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
<FILE path="src/large.ts">
◼=2|  // FIXME: implement feature 0
◼=12|  // FIXME: implement feature 1
◼=22|  // FIXME: implement feature 2
◼=32|  // FIXME: implement feature 3
◼=42|  // FIXME: implement feature 4
◼=52|  // FIXME: implement feature 5
◼=62|  // FIXME: implement feature 6
◼=72|  // FIXME: implement feature 7
◼=82|  // FIXME: implement feature 8
◼=92|  // FIXME: implement feature 9
◼=102|  // FIXME: implement feature 10
◼=112|  // FIXME: implement feature 11
◼=122|  // FIXME: implement feature 12
◼=132|  // FIXME: implement feature 13
◼=142|  // FIXME: implement feature 14
◼=152|  // FIXME: implement feature 15
◼=162|  // FIXME: implement feature 16
◼=172|  // FIXME: implement feature 17
◼=182|  // FIXME: implement feature 18
◼=192|  // FIXME: implement feature 19
◼=202|  // FIXME: implement feature 20
◼=212|  // FIXME: implement feature 21
◼=222|  // FIXME: implement feature 22
◼=232|  // FIXME: implement feature 23
◼=242|  // FIXME: implement feature 24
◼=252|  // FIXME: implement feature 25
◼=262|  // FIXME: implement feature 26
◼=272|  // FIXME: implement feature 27
◼=282|  // FIXME: implement feature 28
◼=292|  // FIXME: implement feature 29
◼=302|  // FIXME: implement feature 30
◼=312|  // FIXME: implement feature 31
◼=322|  // FIXME: implement feature 32
◼=332|  // FIXME: implement feature 33
◼=342|  // FIXME: implement feature 34
◼=352|  // FIXME: implement feature 35
◼=362|  // FIXME: implement feature 36
◼=372|  // FIXME: implement feature 37
◼=382|  // FIXME: implement feature 38
◼=392|  // FIXME: implement feature 39
◼=402|  // FIXME: implement feature 40
◼=412|  // FIXME: implement feature 41
◼=422|  // FIXME: implement feature 42
◼=432|  // FIXME: implement feature 43
◼=442|  // FIXME: implement feature 44
◼=452|  // FIXME: implement feature 45
◼=462|  // FIXME: implement feature 46
◼=472|  // FIXME: implement feature 47
◼=482|  // FIXME: implement feature 48
◼=492|  // FIXME: implement feature 49
</FILE>


Input: {"body":{"messages":[{"content":"You are a code patching assistant. Your task is to generate precise line-based patches using the Micropatch protocol.\n\n## Input Format\n\nYou will receive files in this XML format:\n\n```\n<FILE path=\"src/hello.ts\" name=\"hello.ts\">\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n</FILE>\n\n<FILE path=\"src/utils.ts\" name=\"utils.ts\">\n001|export function add(a, b) {\n002|  return a + b\n003|}\n</FILE>\n```\n\nEach file has:\n- **path**: Full file path\n- **name**: File name\n- **Numbered lines**: Format is `NNN|content` where NNN is the ORIGINAL line number (1-based)\n\n## Output Format\n\nGenerate patches for EACH file that needs modification using this EXACT XML format:\n\n```\n<FILE path=\"src/hello.ts\">\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n</FILE>\n\n<FILE path=\"src/utils.ts\">\n◼<1|/**\n * Adds two numbers\n */\n</FILE>\n```\n\n**CRITICAL RULES**:\n1. Each `<FILE>` tag MUST include the exact `path` attribute from the input\n2. Put patch operations for EACH file inside its own `<FILE>...</FILE>` block\n3. If a file doesn't need changes, omit its `<FILE>` block entirely\n4. DO NOT mix patches from different files\n5. DO NOT include line numbers or any text outside the patch operations\n\n## Micropatch Protocol\n\nThe Micropatch protocol uses line numbers to reference ORIGINAL lines (before any edits).\n\n### Operations\n\nEach operation starts with the marker `◼` at the beginning of a line:\n\n1. **Insert BEFORE line**: `◼<NNN|text`\n   - Inserts `text` as a new line BEFORE original line NNN\n   - Example: `◼<5|console.log('debug')`\n\n2. **Insert AFTER line**: `◼>NNN|text`\n   - Inserts `text` as a new line AFTER original line NNN\n   - Example: `◼>10|}`\n\n3. **Replace single line**: `◼=NNN|new text`\n   - Replaces original line NNN with `new text`\n   - Can span multiple lines (continue until next ◼ or end)\n   - Example:\n     ```\n     ◼=7|function newName() {\n       return 42\n     }\n     ```\n\n4. **Replace range**: `◼=NNN-MMM|replacement`\n   - Replaces lines NNN through MMM with replacement text\n   - Example: `◼=5-8|const combined = a + b + c + d`\n\n5. **Delete single line**: `◼-NNN`\n   - Deletes original line NNN\n   - Example: `◼-12`\n\n6. **Delete range**: `◼-NNN-MMM`\n   - Deletes lines NNN through MMM inclusive\n   - Example: `◼-5-10`\n\n### Escaping\n\n- To include a literal `◼` in your text, use `\\◼`\n- No other escape sequences are recognized\n\n### Important Rules\n\n1. **Use ORIGINAL line numbers**: Always reference the line numbers shown in the input (001, 002, etc.)\n2. **One operation per line**: Each operation must start on a new line with `◼`\n3. **No explanations**: Output ONLY patch operations inside `<FILE>` tags\n4. **Precise operations**: Use the minimal set of operations to achieve the goal\n5. **Verify line numbers**: Double-check that line numbers match the input\n\n## Example\n\n**Input:**\n```\n<FILE path=\"src/math.ts\" name=\"math.ts\">\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n004|\n005|export { x, y }\n</FILE>\n```\n\n**Task:** Change variable names from x,y to a,b\n\n**Output:**\n```\n<FILE path=\"src/math.ts\">\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n◼=5|export { a, b }\n</FILE>\n```\n\n## Your Task\n\nGenerate ONLY the `<FILE>` blocks with patch operations. Do not include explanations, comments, or any other text.","role":"system"},{"content":"Instructions: rename processItem to transformText and add a second parameter \"options: { uppercase: boolean }\" with default value { uppercase: true }. Update all function calls to use the new signature. Above 100, make it upercase.\n\n<FILE path=\"src/processor.ts\" name=\"processor.ts\">\n001|// Utility functions\n002|function processItem(item: string): string {\n003|  return item.toUpperCase()\n004|}\n005|\n006|// Main code\n007|const result0 = processItem('value0')\n008|const data1 = 'some data 1'\n009|const data2 = 'some data 2'\n010|const data3 = 'some data 3'\n011|const data4 = 'some data 4'\n012|const data5 = 'some data 5'\n013|const data6 = 'some data 6'\n014|const data7 = 'some data 7'\n015|const data8 = 'some data 8'\n016|const data9 = 'some data 9'\n017|const data10 = 'some data 10'\n018|const data11 = 'some data 11'\n019|const data12 = 'some data 12'\n020|const data13 = 'some data 13'\n021|const data14 = 'some data 14'\n022|const data15 = 'some data 15'\n023|const data16 = 'some data 16'\n024|const data17 = 'some data 17'\n025|const data18 = 'some data 18'\n026|const data19 = 'some data 19'\n027|const result20 = processItem('value20')\n028|const data21 = 'some data 21'\n029|const data22 = 'some data 22'\n030|const data23 = 'some data 23'\n031|const data24 = 'some data 24'\n032|const data25 = 'some data 25'\n033|const data26 = 'some data 26'\n034|const data27 = 'some data 27'\n035|const data28 = 'some data 28'\n036|const data29 = 'some data 29'\n037|console.log(processItem('test30'))\n038|const data31 = 'some data 31'\n039|const data32 = 'some data 32'\n040|const data33 = 'some data 33'\n041|const data34 = 'some data 34'\n042|const data35 = 'some data 35'\n043|const data36 = 'some data 36'\n044|const data37 = 'some data 37'\n045|const data38 = 'some data 38'\n046|const data39 = 'some data 39'\n047|const result40 = processItem('value40')\n048|const data41 = 'some data 41'\n049|const data42 = 'some data 42'\n050|const data43 = 'some data 43'\n051|const data44 = 'some data 44'\n052|const data45 = 'some data 45'\n053|const data46 = 'some data 46'\n054|const data47 = 'some data 47'\n055|const data48 = 'some data 48'\n056|const data49 = 'some data 49'\n057|const data50 = 'some data 50'\n058|const data51 = 'some data 51'\n059|const data52 = 'some data 52'\n060|const data53 = 'some data 53'\n061|const data54 = 'some data 54'\n062|const data55 = 'some data 55'\n063|const data56 = 'some data 56'\n064|const data57 = 'some data 57'\n065|const data58 = 'some data 58'\n066|const data59 = 'some data 59'\n067|const result60 = processItem('value60')\n068|const data61 = 'some data 61'\n069|const data62 = 'some data 62'\n070|const data63 = 'some data 63'\n071|const data64 = 'some data 64'\n072|const data65 = 'some data 65'\n073|const data66 = 'some data 66'\n074|const data67 = 'some data 67'\n075|const data68 = 'some data 68'\n076|const data69 = 'some data 69'\n077|const data70 = 'some data 70'\n078|const data71 = 'some data 71'\n079|const data72 = 'some data 72'\n080|const data73 = 'some data 73'\n081|const data74 = 'some data 74'\n082|const data75 = 'some data 75'\n083|const data76 = 'some data 76'\n084|const data77 = 'some data 77'\n085|const data78 = 'some data 78'\n086|const data79 = 'some data 79'\n087|const result80 = processItem('value80')\n088|const data81 = 'some data 81'\n089|const data82 = 'some data 82'\n090|const data83 = 'some data 83'\n091|const data84 = 'some data 84'\n092|const data85 = 'some data 85'\n093|const data86 = 'some data 86'\n094|const data87 = 'some data 87'\n095|const data88 = 'some data 88'\n096|const data89 = 'some data 89'\n097|console.log(processItem('test90'))\n098|const data91 = 'some data 91'\n099|const data92 = 'some data 92'\n100|const data93 = 'some data 93'\n101|const data94 = 'some data 94'\n102|const data95 = 'some data 95'\n103|const data96 = 'some data 96'\n104|const data97 = 'some data 97'\n105|const data98 = 'some data 98'\n106|const data99 = 'some data 99'\n107|const result100 = processItem('value100')\n108|const data101 = 'some data 101'\n109|const data102 = 'some data 102'\n110|const data103 = 'some data 103'\n111|const data104 = 'some data 104'\n112|const data105 = 'some data 105'\n113|const data106 = 'some data 106'\n114|const data107 = 'some data 107'\n115|const data108 = 'some data 108'\n116|const data109 = 'some data 109'\n117|const data110 = 'some data 110'\n118|const data111 = 'some data 111'\n119|const data112 = 'some data 112'\n120|const data113 = 'some data 113'\n121|const data114 = 'some data 114'\n122|const data115 = 'some data 115'\n123|const data116 = 'some data 116'\n124|const data117 = 'some data 117'\n125|const data118 = 'some data 118'\n126|const data119 = 'some data 119'\n127|const result120 = processItem('value120')\n128|const data121 = 'some data 121'\n129|const data122 = 'some data 122'\n130|const data123 = 'some data 123'\n131|const data124 = 'some data 124'\n132|const data125 = 'some data 125'\n133|const data126 = 'some data 126'\n134|const data127 = 'some data 127'\n135|const data128 = 'some data 128'\n136|const data129 = 'some data 129'\n137|const data130 = 'some data 130'\n138|const data131 = 'some data 131'\n139|const data132 = 'some data 132'\n140|const data133 = 'some data 133'\n141|const data134 = 'some data 134'\n142|const data135 = 'some data 135'\n143|const data136 = 'some data 136'\n144|const data137 = 'some data 137'\n145|const data138 = 'some data 138'\n146|const data139 = 'some data 139'\n147|const result140 = processItem('value140')\n148|const data141 = 'some data 141'\n149|const data142 = 'some data 142'\n150|const data143 = 'some data 143'\n151|const data144 = 'some data 144'\n152|const data145 = 'some data 145'\n153|const data146 = 'some data 146'\n154|const data147 = 'some data 147'\n155|const data148 = 'some data 148'\n156|const data149 = 'some data 149'\n157|console.log(processItem('test150'))\n158|const data151 = 'some data 151'\n159|const data152 = 'some data 152'\n160|const data153 = 'some data 153'\n161|const data154 = 'some data 154'\n162|const data155 = 'some data 155'\n163|const data156 = 'some data 156'\n164|const data157 = 'some data 157'\n165|const data158 = 'some data 158'\n166|const data159 = 'some data 159'\n167|const result160 = processItem('value160')\n168|const data161 = 'some data 161'\n169|const data162 = 'some data 162'\n170|const data163 = 'some data 163'\n171|const data164 = 'some data 164'\n172|const data165 = 'some data 165'\n173|const data166 = 'some data 166'\n174|const data167 = 'some data 167'\n175|const data168 = 'some data 168'\n176|const data169 = 'some data 169'\n177|const data170 = 'some data 170'\n178|const data171 = 'some data 171'\n179|const data172 = 'some data 172'\n180|const data173 = 'some data 173'\n181|const data174 = 'some data 174'\n182|const data175 = 'some data 175'\n183|const data176 = 'some data 176'\n184|const data177 = 'some data 177'\n185|const data178 = 'some data 178'\n186|const data179 = 'some data 179'\n187|const result180 = processItem('value180')\n188|const data181 = 'some data 181'\n189|const data182 = 'some data 182'\n190|const data183 = 'some data 183'\n191|const data184 = 'some data 184'\n192|const data185 = 'some data 185'\n193|const data186 = 'some data 186'\n194|const data187 = 'some data 187'\n195|const data188 = 'some data 188'\n196|const data189 = 'some data 189'\n197|const data190 = 'some data 190'\n198|const data191 = 'some data 191'\n199|const data192 = 'some data 192'\n200|const data193 = 'some data 193'\n</FILE>\n\nGenerate patches for each file that needs modification:","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.patch","promptSource":"zai:zai.patch:default"},"model":"fast","signal":{},"stopSequences":[]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
<FILE path="src/processor.ts">
◼=2|function transformText(item: string, options: { uppercase: boolean } = { uppercase: true }): string {
◼=7|const result0 = transformText('value0', { uppercase: true })
◼=27|const result20 = transformText('value20', { uppercase: true })
◼=37|console.log(transformText('test30', { uppercase: true }))
◼=47|const result40 = transformText('value40', { uppercase: true })
◼=67|const result60 = transformText('value60', { uppercase: true })
◼=87|const result80 = transformText('value80', { uppercase: true })
◼=97|console.log(transformText('test90', { uppercase: true }))
◼=107|const result100 = transformText('value100', { uppercase: true })
◼=127|const result120 = transformText('value120', { uppercase: true })
◼=147|const result140 = transformText('value140', { uppercase: true })
◼=157|console.log(transformText('test150', { uppercase: true }))
◼=167|const result160 = transformText('value160', { uppercase: true })
◼=187|const result180 = transformText('value180', { uppercase: true })
</FILE>


Input: {"body":{"messages":[{"content":"You are a code patching assistant. Your task is to generate precise line-based patches using the Micropatch protocol.\n\n## Input Format\n\nYou will receive files in this XML format:\n\n```\n<FILE path=\"src/hello.ts\" name=\"hello.ts\">\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n</FILE>\n\n<FILE path=\"src/utils.ts\" name=\"utils.ts\">\n001|export function add(a, b) {\n002|  return a + b\n003|}\n</FILE>\n```\n\nEach file has:\n- **path**: Full file path\n- **name**: File name\n- **Numbered lines**: Format is `NNN|content` where NNN is the ORIGINAL line number (1-based)\n\n## Output Format\n\nGenerate patches for EACH file that needs modification using this EXACT XML format:\n\n```\n<FILE path=\"src/hello.ts\">\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n</FILE>\n\n<FILE path=\"src/utils.ts\">\n◼<1|/**\n * Adds two numbers\n */\n</FILE>\n```\n\n**CRITICAL RULES**:\n1. Each `<FILE>` tag MUST include the exact `path` attribute from the input\n2. Put patch operations for EACH file inside its own `<FILE>...</FILE>` block\n3. If a file doesn't need changes, omit its `<FILE>` block entirely\n4. DO NOT mix patches from different files\n5. DO NOT include line numbers or any text outside the patch operations\n\n## Micropatch Protocol\n\nThe Micropatch protocol uses line numbers to reference ORIGINAL lines (before any edits).\n\n### Operations\n\nEach operation starts with the marker `◼` at the beginning of a line:\n\n1. **Insert BEFORE line**: `◼<NNN|text`\n   - Inserts `text` as a new line BEFORE original line NNN\n   - Example: `◼<5|console.log('debug')`\n\n2. **Insert AFTER line**: `◼>NNN|text`\n   - Inserts `text` as a new line AFTER original line NNN\n   - Example: `◼>10|}`\n\n3. **Replace single line**: `◼=NNN|new text`\n   - Replaces original line NNN with `new text`\n   - Can span multiple lines (continue until next ◼ or end)\n   - Example:\n     ```\n     ◼=7|function newName() {\n       return 42\n     }\n     ```\n\n4. **Replace range**: `◼=NNN-MMM|replacement`\n   - Replaces lines NNN through MMM with replacement text\n   - Example: `◼=5-8|const combined = a + b + c + d`\n\n5. **Delete single line**: `◼-NNN`\n   - Deletes original line NNN\n   - Example: `◼-12`\n\n6. **Delete range**: `◼-NNN-MMM`\n   - Deletes lines NNN through MMM inclusive\n   - Example: `◼-5-10`\n\n### Escaping\n\n- To include a literal `◼` in your text, use `\\◼`\n- No other escape sequences are recognized\n\n### Important Rules\n\n1. **Use ORIGINAL line numbers**: Always reference the line numbers shown in the input (001, 002, etc.)\n2. **One operation per line**: Each operation must start on a new line with `◼`\n3. **No explanations**: Output ONLY patch operations inside `<FILE>` tags\n4. **Precise operations**: Use the minimal set of operations to achieve the goal\n5. **Verify line numbers**: Double-check that line numbers match the input\n\n## Example\n\n**Input:**\n```\n<FILE path=\"src/math.ts\" name=\"math.ts\">\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n004|\n005|export { x, y }\n</FILE>\n```\n\n**Task:** Change variable names from x,y to a,b\n\n**Output:**\n```\n<FILE path=\"src/math.ts\">\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n◼=5|export { a, b }\n</FILE>\n```\n\n## Your Task\n\nGenerate ONLY the `<FILE>` blocks with patch operations. Do not include explanations, comments, or any other text.","role":"system"},{"content":"Instructions: rename processItem to transformText and add a second parameter \"options: { uppercase: boolean }\" with default value { uppercase: true }. Update all function calls to use the new signature. For string where number value in the 1st param is above 100, make it uppercase.\n\n<FILE path=\"src/processor.ts\" name=\"processor.ts\">\n001|// Utility functions\n002|function processItem(item: string): string {\n003|  return item.toUpperCase()\n004|}\n005|\n006|// Main code\n007|const result0 = processItem('value0')\n008|const data1 = 'some data 1'\n009|const data2 = 'some data 2'\n010|const data3 = 'some data 3'\n011|const data4 = 'some data 4'\n012|const data5 = 'some data 5'\n013|const data6 = 'some data 6'\n014|const data7 = 'some data 7'\n015|const data8 = 'some data 8'\n016|const data9 = 'some data 9'\n017|const data10 = 'some data 10'\n018|const data11 = 'some data 11'\n019|const data12 = 'some data 12'\n020|const data13 = 'some data 13'\n021|const data14 = 'some data 14'\n022|const data15 = 'some data 15'\n023|const data16 = 'some data 16'\n024|const data17 = 'some data 17'\n025|const data18 = 'some data 18'\n026|const data19 = 'some data 19'\n027|const result20 = processItem('value20')\n028|const data21 = 'some data 21'\n029|const data22 = 'some data 22'\n030|const data23 = 'some data 23'\n031|const data24 = 'some data 24'\n032|const data25 = 'some data 25'\n033|const data26 = 'some data 26'\n034|const data27 = 'some data 27'\n035|const data28 = 'some data 28'\n036|const data29 = 'some data 29'\n037|console.log(processItem('test30'))\n038|const data31 = 'some data 31'\n039|const data32 = 'some data 32'\n040|const data33 = 'some data 33'\n041|const data34 = 'some data 34'\n042|const data35 = 'some data 35'\n043|const data36 = 'some data 36'\n044|const data37 = 'some data 37'\n045|const data38 = 'some data 38'\n046|const data39 = 'some data 39'\n047|const result40 = processItem('value40')\n048|const data41 = 'some data 41'\n049|const data42 = 'some data 42'\n050|const data43 = 'some data 43'\n051|const data44 = 'some data 44'\n052|const data45 = 'some data 45'\n053|const data46 = 'some data 46'\n054|const data47 = 'some data 47'\n055|const data48 = 'some data 48'\n056|const data49 = 'some data 49'\n057|const data50 = 'some data 50'\n058|const data51 = 'some data 51'\n059|const data52 = 'some data 52'\n060|const data53 = 'some data 53'\n061|const data54 = 'some data 54'\n062|const data55 = 'some data 55'\n063|const data56 = 'some data 56'\n064|const data57 = 'some data 57'\n065|const data58 = 'some data 58'\n066|const data59 = 'some data 59'\n067|const result60 = processItem('value60')\n068|const data61 = 'some data 61'\n069|const data62 = 'some data 62'\n070|const data63 = 'some data 63'\n071|const data64 = 'some data 64'\n072|const data65 = 'some data 65'\n073|const data66 = 'some data 66'\n074|const data67 = 'some data 67'\n075|const data68 = 'some data 68'\n076|const data69 = 'some data 69'\n077|const data70 = 'some data 70'\n078|const data71 = 'some data 71'\n079|const data72 = 'some data 72'\n080|const data73 = 'some data 73'\n081|const data74 = 'some data 74'\n082|const data75 = 'some data 75'\n083|const data76 = 'some data 76'\n084|const data77 = 'some data 77'\n085|const data78 = 'some data 78'\n086|const data79 = 'some data 79'\n087|const result80 = processItem('value80')\n088|const data81 = 'some data 81'\n089|const data82 = 'some data 82'\n090|const data83 = 'some data 83'\n091|const data84 = 'some data 84'\n092|const data85 = 'some data 85'\n093|const data86 = 'some data 86'\n094|const data87 = 'some data 87'\n095|const data88 = 'some data 88'\n096|const data89 = 'some data 89'\n097|console.log(processItem('test90'))\n098|const data91 = 'some data 91'\n099|const data92 = 'some data 92'\n100|const data93 = 'some data 93'\n101|const data94 = 'some data 94'\n102|const data95 = 'some data 95'\n103|const data96 = 'some data 96'\n104|const data97 = 'some data 97'\n105|const data98 = 'some data 98'\n106|const data99 = 'some data 99'\n107|const result100 = processItem('value100')\n108|const data101 = 'some data 101'\n109|const data102 = 'some data 102'\n110|const data103 = 'some data 103'\n111|const data104 = 'some data 104'\n112|const data105 = 'some data 105'\n113|const data106 = 'some data 106'\n114|const data107 = 'some data 107'\n115|const data108 = 'some data 108'\n116|const data109 = 'some data 109'\n117|const data110 = 'some data 110'\n118|const data111 = 'some data 111'\n119|const data112 = 'some data 112'\n120|const data113 = 'some data 113'\n121|const data114 = 'some data 114'\n122|const data115 = 'some data 115'\n123|const data116 = 'some data 116'\n124|const data117 = 'some data 117'\n125|const data118 = 'some data 118'\n126|const data119 = 'some data 119'\n127|const result120 = processItem('value120')\n128|const data121 = 'some data 121'\n129|const data122 = 'some data 122'\n130|const data123 = 'some data 123'\n131|const data124 = 'some data 124'\n132|const data125 = 'some data 125'\n133|const data126 = 'some data 126'\n134|const data127 = 'some data 127'\n135|const data128 = 'some data 128'\n136|const data129 = 'some data 129'\n137|const data130 = 'some data 130'\n138|const data131 = 'some data 131'\n139|const data132 = 'some data 132'\n140|const data133 = 'some data 133'\n141|const data134 = 'some data 134'\n142|const data135 = 'some data 135'\n143|const data136 = 'some data 136'\n144|const data137 = 'some data 137'\n145|const data138 = 'some data 138'\n146|const data139 = 'some data 139'\n147|const result140 = processItem('value140')\n148|const data141 = 'some data 141'\n149|const data142 = 'some data 142'\n150|const data143 = 'some data 143'\n151|const data144 = 'some data 144'\n152|const data145 = 'some data 145'\n153|const data146 = 'some data 146'\n154|const data147 = 'some data 147'\n155|const data148 = 'some data 148'\n156|const data149 = 'some data 149'\n157|console.log(processItem('test150'))\n158|const data151 = 'some data 151'\n159|const data152 = 'some data 152'\n160|const data153 = 'some data 153'\n161|const data154 = 'some data 154'\n162|const data155 = 'some data 155'\n163|const data156 = 'some data 156'\n164|const data157 = 'some data 157'\n165|const data158 = 'some data 158'\n166|const data159 = 'some data 159'\n167|const result160 = processItem('value160')\n168|const data161 = 'some data 161'\n169|const data162 = 'some data 162'\n170|const data163 = 'some data 163'\n171|const data164 = 'some data 164'\n172|const data165 = 'some data 165'\n173|const data166 = 'some data 166'\n174|const data167 = 'some data 167'\n175|const data168 = 'some data 168'\n176|const data169 = 'some data 169'\n177|const data170 = 'some data 170'\n178|const data171 = 'some data 171'\n179|const data172 = 'some data 172'\n180|const data173 = 'some data 173'\n181|const data174 = 'some data 174'\n182|const data175 = 'some data 175'\n183|const data176 = 'some data 176'\n184|const data177 = 'some data 177'\n185|const data178 = 'some data 178'\n186|const data179 = 'some data 179'\n187|const result180 = processItem('value180')\n188|const data181 = 'some data 181'\n189|const data182 = 'some data 182'\n190|const data183 = 'some data 183'\n191|const data184 = 'some data 184'\n192|const data185 = 'some data 185'\n193|const data186 = 'some data 186'\n194|const data187 = 'some data 187'\n195|const data188 = 'some data 188'\n196|const data189 = 'some data 189'\n197|const data190 = 'some data 190'\n198|const data191 = 'some data 191'\n199|const data192 = 'some data 192'\n200|const data193 = 'some data 193'\n</FILE>\n\nGenerate patches for each file that needs modification:","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.patch","promptSource":"zai:zai.patch:default"},"model":"fast","signal":{},"stopSequences":[]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
<FILE path="src/processor.ts">
◼=2-4|function transformText(item: string, options: { uppercase: boolean } = { uppercase: true }): string {
  return options.uppercase ? item.toUpperCase() : item
}
◼=7|const result0 = transformText('value0')
◼=27|const result20 = transformText('value20')
◼=37|console.log(transformText('test30'))
◼=47|const result40 = transformText('value40')
◼=67|const result60 = transformText('value60')
◼=87|const result80 = transformText('value80')
◼=97|console.log(transformText('test90'))
◼=107|const result100 = transformText('value100')
◼=127|const result120 = transformText('value120')
◼=147|const result140 = transformText('value140')
◼=157|console.log(transformText('test150'))
◼=167|const result160 = transformText('value160')
◼=187|const result180 = transformText('value180')
</FILE>


Input: {"body":{"messages":[{"content":"You are a code patching assistant. Your task is to generate precise line-based patches using the Micropatch protocol.\n\n## Input Format\n\nYou will receive files in this XML format:\n\n```\n<FILE path=\"src/hello.ts\" name=\"hello.ts\">\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n</FILE>\n\n<FILE path=\"src/utils.ts\" name=\"utils.ts\">\n001|export function add(a, b) {\n002|  return a + b\n003|}\n</FILE>\n```\n\nEach file has:\n- **path**: Full file path\n- **name**: File name\n- **Numbered lines**: Format is `NNN|content` where NNN is the ORIGINAL line number (1-based)\n\n## Output Format\n\nGenerate patches for EACH file that needs modification using this EXACT XML format:\n\n```\n<FILE path=\"src/hello.ts\">\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n</FILE>\n\n<FILE path=\"src/utils.ts\">\n◼<1|/**\n * Adds two numbers\n */\n</FILE>\n```\n\n**CRITICAL RULES**:\n1. Each `<FILE>` tag MUST include the exact `path` attribute from the input\n2. Put patch operations for EACH file inside its own `<FILE>...</FILE>` block\n3. If a file doesn't need changes, omit its `<FILE>` block entirely\n4. DO NOT mix patches from different files\n5. DO NOT include line numbers or any text outside the patch operations\n\n## Micropatch Protocol\n\nThe Micropatch protocol uses line numbers to reference ORIGINAL lines (before any edits).\n\n### Operations\n\nEach operation starts with the marker `◼` at the beginning of a line:\n\n1. **Insert BEFORE line**: `◼<NNN|text`\n   - Inserts `text` as a new line BEFORE original line NNN\n   - Example: `◼<5|console.log('debug')`\n\n2. **Insert AFTER line**: `◼>NNN|text`\n   - Inserts `text` as a new line AFTER original line NNN\n   - Example: `◼>10|}`\n\n3. **Replace single line**: `◼=NNN|new text`\n   - Replaces original line NNN with `new text`\n   - Can span multiple lines (continue until next ◼ or end)\n   - Example:\n     ```\n     ◼=7|function newName() {\n       return 42\n     }\n     ```\n\n4. **Replace range**: `◼=NNN-MMM|replacement`\n   - Replaces lines NNN through MMM with replacement text\n   - Example: `◼=5-8|const combined = a + b + c + d`\n\n5. **Delete single line**: `◼-NNN`\n   - Deletes original line NNN\n   - Example: `◼-12`\n\n6. **Delete range**: `◼-NNN-MMM`\n   - Deletes lines NNN through MMM inclusive\n   - Example: `◼-5-10`\n\n### Escaping\n\n- To include a literal `◼` in your text, use `\\◼`\n- No other escape sequences are recognized\n\n### Important Rules\n\n1. **Use ORIGINAL line numbers**: Always reference the line numbers shown in the input (001, 002, etc.)\n2. **One operation per line**: Each operation must start on a new line with `◼`\n3. **No explanations**: Output ONLY patch operations inside `<FILE>` tags\n4. **Precise operations**: Use the minimal set of operations to achieve the goal\n5. **Verify line numbers**: Double-check that line numbers match the input\n\n## Example\n\n**Input:**\n```\n<FILE path=\"src/math.ts\" name=\"math.ts\">\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n004|\n005|export { x, y }\n</FILE>\n```\n\n**Task:** Change variable names from x,y to a,b\n\n**Output:**\n```\n<FILE path=\"src/math.ts\">\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n◼=5|export { a, b }\n</FILE>\n```\n\n## Your Task\n\nGenerate ONLY the `<FILE>` blocks with patch operations. Do not include explanations, comments, or any other text.","role":"system"},{"content":"Instructions: rename processItem to transformText and add a second parameter \"options: { uppercase: boolean }\" with default value { uppercase: false }. Update all function calls to use the new signature. For string where number value in the 1st param is above 100, make it uppercase.\n\n<FILE path=\"src/processor.ts\" name=\"processor.ts\">\n001|// Utility functions\n002|function processItem(item: string): string {\n003|  return item.toUpperCase()\n004|}\n005|\n006|// Main code\n007|const result0 = processItem('value0')\n008|const data1 = 'some data 1'\n009|const data2 = 'some data 2'\n010|const data3 = 'some data 3'\n011|const data4 = 'some data 4'\n012|const data5 = 'some data 5'\n013|const data6 = 'some data 6'\n014|const data7 = 'some data 7'\n015|const data8 = 'some data 8'\n016|const data9 = 'some data 9'\n017|const data10 = 'some data 10'\n018|const data11 = 'some data 11'\n019|const data12 = 'some data 12'\n020|const data13 = 'some data 13'\n021|const data14 = 'some data 14'\n022|const data15 = 'some data 15'\n023|const data16 = 'some data 16'\n024|const data17 = 'some data 17'\n025|const data18 = 'some data 18'\n026|const data19 = 'some data 19'\n027|const result20 = processItem('value20')\n028|const data21 = 'some data 21'\n029|const data22 = 'some data 22'\n030|const data23 = 'some data 23'\n031|const data24 = 'some data 24'\n032|const data25 = 'some data 25'\n033|const data26 = 'some data 26'\n034|const data27 = 'some data 27'\n035|const data28 = 'some data 28'\n036|const data29 = 'some data 29'\n037|console.log(processItem('test30'))\n038|const data31 = 'some data 31'\n039|const data32 = 'some data 32'\n040|const data33 = 'some data 33'\n041|const data34 = 'some data 34'\n042|const data35 = 'some data 35'\n043|const data36 = 'some data 36'\n044|const data37 = 'some data 37'\n045|const data38 = 'some data 38'\n046|const data39 = 'some data 39'\n047|const result40 = processItem('value40')\n048|const data41 = 'some data 41'\n049|const data42 = 'some data 42'\n050|const data43 = 'some data 43'\n051|const data44 = 'some data 44'\n052|const data45 = 'some data 45'\n053|const data46 = 'some data 46'\n054|const data47 = 'some data 47'\n055|const data48 = 'some data 48'\n056|const data49 = 'some data 49'\n057|const data50 = 'some data 50'\n058|const data51 = 'some data 51'\n059|const data52 = 'some data 52'\n060|const data53 = 'some data 53'\n061|const data54 = 'some data 54'\n062|const data55 = 'some data 55'\n063|const data56 = 'some data 56'\n064|const data57 = 'some data 57'\n065|const data58 = 'some data 58'\n066|const data59 = 'some data 59'\n067|const result60 = processItem('value60')\n068|const data61 = 'some data 61'\n069|const data62 = 'some data 62'\n070|const data63 = 'some data 63'\n071|const data64 = 'some data 64'\n072|const data65 = 'some data 65'\n073|const data66 = 'some data 66'\n074|const data67 = 'some data 67'\n075|const data68 = 'some data 68'\n076|const data69 = 'some data 69'\n077|const data70 = 'some data 70'\n078|const data71 = 'some data 71'\n079|const data72 = 'some data 72'\n080|const data73 = 'some data 73'\n081|const data74 = 'some data 74'\n082|const data75 = 'some data 75'\n083|const data76 = 'some data 76'\n084|const data77 = 'some data 77'\n085|const data78 = 'some data 78'\n086|const data79 = 'some data 79'\n087|const result80 = processItem('value80')\n088|const data81 = 'some data 81'\n089|const data82 = 'some data 82'\n090|const data83 = 'some data 83'\n091|const data84 = 'some data 84'\n092|const data85 = 'some data 85'\n093|const data86 = 'some data 86'\n094|const data87 = 'some data 87'\n095|const data88 = 'some data 88'\n096|const data89 = 'some data 89'\n097|console.log(processItem('test90'))\n098|const data91 = 'some data 91'\n099|const data92 = 'some data 92'\n100|const data93 = 'some data 93'\n101|const data94 = 'some data 94'\n102|const data95 = 'some data 95'\n103|const data96 = 'some data 96'\n104|const data97 = 'some data 97'\n105|const data98 = 'some data 98'\n106|const data99 = 'some data 99'\n107|const result100 = processItem('value100')\n108|const data101 = 'some data 101'\n109|const data102 = 'some data 102'\n110|const data103 = 'some data 103'\n111|const data104 = 'some data 104'\n112|const data105 = 'some data 105'\n113|const data106 = 'some data 106'\n114|const data107 = 'some data 107'\n115|const data108 = 'some data 108'\n116|const data109 = 'some data 109'\n117|const data110 = 'some data 110'\n118|const data111 = 'some data 111'\n119|const data112 = 'some data 112'\n120|const data113 = 'some data 113'\n121|const data114 = 'some data 114'\n122|const data115 = 'some data 115'\n123|const data116 = 'some data 116'\n124|const data117 = 'some data 117'\n125|const data118 = 'some data 118'\n126|const data119 = 'some data 119'\n127|const result120 = processItem('value120')\n128|const data121 = 'some data 121'\n129|const data122 = 'some data 122'\n130|const data123 = 'some data 123'\n131|const data124 = 'some data 124'\n132|const data125 = 'some data 125'\n133|const data126 = 'some data 126'\n134|const data127 = 'some data 127'\n135|const data128 = 'some data 128'\n136|const data129 = 'some data 129'\n137|const data130 = 'some data 130'\n138|const data131 = 'some data 131'\n139|const data132 = 'some data 132'\n140|const data133 = 'some data 133'\n141|const data134 = 'some data 134'\n142|const data135 = 'some data 135'\n143|const data136 = 'some data 136'\n144|const data137 = 'some data 137'\n145|const data138 = 'some data 138'\n146|const data139 = 'some data 139'\n147|const result140 = processItem('value140')\n148|const data141 = 'some data 141'\n149|const data142 = 'some data 142'\n150|const data143 = 'some data 143'\n151|const data144 = 'some data 144'\n152|const data145 = 'some data 145'\n153|const data146 = 'some data 146'\n154|const data147 = 'some data 147'\n155|const data148 = 'some data 148'\n156|const data149 = 'some data 149'\n157|console.log(processItem('test150'))\n158|const data151 = 'some data 151'\n159|const data152 = 'some data 152'\n160|const data153 = 'some data 153'\n161|const data154 = 'some data 154'\n162|const data155 = 'some data 155'\n163|const data156 = 'some data 156'\n164|const data157 = 'some data 157'\n165|const data158 = 'some data 158'\n166|const data159 = 'some data 159'\n167|const result160 = processItem('value160')\n168|const data161 = 'some data 161'\n169|const data162 = 'some data 162'\n170|const data163 = 'some data 163'\n171|const data164 = 'some data 164'\n172|const data165 = 'some data 165'\n173|const data166 = 'some data 166'\n174|const data167 = 'some data 167'\n175|const data168 = 'some data 168'\n176|const data169 = 'some data 169'\n177|const data170 = 'some data 170'\n178|const data171 = 'some data 171'\n179|const data172 = 'some data 172'\n180|const data173 = 'some data 173'\n181|const data174 = 'some data 174'\n182|const data175 = 'some data 175'\n183|const data176 = 'some data 176'\n184|const data177 = 'some data 177'\n185|const data178 = 'some data 178'\n186|const data179 = 'some data 179'\n187|const result180 = processItem('value180')\n188|const data181 = 'some data 181'\n189|const data182 = 'some data 182'\n190|const data183 = 'some data 183'\n191|const data184 = 'some data 184'\n192|const data185 = 'some data 185'\n193|const data186 = 'some data 186'\n194|const data187 = 'some data 187'\n195|const data188 = 'some data 188'\n196|const data189 = 'some data 189'\n197|const data190 = 'some data 190'\n198|const data191 = 'some data 191'\n199|const data192 = 'some data 192'\n200|const data193 = 'some data 193'\n</FILE>\n\nGenerate patches for each file that needs modification:","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.patch","promptSource":"zai:zai.patch:default"},"model":"fast","signal":{},"stopSequences":[]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
<FILE path="src/processor.ts">
◼=2-4|function transformText(item: string, options: { uppercase: boolean } = { uppercase: false }): string {
  return options.uppercase ? item.toUpperCase() : item
}
◼=7|const result0 = transformText('value0', { uppercase: false })
◼=27|const result20 = transformText('value20', { uppercase: false })
◼=37|console.log(transformText('test30', { uppercase: false }))
◼=47|const result40 = transformText('value40', { uppercase: false })
◼=67|const result60 = transformText('value60', { uppercase: false })
◼=87|const result80 = transformText('value80', { uppercase: false })
◼=97|console.log(transformText('test90', { uppercase: false }))
◼=107|const result100 = transformText('value100', { uppercase: false })
◼=127|const result120 = transformText('value120', { uppercase: true })
◼=147|const result140 = transformText('value140', { uppercase: true })
◼=157|console.log(transformText('test150', { uppercase: true }))
◼=167|const result160 = transformText('value160', { uppercase: true })
◼=187|const result180 = transformText('value180', { uppercase: true })
</FILE>