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## Micropatch Protocol\n\nThe Micropatch protocol uses line numbers to reference ORIGINAL lines (before any edits). All operations use these ORIGINAL line numbers, which remain valid throughout the patching process.\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')` inserts before line 5\n\n2. **Insert AFTER line**: `◼>NNN|text`\n   - Inserts `text` as a new line AFTER original line NNN\n   - Example: `◼>10|}` inserts after line 10\n\n3. **Replace single line**: `◼=NNN|new text`\n   - Replaces original line NNN with `new text`\n   - Can use 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` replaces lines 5-8\n\n5. **Delete single line**: `◼-NNN`\n   - Deletes original line NNN\n   - Example: `◼-12` deletes line 12\n\n6. **Delete range**: `◼-NNN-MMM`\n   - Deletes lines NNN through MMM inclusive\n   - Example: `◼-5-10` deletes lines 5 through 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, not adjusted numbers\n2. **One operation per line**: Each operation must start on a new line with `◼`\n3. **No explanations**: Output ONLY patch operations, no comments or explanations\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\n### Examples\n\n**Example 1: Simple replacement**\nInput file (lines 001-005):\n```\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n004|\n005|export { x, y }\n```\n\nTask: Change variable names from x,y to a,b\n\nOutput:\n```\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n◼=5|export { a, b }\n```\n\n**Example 2: Adding documentation**\nInput file (lines 001-003):\n```\n001|function add(a, b) {\n002|  return a + b\n003|}\n```\n\nTask: Add JSDoc comment\n\nOutput:\n```\n◼<1|/**\n * Adds two numbers together\n * @param a First number\n * @param b Second number\n * @returns Sum of a and b\n */\n```\n\n**Example 3: Refactoring**\nInput file (lines 001-010):\n```\n001|const user = getUser()\n002|const name = user.name\n003|const email = user.email\n004|const age = user.age\n005|\n006|console.log(name)\n007|console.log(email)\n008|console.log(age)\n009|\n010|return user\n```\n\nTask: Use destructuring\n\nOutput:\n```\n◼=1-4|const { name, email, age } = getUser()\n◼-10\n◼>8|return { name, email, age }\n```\n\n## Your Task\n\nGenerate ONLY the patch operations needed to fulfill the user's instructions. Output patch operations between ■PATCH_START■ and ■PATCH_END■ markers.\n\n**Critical**:\n- Output ONLY patch operations, no explanations\n- Use ORIGINAL line numbers from the input\n- Verify each line number is correct\n- Test your patches mentally to ensure they produce the desired result","role":"system"},{"content":"Instructions: add a new section called \"## Installation\"\n\nFile: test.md\n001|# Title\n002|\n003|Content with `code` and **bold** and [links](url)\n\n■PATCH_START■","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.patch","promptSource":"zai:zai.patch:default"},"model":"fast","signal":{},"stopSequences":["■PATCH_END■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■PATCH_START■
◼<3|## Installation
■PATCH_END


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## Micropatch Protocol\n\nThe Micropatch protocol uses line numbers to reference ORIGINAL lines (before any edits). All operations use these ORIGINAL line numbers, which remain valid throughout the patching process.\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')` inserts before line 5\n\n2. **Insert AFTER line**: `◼>NNN|text`\n   - Inserts `text` as a new line AFTER original line NNN\n   - Example: `◼>10|}` inserts after line 10\n\n3. **Replace single line**: `◼=NNN|new text`\n   - Replaces original line NNN with `new text`\n   - Can use 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` replaces lines 5-8\n\n5. **Delete single line**: `◼-NNN`\n   - Deletes original line NNN\n   - Example: `◼-12` deletes line 12\n\n6. **Delete range**: `◼-NNN-MMM`\n   - Deletes lines NNN through MMM inclusive\n   - Example: `◼-5-10` deletes lines 5 through 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, not adjusted numbers\n2. **One operation per line**: Each operation must start on a new line with `◼`\n3. **No explanations**: Output ONLY patch operations, no comments or explanations\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\n6. **Multiple files**: When patching multiple files, clearly separate patches for each file with a comment line like `# File: path/to/file.ts`\n\n### Examples\n\n**Example 1: Simple replacement**\nInput file (lines 001-005):\n```\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n004|\n005|export { x, y }\n```\n\nTask: Change variable names from x,y to a,b\n\nOutput:\n```\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n◼=5|export { a, b }\n```\n\n**Example 2: Adding documentation**\nInput file (lines 001-003):\n```\n001|function add(a, b) {\n002|  return a + b\n003|}\n```\n\nTask: Add JSDoc comment\n\nOutput:\n```\n◼<1|/**\n * Adds two numbers together\n * @param a First number\n * @param b Second number\n * @returns Sum of a and b\n */\n```\n\n**Example 3: Refactoring**\nInput file (lines 001-010):\n```\n001|const user = getUser()\n002|const name = user.name\n003|const email = user.email\n004|const age = user.age\n005|\n006|console.log(name)\n007|console.log(email)\n008|console.log(age)\n009|\n010|return user\n```\n\nTask: Use destructuring\n\nOutput:\n```\n◼=1-4|const { name, email, age } = getUser()\n◼-10\n◼>8|return { name, email, age }\n```\n\n## Your Task\n\nGenerate ONLY the patch operations needed to fulfill the user's instructions. Output patch operations between ■PATCH_START■ and ■PATCH_END■ markers.\n\n**Critical**:\n- Output ONLY patch operations, no explanations\n- Use ORIGINAL line numbers from the input\n- Verify each line number is correct\n- Test your patches mentally to ensure they produce the desired result","role":"system"},{"content":"Instructions: add \"# Header\" at the beginning of each file\n\nFile: file1.txt\n001|Line 1\n002|Line 2\n\n---\n\nFile: file2.txt\n001|Content A\n002|Content B\n\n■PATCH_START■","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.patch","promptSource":"zai:zai.patch:default"},"model":"fast","signal":{},"stopSequences":["■PATCH_END■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■PATCH_START■
# File: file1.txt
◼<1|# Header
# File: file2.txt
◼<1|# Header
■PATCH_END


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## Micropatch Protocol\n\nThe Micropatch protocol uses line numbers to reference ORIGINAL lines (before any edits). All operations use these ORIGINAL line numbers, which remain valid throughout the patching process.\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')` inserts before line 5\n\n2. **Insert AFTER line**: `◼>NNN|text`\n   - Inserts `text` as a new line AFTER original line NNN\n   - Example: `◼>10|}` inserts after line 10\n\n3. **Replace single line**: `◼=NNN|new text`\n   - Replaces original line NNN with `new text`\n   - Can use 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` replaces lines 5-8\n\n5. **Delete single line**: `◼-NNN`\n   - Deletes original line NNN\n   - Example: `◼-12` deletes line 12\n\n6. **Delete range**: `◼-NNN-MMM`\n   - Deletes lines NNN through MMM inclusive\n   - Example: `◼-5-10` deletes lines 5 through 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, not adjusted numbers\n2. **One operation per line**: Each operation must start on a new line with `◼`\n3. **No explanations**: Output ONLY patch operations, no comments or explanations\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\n6. **Multiple files**: When patching multiple files, clearly separate patches for each file with a comment line like `# File: path/to/file.ts`\n\n### Examples\n\n**Example 1: Simple replacement**\nInput file (lines 001-005):\n```\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n004|\n005|export { x, y }\n```\n\nTask: Change variable names from x,y to a,b\n\nOutput:\n```\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n◼=5|export { a, b }\n```\n\n**Example 2: Adding documentation**\nInput file (lines 001-003):\n```\n001|function add(a, b) {\n002|  return a + b\n003|}\n```\n\nTask: Add JSDoc comment\n\nOutput:\n```\n◼<1|/**\n * Adds two numbers together\n * @param a First number\n * @param b Second number\n * @returns Sum of a and b\n */\n```\n\n**Example 3: Refactoring**\nInput file (lines 001-010):\n```\n001|const user = getUser()\n002|const name = user.name\n003|const email = user.email\n004|const age = user.age\n005|\n006|console.log(name)\n007|console.log(email)\n008|console.log(age)\n009|\n010|return user\n```\n\nTask: Use destructuring\n\nOutput:\n```\n◼=1-4|const { name, email, age } = getUser()\n◼-10\n◼>8|return { name, email, age }\n```\n\n## Your Task\n\nGenerate ONLY the patch operations needed to fulfill the user's instructions. Output patch operations between ■PATCH_START■ and ■PATCH_END■ markers.\n\n**Critical**:\n- Output ONLY patch operations, no explanations\n- Use ORIGINAL line numbers from the input\n- Verify each line number is correct\n- Test your patches mentally to ensure they produce the desired result","role":"system"},{"content":"Instructions: add \"# Header\" at the beginning of each file\n\nFile: file1.txt\n001|Line 1\n002|Line 2\n\n---\n\nFile: file2.txt\n001|Content A\n002|Content B\n\n■PATCH_START■","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.patch","promptSource":"zai:zai.patch:default"},"model":"fast","signal":{},"stopSequences":["■PATCH_END■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■PATCH_START■
# File: file1.txt
◼<1|# Header
# File: file2.txt
◼<1|# Header
■PATCH_END


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## Micropatch Protocol\n\nThe Micropatch protocol uses line numbers to reference ORIGINAL lines (before any edits). All operations use these ORIGINAL line numbers, which remain valid throughout the patching process.\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')` inserts before line 5\n\n2. **Insert AFTER line**: `◼>NNN|text`\n   - Inserts `text` as a new line AFTER original line NNN\n   - Example: `◼>10|}` inserts after line 10\n\n3. **Replace single line**: `◼=NNN|new text`\n   - Replaces original line NNN with `new text`\n   - Can use 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` replaces lines 5-8\n\n5. **Delete single line**: `◼-NNN`\n   - Deletes original line NNN\n   - Example: `◼-12` deletes line 12\n\n6. **Delete range**: `◼-NNN-MMM`\n   - Deletes lines NNN through MMM inclusive\n   - Example: `◼-5-10` deletes lines 5 through 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, not adjusted numbers\n2. **One operation per line**: Each operation must start on a new line with `◼`\n3. **No explanations**: Output ONLY patch operations, no comments or explanations\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\n### Examples\n\n**Example 1: Simple replacement**\nInput file (lines 001-005):\n```\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n004|\n005|export { x, y }\n```\n\nTask: Change variable names from x,y to a,b\n\nOutput:\n```\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n◼=5|export { a, b }\n```\n\n**Example 2: Adding documentation**\nInput file (lines 001-003):\n```\n001|function add(a, b) {\n002|  return a + b\n003|}\n```\n\nTask: Add JSDoc comment\n\nOutput:\n```\n◼<1|/**\n * Adds two numbers together\n * @param a First number\n * @param b Second number\n * @returns Sum of a and b\n */\n```\n\n**Example 3: Refactoring**\nInput file (lines 001-010):\n```\n001|const user = getUser()\n002|const name = user.name\n003|const email = user.email\n004|const age = user.age\n005|\n006|console.log(name)\n007|console.log(email)\n008|console.log(age)\n009|\n010|return user\n```\n\nTask: Use destructuring\n\nOutput:\n```\n◼=1-4|const { name, email, age } = getUser()\n◼-10\n◼>8|return { name, email, age }\n```\n\n## Your Task\n\nGenerate ONLY the patch operations needed to fulfill the user's instructions. Output patch operations between ■PATCH_START■ and ■PATCH_END■ markers.\n\n**Critical**:\n- Output ONLY patch operations, no explanations\n- Use ORIGINAL line numbers from the input\n- Verify each line number is correct\n- Test your patches mentally to ensure they produce the desired result","role":"system"},{"content":"Instructions: replace lines 2 to 4 (const b through const d) with a single line: const sum = 2 + 3 + 4\n\nFile: example.ts\n001|const a = 1\n002|const b = 2\n003|const c = 3\n004|const d = 4\n005|const e = 5\n\n■PATCH_START■","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.patch","promptSource":"zai:zai.patch:default"},"model":"fast","signal":{},"stopSequences":["■PATCH_END■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■PATCH_START■
◼=2-4|const sum = 2 + 3 + 4
■PATCH_END


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## Micropatch Protocol\n\nThe Micropatch protocol uses line numbers to reference ORIGINAL lines (before any edits). All operations use these ORIGINAL line numbers, which remain valid throughout the patching process.\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')` inserts before line 5\n\n2. **Insert AFTER line**: `◼>NNN|text`\n   - Inserts `text` as a new line AFTER original line NNN\n   - Example: `◼>10|}` inserts after line 10\n\n3. **Replace single line**: `◼=NNN|new text`\n   - Replaces original line NNN with `new text`\n   - Can use 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` replaces lines 5-8\n\n5. **Delete single line**: `◼-NNN`\n   - Deletes original line NNN\n   - Example: `◼-12` deletes line 12\n\n6. **Delete range**: `◼-NNN-MMM`\n   - Deletes lines NNN through MMM inclusive\n   - Example: `◼-5-10` deletes lines 5 through 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, not adjusted numbers\n2. **One operation per line**: Each operation must start on a new line with `◼`\n3. **No explanations**: Output ONLY patch operations, no comments or explanations\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\n### Examples\n\n**Example 1: Simple replacement**\nInput file (lines 001-005):\n```\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n004|\n005|export { x, y }\n```\n\nTask: Change variable names from x,y to a,b\n\nOutput:\n```\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n◼=5|export { a, b }\n```\n\n**Example 2: Adding documentation**\nInput file (lines 001-003):\n```\n001|function add(a, b) {\n002|  return a + b\n003|}\n```\n\nTask: Add JSDoc comment\n\nOutput:\n```\n◼<1|/**\n * Adds two numbers together\n * @param a First number\n * @param b Second number\n * @returns Sum of a and b\n */\n```\n\n**Example 3: Refactoring**\nInput file (lines 001-010):\n```\n001|const user = getUser()\n002|const name = user.name\n003|const email = user.email\n004|const age = user.age\n005|\n006|console.log(name)\n007|console.log(email)\n008|console.log(age)\n009|\n010|return user\n```\n\nTask: Use destructuring\n\nOutput:\n```\n◼=1-4|const { name, email, age } = getUser()\n◼-10\n◼>8|return { name, email, age }\n```\n\n## Your Task\n\nGenerate ONLY the patch operations needed to fulfill the user's instructions. Output patch operations between ■PATCH_START■ and ■PATCH_END■ markers.\n\n**Critical**:\n- Output ONLY patch operations, no explanations\n- Use ORIGINAL line numbers from the input\n- Verify each line number is correct\n- Test your patches mentally to ensure they produce the desired result","role":"system"},{"content":"Instructions: add a new user {\"id\": 3, \"name\": \"Charlie\"} to the users array and update count to 3\n\nFile: data.json\n001|{\n002|  \"users\": [\n003|    {\"id\": 1, \"name\": \"Alice\"},\n004|    {\"id\": 2, \"name\": \"Bob\"}\n005|  ],\n006|  \"count\": 2\n007|}\n\n■PATCH_START■","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.patch","promptSource":"zai:zai.patch:default"},"model":"fast","signal":{},"stopSequences":["■PATCH_END■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■PATCH_START■
◼=4|    {"id": 2, "name": "Bob"},
◼>4|    {"id": 3, "name": "Charlie"}
◼=6|  "count": 3
■PATCH_END


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

Output:
■PATCH_START■
◼<1|// This file defines constants
■PATCH_END


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## Micropatch Protocol\n\nThe Micropatch protocol uses line numbers to reference ORIGINAL lines (before any edits). All operations use these ORIGINAL line numbers, which remain valid throughout the patching process.\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')` inserts before line 5\n\n2. **Insert AFTER line**: `◼>NNN|text`\n   - Inserts `text` as a new line AFTER original line NNN\n   - Example: `◼>10|}` inserts after line 10\n\n3. **Replace single line**: `◼=NNN|new text`\n   - Replaces original line NNN with `new text`\n   - Can use 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` replaces lines 5-8\n\n5. **Delete single line**: `◼-NNN`\n   - Deletes original line NNN\n   - Example: `◼-12` deletes line 12\n\n6. **Delete range**: `◼-NNN-MMM`\n   - Deletes lines NNN through MMM inclusive\n   - Example: `◼-5-10` deletes lines 5 through 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, not adjusted numbers\n2. **One operation per line**: Each operation must start on a new line with `◼`\n3. **No explanations**: Output ONLY patch operations, no comments or explanations\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\n### Examples\n\n**Example 1: Simple replacement**\nInput file (lines 001-005):\n```\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n004|\n005|export { x, y }\n```\n\nTask: Change variable names from x,y to a,b\n\nOutput:\n```\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n◼=5|export { a, b }\n```\n\n**Example 2: Adding documentation**\nInput file (lines 001-003):\n```\n001|function add(a, b) {\n002|  return a + b\n003|}\n```\n\nTask: Add JSDoc comment\n\nOutput:\n```\n◼<1|/**\n * Adds two numbers together\n * @param a First number\n * @param b Second number\n * @returns Sum of a and b\n */\n```\n\n**Example 3: Refactoring**\nInput file (lines 001-010):\n```\n001|const user = getUser()\n002|const name = user.name\n003|const email = user.email\n004|const age = user.age\n005|\n006|console.log(name)\n007|console.log(email)\n008|console.log(age)\n009|\n010|return user\n```\n\nTask: Use destructuring\n\nOutput:\n```\n◼=1-4|const { name, email, age } = getUser()\n◼-10\n◼>8|return { name, email, age }\n```\n\n## Your Task\n\nGenerate ONLY the patch operations needed to fulfill the user's instructions. Output patch operations between ■PATCH_START■ and ■PATCH_END■ markers.\n\n**Critical**:\n- Output ONLY patch operations, no explanations\n- Use ORIGINAL line numbers from the input\n- Verify each line number is correct\n- Test your patches mentally to ensure they produce the desired result","role":"system"},{"content":"Instructions: add a comment at the top\n\nFile: large.ts\n501|const var500 = 500\n502|const var501 = 501\n503|const var502 = 502\n504|const var503 = 503\n505|const var504 = 504\n506|const var505 = 505\n507|const var506 = 506\n508|const var507 = 507\n509|const var508 = 508\n510|const var509 = 509\n511|const var510 = 510\n512|const var511 = 511\n513|const var512 = 512\n514|const var513 = 513\n515|const var514 = 514\n516|const var515 = 515\n517|const var516 = 516\n518|const var517 = 517\n519|const var518 = 518\n520|const var519 = 519\n521|const var520 = 520\n522|const var521 = 521\n523|const var522 = 522\n524|const var523 = 523\n525|const var524 = 524\n526|const var525 = 525\n527|const var526 = 526\n528|const var527 = 527\n529|const var528 = 528\n530|const var529 = 529\n531|const var530 = 530\n532|const var531 = 531\n533|const var532 = 532\n534|const var533 = 533\n535|const var534 = 534\n536|const var535 = 535\n537|const var536 = 536\n538|const var537 = 537\n539|const var538 = 538\n540|const var539 = 539\n541|const var540 = 540\n542|const var541 = 541\n543|const var542 = 542\n544|const var543 = 543\n545|const var544 = 544\n546|const var545 = 545\n547|const var546 = 546\n548|const var547 = 547\n549|const var548 = 548\n550|const var549 = 549\n551|const var550 = 550\n552|const var551 = 551\n553|const var552 = 552\n554|const var553 = 553\n555|const var554 = 554\n556|const var555 = 555\n557|const var556 = 556\n558|const var557 = 557\n559|const var558 = 558\n560|const var559 = 559\n561|const var560 = 560\n562|const var561 = 561\n563|const var562 = 562\n564|const var563 = 563\n565|const var564 = 564\n566|const var565 = 565\n567|const var566 = 566\n568|const var567 = 567\n569|const var568 = 568\n570|const var569 = 569\n571|const var570 = 570\n572|const var571 = 571\n573|const var572 = 572\n574|const var573 = 573\n575|const var574 = 574\n576|const var575 = 575\n577|const var576 = 576\n578|const var577 = 577\n579|const var578 = 578\n580|const var579 = 579\n581|const var580 = 580\n582|const var581 = 581\n583|const var582 = 582\n584|const var583 = 583\n585|const var584 = 584\n586|const var585 = 585\n587|const var586 = 586\n588|const var587 = 587\n589|const var588 = 588\n590|const var589 = 589\n591|const var590 = 590\n592|const var591 = 591\n593|const var592 = 592\n594|const var593 = 593\n595|const var594 = 594\n596|const var595 = 595\n597|const var596 = 596\n598|const var597 = 597\n599|const var598 = 598\n600|const var599 = 599\n601|const var600 = 600\n602|const var601 = 601\n603|const var602 = 602\n604|const var603 = 603\n605|const var604 = 604\n606|const var605 = 605\n607|const var606 = 606\n608|const var607 = 607\n609|const var608 = 608\n610|const var609 = 609\n611|const var610 = 610\n612|const var611 = 611\n613|const var612 = 612\n614|const var613 = 613\n615|const var614 = 614\n616|const var615 = 615\n617|const var616 = 616\n618|const var617 = 617\n619|const var618 = 618\n620|const var619 = 619\n621|const var620 = 620\n622|const var621 = 621\n623|const var622 = 622\n624|const var623 = 623\n625|const var624 = 624\n626|const var625 = 625\n627|const var626 = 626\n628|const var627 = 627\n629|const var628 = 628\n630|const var629 = 629\n631|const var630 = 630\n632|const var631 = 631\n633|const var632 = 632\n634|const var633 = 633\n635|const var634 = 634\n636|const var635 = 635\n637|const var636 = 636\n638|const var637 = 637\n639|const var638 = 638\n640|const var639 = 639\n641|const var640 = 640\n642|const var641 = 641\n643|const var642 = 642\n644|const var643 = 643\n645|const var644 = 644\n646|const var645 = 645\n647|const var646 = 646\n648|const var647 = 647\n649|const var648 = 648\n650|const var649 = 649\n651|const var650 = 650\n652|const var651 = 651\n653|const var652 = 652\n654|const var653 = 653\n655|const var654 = 654\n656|const var655 = 655\n657|const var656 = 656\n658|const var657 = 657\n659|const var658 = 658\n660|const var659 = 659\n661|const var660 = 660\n662|const var661 = 661\n663|const var662 = 662\n664|const var663 = 663\n665|const var664 = 664\n666|const var665 = 665\n667|const var666 = 666\n668|const var667 = 667\n669|const var668 = 668\n670|const var669 = 669\n671|const var670 = 670\n672|const var671 = 671\n673|const var672 = 672\n674|const var673 = 673\n675|const var674 = 674\n676|const var675 = 675\n677|const var676 = 676\n678|const var677 = 677\n679|const var678 = 678\n680|const var679 = 679\n681|const var680 = 680\n682|const var681 = 681\n683|const var682 = 682\n684|const var683 = 683\n685|const var684 = 684\n686|const var685 = 685\n687|const var686 = 686\n688|const var687 = 687\n689|const var688 = 688\n690|const var689 = 689\n691|const var690 = 690\n692|const var691 = 691\n693|const var692 = 692\n694|const var693 = 693\n695|const var694 = 694\n696|const var695 = 695\n697|const var696 = 696\n698|const var697 = 697\n699|const var698 = 698\n700|const var699 = 699\n701|const var700 = 700\n702|const var701 = 701\n703|const var702 = 702\n704|const var703 = 703\n705|const var704 = 704\n706|const var705 = 705\n707|const var706 = 706\n708|const var707 = 707\n709|const var708 = 708\n710|const var709 = 709\n711|const var710 = 710\n712|const var711 = 711\n713|const var712 = 712\n714|const var713 = 713\n715|const var714 = 714\n716|const var715 = 715\n717|const var716 = 716\n718|const var717 = 717\n719|const var718 = 718\n720|const var719 = 719\n721|const var720 = 720\n722|const var721 = 721\n723|const var722 = 722\n724|const var723 = 723\n725|const var724 = 724\n726|const var725 = 725\n727|const var726 = 726\n728|const var727 = 727\n729|const var728 = 728\n730|const var729 = 729\n731|const var730 = 730\n732|const var731 = 731\n733|const var732 = 732\n734|const var733 = 733\n735|const var734 = 734\n736|const var735 = 735\n737|const var736 = 736\n738|const var737 = 737\n739|const var738 = 738\n740|const var739 = 739\n741|const var740 = 740\n742|const var741 = 741\n743|const var742 = 742\n744|const var743 = 743\n745|const var744 = 744\n746|const var745 = 745\n747|const var746 = 746\n748|const var747 = 747\n749|const var748 = 748\n750|const var749 = 749\n751|const var750 = 750\n752|const var751 = 751\n753|const var752 = 752\n754|const var753 = 753\n755|const var754 = 754\n756|const var755 = 755\n757|const var756 = 756\n758|const var757 = 757\n759|const var758 = 758\n760|const var759 = 759\n761|const var760 = 760\n762|const var761 = 761\n763|const var762 = 762\n764|const var763 = 763\n765|const var764 = 764\n766|const var765 = 765\n767|const var766 = 766\n768|const var767 = 767\n769|const var768 = 768\n770|const var769 = 769\n771|const var770 = 770\n772|const var771 = 771\n773|const var772 = 772\n774|const var773 = 773\n775|const var774 = 774\n776|const var775 = 775\n777|const var776 = 776\n778|const var777 = 777\n779|const var778 = 778\n780|const var779 = 779\n781|const var780 = 780\n782|const var781 = 781\n783|const var782 = 782\n784|const var783 = 783\n785|const var784 = 784\n786|const var785 = 785\n787|const var786 = 786\n788|const var787 = 787\n789|const var788 = 788\n790|const var789 = 789\n791|const var790 = 790\n792|const var791 = 791\n793|const var792 = 792\n794|const var793 = 793\n795|const var794 = 794\n796|const var795 = 795\n797|const var796 = 796\n798|const var797 = 797\n799|const var798 = 798\n800|const var799 = 799\n801|const var800 = 800\n802|const var801 = 801\n803|const var802 = 802\n804|const var803 = 803\n805|const var804 = 804\n806|const var805 = 805\n807|const var806 = 806\n808|const var807 = 807\n809|const var808 = 808\n810|const var809 = 809\n811|const var810 = 810\n812|const var811 = 811\n813|const var812 = 812\n814|const var813 = 813\n815|const var814 = 814\n816|const var815 = 815\n817|const var816 = 816\n818|const var817 = 817\n819|const var818 = 818\n820|const var819 = 819\n821|const var820 = 820\n822|const var821 = 821\n823|const var822 = 822\n824|const var823 = 823\n825|const var824 = 824\n826|const var825 = 825\n827|const var826 = 826\n828|const var827 = 827\n829|const var828 = 828\n830|const var829 = 829\n831|const var830 = 830\n832|const var831 = 831\n833|const var832 = 832\n834|const var833 = 833\n835|const var834 = 834\n836|const var835 = 835\n837|const var836 = 836\n838|const var837 = 837\n839|const var838 = 838\n840|const var839 = 839\n841|const var840 = 840\n842|const var841 = 841\n843|const var842 = 842\n844|const var843 = 843\n845|const var844 = 844\n846|const var845 = 845\n847|const var846 = 846\n848|const var847 = 847\n849|const var848 = 848\n850|const var849 = 849\n851|const var850 = 850\n852|const var851 = 851\n853|const var852 = 852\n854|const var853 = 853\n855|const var854 = 854\n856|const var855 = 855\n857|const var856 = 856\n858|const var857 = 857\n859|const var858 = 858\n860|const var859 = 859\n861|const var860 = 860\n862|const var861 = 861\n863|const var862 = 862\n864|const var863 = 863\n865|const var864 = 864\n866|const var865 = 865\n867|const var866 = 866\n868|const var867 = 867\n869|const var868 = 868\n870|const var869 = 869\n871|const var870 = 870\n872|const var871 = 871\n873|const var872 = 872\n874|const var873 = 873\n875|const var874 = 874\n876|const var875 = 875\n877|const var876 = 876\n878|const var877 = 877\n879|const var878 = 878\n880|const var879 = 879\n881|const var880 = 880\n882|const var881 = 881\n883|const var882 = 882\n884|const var883 = 883\n885|const var884 = 884\n886|const var885 = 885\n887|const var886 = 886\n888|const var887 = 887\n889|const var888 = 888\n890|const var889 = 889\n891|const var890 = 890\n892|const var891 = 891\n893|const var892 = 892\n894|const var893 = 893\n895|const var894 = 894\n896|const var895 = 895\n897|const var896 = 896\n898|const var897 = 897\n899|const var898 = 898\n900|const var899 = 899\n901|const var900 = 900\n902|const var901 = 901\n903|const var902 = 902\n904|const var903 = 903\n905|const var904 = 904\n906|const var905 = 905\n907|const var906 = 906\n908|const var907 = 907\n909|const var908 = 908\n910|const var909 = 909\n911|const var910 = 910\n912|const var911 = 911\n913|const var912 = 912\n914|const var913 = 913\n915|const var914 = 914\n916|const var915 = 915\n917|const var916 = 916\n918|const var917 = 917\n919|const var918 = 918\n920|const var919 = 919\n921|const var920 = 920\n922|const var921 = 921\n923|const var922 = 922\n924|const var923 = 923\n925|const var924 = 924\n926|const var925 = 925\n927|const var926 = 926\n928|const var927 = 927\n929|const var928 = 928\n930|const var929 = 929\n931|const var930 = 930\n932|const var931 = 931\n933|const var932 = 932\n934|const var933 = 933\n935|const var934 = 934\n936|const var935 = 935\n937|const var936 = 936\n938|const var937 = 937\n939|const var938 = 938\n940|const var939 = 939\n941|const var940 = 940\n942|const var941 = 941\n943|const var942 = 942\n944|const var943 = 943\n945|const var944 = 944\n946|const var945 = 945\n947|const var946 = 946\n948|const var947 = 947\n949|const var948 = 948\n950|const var949 = 949\n951|const var950 = 950\n952|const var951 = 951\n953|const var952 = 952\n954|const var953 = 953\n955|const var954 = 954\n956|const var955 = 955\n957|const var956 = 956\n958|const var957 = 957\n959|const var958 = 958\n960|const var959 = 959\n961|const var960 = 960\n962|const var961 = 961\n963|const var962 = 962\n964|const var963 = 963\n965|const var964 = 964\n966|const var965 = 965\n967|const var966 = 966\n968|const var967 = 967\n969|const var968 = 968\n970|const var969 = 969\n971|const var970 = 970\n972|const var971 = 971\n973|const var972 = 972\n974|const var973 = 973\n975|const var974 = 974\n976|const var975 = 975\n977|const var976 = 976\n978|const var977 = 977\n979|const var978 = 978\n980|const var979 = 979\n981|const var980 = 980\n982|const var981 = 981\n983|const var982 = 982\n984|const var983 = 983\n985|const var984 = 984\n986|const var985 = 985\n987|const var986 = 986\n988|const var987 = 987\n989|const var988 = 988\n990|const var989 = 989\n991|const var990 = 990\n992|const var991 = 991\n993|const var992 = 992\n994|const var993 = 993\n995|const var994 = 994\n996|const var995 = 995\n997|const var996 = 996\n998|const var997 = 997\n999|const var998 = 998\n1000|const var999 = 999\n\n■PATCH_START■","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.patch","promptSource":"zai:zai.patch:default"},"model":"fast","signal":{},"stopSequences":["■PATCH_END■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■PATCH_START■
◼<501|// Top of file
■PATCH_END


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## Micropatch Protocol\n\nThe Micropatch protocol uses line numbers to reference ORIGINAL lines (before any edits). All operations use these ORIGINAL line numbers, which remain valid throughout the patching process.\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')` inserts before line 5\n\n2. **Insert AFTER line**: `◼>NNN|text`\n   - Inserts `text` as a new line AFTER original line NNN\n   - Example: `◼>10|}` inserts after line 10\n\n3. **Replace single line**: `◼=NNN|new text`\n   - Replaces original line NNN with `new text`\n   - Can use 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` replaces lines 5-8\n\n5. **Delete single line**: `◼-NNN`\n   - Deletes original line NNN\n   - Example: `◼-12` deletes line 12\n\n6. **Delete range**: `◼-NNN-MMM`\n   - Deletes lines NNN through MMM inclusive\n   - Example: `◼-5-10` deletes lines 5 through 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, not adjusted numbers\n2. **One operation per line**: Each operation must start on a new line with `◼`\n3. **No explanations**: Output ONLY patch operations, no comments or explanations\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\n### Examples\n\n**Example 1: Simple replacement**\nInput file (lines 001-005):\n```\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n004|\n005|export { x, y }\n```\n\nTask: Change variable names from x,y to a,b\n\nOutput:\n```\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n◼=5|export { a, b }\n```\n\n**Example 2: Adding documentation**\nInput file (lines 001-003):\n```\n001|function add(a, b) {\n002|  return a + b\n003|}\n```\n\nTask: Add JSDoc comment\n\nOutput:\n```\n◼<1|/**\n * Adds two numbers together\n * @param a First number\n * @param b Second number\n * @returns Sum of a and b\n */\n```\n\n**Example 3: Refactoring**\nInput file (lines 001-010):\n```\n001|const user = getUser()\n002|const name = user.name\n003|const email = user.email\n004|const age = user.age\n005|\n006|console.log(name)\n007|console.log(email)\n008|console.log(age)\n009|\n010|return user\n```\n\nTask: Use destructuring\n\nOutput:\n```\n◼=1-4|const { name, email, age } = getUser()\n◼-10\n◼>8|return { name, email, age }\n```\n\n## Your Task\n\nGenerate ONLY the patch operations needed to fulfill the user's instructions. Output patch operations between ■PATCH_START■ and ■PATCH_END■ markers.\n\n**Critical**:\n- Output ONLY patch operations, no explanations\n- Use ORIGINAL line numbers from the input\n- Verify each line number is correct\n- Test your patches mentally to ensure they produce the desired result","role":"system"},{"content":"Instructions: add a comment at the top\n\nFile: large.ts\n1001|const var1000 = 1000\n1002|const var1001 = 1001\n1003|const var1002 = 1002\n1004|const var1003 = 1003\n1005|const var1004 = 1004\n1006|const var1005 = 1005\n1007|const var1006 = 1006\n1008|const var1007 = 1007\n1009|const var1008 = 1008\n1010|const var1009 = 1009\n1011|const var1010 = 1010\n1012|const var1011 = 1011\n1013|const var1012 = 1012\n1014|const var1013 = 1013\n1015|const var1014 = 1014\n1016|const var1015 = 1015\n1017|const var1016 = 1016\n1018|const var1017 = 1017\n1019|const var1018 = 1018\n1020|const var1019 = 1019\n1021|const var1020 = 1020\n1022|const var1021 = 1021\n1023|const var1022 = 1022\n1024|const var1023 = 1023\n1025|const var1024 = 1024\n1026|const var1025 = 1025\n1027|const var1026 = 1026\n1028|const var1027 = 1027\n1029|const var1028 = 1028\n1030|const var1029 = 1029\n1031|const var1030 = 1030\n1032|const var1031 = 1031\n1033|const var1032 = 1032\n1034|const var1033 = 1033\n1035|const var1034 = 1034\n1036|const var1035 = 1035\n1037|const var1036 = 1036\n1038|const var1037 = 1037\n1039|const var1038 = 1038\n1040|const var1039 = 1039\n1041|const var1040 = 1040\n1042|const var1041 = 1041\n1043|const var1042 = 1042\n1044|const var1043 = 1043\n1045|const var1044 = 1044\n1046|const var1045 = 1045\n1047|const var1046 = 1046\n1048|const var1047 = 1047\n1049|const var1048 = 1048\n1050|const var1049 = 1049\n1051|const var1050 = 1050\n1052|const var1051 = 1051\n1053|const var1052 = 1052\n1054|const var1053 = 1053\n1055|const var1054 = 1054\n1056|const var1055 = 1055\n1057|const var1056 = 1056\n1058|const var1057 = 1057\n1059|const var1058 = 1058\n1060|const var1059 = 1059\n1061|const var1060 = 1060\n1062|const var1061 = 1061\n1063|const var1062 = 1062\n1064|const var1063 = 1063\n1065|const var1064 = 1064\n1066|const var1065 = 1065\n1067|const var1066 = 1066\n1068|const var1067 = 1067\n1069|const var1068 = 1068\n1070|const var1069 = 1069\n1071|const var1070 = 1070\n1072|const var1071 = 1071\n1073|const var1072 = 1072\n1074|const var1073 = 1073\n1075|const var1074 = 1074\n1076|const var1075 = 1075\n1077|const var1076 = 1076\n1078|const var1077 = 1077\n1079|const var1078 = 1078\n1080|const var1079 = 1079\n1081|const var1080 = 1080\n1082|const var1081 = 1081\n1083|const var1082 = 1082\n1084|const var1083 = 1083\n1085|const var1084 = 1084\n1086|const var1085 = 1085\n1087|const var1086 = 1086\n1088|const var1087 = 1087\n1089|const var1088 = 1088\n1090|const var1089 = 1089\n1091|const var1090 = 1090\n1092|const var1091 = 1091\n1093|const var1092 = 1092\n1094|const var1093 = 1093\n1095|const var1094 = 1094\n1096|const var1095 = 1095\n1097|const var1096 = 1096\n1098|const var1097 = 1097\n1099|const var1098 = 1098\n1100|const var1099 = 1099\n1101|const var1100 = 1100\n1102|const var1101 = 1101\n1103|const var1102 = 1102\n1104|const var1103 = 1103\n1105|const var1104 = 1104\n1106|const var1105 = 1105\n1107|const var1106 = 1106\n1108|const var1107 = 1107\n1109|const var1108 = 1108\n1110|const var1109 = 1109\n1111|const var1110 = 1110\n1112|const var1111 = 1111\n1113|const var1112 = 1112\n1114|const var1113 = 1113\n1115|const var1114 = 1114\n1116|const var1115 = 1115\n1117|const var1116 = 1116\n1118|const var1117 = 1117\n1119|const var1118 = 1118\n1120|const var1119 = 1119\n1121|const var1120 = 1120\n1122|const var1121 = 1121\n1123|const var1122 = 1122\n1124|const var1123 = 1123\n1125|const var1124 = 1124\n1126|const var1125 = 1125\n1127|const var1126 = 1126\n1128|const var1127 = 1127\n1129|const var1128 = 1128\n1130|const var1129 = 1129\n1131|const var1130 = 1130\n1132|const var1131 = 1131\n1133|const var1132 = 1132\n1134|const var1133 = 1133\n1135|const var1134 = 1134\n1136|const var1135 = 1135\n1137|const var1136 = 1136\n1138|const var1137 = 1137\n1139|const var1138 = 1138\n1140|const var1139 = 1139\n1141|const var1140 = 1140\n1142|const var1141 = 1141\n1143|const var1142 = 1142\n1144|const var1143 = 1143\n1145|const var1144 = 1144\n1146|const var1145 = 1145\n1147|const var1146 = 1146\n1148|const var1147 = 1147\n1149|const var1148 = 1148\n1150|const var1149 = 1149\n1151|const var1150 = 1150\n1152|const var1151 = 1151\n1153|const var1152 = 1152\n1154|const var1153 = 1153\n1155|const var1154 = 1154\n1156|const var1155 = 1155\n1157|const var1156 = 1156\n1158|const var1157 = 1157\n1159|const var1158 = 1158\n1160|const var1159 = 1159\n1161|const var1160 = 1160\n1162|const var1161 = 1161\n1163|const var1162 = 1162\n1164|const var1163 = 1163\n1165|const var1164 = 1164\n1166|const var1165 = 1165\n1167|const var1166 = 1166\n1168|const var1167 = 1167\n1169|const var1168 = 1168\n1170|const var1169 = 1169\n1171|const var1170 = 1170\n1172|const var1171 = 1171\n1173|const var1172 = 1172\n1174|const var1173 = 1173\n1175|const var1174 = 1174\n1176|const var1175 = 1175\n1177|const var1176 = 1176\n1178|const var1177 = 1177\n1179|const var1178 = 1178\n1180|const var1179 = 1179\n1181|const var1180 = 1180\n1182|const var1181 = 1181\n1183|const var1182 = 1182\n1184|const var1183 = 1183\n1185|const var1184 = 1184\n1186|const var1185 = 1185\n1187|const var1186 = 1186\n1188|const var1187 = 1187\n1189|const var1188 = 1188\n1190|const var1189 = 1189\n1191|const var1190 = 1190\n1192|const var1191 = 1191\n1193|const var1192 = 1192\n1194|const var1193 = 1193\n1195|const var1194 = 1194\n1196|const var1195 = 1195\n1197|const var1196 = 1196\n1198|const var1197 = 1197\n1199|const var1198 = 1198\n1200|const var1199 = 1199\n1201|const var1200 = 1200\n1202|const var1201 = 1201\n1203|const var1202 = 1202\n1204|const var1203 = 1203\n1205|const var1204 = 1204\n1206|const var1205 = 1205\n1207|const var1206 = 1206\n1208|const var1207 = 1207\n1209|const var1208 = 1208\n1210|const var1209 = 1209\n1211|const var1210 = 1210\n1212|const var1211 = 1211\n1213|const var1212 = 1212\n1214|const var1213 = 1213\n1215|const var1214 = 1214\n1216|const var1215 = 1215\n1217|const var1216 = 1216\n1218|const var1217 = 1217\n1219|const var1218 = 1218\n1220|const var1219 = 1219\n1221|const var1220 = 1220\n1222|const var1221 = 1221\n1223|const var1222 = 1222\n1224|const var1223 = 1223\n1225|const var1224 = 1224\n1226|const var1225 = 1225\n1227|const var1226 = 1226\n1228|const var1227 = 1227\n1229|const var1228 = 1228\n1230|const var1229 = 1229\n1231|const var1230 = 1230\n1232|const var1231 = 1231\n1233|const var1232 = 1232\n1234|const var1233 = 1233\n1235|const var1234 = 1234\n1236|const var1235 = 1235\n1237|const var1236 = 1236\n1238|const var1237 = 1237\n1239|const var1238 = 1238\n1240|const var1239 = 1239\n1241|const var1240 = 1240\n1242|const var1241 = 1241\n1243|const var1242 = 1242\n1244|const var1243 = 1243\n1245|const var1244 = 1244\n1246|const var1245 = 1245\n1247|const var1246 = 1246\n1248|const var1247 = 1247\n1249|const var1248 = 1248\n1250|const var1249 = 1249\n1251|const var1250 = 1250\n1252|const var1251 = 1251\n1253|const var1252 = 1252\n1254|const var1253 = 1253\n1255|const var1254 = 1254\n1256|const var1255 = 1255\n1257|const var1256 = 1256\n1258|const var1257 = 1257\n1259|const var1258 = 1258\n1260|const var1259 = 1259\n1261|const var1260 = 1260\n1262|const var1261 = 1261\n1263|const var1262 = 1262\n1264|const var1263 = 1263\n1265|const var1264 = 1264\n1266|const var1265 = 1265\n1267|const var1266 = 1266\n1268|const var1267 = 1267\n1269|const var1268 = 1268\n1270|const var1269 = 1269\n1271|const var1270 = 1270\n1272|const var1271 = 1271\n1273|const var1272 = 1272\n1274|const var1273 = 1273\n1275|const var1274 = 1274\n1276|const var1275 = 1275\n1277|const var1276 = 1276\n1278|const var1277 = 1277\n1279|const var1278 = 1278\n1280|const var1279 = 1279\n1281|const var1280 = 1280\n1282|const var1281 = 1281\n1283|const var1282 = 1282\n1284|const var1283 = 1283\n1285|const var1284 = 1284\n1286|const var1285 = 1285\n1287|const var1286 = 1286\n1288|const var1287 = 1287\n1289|const var1288 = 1288\n1290|const var1289 = 1289\n1291|const var1290 = 1290\n1292|const var1291 = 1291\n1293|const var1292 = 1292\n1294|const var1293 = 1293\n1295|const var1294 = 1294\n1296|const var1295 = 1295\n1297|const var1296 = 1296\n1298|const var1297 = 1297\n1299|const var1298 = 1298\n1300|const var1299 = 1299\n1301|const var1300 = 1300\n1302|const var1301 = 1301\n1303|const var1302 = 1302\n1304|const var1303 = 1303\n1305|const var1304 = 1304\n1306|const var1305 = 1305\n1307|const var1306 = 1306\n1308|const var1307 = 1307\n1309|const var1308 = 1308\n1310|const var1309 = 1309\n1311|const var1310 = 1310\n1312|const var1311 = 1311\n1313|const var1312 = 1312\n1314|const var1313 = 1313\n1315|const var1314 = 1314\n1316|const var1315 = 1315\n1317|const var1316 = 1316\n1318|const var1317 = 1317\n1319|const var1318 = 1318\n1320|const var1319 = 1319\n1321|const var1320 = 1320\n1322|const var1321 = 1321\n1323|const var1322 = 1322\n1324|const var1323 = 1323\n1325|const var1324 = 1324\n1326|const var1325 = 1325\n1327|const var1326 = 1326\n1328|const var1327 = 1327\n1329|const var1328 = 1328\n1330|const var1329 = 1329\n1331|const var1330 = 1330\n1332|const var1331 = 1331\n1333|const var1332 = 1332\n1334|const var1333 = 1333\n1335|const var1334 = 1334\n1336|const var1335 = 1335\n1337|const var1336 = 1336\n1338|const var1337 = 1337\n1339|const var1338 = 1338\n1340|const var1339 = 1339\n1341|const var1340 = 1340\n1342|const var1341 = 1341\n1343|const var1342 = 1342\n1344|const var1343 = 1343\n1345|const var1344 = 1344\n1346|const var1345 = 1345\n1347|const var1346 = 1346\n1348|const var1347 = 1347\n1349|const var1348 = 1348\n1350|const var1349 = 1349\n1351|const var1350 = 1350\n1352|const var1351 = 1351\n1353|const var1352 = 1352\n1354|const var1353 = 1353\n1355|const var1354 = 1354\n1356|const var1355 = 1355\n1357|const var1356 = 1356\n1358|const var1357 = 1357\n1359|const var1358 = 1358\n1360|const var1359 = 1359\n1361|const var1360 = 1360\n1362|const var1361 = 1361\n1363|const var1362 = 1362\n1364|const var1363 = 1363\n1365|const var1364 = 1364\n1366|const var1365 = 1365\n1367|const var1366 = 1366\n1368|const var1367 = 1367\n1369|const var1368 = 1368\n1370|const var1369 = 1369\n1371|const var1370 = 1370\n1372|const var1371 = 1371\n1373|const var1372 = 1372\n1374|const var1373 = 1373\n1375|const var1374 = 1374\n1376|const var1375 = 1375\n1377|const var1376 = 1376\n1378|const var1377 = 1377\n1379|const var1378 = 1378\n1380|const var1379 = 1379\n1381|const var1380 = 1380\n1382|const var1381 = 1381\n1383|const var1382 = 1382\n1384|const var1383 = 1383\n1385|const var1384 = 1384\n1386|const var1385 = 1385\n1387|const var1386 = 1386\n1388|const var1387 = 1387\n1389|const var1388 = 1388\n1390|const var1389 = 1389\n1391|const var1390 = 1390\n1392|const var1391 = 1391\n1393|const var1392 = 1392\n1394|const var1393 = 1393\n1395|const var1394 = 1394\n1396|const var1395 = 1395\n1397|const var1396 = 1396\n1398|const var1397 = 1397\n1399|const var1398 = 1398\n1400|const var1399 = 1399\n1401|const var1400 = 1400\n1402|const var1401 = 1401\n1403|const var1402 = 1402\n1404|const var1403 = 1403\n1405|const var1404 = 1404\n1406|const var1405 = 1405\n1407|const var1406 = 1406\n1408|const var1407 = 1407\n1409|const var1408 = 1408\n1410|const var1409 = 1409\n1411|const var1410 = 1410\n1412|const var1411 = 1411\n1413|const var1412 = 1412\n1414|const var1413 = 1413\n1415|const var1414 = 1414\n1416|const var1415 = 1415\n1417|const var1416 = 1416\n1418|const var1417 = 1417\n1419|const var1418 = 1418\n1420|const var1419 = 1419\n1421|const var1420 = 1420\n1422|const var1421 = 1421\n1423|const var1422 = 1422\n1424|const var1423 = 1423\n1425|const var1424 = 1424\n1426|const var1425 = 1425\n1427|const var1426 = 1426\n1428|const var1427 = 1427\n1429|const var1428 = 1428\n1430|const var1429 = 1429\n1431|const var1430 = 1430\n1432|const var1431 = 1431\n1433|const var1432 = 1432\n1434|const var1433 = 1433\n1435|const var1434 = 1434\n1436|const var1435 = 1435\n1437|const var1436 = 1436\n1438|const var1437 = 1437\n1439|const var1438 = 1438\n1440|const var1439 = 1439\n1441|const var1440 = 1440\n1442|const var1441 = 1441\n1443|const var1442 = 1442\n1444|const var1443 = 1443\n1445|const var1444 = 1444\n1446|const var1445 = 1445\n1447|const var1446 = 1446\n1448|const var1447 = 1447\n1449|const var1448 = 1448\n1450|const var1449 = 1449\n1451|const var1450 = 1450\n1452|const var1451 = 1451\n1453|const var1452 = 1452\n1454|const var1453 = 1453\n1455|const var1454 = 1454\n1456|const var1455 = 1455\n1457|const var1456 = 1456\n1458|const var1457 = 1457\n1459|const var1458 = 1458\n1460|const var1459 = 1459\n1461|const var1460 = 1460\n1462|const var1461 = 1461\n1463|const var1462 = 1462\n1464|const var1463 = 1463\n1465|const var1464 = 1464\n1466|const var1465 = 1465\n1467|const var1466 = 1466\n1468|const var1467 = 1467\n1469|const var1468 = 1468\n1470|const var1469 = 1469\n1471|const var1470 = 1470\n1472|const var1471 = 1471\n1473|const var1472 = 1472\n1474|const var1473 = 1473\n1475|const var1474 = 1474\n1476|const var1475 = 1475\n1477|const var1476 = 1476\n1478|const var1477 = 1477\n1479|const var1478 = 1478\n1480|const var1479 = 1479\n1481|const var1480 = 1480\n1482|const var1481 = 1481\n1483|const var1482 = 1482\n1484|const var1483 = 1483\n1485|const var1484 = 1484\n1486|const var1485 = 1485\n1487|const var1486 = 1486\n1488|const var1487 = 1487\n1489|const var1488 = 1488\n1490|const var1489 = 1489\n1491|const var1490 = 1490\n1492|const var1491 = 1491\n1493|const var1492 = 1492\n1494|const var1493 = 1493\n1495|const var1494 = 1494\n1496|const var1495 = 1495\n1497|const var1496 = 1496\n1498|const var1497 = 1497\n1499|const var1498 = 1498\n1500|const var1499 = 1499\n\n■PATCH_START■","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.patch","promptSource":"zai:zai.patch:default"},"model":"fast","signal":{},"stopSequences":["■PATCH_END■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■PATCH_START■
◼<1001|// This file defines many constants
■PATCH_END


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## Micropatch Protocol\n\nThe Micropatch protocol uses line numbers to reference ORIGINAL lines (before any edits). All operations use these ORIGINAL line numbers, which remain valid throughout the patching process.\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')` inserts before line 5\n\n2. **Insert AFTER line**: `◼>NNN|text`\n   - Inserts `text` as a new line AFTER original line NNN\n   - Example: `◼>10|}` inserts after line 10\n\n3. **Replace single line**: `◼=NNN|new text`\n   - Replaces original line NNN with `new text`\n   - Can use 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` replaces lines 5-8\n\n5. **Delete single line**: `◼-NNN`\n   - Deletes original line NNN\n   - Example: `◼-12` deletes line 12\n\n6. **Delete range**: `◼-NNN-MMM`\n   - Deletes lines NNN through MMM inclusive\n   - Example: `◼-5-10` deletes lines 5 through 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, not adjusted numbers\n2. **One operation per line**: Each operation must start on a new line with `◼`\n3. **No explanations**: Output ONLY patch operations, no comments or explanations\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\n### Examples\n\n**Example 1: Simple replacement**\nInput file (lines 001-005):\n```\n001|const x = 1\n002|const y = 2\n003|console.log(x + y)\n004|\n005|export { x, y }\n```\n\nTask: Change variable names from x,y to a,b\n\nOutput:\n```\n◼=1|const a = 1\n◼=2|const b = 2\n◼=3|console.log(a + b)\n◼=5|export { a, b }\n```\n\n**Example 2: Adding documentation**\nInput file (lines 001-003):\n```\n001|function add(a, b) {\n002|  return a + b\n003|}\n```\n\nTask: Add JSDoc comment\n\nOutput:\n```\n◼<1|/**\n * Adds two numbers together\n * @param a First number\n * @param b Second number\n * @returns Sum of a and b\n */\n```\n\n**Example 3: Refactoring**\nInput file (lines 001-010):\n```\n001|const user = getUser()\n002|const name = user.name\n003|const email = user.email\n004|const age = user.age\n005|\n006|console.log(name)\n007|console.log(email)\n008|console.log(age)\n009|\n010|return user\n```\n\nTask: Use destructuring\n\nOutput:\n```\n◼=1-4|const { name, email, age } = getUser()\n◼-10\n◼>8|return { name, email, age }\n```\n\n## Your Task\n\nGenerate ONLY the patch operations needed to fulfill the user's instructions. Output patch operations between ■PATCH_START■ and ■PATCH_END■ markers.\n\n**Critical**:\n- Output ONLY patch operations, no explanations\n- Use ORIGINAL line numbers from the input\n- Verify each line number is correct\n- Test your patches mentally to ensure they produce the desired result","role":"system"},{"content":"Instructions: add a comment at the top\n\nFile: large.ts\n1501|const var1500 = 1500\n1502|const var1501 = 1501\n1503|const var1502 = 1502\n1504|const var1503 = 1503\n1505|const var1504 = 1504\n1506|const var1505 = 1505\n1507|const var1506 = 1506\n1508|const var1507 = 1507\n1509|const var1508 = 1508\n1510|const var1509 = 1509\n1511|const var1510 = 1510\n1512|const var1511 = 1511\n1513|const var1512 = 1512\n1514|const var1513 = 1513\n1515|const var1514 = 1514\n1516|const var1515 = 1515\n1517|const var1516 = 1516\n1518|const var1517 = 1517\n1519|const var1518 = 1518\n1520|const var1519 = 1519\n1521|const var1520 = 1520\n1522|const var1521 = 1521\n1523|const var1522 = 1522\n1524|const var1523 = 1523\n1525|const var1524 = 1524\n1526|const var1525 = 1525\n1527|const var1526 = 1526\n1528|const var1527 = 1527\n1529|const var1528 = 1528\n1530|const var1529 = 1529\n1531|const var1530 = 1530\n1532|const var1531 = 1531\n1533|const var1532 = 1532\n1534|const var1533 = 1533\n1535|const var1534 = 1534\n1536|const var1535 = 1535\n1537|const var1536 = 1536\n1538|const var1537 = 1537\n1539|const var1538 = 1538\n1540|const var1539 = 1539\n1541|const var1540 = 1540\n1542|const var1541 = 1541\n1543|const var1542 = 1542\n1544|const var1543 = 1543\n1545|const var1544 = 1544\n1546|const var1545 = 1545\n1547|const var1546 = 1546\n1548|const var1547 = 1547\n1549|const var1548 = 1548\n1550|const var1549 = 1549\n1551|const var1550 = 1550\n1552|const var1551 = 1551\n1553|const var1552 = 1552\n1554|const var1553 = 1553\n1555|const var1554 = 1554\n1556|const var1555 = 1555\n1557|const var1556 = 1556\n1558|const var1557 = 1557\n1559|const var1558 = 1558\n1560|const var1559 = 1559\n1561|const var1560 = 1560\n1562|const var1561 = 1561\n1563|const var1562 = 1562\n1564|const var1563 = 1563\n1565|const var1564 = 1564\n1566|const var1565 = 1565\n1567|const var1566 = 1566\n1568|const var1567 = 1567\n1569|const var1568 = 1568\n1570|const var1569 = 1569\n1571|const var1570 = 1570\n1572|const var1571 = 1571\n1573|const var1572 = 1572\n1574|const var1573 = 1573\n1575|const var1574 = 1574\n1576|const var1575 = 1575\n1577|const var1576 = 1576\n1578|const var1577 = 1577\n1579|const var1578 = 1578\n1580|const var1579 = 1579\n1581|const var1580 = 1580\n1582|const var1581 = 1581\n1583|const var1582 = 1582\n1584|const var1583 = 1583\n1585|const var1584 = 1584\n1586|const var1585 = 1585\n1587|const var1586 = 1586\n1588|const var1587 = 1587\n1589|const var1588 = 1588\n1590|const var1589 = 1589\n1591|const var1590 = 1590\n1592|const var1591 = 1591\n1593|const var1592 = 1592\n1594|const var1593 = 1593\n1595|const var1594 = 1594\n1596|const var1595 = 1595\n1597|const var1596 = 1596\n1598|const var1597 = 1597\n1599|const var1598 = 1598\n1600|const var1599 = 1599\n1601|const var1600 = 1600\n1602|const var1601 = 1601\n1603|const var1602 = 1602\n1604|const var1603 = 1603\n1605|const var1604 = 1604\n1606|const var1605 = 1605\n1607|const var1606 = 1606\n1608|const var1607 = 1607\n1609|const var1608 = 1608\n1610|const var1609 = 1609\n1611|const var1610 = 1610\n1612|const var1611 = 1611\n1613|const var1612 = 1612\n1614|const var1613 = 1613\n1615|const var1614 = 1614\n1616|const var1615 = 1615\n1617|const var1616 = 1616\n1618|const var1617 = 1617\n1619|const var1618 = 1618\n1620|const var1619 = 1619\n1621|const var1620 = 1620\n1622|const var1621 = 1621\n1623|const var1622 = 1622\n1624|const var1623 = 1623\n1625|const var1624 = 1624\n1626|const var1625 = 1625\n1627|const var1626 = 1626\n1628|const var1627 = 1627\n1629|const var1628 = 1628\n1630|const var1629 = 1629\n1631|const var1630 = 1630\n1632|const var1631 = 1631\n1633|const var1632 = 1632\n1634|const var1633 = 1633\n1635|const var1634 = 1634\n1636|const var1635 = 1635\n1637|const var1636 = 1636\n1638|const var1637 = 1637\n1639|const var1638 = 1638\n1640|const var1639 = 1639\n1641|const var1640 = 1640\n1642|const var1641 = 1641\n1643|const var1642 = 1642\n1644|const var1643 = 1643\n1645|const var1644 = 1644\n1646|const var1645 = 1645\n1647|const var1646 = 1646\n1648|const var1647 = 1647\n1649|const var1648 = 1648\n1650|const var1649 = 1649\n1651|const var1650 = 1650\n1652|const var1651 = 1651\n1653|const var1652 = 1652\n1654|const var1653 = 1653\n1655|const var1654 = 1654\n1656|const var1655 = 1655\n1657|const var1656 = 1656\n1658|const var1657 = 1657\n1659|const var1658 = 1658\n1660|const var1659 = 1659\n1661|const var1660 = 1660\n1662|const var1661 = 1661\n1663|const var1662 = 1662\n1664|const var1663 = 1663\n1665|const var1664 = 1664\n1666|const var1665 = 1665\n1667|const var1666 = 1666\n1668|const var1667 = 1667\n1669|const var1668 = 1668\n1670|const var1669 = 1669\n1671|const var1670 = 1670\n1672|const var1671 = 1671\n1673|const var1672 = 1672\n1674|const var1673 = 1673\n1675|const var1674 = 1674\n1676|const var1675 = 1675\n1677|const var1676 = 1676\n1678|const var1677 = 1677\n1679|const var1678 = 1678\n1680|const var1679 = 1679\n1681|const var1680 = 1680\n1682|const var1681 = 1681\n1683|const var1682 = 1682\n1684|const var1683 = 1683\n1685|const var1684 = 1684\n1686|const var1685 = 1685\n1687|const var1686 = 1686\n1688|const var1687 = 1687\n1689|const var1688 = 1688\n1690|const var1689 = 1689\n1691|const var1690 = 1690\n1692|const var1691 = 1691\n1693|const var1692 = 1692\n1694|const var1693 = 1693\n1695|const var1694 = 1694\n1696|const var1695 = 1695\n1697|const var1696 = 1696\n1698|const var1697 = 1697\n1699|const var1698 = 1698\n1700|const var1699 = 1699\n1701|const var1700 = 1700\n1702|const var1701 = 1701\n1703|const var1702 = 1702\n1704|const var1703 = 1703\n1705|const var1704 = 1704\n1706|const var1705 = 1705\n1707|const var1706 = 1706\n1708|const var1707 = 1707\n1709|const var1708 = 1708\n1710|const var1709 = 1709\n1711|const var1710 = 1710\n1712|const var1711 = 1711\n1713|const var1712 = 1712\n1714|const var1713 = 1713\n1715|const var1714 = 1714\n1716|const var1715 = 1715\n1717|const var1716 = 1716\n1718|const var1717 = 1717\n1719|const var1718 = 1718\n1720|const var1719 = 1719\n1721|const var1720 = 1720\n1722|const var1721 = 1721\n1723|const var1722 = 1722\n1724|const var1723 = 1723\n1725|const var1724 = 1724\n1726|const var1725 = 1725\n1727|const var1726 = 1726\n1728|const var1727 = 1727\n1729|const var1728 = 1728\n1730|const var1729 = 1729\n1731|const var1730 = 1730\n1732|const var1731 = 1731\n1733|const var1732 = 1732\n1734|const var1733 = 1733\n1735|const var1734 = 1734\n1736|const var1735 = 1735\n1737|const var1736 = 1736\n1738|const var1737 = 1737\n1739|const var1738 = 1738\n1740|const var1739 = 1739\n1741|const var1740 = 1740\n1742|const var1741 = 1741\n1743|const var1742 = 1742\n1744|const var1743 = 1743\n1745|const var1744 = 1744\n1746|const var1745 = 1745\n1747|const var1746 = 1746\n1748|const var1747 = 1747\n1749|const var1748 = 1748\n1750|const var1749 = 1749\n1751|const var1750 = 1750\n1752|const var1751 = 1751\n1753|const var1752 = 1752\n1754|const var1753 = 1753\n1755|const var1754 = 1754\n1756|const var1755 = 1755\n1757|const var1756 = 1756\n1758|const var1757 = 1757\n1759|const var1758 = 1758\n1760|const var1759 = 1759\n1761|const var1760 = 1760\n1762|const var1761 = 1761\n1763|const var1762 = 1762\n1764|const var1763 = 1763\n1765|const var1764 = 1764\n1766|const var1765 = 1765\n1767|const var1766 = 1766\n1768|const var1767 = 1767\n1769|const var1768 = 1768\n1770|const var1769 = 1769\n1771|const var1770 = 1770\n1772|const var1771 = 1771\n1773|const var1772 = 1772\n1774|const var1773 = 1773\n1775|const var1774 = 1774\n1776|const var1775 = 1775\n1777|const var1776 = 1776\n1778|const var1777 = 1777\n1779|const var1778 = 1778\n1780|const var1779 = 1779\n1781|const var1780 = 1780\n1782|const var1781 = 1781\n1783|const var1782 = 1782\n1784|const var1783 = 1783\n1785|const var1784 = 1784\n1786|const var1785 = 1785\n1787|const var1786 = 1786\n1788|const var1787 = 1787\n1789|const var1788 = 1788\n1790|const var1789 = 1789\n1791|const var1790 = 1790\n1792|const var1791 = 1791\n1793|const var1792 = 1792\n1794|const var1793 = 1793\n1795|const var1794 = 1794\n1796|const var1795 = 1795\n1797|const var1796 = 1796\n1798|const var1797 = 1797\n1799|const var1798 = 1798\n1800|const var1799 = 1799\n1801|const var1800 = 1800\n1802|const var1801 = 1801\n1803|const var1802 = 1802\n1804|const var1803 = 1803\n1805|const var1804 = 1804\n1806|const var1805 = 1805\n1807|const var1806 = 1806\n1808|const var1807 = 1807\n1809|const var1808 = 1808\n1810|const var1809 = 1809\n1811|const var1810 = 1810\n1812|const var1811 = 1811\n1813|const var1812 = 1812\n1814|const var1813 = 1813\n1815|const var1814 = 1814\n1816|const var1815 = 1815\n1817|const var1816 = 1816\n1818|const var1817 = 1817\n1819|const var1818 = 1818\n1820|const var1819 = 1819\n1821|const var1820 = 1820\n1822|const var1821 = 1821\n1823|const var1822 = 1822\n1824|const var1823 = 1823\n1825|const var1824 = 1824\n1826|const var1825 = 1825\n1827|const var1826 = 1826\n1828|const var1827 = 1827\n1829|const var1828 = 1828\n1830|const var1829 = 1829\n1831|const var1830 = 1830\n1832|const var1831 = 1831\n1833|const var1832 = 1832\n1834|const var1833 = 1833\n1835|const var1834 = 1834\n1836|const var1835 = 1835\n1837|const var1836 = 1836\n1838|const var1837 = 1837\n1839|const var1838 = 1838\n1840|const var1839 = 1839\n1841|const var1840 = 1840\n1842|const var1841 = 1841\n1843|const var1842 = 1842\n1844|const var1843 = 1843\n1845|const var1844 = 1844\n1846|const var1845 = 1845\n1847|const var1846 = 1846\n1848|const var1847 = 1847\n1849|const var1848 = 1848\n1850|const var1849 = 1849\n1851|const var1850 = 1850\n1852|const var1851 = 1851\n1853|const var1852 = 1852\n1854|const var1853 = 1853\n1855|const var1854 = 1854\n1856|const var1855 = 1855\n1857|const var1856 = 1856\n1858|const var1857 = 1857\n1859|const var1858 = 1858\n1860|const var1859 = 1859\n1861|const var1860 = 1860\n1862|const var1861 = 1861\n1863|const var1862 = 1862\n1864|const var1863 = 1863\n1865|const var1864 = 1864\n1866|const var1865 = 1865\n1867|const var1866 = 1866\n1868|const var1867 = 1867\n1869|const var1868 = 1868\n1870|const var1869 = 1869\n1871|const var1870 = 1870\n1872|const var1871 = 1871\n1873|const var1872 = 1872\n1874|const var1873 = 1873\n1875|const var1874 = 1874\n1876|const var1875 = 1875\n1877|const var1876 = 1876\n1878|const var1877 = 1877\n1879|const var1878 = 1878\n1880|const var1879 = 1879\n1881|const var1880 = 1880\n1882|const var1881 = 1881\n1883|const var1882 = 1882\n1884|const var1883 = 1883\n1885|const var1884 = 1884\n1886|const var1885 = 1885\n1887|const var1886 = 1886\n1888|const var1887 = 1887\n1889|const var1888 = 1888\n1890|const var1889 = 1889\n1891|const var1890 = 1890\n1892|const var1891 = 1891\n1893|const var1892 = 1892\n1894|const var1893 = 1893\n1895|const var1894 = 1894\n1896|const var1895 = 1895\n1897|const var1896 = 1896\n1898|const var1897 = 1897\n1899|const var1898 = 1898\n1900|const var1899 = 1899\n1901|const var1900 = 1900\n1902|const var1901 = 1901\n1903|const var1902 = 1902\n1904|const var1903 = 1903\n1905|const var1904 = 1904\n1906|const var1905 = 1905\n1907|const var1906 = 1906\n1908|const var1907 = 1907\n1909|const var1908 = 1908\n1910|const var1909 = 1909\n1911|const var1910 = 1910\n1912|const var1911 = 1911\n1913|const var1912 = 1912\n1914|const var1913 = 1913\n1915|const var1914 = 1914\n1916|const var1915 = 1915\n1917|const var1916 = 1916\n1918|const var1917 = 1917\n1919|const var1918 = 1918\n1920|const var1919 = 1919\n1921|const var1920 = 1920\n1922|const var1921 = 1921\n1923|const var1922 = 1922\n1924|const var1923 = 1923\n1925|const var1924 = 1924\n1926|const var1925 = 1925\n1927|const var1926 = 1926\n1928|const var1927 = 1927\n1929|const var1928 = 1928\n1930|const var1929 = 1929\n1931|const var1930 = 1930\n1932|const var1931 = 1931\n1933|const var1932 = 1932\n1934|const var1933 = 1933\n1935|const var1934 = 1934\n1936|const var1935 = 1935\n1937|const var1936 = 1936\n1938|const var1937 = 1937\n1939|const var1938 = 1938\n1940|const var1939 = 1939\n1941|const var1940 = 1940\n1942|const var1941 = 1941\n1943|const var1942 = 1942\n1944|const var1943 = 1943\n1945|const var1944 = 1944\n1946|const var1945 = 1945\n1947|const var1946 = 1946\n1948|const var1947 = 1947\n1949|const var1948 = 1948\n1950|const var1949 = 1949\n1951|const var1950 = 1950\n1952|const var1951 = 1951\n1953|const var1952 = 1952\n1954|const var1953 = 1953\n1955|const var1954 = 1954\n1956|const var1955 = 1955\n1957|const var1956 = 1956\n1958|const var1957 = 1957\n1959|const var1958 = 1958\n1960|const var1959 = 1959\n1961|const var1960 = 1960\n1962|const var1961 = 1961\n1963|const var1962 = 1962\n1964|const var1963 = 1963\n1965|const var1964 = 1964\n1966|const var1965 = 1965\n1967|const var1966 = 1966\n1968|const var1967 = 1967\n1969|const var1968 = 1968\n1970|const var1969 = 1969\n1971|const var1970 = 1970\n1972|const var1971 = 1971\n1973|const var1972 = 1972\n1974|const var1973 = 1973\n1975|const var1974 = 1974\n1976|const var1975 = 1975\n1977|const var1976 = 1976\n1978|const var1977 = 1977\n1979|const var1978 = 1978\n1980|const var1979 = 1979\n1981|const var1980 = 1980\n1982|const var1981 = 1981\n1983|const var1982 = 1982\n1984|const var1983 = 1983\n1985|const var1984 = 1984\n1986|const var1985 = 1985\n1987|const var1986 = 1986\n1988|const var1987 = 1987\n1989|const var1988 = 1988\n1990|const var1989 = 1989\n1991|const var1990 = 1990\n1992|const var1991 = 1991\n1993|const var1992 = 1992\n1994|const var1993 = 1993\n1995|const var1994 = 1994\n1996|const var1995 = 1995\n1997|const var1996 = 1996\n1998|const var1997 = 1997\n1999|const var1998 = 1998\n2000|const var1999 = 1999\n\n■PATCH_START■","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.patch","promptSource":"zai:zai.patch:default"},"model":"fast","signal":{},"stopSequences":["■PATCH_END■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■PATCH_START■
◼<1501|// Generated constants file
■PATCH_END