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 DONE comments\n\n<FILE path=\"src/giant.ts\" name=\"giant.ts\" (PARTIAL: lines 557-1112 of 2002 total lines)>\n557|  const variable555 = 555\n558|  const variable556 = 556\n559|  const variable557 = 557\n560|  const variable558 = 558\n561|  const variable559 = 559\n562|  const variable560 = 560\n563|  const variable561 = 561\n564|  const variable562 = 562\n565|  const variable563 = 563\n566|  const variable564 = 564\n567|  const variable565 = 565\n568|  const variable566 = 566\n569|  const variable567 = 567\n570|  const variable568 = 568\n571|  const variable569 = 569\n572|  const variable570 = 570\n573|  const variable571 = 571\n574|  const variable572 = 572\n575|  const variable573 = 573\n576|  const variable574 = 574\n577|  const variable575 = 575\n578|  const variable576 = 576\n579|  const variable577 = 577\n580|  const variable578 = 578\n581|  const variable579 = 579\n582|  const variable580 = 580\n583|  const variable581 = 581\n584|  const variable582 = 582\n585|  const variable583 = 583\n586|  const variable584 = 584\n587|  const variable585 = 585\n588|  const variable586 = 586\n589|  const variable587 = 587\n590|  const variable588 = 588\n591|  const variable589 = 589\n592|  const variable590 = 590\n593|  const variable591 = 591\n594|  const variable592 = 592\n595|  const variable593 = 593\n596|  const variable594 = 594\n597|  const variable595 = 595\n598|  const variable596 = 596\n599|  const variable597 = 597\n600|  const variable598 = 598\n601|  const variable599 = 599\n602|  // TODO: section 6\n603|  const variable601 = 601\n604|  const variable602 = 602\n605|  const variable603 = 603\n606|  const variable604 = 604\n607|  const variable605 = 605\n608|  const variable606 = 606\n609|  const variable607 = 607\n610|  const variable608 = 608\n611|  const variable609 = 609\n612|  const variable610 = 610\n613|  const variable611 = 611\n614|  const variable612 = 612\n615|  const variable613 = 613\n616|  const variable614 = 614\n617|  const variable615 = 615\n618|  const variable616 = 616\n619|  const variable617 = 617\n620|  const variable618 = 618\n621|  const variable619 = 619\n622|  const variable620 = 620\n623|  const variable621 = 621\n624|  const variable622 = 622\n625|  const variable623 = 623\n626|  const variable624 = 624\n627|  const variable625 = 625\n628|  const variable626 = 626\n629|  const variable627 = 627\n630|  const variable628 = 628\n631|  const variable629 = 629\n632|  const variable630 = 630\n633|  const variable631 = 631\n634|  const variable632 = 632\n635|  const variable633 = 633\n636|  const variable634 = 634\n637|  const variable635 = 635\n638|  const variable636 = 636\n639|  const variable637 = 637\n640|  const variable638 = 638\n641|  const variable639 = 639\n642|  const variable640 = 640\n643|  const variable641 = 641\n644|  const variable642 = 642\n645|  const variable643 = 643\n646|  const variable644 = 644\n647|  const variable645 = 645\n648|  const variable646 = 646\n649|  const variable647 = 647\n650|  const variable648 = 648\n651|  const variable649 = 649\n652|  const variable650 = 650\n653|  const variable651 = 651\n654|  const variable652 = 652\n655|  const variable653 = 653\n656|  const variable654 = 654\n657|  const variable655 = 655\n658|  const variable656 = 656\n659|  const variable657 = 657\n660|  const variable658 = 658\n661|  const variable659 = 659\n662|  const variable660 = 660\n663|  const variable661 = 661\n664|  const variable662 = 662\n665|  const variable663 = 663\n666|  const variable664 = 664\n667|  const variable665 = 665\n668|  const variable666 = 666\n669|  const variable667 = 667\n670|  const variable668 = 668\n671|  const variable669 = 669\n672|  const variable670 = 670\n673|  const variable671 = 671\n674|  const variable672 = 672\n675|  const variable673 = 673\n676|  const variable674 = 674\n677|  const variable675 = 675\n678|  const variable676 = 676\n679|  const variable677 = 677\n680|  const variable678 = 678\n681|  const variable679 = 679\n682|  const variable680 = 680\n683|  const variable681 = 681\n684|  const variable682 = 682\n685|  const variable683 = 683\n686|  const variable684 = 684\n687|  const variable685 = 685\n688|  const variable686 = 686\n689|  const variable687 = 687\n690|  const variable688 = 688\n691|  const variable689 = 689\n692|  const variable690 = 690\n693|  const variable691 = 691\n694|  const variable692 = 692\n695|  const variable693 = 693\n696|  const variable694 = 694\n697|  const variable695 = 695\n698|  const variable696 = 696\n699|  const variable697 = 697\n700|  const variable698 = 698\n701|  const variable699 = 699\n702|  // TODO: section 7\n703|  const variable701 = 701\n704|  const variable702 = 702\n705|  const variable703 = 703\n706|  const variable704 = 704\n707|  const variable705 = 705\n708|  const variable706 = 706\n709|  const variable707 = 707\n710|  const variable708 = 708\n711|  const variable709 = 709\n712|  const variable710 = 710\n713|  const variable711 = 711\n714|  const variable712 = 712\n715|  const variable713 = 713\n716|  const variable714 = 714\n717|  const variable715 = 715\n718|  const variable716 = 716\n719|  const variable717 = 717\n720|  const variable718 = 718\n721|  const variable719 = 719\n722|  const variable720 = 720\n723|  const variable721 = 721\n724|  const variable722 = 722\n725|  const variable723 = 723\n726|  const variable724 = 724\n727|  const variable725 = 725\n728|  const variable726 = 726\n729|  const variable727 = 727\n730|  const variable728 = 728\n731|  const variable729 = 729\n732|  const variable730 = 730\n733|  const variable731 = 731\n734|  const variable732 = 732\n735|  const variable733 = 733\n736|  const variable734 = 734\n737|  const variable735 = 735\n738|  const variable736 = 736\n739|  const variable737 = 737\n740|  const variable738 = 738\n741|  const variable739 = 739\n742|  const variable740 = 740\n743|  const variable741 = 741\n744|  const variable742 = 742\n745|  const variable743 = 743\n746|  const variable744 = 744\n747|  const variable745 = 745\n748|  const variable746 = 746\n749|  const variable747 = 747\n750|  const variable748 = 748\n751|  const variable749 = 749\n752|  const variable750 = 750\n753|  const variable751 = 751\n754|  const variable752 = 752\n755|  const variable753 = 753\n756|  const variable754 = 754\n757|  const variable755 = 755\n758|  const variable756 = 756\n759|  const variable757 = 757\n760|  const variable758 = 758\n761|  const variable759 = 759\n762|  const variable760 = 760\n763|  const variable761 = 761\n764|  const variable762 = 762\n765|  const variable763 = 763\n766|  const variable764 = 764\n767|  const variable765 = 765\n768|  const variable766 = 766\n769|  const variable767 = 767\n770|  const variable768 = 768\n771|  const variable769 = 769\n772|  const variable770 = 770\n773|  const variable771 = 771\n774|  const variable772 = 772\n775|  const variable773 = 773\n776|  const variable774 = 774\n777|  const variable775 = 775\n778|  const variable776 = 776\n779|  const variable777 = 777\n780|  const variable778 = 778\n781|  const variable779 = 779\n782|  const variable780 = 780\n783|  const variable781 = 781\n784|  const variable782 = 782\n785|  const variable783 = 783\n786|  const variable784 = 784\n787|  const variable785 = 785\n788|  const variable786 = 786\n789|  const variable787 = 787\n790|  const variable788 = 788\n791|  const variable789 = 789\n792|  const variable790 = 790\n793|  const variable791 = 791\n794|  const variable792 = 792\n795|  const variable793 = 793\n796|  const variable794 = 794\n797|  const variable795 = 795\n798|  const variable796 = 796\n799|  const variable797 = 797\n800|  const variable798 = 798\n801|  const variable799 = 799\n802|  // TODO: section 8\n803|  const variable801 = 801\n804|  const variable802 = 802\n805|  const variable803 = 803\n806|  const variable804 = 804\n807|  const variable805 = 805\n808|  const variable806 = 806\n809|  const variable807 = 807\n810|  const variable808 = 808\n811|  const variable809 = 809\n812|  const variable810 = 810\n813|  const variable811 = 811\n814|  const variable812 = 812\n815|  const variable813 = 813\n816|  const variable814 = 814\n817|  const variable815 = 815\n818|  const variable816 = 816\n819|  const variable817 = 817\n820|  const variable818 = 818\n821|  const variable819 = 819\n822|  const variable820 = 820\n823|  const variable821 = 821\n824|  const variable822 = 822\n825|  const variable823 = 823\n826|  const variable824 = 824\n827|  const variable825 = 825\n828|  const variable826 = 826\n829|  const variable827 = 827\n830|  const variable828 = 828\n831|  const variable829 = 829\n832|  const variable830 = 830\n833|  const variable831 = 831\n834|  const variable832 = 832\n835|  const variable833 = 833\n836|  const variable834 = 834\n837|  const variable835 = 835\n838|  const variable836 = 836\n839|  const variable837 = 837\n840|  const variable838 = 838\n841|  const variable839 = 839\n842|  const variable840 = 840\n843|  const variable841 = 841\n844|  const variable842 = 842\n845|  const variable843 = 843\n846|  const variable844 = 844\n847|  const variable845 = 845\n848|  const variable846 = 846\n849|  const variable847 = 847\n850|  const variable848 = 848\n851|  const variable849 = 849\n852|  const variable850 = 850\n853|  const variable851 = 851\n854|  const variable852 = 852\n855|  const variable853 = 853\n856|  const variable854 = 854\n857|  const variable855 = 855\n858|  const variable856 = 856\n859|  const variable857 = 857\n860|  const variable858 = 858\n861|  const variable859 = 859\n862|  const variable860 = 860\n863|  const variable861 = 861\n864|  const variable862 = 862\n865|  const variable863 = 863\n866|  const variable864 = 864\n867|  const variable865 = 865\n868|  const variable866 = 866\n869|  const variable867 = 867\n870|  const variable868 = 868\n871|  const variable869 = 869\n872|  const variable870 = 870\n873|  const variable871 = 871\n874|  const variable872 = 872\n875|  const variable873 = 873\n876|  const variable874 = 874\n877|  const variable875 = 875\n878|  const variable876 = 876\n879|  const variable877 = 877\n880|  const variable878 = 878\n881|  const variable879 = 879\n882|  const variable880 = 880\n883|  const variable881 = 881\n884|  const variable882 = 882\n885|  const variable883 = 883\n886|  const variable884 = 884\n887|  const variable885 = 885\n888|  const variable886 = 886\n889|  const variable887 = 887\n890|  const variable888 = 888\n891|  const variable889 = 889\n892|  const variable890 = 890\n893|  const variable891 = 891\n894|  const variable892 = 892\n895|  const variable893 = 893\n896|  const variable894 = 894\n897|  const variable895 = 895\n898|  const variable896 = 896\n899|  const variable897 = 897\n900|  const variable898 = 898\n901|  const variable899 = 899\n902|  // TODO: section 9\n903|  const variable901 = 901\n904|  const variable902 = 902\n905|  const variable903 = 903\n906|  const variable904 = 904\n907|  const variable905 = 905\n908|  const variable906 = 906\n909|  const variable907 = 907\n910|  const variable908 = 908\n911|  const variable909 = 909\n912|  const variable910 = 910\n913|  const variable911 = 911\n914|  const variable912 = 912\n915|  const variable913 = 913\n916|  const variable914 = 914\n917|  const variable915 = 915\n918|  const variable916 = 916\n919|  const variable917 = 917\n920|  const variable918 = 918\n921|  const variable919 = 919\n922|  const variable920 = 920\n923|  const variable921 = 921\n924|  const variable922 = 922\n925|  const variable923 = 923\n926|  const variable924 = 924\n927|  const variable925 = 925\n928|  const variable926 = 926\n929|  const variable927 = 927\n930|  const variable928 = 928\n931|  const variable929 = 929\n932|  const variable930 = 930\n933|  const variable931 = 931\n934|  const variable932 = 932\n935|  const variable933 = 933\n936|  const variable934 = 934\n937|  const variable935 = 935\n938|  const variable936 = 936\n939|  const variable937 = 937\n940|  const variable938 = 938\n941|  const variable939 = 939\n942|  const variable940 = 940\n943|  const variable941 = 941\n944|  const variable942 = 942\n945|  const variable943 = 943\n946|  const variable944 = 944\n947|  const variable945 = 945\n948|  const variable946 = 946\n949|  const variable947 = 947\n950|  const variable948 = 948\n951|  const variable949 = 949\n952|  const variable950 = 950\n953|  const variable951 = 951\n954|  const variable952 = 952\n955|  const variable953 = 953\n956|  const variable954 = 954\n957|  const variable955 = 955\n958|  const variable956 = 956\n959|  const variable957 = 957\n960|  const variable958 = 958\n961|  const variable959 = 959\n962|  const variable960 = 960\n963|  const variable961 = 961\n964|  const variable962 = 962\n965|  const variable963 = 963\n966|  const variable964 = 964\n967|  const variable965 = 965\n968|  const variable966 = 966\n969|  const variable967 = 967\n970|  const variable968 = 968\n971|  const variable969 = 969\n972|  const variable970 = 970\n973|  const variable971 = 971\n974|  const variable972 = 972\n975|  const variable973 = 973\n976|  const variable974 = 974\n977|  const variable975 = 975\n978|  const variable976 = 976\n979|  const variable977 = 977\n980|  const variable978 = 978\n981|  const variable979 = 979\n982|  const variable980 = 980\n983|  const variable981 = 981\n984|  const variable982 = 982\n985|  const variable983 = 983\n986|  const variable984 = 984\n987|  const variable985 = 985\n988|  const variable986 = 986\n989|  const variable987 = 987\n990|  const variable988 = 988\n991|  const variable989 = 989\n992|  const variable990 = 990\n993|  const variable991 = 991\n994|  const variable992 = 992\n995|  const variable993 = 993\n996|  const variable994 = 994\n997|  const variable995 = 995\n998|  const variable996 = 996\n999|  const variable997 = 997\n1000|  const variable998 = 998\n1001|  const variable999 = 999\n1002|  // TODO: section 10\n1003|  const variable1001 = 1001\n1004|  const variable1002 = 1002\n1005|  const variable1003 = 1003\n1006|  const variable1004 = 1004\n1007|  const variable1005 = 1005\n1008|  const variable1006 = 1006\n1009|  const variable1007 = 1007\n1010|  const variable1008 = 1008\n1011|  const variable1009 = 1009\n1012|  const variable1010 = 1010\n1013|  const variable1011 = 1011\n1014|  const variable1012 = 1012\n1015|  const variable1013 = 1013\n1016|  const variable1014 = 1014\n1017|  const variable1015 = 1015\n1018|  const variable1016 = 1016\n1019|  const variable1017 = 1017\n1020|  const variable1018 = 1018\n1021|  const variable1019 = 1019\n1022|  const variable1020 = 1020\n1023|  const variable1021 = 1021\n1024|  const variable1022 = 1022\n1025|  const variable1023 = 1023\n1026|  const variable1024 = 1024\n1027|  const variable1025 = 1025\n1028|  const variable1026 = 1026\n1029|  const variable1027 = 1027\n1030|  const variable1028 = 1028\n1031|  const variable1029 = 1029\n1032|  const variable1030 = 1030\n1033|  const variable1031 = 1031\n1034|  const variable1032 = 1032\n1035|  const variable1033 = 1033\n1036|  const variable1034 = 1034\n1037|  const variable1035 = 1035\n1038|  const variable1036 = 1036\n1039|  const variable1037 = 1037\n1040|  const variable1038 = 1038\n1041|  const variable1039 = 1039\n1042|  const variable1040 = 1040\n1043|  const variable1041 = 1041\n1044|  const variable1042 = 1042\n1045|  const variable1043 = 1043\n1046|  const variable1044 = 1044\n1047|  const variable1045 = 1045\n1048|  const variable1046 = 1046\n1049|  const variable1047 = 1047\n1050|  const variable1048 = 1048\n1051|  const variable1049 = 1049\n1052|  const variable1050 = 1050\n1053|  const variable1051 = 1051\n1054|  const variable1052 = 1052\n1055|  const variable1053 = 1053\n1056|  const variable1054 = 1054\n1057|  const variable1055 = 1055\n1058|  const variable1056 = 1056\n1059|  const variable1057 = 1057\n1060|  const variable1058 = 1058\n1061|  const variable1059 = 1059\n1062|  const variable1060 = 1060\n1063|  const variable1061 = 1061\n1064|  const variable1062 = 1062\n1065|  const variable1063 = 1063\n1066|  const variable1064 = 1064\n1067|  const variable1065 = 1065\n1068|  const variable1066 = 1066\n1069|  const variable1067 = 1067\n1070|  const variable1068 = 1068\n1071|  const variable1069 = 1069\n1072|  const variable1070 = 1070\n1073|  const variable1071 = 1071\n1074|  const variable1072 = 1072\n1075|  const variable1073 = 1073\n1076|  const variable1074 = 1074\n1077|  const variable1075 = 1075\n1078|  const variable1076 = 1076\n1079|  const variable1077 = 1077\n1080|  const variable1078 = 1078\n1081|  const variable1079 = 1079\n1082|  const variable1080 = 1080\n1083|  const variable1081 = 1081\n1084|  const variable1082 = 1082\n1085|  const variable1083 = 1083\n1086|  const variable1084 = 1084\n1087|  const variable1085 = 1085\n1088|  const variable1086 = 1086\n1089|  const variable1087 = 1087\n1090|  const variable1088 = 1088\n1091|  const variable1089 = 1089\n1092|  const variable1090 = 1090\n1093|  const variable1091 = 1091\n1094|  const variable1092 = 1092\n1095|  const variable1093 = 1093\n1096|  const variable1094 = 1094\n1097|  const variable1095 = 1095\n1098|  const variable1096 = 1096\n1099|  const variable1097 = 1097\n1100|  const variable1098 = 1098\n1101|  const variable1099 = 1099\n1102|  // TODO: section 11\n1103|  const variable1101 = 1101\n1104|  const variable1102 = 1102\n1105|  const variable1103 = 1103\n1106|  const variable1104 = 1104\n1107|  const variable1105 = 1105\n1108|  const variable1106 = 1106\n1109|  const variable1107 = 1107\n1110|  const variable1108 = 1108\n1111|  const variable1109 = 1109\n1112|  const variable1110 = 1110\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/giant.ts">
◼=602|// DONE: section 6
◼=702|// DONE: section 7
◼=802|// DONE: section 8
◼=902|// DONE: section 9
◼=1002|// DONE: section 10
◼=1102|// DONE: section 11
</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 DONE comments\n\n<FILE path=\"src/giant.ts\" name=\"giant.ts\" (PARTIAL: lines 1113-1668 of 2002 total lines)>\n1113|  const variable1111 = 1111\n1114|  const variable1112 = 1112\n1115|  const variable1113 = 1113\n1116|  const variable1114 = 1114\n1117|  const variable1115 = 1115\n1118|  const variable1116 = 1116\n1119|  const variable1117 = 1117\n1120|  const variable1118 = 1118\n1121|  const variable1119 = 1119\n1122|  const variable1120 = 1120\n1123|  const variable1121 = 1121\n1124|  const variable1122 = 1122\n1125|  const variable1123 = 1123\n1126|  const variable1124 = 1124\n1127|  const variable1125 = 1125\n1128|  const variable1126 = 1126\n1129|  const variable1127 = 1127\n1130|  const variable1128 = 1128\n1131|  const variable1129 = 1129\n1132|  const variable1130 = 1130\n1133|  const variable1131 = 1131\n1134|  const variable1132 = 1132\n1135|  const variable1133 = 1133\n1136|  const variable1134 = 1134\n1137|  const variable1135 = 1135\n1138|  const variable1136 = 1136\n1139|  const variable1137 = 1137\n1140|  const variable1138 = 1138\n1141|  const variable1139 = 1139\n1142|  const variable1140 = 1140\n1143|  const variable1141 = 1141\n1144|  const variable1142 = 1142\n1145|  const variable1143 = 1143\n1146|  const variable1144 = 1144\n1147|  const variable1145 = 1145\n1148|  const variable1146 = 1146\n1149|  const variable1147 = 1147\n1150|  const variable1148 = 1148\n1151|  const variable1149 = 1149\n1152|  const variable1150 = 1150\n1153|  const variable1151 = 1151\n1154|  const variable1152 = 1152\n1155|  const variable1153 = 1153\n1156|  const variable1154 = 1154\n1157|  const variable1155 = 1155\n1158|  const variable1156 = 1156\n1159|  const variable1157 = 1157\n1160|  const variable1158 = 1158\n1161|  const variable1159 = 1159\n1162|  const variable1160 = 1160\n1163|  const variable1161 = 1161\n1164|  const variable1162 = 1162\n1165|  const variable1163 = 1163\n1166|  const variable1164 = 1164\n1167|  const variable1165 = 1165\n1168|  const variable1166 = 1166\n1169|  const variable1167 = 1167\n1170|  const variable1168 = 1168\n1171|  const variable1169 = 1169\n1172|  const variable1170 = 1170\n1173|  const variable1171 = 1171\n1174|  const variable1172 = 1172\n1175|  const variable1173 = 1173\n1176|  const variable1174 = 1174\n1177|  const variable1175 = 1175\n1178|  const variable1176 = 1176\n1179|  const variable1177 = 1177\n1180|  const variable1178 = 1178\n1181|  const variable1179 = 1179\n1182|  const variable1180 = 1180\n1183|  const variable1181 = 1181\n1184|  const variable1182 = 1182\n1185|  const variable1183 = 1183\n1186|  const variable1184 = 1184\n1187|  const variable1185 = 1185\n1188|  const variable1186 = 1186\n1189|  const variable1187 = 1187\n1190|  const variable1188 = 1188\n1191|  const variable1189 = 1189\n1192|  const variable1190 = 1190\n1193|  const variable1191 = 1191\n1194|  const variable1192 = 1192\n1195|  const variable1193 = 1193\n1196|  const variable1194 = 1194\n1197|  const variable1195 = 1195\n1198|  const variable1196 = 1196\n1199|  const variable1197 = 1197\n1200|  const variable1198 = 1198\n1201|  const variable1199 = 1199\n1202|  // TODO: section 12\n1203|  const variable1201 = 1201\n1204|  const variable1202 = 1202\n1205|  const variable1203 = 1203\n1206|  const variable1204 = 1204\n1207|  const variable1205 = 1205\n1208|  const variable1206 = 1206\n1209|  const variable1207 = 1207\n1210|  const variable1208 = 1208\n1211|  const variable1209 = 1209\n1212|  const variable1210 = 1210\n1213|  const variable1211 = 1211\n1214|  const variable1212 = 1212\n1215|  const variable1213 = 1213\n1216|  const variable1214 = 1214\n1217|  const variable1215 = 1215\n1218|  const variable1216 = 1216\n1219|  const variable1217 = 1217\n1220|  const variable1218 = 1218\n1221|  const variable1219 = 1219\n1222|  const variable1220 = 1220\n1223|  const variable1221 = 1221\n1224|  const variable1222 = 1222\n1225|  const variable1223 = 1223\n1226|  const variable1224 = 1224\n1227|  const variable1225 = 1225\n1228|  const variable1226 = 1226\n1229|  const variable1227 = 1227\n1230|  const variable1228 = 1228\n1231|  const variable1229 = 1229\n1232|  const variable1230 = 1230\n1233|  const variable1231 = 1231\n1234|  const variable1232 = 1232\n1235|  const variable1233 = 1233\n1236|  const variable1234 = 1234\n1237|  const variable1235 = 1235\n1238|  const variable1236 = 1236\n1239|  const variable1237 = 1237\n1240|  const variable1238 = 1238\n1241|  const variable1239 = 1239\n1242|  const variable1240 = 1240\n1243|  const variable1241 = 1241\n1244|  const variable1242 = 1242\n1245|  const variable1243 = 1243\n1246|  const variable1244 = 1244\n1247|  const variable1245 = 1245\n1248|  const variable1246 = 1246\n1249|  const variable1247 = 1247\n1250|  const variable1248 = 1248\n1251|  const variable1249 = 1249\n1252|  const variable1250 = 1250\n1253|  const variable1251 = 1251\n1254|  const variable1252 = 1252\n1255|  const variable1253 = 1253\n1256|  const variable1254 = 1254\n1257|  const variable1255 = 1255\n1258|  const variable1256 = 1256\n1259|  const variable1257 = 1257\n1260|  const variable1258 = 1258\n1261|  const variable1259 = 1259\n1262|  const variable1260 = 1260\n1263|  const variable1261 = 1261\n1264|  const variable1262 = 1262\n1265|  const variable1263 = 1263\n1266|  const variable1264 = 1264\n1267|  const variable1265 = 1265\n1268|  const variable1266 = 1266\n1269|  const variable1267 = 1267\n1270|  const variable1268 = 1268\n1271|  const variable1269 = 1269\n1272|  const variable1270 = 1270\n1273|  const variable1271 = 1271\n1274|  const variable1272 = 1272\n1275|  const variable1273 = 1273\n1276|  const variable1274 = 1274\n1277|  const variable1275 = 1275\n1278|  const variable1276 = 1276\n1279|  const variable1277 = 1277\n1280|  const variable1278 = 1278\n1281|  const variable1279 = 1279\n1282|  const variable1280 = 1280\n1283|  const variable1281 = 1281\n1284|  const variable1282 = 1282\n1285|  const variable1283 = 1283\n1286|  const variable1284 = 1284\n1287|  const variable1285 = 1285\n1288|  const variable1286 = 1286\n1289|  const variable1287 = 1287\n1290|  const variable1288 = 1288\n1291|  const variable1289 = 1289\n1292|  const variable1290 = 1290\n1293|  const variable1291 = 1291\n1294|  const variable1292 = 1292\n1295|  const variable1293 = 1293\n1296|  const variable1294 = 1294\n1297|  const variable1295 = 1295\n1298|  const variable1296 = 1296\n1299|  const variable1297 = 1297\n1300|  const variable1298 = 1298\n1301|  const variable1299 = 1299\n1302|  // TODO: section 13\n1303|  const variable1301 = 1301\n1304|  const variable1302 = 1302\n1305|  const variable1303 = 1303\n1306|  const variable1304 = 1304\n1307|  const variable1305 = 1305\n1308|  const variable1306 = 1306\n1309|  const variable1307 = 1307\n1310|  const variable1308 = 1308\n1311|  const variable1309 = 1309\n1312|  const variable1310 = 1310\n1313|  const variable1311 = 1311\n1314|  const variable1312 = 1312\n1315|  const variable1313 = 1313\n1316|  const variable1314 = 1314\n1317|  const variable1315 = 1315\n1318|  const variable1316 = 1316\n1319|  const variable1317 = 1317\n1320|  const variable1318 = 1318\n1321|  const variable1319 = 1319\n1322|  const variable1320 = 1320\n1323|  const variable1321 = 1321\n1324|  const variable1322 = 1322\n1325|  const variable1323 = 1323\n1326|  const variable1324 = 1324\n1327|  const variable1325 = 1325\n1328|  const variable1326 = 1326\n1329|  const variable1327 = 1327\n1330|  const variable1328 = 1328\n1331|  const variable1329 = 1329\n1332|  const variable1330 = 1330\n1333|  const variable1331 = 1331\n1334|  const variable1332 = 1332\n1335|  const variable1333 = 1333\n1336|  const variable1334 = 1334\n1337|  const variable1335 = 1335\n1338|  const variable1336 = 1336\n1339|  const variable1337 = 1337\n1340|  const variable1338 = 1338\n1341|  const variable1339 = 1339\n1342|  const variable1340 = 1340\n1343|  const variable1341 = 1341\n1344|  const variable1342 = 1342\n1345|  const variable1343 = 1343\n1346|  const variable1344 = 1344\n1347|  const variable1345 = 1345\n1348|  const variable1346 = 1346\n1349|  const variable1347 = 1347\n1350|  const variable1348 = 1348\n1351|  const variable1349 = 1349\n1352|  const variable1350 = 1350\n1353|  const variable1351 = 1351\n1354|  const variable1352 = 1352\n1355|  const variable1353 = 1353\n1356|  const variable1354 = 1354\n1357|  const variable1355 = 1355\n1358|  const variable1356 = 1356\n1359|  const variable1357 = 1357\n1360|  const variable1358 = 1358\n1361|  const variable1359 = 1359\n1362|  const variable1360 = 1360\n1363|  const variable1361 = 1361\n1364|  const variable1362 = 1362\n1365|  const variable1363 = 1363\n1366|  const variable1364 = 1364\n1367|  const variable1365 = 1365\n1368|  const variable1366 = 1366\n1369|  const variable1367 = 1367\n1370|  const variable1368 = 1368\n1371|  const variable1369 = 1369\n1372|  const variable1370 = 1370\n1373|  const variable1371 = 1371\n1374|  const variable1372 = 1372\n1375|  const variable1373 = 1373\n1376|  const variable1374 = 1374\n1377|  const variable1375 = 1375\n1378|  const variable1376 = 1376\n1379|  const variable1377 = 1377\n1380|  const variable1378 = 1378\n1381|  const variable1379 = 1379\n1382|  const variable1380 = 1380\n1383|  const variable1381 = 1381\n1384|  const variable1382 = 1382\n1385|  const variable1383 = 1383\n1386|  const variable1384 = 1384\n1387|  const variable1385 = 1385\n1388|  const variable1386 = 1386\n1389|  const variable1387 = 1387\n1390|  const variable1388 = 1388\n1391|  const variable1389 = 1389\n1392|  const variable1390 = 1390\n1393|  const variable1391 = 1391\n1394|  const variable1392 = 1392\n1395|  const variable1393 = 1393\n1396|  const variable1394 = 1394\n1397|  const variable1395 = 1395\n1398|  const variable1396 = 1396\n1399|  const variable1397 = 1397\n1400|  const variable1398 = 1398\n1401|  const variable1399 = 1399\n1402|  // TODO: section 14\n1403|  const variable1401 = 1401\n1404|  const variable1402 = 1402\n1405|  const variable1403 = 1403\n1406|  const variable1404 = 1404\n1407|  const variable1405 = 1405\n1408|  const variable1406 = 1406\n1409|  const variable1407 = 1407\n1410|  const variable1408 = 1408\n1411|  const variable1409 = 1409\n1412|  const variable1410 = 1410\n1413|  const variable1411 = 1411\n1414|  const variable1412 = 1412\n1415|  const variable1413 = 1413\n1416|  const variable1414 = 1414\n1417|  const variable1415 = 1415\n1418|  const variable1416 = 1416\n1419|  const variable1417 = 1417\n1420|  const variable1418 = 1418\n1421|  const variable1419 = 1419\n1422|  const variable1420 = 1420\n1423|  const variable1421 = 1421\n1424|  const variable1422 = 1422\n1425|  const variable1423 = 1423\n1426|  const variable1424 = 1424\n1427|  const variable1425 = 1425\n1428|  const variable1426 = 1426\n1429|  const variable1427 = 1427\n1430|  const variable1428 = 1428\n1431|  const variable1429 = 1429\n1432|  const variable1430 = 1430\n1433|  const variable1431 = 1431\n1434|  const variable1432 = 1432\n1435|  const variable1433 = 1433\n1436|  const variable1434 = 1434\n1437|  const variable1435 = 1435\n1438|  const variable1436 = 1436\n1439|  const variable1437 = 1437\n1440|  const variable1438 = 1438\n1441|  const variable1439 = 1439\n1442|  const variable1440 = 1440\n1443|  const variable1441 = 1441\n1444|  const variable1442 = 1442\n1445|  const variable1443 = 1443\n1446|  const variable1444 = 1444\n1447|  const variable1445 = 1445\n1448|  const variable1446 = 1446\n1449|  const variable1447 = 1447\n1450|  const variable1448 = 1448\n1451|  const variable1449 = 1449\n1452|  const variable1450 = 1450\n1453|  const variable1451 = 1451\n1454|  const variable1452 = 1452\n1455|  const variable1453 = 1453\n1456|  const variable1454 = 1454\n1457|  const variable1455 = 1455\n1458|  const variable1456 = 1456\n1459|  const variable1457 = 1457\n1460|  const variable1458 = 1458\n1461|  const variable1459 = 1459\n1462|  const variable1460 = 1460\n1463|  const variable1461 = 1461\n1464|  const variable1462 = 1462\n1465|  const variable1463 = 1463\n1466|  const variable1464 = 1464\n1467|  const variable1465 = 1465\n1468|  const variable1466 = 1466\n1469|  const variable1467 = 1467\n1470|  const variable1468 = 1468\n1471|  const variable1469 = 1469\n1472|  const variable1470 = 1470\n1473|  const variable1471 = 1471\n1474|  const variable1472 = 1472\n1475|  const variable1473 = 1473\n1476|  const variable1474 = 1474\n1477|  const variable1475 = 1475\n1478|  const variable1476 = 1476\n1479|  const variable1477 = 1477\n1480|  const variable1478 = 1478\n1481|  const variable1479 = 1479\n1482|  const variable1480 = 1480\n1483|  const variable1481 = 1481\n1484|  const variable1482 = 1482\n1485|  const variable1483 = 1483\n1486|  const variable1484 = 1484\n1487|  const variable1485 = 1485\n1488|  const variable1486 = 1486\n1489|  const variable1487 = 1487\n1490|  const variable1488 = 1488\n1491|  const variable1489 = 1489\n1492|  const variable1490 = 1490\n1493|  const variable1491 = 1491\n1494|  const variable1492 = 1492\n1495|  const variable1493 = 1493\n1496|  const variable1494 = 1494\n1497|  const variable1495 = 1495\n1498|  const variable1496 = 1496\n1499|  const variable1497 = 1497\n1500|  const variable1498 = 1498\n1501|  const variable1499 = 1499\n1502|  // TODO: section 15\n1503|  const variable1501 = 1501\n1504|  const variable1502 = 1502\n1505|  const variable1503 = 1503\n1506|  const variable1504 = 1504\n1507|  const variable1505 = 1505\n1508|  const variable1506 = 1506\n1509|  const variable1507 = 1507\n1510|  const variable1508 = 1508\n1511|  const variable1509 = 1509\n1512|  const variable1510 = 1510\n1513|  const variable1511 = 1511\n1514|  const variable1512 = 1512\n1515|  const variable1513 = 1513\n1516|  const variable1514 = 1514\n1517|  const variable1515 = 1515\n1518|  const variable1516 = 1516\n1519|  const variable1517 = 1517\n1520|  const variable1518 = 1518\n1521|  const variable1519 = 1519\n1522|  const variable1520 = 1520\n1523|  const variable1521 = 1521\n1524|  const variable1522 = 1522\n1525|  const variable1523 = 1523\n1526|  const variable1524 = 1524\n1527|  const variable1525 = 1525\n1528|  const variable1526 = 1526\n1529|  const variable1527 = 1527\n1530|  const variable1528 = 1528\n1531|  const variable1529 = 1529\n1532|  const variable1530 = 1530\n1533|  const variable1531 = 1531\n1534|  const variable1532 = 1532\n1535|  const variable1533 = 1533\n1536|  const variable1534 = 1534\n1537|  const variable1535 = 1535\n1538|  const variable1536 = 1536\n1539|  const variable1537 = 1537\n1540|  const variable1538 = 1538\n1541|  const variable1539 = 1539\n1542|  const variable1540 = 1540\n1543|  const variable1541 = 1541\n1544|  const variable1542 = 1542\n1545|  const variable1543 = 1543\n1546|  const variable1544 = 1544\n1547|  const variable1545 = 1545\n1548|  const variable1546 = 1546\n1549|  const variable1547 = 1547\n1550|  const variable1548 = 1548\n1551|  const variable1549 = 1549\n1552|  const variable1550 = 1550\n1553|  const variable1551 = 1551\n1554|  const variable1552 = 1552\n1555|  const variable1553 = 1553\n1556|  const variable1554 = 1554\n1557|  const variable1555 = 1555\n1558|  const variable1556 = 1556\n1559|  const variable1557 = 1557\n1560|  const variable1558 = 1558\n1561|  const variable1559 = 1559\n1562|  const variable1560 = 1560\n1563|  const variable1561 = 1561\n1564|  const variable1562 = 1562\n1565|  const variable1563 = 1563\n1566|  const variable1564 = 1564\n1567|  const variable1565 = 1565\n1568|  const variable1566 = 1566\n1569|  const variable1567 = 1567\n1570|  const variable1568 = 1568\n1571|  const variable1569 = 1569\n1572|  const variable1570 = 1570\n1573|  const variable1571 = 1571\n1574|  const variable1572 = 1572\n1575|  const variable1573 = 1573\n1576|  const variable1574 = 1574\n1577|  const variable1575 = 1575\n1578|  const variable1576 = 1576\n1579|  const variable1577 = 1577\n1580|  const variable1578 = 1578\n1581|  const variable1579 = 1579\n1582|  const variable1580 = 1580\n1583|  const variable1581 = 1581\n1584|  const variable1582 = 1582\n1585|  const variable1583 = 1583\n1586|  const variable1584 = 1584\n1587|  const variable1585 = 1585\n1588|  const variable1586 = 1586\n1589|  const variable1587 = 1587\n1590|  const variable1588 = 1588\n1591|  const variable1589 = 1589\n1592|  const variable1590 = 1590\n1593|  const variable1591 = 1591\n1594|  const variable1592 = 1592\n1595|  const variable1593 = 1593\n1596|  const variable1594 = 1594\n1597|  const variable1595 = 1595\n1598|  const variable1596 = 1596\n1599|  const variable1597 = 1597\n1600|  const variable1598 = 1598\n1601|  const variable1599 = 1599\n1602|  // TODO: section 16\n1603|  const variable1601 = 1601\n1604|  const variable1602 = 1602\n1605|  const variable1603 = 1603\n1606|  const variable1604 = 1604\n1607|  const variable1605 = 1605\n1608|  const variable1606 = 1606\n1609|  const variable1607 = 1607\n1610|  const variable1608 = 1608\n1611|  const variable1609 = 1609\n1612|  const variable1610 = 1610\n1613|  const variable1611 = 1611\n1614|  const variable1612 = 1612\n1615|  const variable1613 = 1613\n1616|  const variable1614 = 1614\n1617|  const variable1615 = 1615\n1618|  const variable1616 = 1616\n1619|  const variable1617 = 1617\n1620|  const variable1618 = 1618\n1621|  const variable1619 = 1619\n1622|  const variable1620 = 1620\n1623|  const variable1621 = 1621\n1624|  const variable1622 = 1622\n1625|  const variable1623 = 1623\n1626|  const variable1624 = 1624\n1627|  const variable1625 = 1625\n1628|  const variable1626 = 1626\n1629|  const variable1627 = 1627\n1630|  const variable1628 = 1628\n1631|  const variable1629 = 1629\n1632|  const variable1630 = 1630\n1633|  const variable1631 = 1631\n1634|  const variable1632 = 1632\n1635|  const variable1633 = 1633\n1636|  const variable1634 = 1634\n1637|  const variable1635 = 1635\n1638|  const variable1636 = 1636\n1639|  const variable1637 = 1637\n1640|  const variable1638 = 1638\n1641|  const variable1639 = 1639\n1642|  const variable1640 = 1640\n1643|  const variable1641 = 1641\n1644|  const variable1642 = 1642\n1645|  const variable1643 = 1643\n1646|  const variable1644 = 1644\n1647|  const variable1645 = 1645\n1648|  const variable1646 = 1646\n1649|  const variable1647 = 1647\n1650|  const variable1648 = 1648\n1651|  const variable1649 = 1649\n1652|  const variable1650 = 1650\n1653|  const variable1651 = 1651\n1654|  const variable1652 = 1652\n1655|  const variable1653 = 1653\n1656|  const variable1654 = 1654\n1657|  const variable1655 = 1655\n1658|  const variable1656 = 1656\n1659|  const variable1657 = 1657\n1660|  const variable1658 = 1658\n1661|  const variable1659 = 1659\n1662|  const variable1660 = 1660\n1663|  const variable1661 = 1661\n1664|  const variable1662 = 1662\n1665|  const variable1663 = 1663\n1666|  const variable1664 = 1664\n1667|  const variable1665 = 1665\n1668|  const variable1666 = 1666\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/giant.ts">
◼=1202|// DONE: section 12
◼=1302|// DONE: section 13
◼=1402|// DONE: section 14
◼=1502|// DONE: section 15
◼=1602|// DONE: section 16
</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 DONE comments\n\n<FILE path=\"src/giant.ts\" name=\"giant.ts\" (PARTIAL: lines 1669-2002 of 2002 total lines)>\n1669|  const variable1667 = 1667\n1670|  const variable1668 = 1668\n1671|  const variable1669 = 1669\n1672|  const variable1670 = 1670\n1673|  const variable1671 = 1671\n1674|  const variable1672 = 1672\n1675|  const variable1673 = 1673\n1676|  const variable1674 = 1674\n1677|  const variable1675 = 1675\n1678|  const variable1676 = 1676\n1679|  const variable1677 = 1677\n1680|  const variable1678 = 1678\n1681|  const variable1679 = 1679\n1682|  const variable1680 = 1680\n1683|  const variable1681 = 1681\n1684|  const variable1682 = 1682\n1685|  const variable1683 = 1683\n1686|  const variable1684 = 1684\n1687|  const variable1685 = 1685\n1688|  const variable1686 = 1686\n1689|  const variable1687 = 1687\n1690|  const variable1688 = 1688\n1691|  const variable1689 = 1689\n1692|  const variable1690 = 1690\n1693|  const variable1691 = 1691\n1694|  const variable1692 = 1692\n1695|  const variable1693 = 1693\n1696|  const variable1694 = 1694\n1697|  const variable1695 = 1695\n1698|  const variable1696 = 1696\n1699|  const variable1697 = 1697\n1700|  const variable1698 = 1698\n1701|  const variable1699 = 1699\n1702|  // TODO: section 17\n1703|  const variable1701 = 1701\n1704|  const variable1702 = 1702\n1705|  const variable1703 = 1703\n1706|  const variable1704 = 1704\n1707|  const variable1705 = 1705\n1708|  const variable1706 = 1706\n1709|  const variable1707 = 1707\n1710|  const variable1708 = 1708\n1711|  const variable1709 = 1709\n1712|  const variable1710 = 1710\n1713|  const variable1711 = 1711\n1714|  const variable1712 = 1712\n1715|  const variable1713 = 1713\n1716|  const variable1714 = 1714\n1717|  const variable1715 = 1715\n1718|  const variable1716 = 1716\n1719|  const variable1717 = 1717\n1720|  const variable1718 = 1718\n1721|  const variable1719 = 1719\n1722|  const variable1720 = 1720\n1723|  const variable1721 = 1721\n1724|  const variable1722 = 1722\n1725|  const variable1723 = 1723\n1726|  const variable1724 = 1724\n1727|  const variable1725 = 1725\n1728|  const variable1726 = 1726\n1729|  const variable1727 = 1727\n1730|  const variable1728 = 1728\n1731|  const variable1729 = 1729\n1732|  const variable1730 = 1730\n1733|  const variable1731 = 1731\n1734|  const variable1732 = 1732\n1735|  const variable1733 = 1733\n1736|  const variable1734 = 1734\n1737|  const variable1735 = 1735\n1738|  const variable1736 = 1736\n1739|  const variable1737 = 1737\n1740|  const variable1738 = 1738\n1741|  const variable1739 = 1739\n1742|  const variable1740 = 1740\n1743|  const variable1741 = 1741\n1744|  const variable1742 = 1742\n1745|  const variable1743 = 1743\n1746|  const variable1744 = 1744\n1747|  const variable1745 = 1745\n1748|  const variable1746 = 1746\n1749|  const variable1747 = 1747\n1750|  const variable1748 = 1748\n1751|  const variable1749 = 1749\n1752|  const variable1750 = 1750\n1753|  const variable1751 = 1751\n1754|  const variable1752 = 1752\n1755|  const variable1753 = 1753\n1756|  const variable1754 = 1754\n1757|  const variable1755 = 1755\n1758|  const variable1756 = 1756\n1759|  const variable1757 = 1757\n1760|  const variable1758 = 1758\n1761|  const variable1759 = 1759\n1762|  const variable1760 = 1760\n1763|  const variable1761 = 1761\n1764|  const variable1762 = 1762\n1765|  const variable1763 = 1763\n1766|  const variable1764 = 1764\n1767|  const variable1765 = 1765\n1768|  const variable1766 = 1766\n1769|  const variable1767 = 1767\n1770|  const variable1768 = 1768\n1771|  const variable1769 = 1769\n1772|  const variable1770 = 1770\n1773|  const variable1771 = 1771\n1774|  const variable1772 = 1772\n1775|  const variable1773 = 1773\n1776|  const variable1774 = 1774\n1777|  const variable1775 = 1775\n1778|  const variable1776 = 1776\n1779|  const variable1777 = 1777\n1780|  const variable1778 = 1778\n1781|  const variable1779 = 1779\n1782|  const variable1780 = 1780\n1783|  const variable1781 = 1781\n1784|  const variable1782 = 1782\n1785|  const variable1783 = 1783\n1786|  const variable1784 = 1784\n1787|  const variable1785 = 1785\n1788|  const variable1786 = 1786\n1789|  const variable1787 = 1787\n1790|  const variable1788 = 1788\n1791|  const variable1789 = 1789\n1792|  const variable1790 = 1790\n1793|  const variable1791 = 1791\n1794|  const variable1792 = 1792\n1795|  const variable1793 = 1793\n1796|  const variable1794 = 1794\n1797|  const variable1795 = 1795\n1798|  const variable1796 = 1796\n1799|  const variable1797 = 1797\n1800|  const variable1798 = 1798\n1801|  const variable1799 = 1799\n1802|  // TODO: section 18\n1803|  const variable1801 = 1801\n1804|  const variable1802 = 1802\n1805|  const variable1803 = 1803\n1806|  const variable1804 = 1804\n1807|  const variable1805 = 1805\n1808|  const variable1806 = 1806\n1809|  const variable1807 = 1807\n1810|  const variable1808 = 1808\n1811|  const variable1809 = 1809\n1812|  const variable1810 = 1810\n1813|  const variable1811 = 1811\n1814|  const variable1812 = 1812\n1815|  const variable1813 = 1813\n1816|  const variable1814 = 1814\n1817|  const variable1815 = 1815\n1818|  const variable1816 = 1816\n1819|  const variable1817 = 1817\n1820|  const variable1818 = 1818\n1821|  const variable1819 = 1819\n1822|  const variable1820 = 1820\n1823|  const variable1821 = 1821\n1824|  const variable1822 = 1822\n1825|  const variable1823 = 1823\n1826|  const variable1824 = 1824\n1827|  const variable1825 = 1825\n1828|  const variable1826 = 1826\n1829|  const variable1827 = 1827\n1830|  const variable1828 = 1828\n1831|  const variable1829 = 1829\n1832|  const variable1830 = 1830\n1833|  const variable1831 = 1831\n1834|  const variable1832 = 1832\n1835|  const variable1833 = 1833\n1836|  const variable1834 = 1834\n1837|  const variable1835 = 1835\n1838|  const variable1836 = 1836\n1839|  const variable1837 = 1837\n1840|  const variable1838 = 1838\n1841|  const variable1839 = 1839\n1842|  const variable1840 = 1840\n1843|  const variable1841 = 1841\n1844|  const variable1842 = 1842\n1845|  const variable1843 = 1843\n1846|  const variable1844 = 1844\n1847|  const variable1845 = 1845\n1848|  const variable1846 = 1846\n1849|  const variable1847 = 1847\n1850|  const variable1848 = 1848\n1851|  const variable1849 = 1849\n1852|  const variable1850 = 1850\n1853|  const variable1851 = 1851\n1854|  const variable1852 = 1852\n1855|  const variable1853 = 1853\n1856|  const variable1854 = 1854\n1857|  const variable1855 = 1855\n1858|  const variable1856 = 1856\n1859|  const variable1857 = 1857\n1860|  const variable1858 = 1858\n1861|  const variable1859 = 1859\n1862|  const variable1860 = 1860\n1863|  const variable1861 = 1861\n1864|  const variable1862 = 1862\n1865|  const variable1863 = 1863\n1866|  const variable1864 = 1864\n1867|  const variable1865 = 1865\n1868|  const variable1866 = 1866\n1869|  const variable1867 = 1867\n1870|  const variable1868 = 1868\n1871|  const variable1869 = 1869\n1872|  const variable1870 = 1870\n1873|  const variable1871 = 1871\n1874|  const variable1872 = 1872\n1875|  const variable1873 = 1873\n1876|  const variable1874 = 1874\n1877|  const variable1875 = 1875\n1878|  const variable1876 = 1876\n1879|  const variable1877 = 1877\n1880|  const variable1878 = 1878\n1881|  const variable1879 = 1879\n1882|  const variable1880 = 1880\n1883|  const variable1881 = 1881\n1884|  const variable1882 = 1882\n1885|  const variable1883 = 1883\n1886|  const variable1884 = 1884\n1887|  const variable1885 = 1885\n1888|  const variable1886 = 1886\n1889|  const variable1887 = 1887\n1890|  const variable1888 = 1888\n1891|  const variable1889 = 1889\n1892|  const variable1890 = 1890\n1893|  const variable1891 = 1891\n1894|  const variable1892 = 1892\n1895|  const variable1893 = 1893\n1896|  const variable1894 = 1894\n1897|  const variable1895 = 1895\n1898|  const variable1896 = 1896\n1899|  const variable1897 = 1897\n1900|  const variable1898 = 1898\n1901|  const variable1899 = 1899\n1902|  // TODO: section 19\n1903|  const variable1901 = 1901\n1904|  const variable1902 = 1902\n1905|  const variable1903 = 1903\n1906|  const variable1904 = 1904\n1907|  const variable1905 = 1905\n1908|  const variable1906 = 1906\n1909|  const variable1907 = 1907\n1910|  const variable1908 = 1908\n1911|  const variable1909 = 1909\n1912|  const variable1910 = 1910\n1913|  const variable1911 = 1911\n1914|  const variable1912 = 1912\n1915|  const variable1913 = 1913\n1916|  const variable1914 = 1914\n1917|  const variable1915 = 1915\n1918|  const variable1916 = 1916\n1919|  const variable1917 = 1917\n1920|  const variable1918 = 1918\n1921|  const variable1919 = 1919\n1922|  const variable1920 = 1920\n1923|  const variable1921 = 1921\n1924|  const variable1922 = 1922\n1925|  const variable1923 = 1923\n1926|  const variable1924 = 1924\n1927|  const variable1925 = 1925\n1928|  const variable1926 = 1926\n1929|  const variable1927 = 1927\n1930|  const variable1928 = 1928\n1931|  const variable1929 = 1929\n1932|  const variable1930 = 1930\n1933|  const variable1931 = 1931\n1934|  const variable1932 = 1932\n1935|  const variable1933 = 1933\n1936|  const variable1934 = 1934\n1937|  const variable1935 = 1935\n1938|  const variable1936 = 1936\n1939|  const variable1937 = 1937\n1940|  const variable1938 = 1938\n1941|  const variable1939 = 1939\n1942|  const variable1940 = 1940\n1943|  const variable1941 = 1941\n1944|  const variable1942 = 1942\n1945|  const variable1943 = 1943\n1946|  const variable1944 = 1944\n1947|  const variable1945 = 1945\n1948|  const variable1946 = 1946\n1949|  const variable1947 = 1947\n1950|  const variable1948 = 1948\n1951|  const variable1949 = 1949\n1952|  const variable1950 = 1950\n1953|  const variable1951 = 1951\n1954|  const variable1952 = 1952\n1955|  const variable1953 = 1953\n1956|  const variable1954 = 1954\n1957|  const variable1955 = 1955\n1958|  const variable1956 = 1956\n1959|  const variable1957 = 1957\n1960|  const variable1958 = 1958\n1961|  const variable1959 = 1959\n1962|  const variable1960 = 1960\n1963|  const variable1961 = 1961\n1964|  const variable1962 = 1962\n1965|  const variable1963 = 1963\n1966|  const variable1964 = 1964\n1967|  const variable1965 = 1965\n1968|  const variable1966 = 1966\n1969|  const variable1967 = 1967\n1970|  const variable1968 = 1968\n1971|  const variable1969 = 1969\n1972|  const variable1970 = 1970\n1973|  const variable1971 = 1971\n1974|  const variable1972 = 1972\n1975|  const variable1973 = 1973\n1976|  const variable1974 = 1974\n1977|  const variable1975 = 1975\n1978|  const variable1976 = 1976\n1979|  const variable1977 = 1977\n1980|  const variable1978 = 1978\n1981|  const variable1979 = 1979\n1982|  const variable1980 = 1980\n1983|  const variable1981 = 1981\n1984|  const variable1982 = 1982\n1985|  const variable1983 = 1983\n1986|  const variable1984 = 1984\n1987|  const variable1985 = 1985\n1988|  const variable1986 = 1986\n1989|  const variable1987 = 1987\n1990|  const variable1988 = 1988\n1991|  const variable1989 = 1989\n1992|  const variable1990 = 1990\n1993|  const variable1991 = 1991\n1994|  const variable1992 = 1992\n1995|  const variable1993 = 1993\n1996|  const variable1994 = 1994\n1997|  const variable1995 = 1995\n1998|  const variable1996 = 1996\n1999|  const variable1997 = 1997\n2000|  const variable1998 = 1998\n2001|  const variable1999 = 1999\n2002|}\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/giant.ts">
◼=1702|// DONE: section 17
◼=1802|// DONE: section 18
◼=1902|// DONE: section 19
</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 DONE comments\n\n<FILE path=\"src/giant.ts\" name=\"giant.ts\" (PARTIAL: lines 1-556 of 2002 total lines)>\n001|function giant() {\n002|  // TODO: section 0\n003|  const variable1 = 1\n004|  const variable2 = 2\n005|  const variable3 = 3\n006|  const variable4 = 4\n007|  const variable5 = 5\n008|  const variable6 = 6\n009|  const variable7 = 7\n010|  const variable8 = 8\n011|  const variable9 = 9\n012|  const variable10 = 10\n013|  const variable11 = 11\n014|  const variable12 = 12\n015|  const variable13 = 13\n016|  const variable14 = 14\n017|  const variable15 = 15\n018|  const variable16 = 16\n019|  const variable17 = 17\n020|  const variable18 = 18\n021|  const variable19 = 19\n022|  const variable20 = 20\n023|  const variable21 = 21\n024|  const variable22 = 22\n025|  const variable23 = 23\n026|  const variable24 = 24\n027|  const variable25 = 25\n028|  const variable26 = 26\n029|  const variable27 = 27\n030|  const variable28 = 28\n031|  const variable29 = 29\n032|  const variable30 = 30\n033|  const variable31 = 31\n034|  const variable32 = 32\n035|  const variable33 = 33\n036|  const variable34 = 34\n037|  const variable35 = 35\n038|  const variable36 = 36\n039|  const variable37 = 37\n040|  const variable38 = 38\n041|  const variable39 = 39\n042|  const variable40 = 40\n043|  const variable41 = 41\n044|  const variable42 = 42\n045|  const variable43 = 43\n046|  const variable44 = 44\n047|  const variable45 = 45\n048|  const variable46 = 46\n049|  const variable47 = 47\n050|  const variable48 = 48\n051|  const variable49 = 49\n052|  const variable50 = 50\n053|  const variable51 = 51\n054|  const variable52 = 52\n055|  const variable53 = 53\n056|  const variable54 = 54\n057|  const variable55 = 55\n058|  const variable56 = 56\n059|  const variable57 = 57\n060|  const variable58 = 58\n061|  const variable59 = 59\n062|  const variable60 = 60\n063|  const variable61 = 61\n064|  const variable62 = 62\n065|  const variable63 = 63\n066|  const variable64 = 64\n067|  const variable65 = 65\n068|  const variable66 = 66\n069|  const variable67 = 67\n070|  const variable68 = 68\n071|  const variable69 = 69\n072|  const variable70 = 70\n073|  const variable71 = 71\n074|  const variable72 = 72\n075|  const variable73 = 73\n076|  const variable74 = 74\n077|  const variable75 = 75\n078|  const variable76 = 76\n079|  const variable77 = 77\n080|  const variable78 = 78\n081|  const variable79 = 79\n082|  const variable80 = 80\n083|  const variable81 = 81\n084|  const variable82 = 82\n085|  const variable83 = 83\n086|  const variable84 = 84\n087|  const variable85 = 85\n088|  const variable86 = 86\n089|  const variable87 = 87\n090|  const variable88 = 88\n091|  const variable89 = 89\n092|  const variable90 = 90\n093|  const variable91 = 91\n094|  const variable92 = 92\n095|  const variable93 = 93\n096|  const variable94 = 94\n097|  const variable95 = 95\n098|  const variable96 = 96\n099|  const variable97 = 97\n100|  const variable98 = 98\n101|  const variable99 = 99\n102|  // TODO: section 1\n103|  const variable101 = 101\n104|  const variable102 = 102\n105|  const variable103 = 103\n106|  const variable104 = 104\n107|  const variable105 = 105\n108|  const variable106 = 106\n109|  const variable107 = 107\n110|  const variable108 = 108\n111|  const variable109 = 109\n112|  const variable110 = 110\n113|  const variable111 = 111\n114|  const variable112 = 112\n115|  const variable113 = 113\n116|  const variable114 = 114\n117|  const variable115 = 115\n118|  const variable116 = 116\n119|  const variable117 = 117\n120|  const variable118 = 118\n121|  const variable119 = 119\n122|  const variable120 = 120\n123|  const variable121 = 121\n124|  const variable122 = 122\n125|  const variable123 = 123\n126|  const variable124 = 124\n127|  const variable125 = 125\n128|  const variable126 = 126\n129|  const variable127 = 127\n130|  const variable128 = 128\n131|  const variable129 = 129\n132|  const variable130 = 130\n133|  const variable131 = 131\n134|  const variable132 = 132\n135|  const variable133 = 133\n136|  const variable134 = 134\n137|  const variable135 = 135\n138|  const variable136 = 136\n139|  const variable137 = 137\n140|  const variable138 = 138\n141|  const variable139 = 139\n142|  const variable140 = 140\n143|  const variable141 = 141\n144|  const variable142 = 142\n145|  const variable143 = 143\n146|  const variable144 = 144\n147|  const variable145 = 145\n148|  const variable146 = 146\n149|  const variable147 = 147\n150|  const variable148 = 148\n151|  const variable149 = 149\n152|  const variable150 = 150\n153|  const variable151 = 151\n154|  const variable152 = 152\n155|  const variable153 = 153\n156|  const variable154 = 154\n157|  const variable155 = 155\n158|  const variable156 = 156\n159|  const variable157 = 157\n160|  const variable158 = 158\n161|  const variable159 = 159\n162|  const variable160 = 160\n163|  const variable161 = 161\n164|  const variable162 = 162\n165|  const variable163 = 163\n166|  const variable164 = 164\n167|  const variable165 = 165\n168|  const variable166 = 166\n169|  const variable167 = 167\n170|  const variable168 = 168\n171|  const variable169 = 169\n172|  const variable170 = 170\n173|  const variable171 = 171\n174|  const variable172 = 172\n175|  const variable173 = 173\n176|  const variable174 = 174\n177|  const variable175 = 175\n178|  const variable176 = 176\n179|  const variable177 = 177\n180|  const variable178 = 178\n181|  const variable179 = 179\n182|  const variable180 = 180\n183|  const variable181 = 181\n184|  const variable182 = 182\n185|  const variable183 = 183\n186|  const variable184 = 184\n187|  const variable185 = 185\n188|  const variable186 = 186\n189|  const variable187 = 187\n190|  const variable188 = 188\n191|  const variable189 = 189\n192|  const variable190 = 190\n193|  const variable191 = 191\n194|  const variable192 = 192\n195|  const variable193 = 193\n196|  const variable194 = 194\n197|  const variable195 = 195\n198|  const variable196 = 196\n199|  const variable197 = 197\n200|  const variable198 = 198\n201|  const variable199 = 199\n202|  // TODO: section 2\n203|  const variable201 = 201\n204|  const variable202 = 202\n205|  const variable203 = 203\n206|  const variable204 = 204\n207|  const variable205 = 205\n208|  const variable206 = 206\n209|  const variable207 = 207\n210|  const variable208 = 208\n211|  const variable209 = 209\n212|  const variable210 = 210\n213|  const variable211 = 211\n214|  const variable212 = 212\n215|  const variable213 = 213\n216|  const variable214 = 214\n217|  const variable215 = 215\n218|  const variable216 = 216\n219|  const variable217 = 217\n220|  const variable218 = 218\n221|  const variable219 = 219\n222|  const variable220 = 220\n223|  const variable221 = 221\n224|  const variable222 = 222\n225|  const variable223 = 223\n226|  const variable224 = 224\n227|  const variable225 = 225\n228|  const variable226 = 226\n229|  const variable227 = 227\n230|  const variable228 = 228\n231|  const variable229 = 229\n232|  const variable230 = 230\n233|  const variable231 = 231\n234|  const variable232 = 232\n235|  const variable233 = 233\n236|  const variable234 = 234\n237|  const variable235 = 235\n238|  const variable236 = 236\n239|  const variable237 = 237\n240|  const variable238 = 238\n241|  const variable239 = 239\n242|  const variable240 = 240\n243|  const variable241 = 241\n244|  const variable242 = 242\n245|  const variable243 = 243\n246|  const variable244 = 244\n247|  const variable245 = 245\n248|  const variable246 = 246\n249|  const variable247 = 247\n250|  const variable248 = 248\n251|  const variable249 = 249\n252|  const variable250 = 250\n253|  const variable251 = 251\n254|  const variable252 = 252\n255|  const variable253 = 253\n256|  const variable254 = 254\n257|  const variable255 = 255\n258|  const variable256 = 256\n259|  const variable257 = 257\n260|  const variable258 = 258\n261|  const variable259 = 259\n262|  const variable260 = 260\n263|  const variable261 = 261\n264|  const variable262 = 262\n265|  const variable263 = 263\n266|  const variable264 = 264\n267|  const variable265 = 265\n268|  const variable266 = 266\n269|  const variable267 = 267\n270|  const variable268 = 268\n271|  const variable269 = 269\n272|  const variable270 = 270\n273|  const variable271 = 271\n274|  const variable272 = 272\n275|  const variable273 = 273\n276|  const variable274 = 274\n277|  const variable275 = 275\n278|  const variable276 = 276\n279|  const variable277 = 277\n280|  const variable278 = 278\n281|  const variable279 = 279\n282|  const variable280 = 280\n283|  const variable281 = 281\n284|  const variable282 = 282\n285|  const variable283 = 283\n286|  const variable284 = 284\n287|  const variable285 = 285\n288|  const variable286 = 286\n289|  const variable287 = 287\n290|  const variable288 = 288\n291|  const variable289 = 289\n292|  const variable290 = 290\n293|  const variable291 = 291\n294|  const variable292 = 292\n295|  const variable293 = 293\n296|  const variable294 = 294\n297|  const variable295 = 295\n298|  const variable296 = 296\n299|  const variable297 = 297\n300|  const variable298 = 298\n301|  const variable299 = 299\n302|  // TODO: section 3\n303|  const variable301 = 301\n304|  const variable302 = 302\n305|  const variable303 = 303\n306|  const variable304 = 304\n307|  const variable305 = 305\n308|  const variable306 = 306\n309|  const variable307 = 307\n310|  const variable308 = 308\n311|  const variable309 = 309\n312|  const variable310 = 310\n313|  const variable311 = 311\n314|  const variable312 = 312\n315|  const variable313 = 313\n316|  const variable314 = 314\n317|  const variable315 = 315\n318|  const variable316 = 316\n319|  const variable317 = 317\n320|  const variable318 = 318\n321|  const variable319 = 319\n322|  const variable320 = 320\n323|  const variable321 = 321\n324|  const variable322 = 322\n325|  const variable323 = 323\n326|  const variable324 = 324\n327|  const variable325 = 325\n328|  const variable326 = 326\n329|  const variable327 = 327\n330|  const variable328 = 328\n331|  const variable329 = 329\n332|  const variable330 = 330\n333|  const variable331 = 331\n334|  const variable332 = 332\n335|  const variable333 = 333\n336|  const variable334 = 334\n337|  const variable335 = 335\n338|  const variable336 = 336\n339|  const variable337 = 337\n340|  const variable338 = 338\n341|  const variable339 = 339\n342|  const variable340 = 340\n343|  const variable341 = 341\n344|  const variable342 = 342\n345|  const variable343 = 343\n346|  const variable344 = 344\n347|  const variable345 = 345\n348|  const variable346 = 346\n349|  const variable347 = 347\n350|  const variable348 = 348\n351|  const variable349 = 349\n352|  const variable350 = 350\n353|  const variable351 = 351\n354|  const variable352 = 352\n355|  const variable353 = 353\n356|  const variable354 = 354\n357|  const variable355 = 355\n358|  const variable356 = 356\n359|  const variable357 = 357\n360|  const variable358 = 358\n361|  const variable359 = 359\n362|  const variable360 = 360\n363|  const variable361 = 361\n364|  const variable362 = 362\n365|  const variable363 = 363\n366|  const variable364 = 364\n367|  const variable365 = 365\n368|  const variable366 = 366\n369|  const variable367 = 367\n370|  const variable368 = 368\n371|  const variable369 = 369\n372|  const variable370 = 370\n373|  const variable371 = 371\n374|  const variable372 = 372\n375|  const variable373 = 373\n376|  const variable374 = 374\n377|  const variable375 = 375\n378|  const variable376 = 376\n379|  const variable377 = 377\n380|  const variable378 = 378\n381|  const variable379 = 379\n382|  const variable380 = 380\n383|  const variable381 = 381\n384|  const variable382 = 382\n385|  const variable383 = 383\n386|  const variable384 = 384\n387|  const variable385 = 385\n388|  const variable386 = 386\n389|  const variable387 = 387\n390|  const variable388 = 388\n391|  const variable389 = 389\n392|  const variable390 = 390\n393|  const variable391 = 391\n394|  const variable392 = 392\n395|  const variable393 = 393\n396|  const variable394 = 394\n397|  const variable395 = 395\n398|  const variable396 = 396\n399|  const variable397 = 397\n400|  const variable398 = 398\n401|  const variable399 = 399\n402|  // TODO: section 4\n403|  const variable401 = 401\n404|  const variable402 = 402\n405|  const variable403 = 403\n406|  const variable404 = 404\n407|  const variable405 = 405\n408|  const variable406 = 406\n409|  const variable407 = 407\n410|  const variable408 = 408\n411|  const variable409 = 409\n412|  const variable410 = 410\n413|  const variable411 = 411\n414|  const variable412 = 412\n415|  const variable413 = 413\n416|  const variable414 = 414\n417|  const variable415 = 415\n418|  const variable416 = 416\n419|  const variable417 = 417\n420|  const variable418 = 418\n421|  const variable419 = 419\n422|  const variable420 = 420\n423|  const variable421 = 421\n424|  const variable422 = 422\n425|  const variable423 = 423\n426|  const variable424 = 424\n427|  const variable425 = 425\n428|  const variable426 = 426\n429|  const variable427 = 427\n430|  const variable428 = 428\n431|  const variable429 = 429\n432|  const variable430 = 430\n433|  const variable431 = 431\n434|  const variable432 = 432\n435|  const variable433 = 433\n436|  const variable434 = 434\n437|  const variable435 = 435\n438|  const variable436 = 436\n439|  const variable437 = 437\n440|  const variable438 = 438\n441|  const variable439 = 439\n442|  const variable440 = 440\n443|  const variable441 = 441\n444|  const variable442 = 442\n445|  const variable443 = 443\n446|  const variable444 = 444\n447|  const variable445 = 445\n448|  const variable446 = 446\n449|  const variable447 = 447\n450|  const variable448 = 448\n451|  const variable449 = 449\n452|  const variable450 = 450\n453|  const variable451 = 451\n454|  const variable452 = 452\n455|  const variable453 = 453\n456|  const variable454 = 454\n457|  const variable455 = 455\n458|  const variable456 = 456\n459|  const variable457 = 457\n460|  const variable458 = 458\n461|  const variable459 = 459\n462|  const variable460 = 460\n463|  const variable461 = 461\n464|  const variable462 = 462\n465|  const variable463 = 463\n466|  const variable464 = 464\n467|  const variable465 = 465\n468|  const variable466 = 466\n469|  const variable467 = 467\n470|  const variable468 = 468\n471|  const variable469 = 469\n472|  const variable470 = 470\n473|  const variable471 = 471\n474|  const variable472 = 472\n475|  const variable473 = 473\n476|  const variable474 = 474\n477|  const variable475 = 475\n478|  const variable476 = 476\n479|  const variable477 = 477\n480|  const variable478 = 478\n481|  const variable479 = 479\n482|  const variable480 = 480\n483|  const variable481 = 481\n484|  const variable482 = 482\n485|  const variable483 = 483\n486|  const variable484 = 484\n487|  const variable485 = 485\n488|  const variable486 = 486\n489|  const variable487 = 487\n490|  const variable488 = 488\n491|  const variable489 = 489\n492|  const variable490 = 490\n493|  const variable491 = 491\n494|  const variable492 = 492\n495|  const variable493 = 493\n496|  const variable494 = 494\n497|  const variable495 = 495\n498|  const variable496 = 496\n499|  const variable497 = 497\n500|  const variable498 = 498\n501|  const variable499 = 499\n502|  // TODO: section 5\n503|  const variable501 = 501\n504|  const variable502 = 502\n505|  const variable503 = 503\n506|  const variable504 = 504\n507|  const variable505 = 505\n508|  const variable506 = 506\n509|  const variable507 = 507\n510|  const variable508 = 508\n511|  const variable509 = 509\n512|  const variable510 = 510\n513|  const variable511 = 511\n514|  const variable512 = 512\n515|  const variable513 = 513\n516|  const variable514 = 514\n517|  const variable515 = 515\n518|  const variable516 = 516\n519|  const variable517 = 517\n520|  const variable518 = 518\n521|  const variable519 = 519\n522|  const variable520 = 520\n523|  const variable521 = 521\n524|  const variable522 = 522\n525|  const variable523 = 523\n526|  const variable524 = 524\n527|  const variable525 = 525\n528|  const variable526 = 526\n529|  const variable527 = 527\n530|  const variable528 = 528\n531|  const variable529 = 529\n532|  const variable530 = 530\n533|  const variable531 = 531\n534|  const variable532 = 532\n535|  const variable533 = 533\n536|  const variable534 = 534\n537|  const variable535 = 535\n538|  const variable536 = 536\n539|  const variable537 = 537\n540|  const variable538 = 538\n541|  const variable539 = 539\n542|  const variable540 = 540\n543|  const variable541 = 541\n544|  const variable542 = 542\n545|  const variable543 = 543\n546|  const variable544 = 544\n547|  const variable545 = 545\n548|  const variable546 = 546\n549|  const variable547 = 547\n550|  const variable548 = 548\n551|  const variable549 = 549\n552|  const variable550 = 550\n553|  const variable551 = 551\n554|  const variable552 = 552\n555|  const variable553 = 553\n556|  const variable554 = 554\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/giant.ts">
◼=2|  // DONE: section 0
◼=102|  // DONE: section 1
◼=202|  // DONE: section 2
◼=302|  // DONE: section 3
◼=402|  // DONE: section 4
◼=502|  // DONE: section 5
</FILE>