From ad57d8117abce30d9e9ae56333746126481c6abf Mon Sep 17 00:00:00 2001
From: yousefed Hello, world! How are you? Hello, world! How are you? Hello, world! How are you? Hello, world! How are you?
` is valid, but `
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"C\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ode\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\",\\\"
\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",\\\"<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"code d\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ata-l\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"anguage=\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\\\\\"javas\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"cri\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"pt\\\\\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\">console.log\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"('hell\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"o world');\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"code>\\\"]}]}\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1197,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":123} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/Add heading (h1) and code block_1_2b1987665a8c6b76ea1cc84255389571.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/Add heading (h1) and code block_1_2b1987665a8c6b76ea1cc84255389571.json
deleted file mode 100644
index 7f3f115776..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/Add heading (h1) and code block_1_2b1987665a8c6b76ea1cc84255389571.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
` is valid, but `
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"conso\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"le.log\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"('he\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"llo world');\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"
` is valid, but `
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"li>B\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ananas\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ul>\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"]}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1183,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":117}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add a list (end)_1_d09f092a3a86410797b84afbe6a05773.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add a list (end)_1_d09f092a3a86410797b84afbe6a05773.json
deleted file mode 100644
index de0a7f3211..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add a list (end)_1_d09f092a3a86410797b84afbe6a05773.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
` is valid, but `
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"
\\\"]}\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1118,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":111}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add a new paragraph (empty doc)_1_0737d0ae03c2d0adf101da14bdef2414.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add a new paragraph (empty doc)_1_0737d0ae03c2d0adf101da14bdef2414.json
new file mode 100644
index 0000000000..324169ccfc
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add a new paragraph (empty doc)_1_0737d0ae03c2d0adf101da14bdef2414.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `
` is valid, but `
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nBecause the document is empty, YOU MUST first update the empty block before adding new blocks.\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"\\\"},{\\\"cursor\\\":true}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"write a new paragraph with the text 'You look great today!'\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01TY4nK664oxek1YEPeDwnnt\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1148,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":11,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01QHWsXT78qjs18nXt9WAk5G\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operatio\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ns\\\":\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" [{\\\"ty\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"pe\\\":\\\"up\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"date\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"id\\\":\\\"ref1$\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",\\\"bloc\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"k\\\":\\\"<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"p>You \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"lo\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ok g\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"reat today\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"!
block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"\\\"},{\\\"cursor\\\":true}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Because the document is empty, first update the empty block before adding new blocks.\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"write a new paragraph with the text 'You look great today!'\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01TTpZunpRFo6XMRwFnTab65\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1081,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":15,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01NbuB5m8nLsgaWbJS3AUavp\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operations\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\": [{\\\"t\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ype\\\":\\\"upda\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"te\\\",\\\"id\\\":\\\"re\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"f1\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"$\\\",\\\"bl\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ock\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"You lo\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ok\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" great \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"toda\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"y!
\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1081,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":82} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add a new paragraph (end)_1_25717cdb5e0dabfd9e85a28126fc6b5b.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add a new paragraph (end)_1_25717cdb5e0dabfd9e85a28126fc6b5b.json
new file mode 100644
index 0000000000..fc2ff734a8
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add a new paragraph (end)_1_25717cdb5e0dabfd9e85a28126fc6b5b.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"add a new paragraph with the text 'You look great today!' after the last sentence\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01HMjyW8XEMYqNx286NuGvxk\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1178,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":11,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01LWhfRPfyN5HUkhXEkAtXue\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operatio\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ns\\\": [{\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"type\\\":\\\"add\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"reference\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Id\\\":\\\"ref2\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"$\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"positio\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"n\\\":\\\"after\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"blocks\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"[\\\"You l\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ook gre\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"at\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" today!
\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"]}]}\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1178,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":94} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add a new paragraph (end)_1_97ed001b6f5aed92d99361bc27ca0de9.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add a new paragraph (end)_1_97ed001b6f5aed92d99361bc27ca0de9.json
deleted file mode 100644
index 947ce50147..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add a new paragraph (end)_1_97ed001b6f5aed92d99361bc27ca0de9.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"add a new paragraph with the text 'You look great today!' after the last sentence\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01Afzi2hECs4YCeA5Gxd22wu\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1113,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":15,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01LQPWW9Hybdxs1x7XtDM1eE\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"o\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"pera\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"tions\\\": [\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"t\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ype\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"add\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"reference\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Id\\\":\\\"ref\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"2$\\\",\\\"posi\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"tion\\\":\\\"after\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\",\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"blocks\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":[\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"You l\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ook\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" great tod\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ay!<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"/p>\\\"]\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1113,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":94} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add a new paragraph (start)_1_83b238d8e21398ee970fac58c746fe19.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add a new paragraph (start)_1_83b238d8e21398ee970fac58c746fe19.json
deleted file mode 100644
index 8d0a34ebc4..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add a new paragraph (start)_1_83b238d8e21398ee970fac58c746fe19.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"add a new paragraph with the text 'You look great today!' before the first sentence\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_011ekxiY9CASdUh5TmWaji9x\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1113,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":15,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01JsfqfAaQyJkReZoJTkJj2y\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operation\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"s\\\": [\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"type\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"add\\\",\\\"re\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ferenceId\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"ref1$\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\",\\\"po\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"sition\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"before\\\",\\\"bl\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ocks\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":[\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"You\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" look\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" great tod\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ay!
\\\"]\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1113,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":94} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add a new paragraph (start)_1_8fc8e14082d21bf98623cd9ef57bafff.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add a new paragraph (start)_1_8fc8e14082d21bf98623cd9ef57bafff.json
new file mode 100644
index 0000000000..cb75932629
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add a new paragraph (start)_1_8fc8e14082d21bf98623cd9ef57bafff.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"add a new paragraph with the text 'You look great today!' before the first sentence\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01GnZHTPVy8TjtR1eWMCrsD3\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1178,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":11,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01249NZozkyZExyreygAe2ab\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"oper\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ations\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\": [{\\\"type\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"ad\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"d\\\",\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"referenceI\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"d\\\":\\\"r\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ef\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"1$\\\",\\\"posit\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ion\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"before\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"bl\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ocks\\\":[\\\"Y\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ou look grea\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"t today!
\\\"]}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1178,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":94} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/Add heading (h1) and code block_1_138de1ba18f0c4a7c084805a95d8aced.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/Add heading (h1) and code block_1_138de1ba18f0c4a7c084805a95d8aced.json
deleted file mode 100644
index 579930a036..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/Add heading (h1) and code block_1_138de1ba18f0c4a7c084805a95d8aced.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"at the end of doc, add a h1 heading `Code` and a javascript code block (block, not inline style) with `console.log('hello world');`\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-e7321176-1786-4469-8a67-46c47f9ad895\",\"object\":\"chat.completion.chunk\",\"created\":1758783439,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_155ab82e98\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk0tye04v7p34s86pxrq0\"}}\n\ndata: {\"id\":\"chatcmpl-e7321176-1786-4469-8a67-46c47f9ad895\",\"object\":\"chat.completion.chunk\",\"created\":1758783439,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_155ab82e98\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"1zfedaer2\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"blocks\\\":[\\\"\\\\u003ch1\\\\u003eCode\\\\u003c/h1\\\\u003e\\\",\\\"\\\\u003cpre\\\\u003e\\\\u003ccode data-language='javascript'\\\\u003econsole.log('hello world');\\\\u003c/code\\\\u003e\\\\u003c/pre\\\\u003e\\\"],\\\"position\\\":\\\"after\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"type\\\":\\\"add\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-e7321176-1786-4469-8a67-46c47f9ad895\",\"object\":\"chat.completion.chunk\",\"created\":1758783439,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_155ab82e98\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk0tye04v7p34s86pxrq0\",\"usage\":{\"queue_time\":0.084504521,\"prompt_tokens\":845,\"prompt_time\":0.068739009,\"completion_tokens\":58,\"completion_time\":0.127742835,\"total_tokens\":903,\"total_time\":0.196481844}},\"usage\":{\"queue_time\":0.084504521,\"prompt_tokens\":845,\"prompt_time\":0.068739009,\"completion_tokens\":58,\"completion_time\":0.127742835,\"total_tokens\":903,\"total_time\":0.196481844}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/Add heading (h1) and code block_1_72b3fb10d4b64ad2c57b7e759fb45ea2.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/Add heading (h1) and code block_1_72b3fb10d4b64ad2c57b7e759fb45ea2.json
new file mode 100644
index 0000000000..d75524a1ce
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/Add heading (h1) and code block_1_72b3fb10d4b64ad2c57b7e759fb45ea2.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"},{\"role\":\"user\",\"content\":\"at the end of doc, add a h1 heading `Code` and a javascript code block (block, not inline style) with `console.log('hello world');`\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-10426910-d469-4d0c-bd47-99fddf1cff76\",\"object\":\"chat.completion.chunk\",\"created\":1763483248,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabwnt34ekar9md31jkv2pf1\",\"seed\":43553737}}\n\ndata: {\"id\":\"chatcmpl-10426910-d469-4d0c-bd47-99fddf1cff76\",\"object\":\"chat.completion.chunk\",\"created\":1763483248,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"bwxnfew4n\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"blocks\\\":[\\\"\\\\u003ch1\\\\u003eCode\\\\u003c/h1\\\\u003e\\\",\\\"\\\\u003cpre\\\\u003e\\\\u003ccode data-language=\\\\\\\"javascript\\\\\\\"\\\\u003econsole.log('hello world');\\\\u003c/code\\\\u003e\\\\u003c/pre\\\\u003e\\\"],\\\"position\\\":\\\"after\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"type\\\":\\\"add\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-10426910-d469-4d0c-bd47-99fddf1cff76\",\"object\":\"chat.completion.chunk\",\"created\":1763483248,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabwnt34ekar9md31jkv2pf1\",\"usage\":{\"queue_time\":0.042807215,\"prompt_tokens\":896,\"prompt_time\":0.046773548,\"completion_tokens\":58,\"completion_time\":0.123359878,\"total_tokens\":954,\"total_time\":0.170133426}},\"usage\":{\"queue_time\":0.042807215,\"prompt_tokens\":896,\"prompt_time\":0.046773548,\"completion_tokens\":58,\"completion_time\":0.123359878,\"total_tokens\":954,\"total_time\":0.170133426}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a list (end)_1_6330fcc2bc48733981e5337c6f38fe08.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a list (end)_1_6330fcc2bc48733981e5337c6f38fe08.json
new file mode 100644
index 0000000000..1b4cea3511
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a list (end)_1_6330fcc2bc48733981e5337c6f38fe08.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"},{\"role\":\"user\",\"content\":\"add a list with the items 'Apples' and 'Bananas' after the last sentence\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-6934dde6-cb89-4879-bcf8-fdad39c9c020\",\"object\":\"chat.completion.chunk\",\"created\":1763480998,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabth4kee7mb0jvq72jdscjj\",\"seed\":1285068834}}\n\ndata: {\"id\":\"chatcmpl-6934dde6-cb89-4879-bcf8-fdad39c9c020\",\"object\":\"chat.completion.chunk\",\"created\":1763480998,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"hhb97pghn\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"blocks\\\":[\\\"\\\\u003cul\\\\u003e\\\\u003cli\\\\u003eApples\\\\u003c/li\\\\u003e\\\\u003c/ul\\\\u003e\\\",\\\"\\\\u003cul\\\\u003e\\\\u003cli\\\\u003eBananas\\\\u003c/li\\\\u003e\\\\u003c/ul\\\\u003e\\\"],\\\"position\\\":\\\"after\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"type\\\":\\\"add\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-6934dde6-cb89-4879-bcf8-fdad39c9c020\",\"object\":\"chat.completion.chunk\",\"created\":1763480998,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabth4kee7mb0jvq72jdscjj\",\"usage\":{\"queue_time\":0.042301783,\"prompt_tokens\":880,\"prompt_time\":0.043239229,\"completion_tokens\":54,\"completion_time\":0.118586264,\"total_tokens\":934,\"total_time\":0.161825493}},\"usage\":{\"queue_time\":0.042301783,\"prompt_tokens\":880,\"prompt_time\":0.043239229,\"completion_tokens\":54,\"completion_time\":0.118586264,\"total_tokens\":934,\"total_time\":0.161825493}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a list (end)_1_e8b5b0d45734575f7ba8e685f6787aca.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a list (end)_1_e8b5b0d45734575f7ba8e685f6787aca.json
deleted file mode 100644
index a27356d148..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a list (end)_1_e8b5b0d45734575f7ba8e685f6787aca.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"add a list with the items 'Apples' and 'Bananas' after the last sentence\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-84e55078-3dc6-43cf-ab85-afd649c8edbb\",\"object\":\"chat.completion.chunk\",\"created\":1758783439,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_155ab82e98\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk0f2fzxskefjmhj9fx7p\"}}\n\ndata: {\"id\":\"chatcmpl-84e55078-3dc6-43cf-ab85-afd649c8edbb\",\"object\":\"chat.completion.chunk\",\"created\":1758783439,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_155ab82e98\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"1db3bk93w\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"blocks\\\":[\\\"\\\\u003cul\\\\u003e\\\\u003cli\\\\u003eApples\\\\u003c/li\\\\u003e\\\\u003c/ul\\\\u003e\\\",\\\"\\\\u003cul\\\\u003e\\\\u003cli\\\\u003eBananas\\\\u003c/li\\\\u003e\\\\u003c/ul\\\\u003e\\\"],\\\"position\\\":\\\"after\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"type\\\":\\\"add\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-84e55078-3dc6-43cf-ab85-afd649c8edbb\",\"object\":\"chat.completion.chunk\",\"created\":1758783439,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_155ab82e98\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk0f2fzxskefjmhj9fx7p\",\"usage\":{\"queue_time\":0.08498975,\"prompt_tokens\":829,\"prompt_time\":0.067493718,\"completion_tokens\":54,\"completion_time\":0.123861036,\"total_tokens\":883,\"total_time\":0.191354754}},\"usage\":{\"queue_time\":0.08498975,\"prompt_tokens\":829,\"prompt_time\":0.067493718,\"completion_tokens\":54,\"completion_time\":0.123861036,\"total_tokens\":883,\"total_time\":0.191354754}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (empty doc)_1_1ac8c5c60083d88192ef7e84254cb786.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (empty doc)_1_1ac8c5c60083d88192ef7e84254cb786.json
deleted file mode 100644
index 788ae6fc29..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (empty doc)_1_1ac8c5c60083d88192ef7e84254cb786.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"\\\"},{\\\"cursor\\\":true}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Because the document is empty, first update the empty block before adding new blocks.\"},{\"role\":\"user\",\"content\":\"write a new paragraph with the text 'You look great today!'\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-37b04888-a742-4a48-b808-ecfca77834fa\",\"object\":\"chat.completion.chunk\",\"created\":1758783555,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_ede95a097b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztphc7f0j85995eq2zqryg\"}}\n\ndata: {\"id\":\"chatcmpl-37b04888-a742-4a48-b808-ecfca77834fa\",\"object\":\"chat.completion.chunk\",\"created\":1758783555,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_ede95a097b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"00kkp36kc\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eYou look great today!\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-37b04888-a742-4a48-b808-ecfca77834fa\",\"object\":\"chat.completion.chunk\",\"created\":1758783555,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_ede95a097b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztphc7f0j85995eq2zqryg\",\"usage\":{\"queue_time\":0.14394342,\"prompt_tokens\":798,\"prompt_time\":0.066320232,\"completion_tokens\":33,\"completion_time\":0.09610912,\"total_tokens\":831,\"total_time\":0.162429352}},\"usage\":{\"queue_time\":0.14394342,\"prompt_tokens\":798,\"prompt_time\":0.066320232,\"completion_tokens\":33,\"completion_time\":0.09610912,\"total_tokens\":831,\"total_time\":0.162429352}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (empty doc)_1_1df3fb78a5790897b37bfba0ae96be1e.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (empty doc)_1_1df3fb78a5790897b37bfba0ae96be1e.json
new file mode 100644
index 0000000000..cc963a664f
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (empty doc)_1_1df3fb78a5790897b37bfba0ae96be1e.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nBecause the document is empty, YOU MUST first update the empty block before adding new blocks.[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"\\\"},{\\\"cursor\\\":true}]\"},{\"role\":\"user\",\"content\":\"write a new paragraph with the text 'You look great today!'\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-c61a04bb-05b7-414f-a5a4-59bd16debc81\",\"object\":\"chat.completion.chunk\",\"created\":1763483085,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabwgtcde7d8fhsgymnmv5vn\",\"seed\":1850703950}}\n\ndata: {\"id\":\"chatcmpl-c61a04bb-05b7-414f-a5a4-59bd16debc81\",\"object\":\"chat.completion.chunk\",\"created\":1763483085,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"vm25qfb3s\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eYou look great today!\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-c61a04bb-05b7-414f-a5a4-59bd16debc81\",\"object\":\"chat.completion.chunk\",\"created\":1763483085,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabwgtcde7d8fhsgymnmv5vn\",\"usage\":{\"queue_time\":0.042557292,\"prompt_tokens\":850,\"prompt_time\":0.043872526,\"completion_tokens\":32,\"completion_time\":0.085216592,\"total_tokens\":882,\"total_time\":0.129089118}},\"usage\":{\"queue_time\":0.042557292,\"prompt_tokens\":850,\"prompt_time\":0.043872526,\"completion_tokens\":32,\"completion_time\":0.085216592,\"total_tokens\":882,\"total_time\":0.129089118}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (end)_1_13ac6e523b724ec3d4e4113c1f973f7d.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (end)_1_13ac6e523b724ec3d4e4113c1f973f7d.json
new file mode 100644
index 0000000000..aa5f9b2778
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (end)_1_13ac6e523b724ec3d4e4113c1f973f7d.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' after the last sentence\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-b42322ef-e528-4624-906b-5378f1b17098\",\"object\":\"chat.completion.chunk\",\"created\":1763483277,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabwpp7zekcbg4798pf9pav5\",\"seed\":2026835078}}\n\ndata: {\"id\":\"chatcmpl-b42322ef-e528-4624-906b-5378f1b17098\",\"object\":\"chat.completion.chunk\",\"created\":1763483277,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"ege2fe6zx\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"blocks\\\":[\\\"\\\\u003cp\\\\u003eYou look great today!\\\\u003c/p\\\\u003e\\\"],\\\"position\\\":\\\"after\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"type\\\":\\\"add\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-b42322ef-e528-4624-906b-5378f1b17098\",\"object\":\"chat.completion.chunk\",\"created\":1763483277,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabwpp7zekcbg4798pf9pav5\",\"usage\":{\"queue_time\":0.091881788,\"prompt_tokens\":878,\"prompt_time\":0.064035552,\"completion_tokens\":38,\"completion_time\":0.081293196,\"total_tokens\":916,\"total_time\":0.145328748}},\"usage\":{\"queue_time\":0.091881788,\"prompt_tokens\":878,\"prompt_time\":0.064035552,\"completion_tokens\":38,\"completion_time\":0.081293196,\"total_tokens\":916,\"total_time\":0.145328748}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (end)_1_a33718ee9e8c30a7679da0e2ea5443bf.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (end)_1_a33718ee9e8c30a7679da0e2ea5443bf.json
deleted file mode 100644
index 33334f104d..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (end)_1_a33718ee9e8c30a7679da0e2ea5443bf.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' after the last sentence\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-dbde950c-7299-4a7d-819a-96ff8a9014aa\",\"object\":\"chat.completion.chunk\",\"created\":1758783439,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9e1e8f8435\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk05qey1sp983bm54g0e7\"}}\n\ndata: {\"id\":\"chatcmpl-dbde950c-7299-4a7d-819a-96ff8a9014aa\",\"object\":\"chat.completion.chunk\",\"created\":1758783439,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9e1e8f8435\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"axzcy4tet\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"blocks\\\":[\\\"\\\\u003cp\\\\u003eYou look great today!\\\\u003c/p\\\\u003e\\\"],\\\"position\\\":\\\"after\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"type\\\":\\\"add\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-dbde950c-7299-4a7d-819a-96ff8a9014aa\",\"object\":\"chat.completion.chunk\",\"created\":1758783439,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9e1e8f8435\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk05qey1sp983bm54g0e7\",\"usage\":{\"queue_time\":0.088833993,\"prompt_tokens\":827,\"prompt_time\":0.068264884,\"completion_tokens\":38,\"completion_time\":0.089419435,\"total_tokens\":865,\"total_time\":0.157684319}},\"usage\":{\"queue_time\":0.088833993,\"prompt_tokens\":827,\"prompt_time\":0.068264884,\"completion_tokens\":38,\"completion_time\":0.089419435,\"total_tokens\":865,\"total_time\":0.157684319}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (start)_1_9b1a71da901951950261005a76c3444a.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (start)_1_9b1a71da901951950261005a76c3444a.json
deleted file mode 100644
index f7fbccae5a..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (start)_1_9b1a71da901951950261005a76c3444a.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' before the first sentence\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-4f3f51e3-80d0-4c7f-8586-c93f4e0e6f6c\",\"object\":\"chat.completion.chunk\",\"created\":1758783438,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_adc8919c18\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztjzrmfzxaep2pyt2sbhc3\"}}\n\ndata: {\"id\":\"chatcmpl-4f3f51e3-80d0-4c7f-8586-c93f4e0e6f6c\",\"object\":\"chat.completion.chunk\",\"created\":1758783438,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_adc8919c18\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"ekszm6xby\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"blocks\\\":[\\\"\\\\u003cp\\\\u003eYou look great today!\\\\u003c/p\\\\u003e\\\"],\\\"position\\\":\\\"before\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"type\\\":\\\"add\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-4f3f51e3-80d0-4c7f-8586-c93f4e0e6f6c\",\"object\":\"chat.completion.chunk\",\"created\":1758783438,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_adc8919c18\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztjzrmfzxaep2pyt2sbhc3\",\"usage\":{\"queue_time\":0.203541748,\"prompt_tokens\":827,\"prompt_time\":0.068058296,\"completion_tokens\":38,\"completion_time\":0.08582147,\"total_tokens\":865,\"total_time\":0.153879766}},\"usage\":{\"queue_time\":0.203541748,\"prompt_tokens\":827,\"prompt_time\":0.068058296,\"completion_tokens\":38,\"completion_time\":0.08582147,\"total_tokens\":865,\"total_time\":0.153879766}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (start)_1_c7a2f3226a4ee862c75a049c92cea98f.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (start)_1_c7a2f3226a4ee862c75a049c92cea98f.json
new file mode 100644
index 0000000000..9d972b74e0
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (start)_1_c7a2f3226a4ee862c75a049c92cea98f.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' before the first sentence\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-718a3ee0-ad94-427f-bb67-fb1c9bf23ae2\",\"object\":\"chat.completion.chunk\",\"created\":1763480997,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_dae98b5ecb\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabth3v9e229s8jy8n6f7853\",\"seed\":1320276066}}\n\ndata: {\"id\":\"chatcmpl-718a3ee0-ad94-427f-bb67-fb1c9bf23ae2\",\"object\":\"chat.completion.chunk\",\"created\":1763480997,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_dae98b5ecb\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"agqas81av\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"blocks\\\":[\\\"\\\\u003cp\\\\u003eYou look great today!\\\\u003c/p\\\\u003e\\\"],\\\"position\\\":\\\"before\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"type\\\":\\\"add\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-718a3ee0-ad94-427f-bb67-fb1c9bf23ae2\",\"object\":\"chat.completion.chunk\",\"created\":1763480997,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_dae98b5ecb\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabth3v9e229s8jy8n6f7853\",\"usage\":{\"queue_time\":0.092418647,\"prompt_tokens\":878,\"prompt_time\":0.042861614,\"completion_tokens\":38,\"completion_time\":0.094459111,\"total_tokens\":916,\"total_time\":0.137320725}},\"usage\":{\"queue_time\":0.092418647,\"prompt_tokens\":878,\"prompt_time\":0.042861614,\"completion_tokens\":38,\"completion_time\":0.094459111,\"total_tokens\":916,\"total_time\":0.137320725}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/Add heading (h1) and code block_1_1d3b032c0f42ea308a1e7a13160bec4b.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/Add heading (h1) and code block_1_1d3b032c0f42ea308a1e7a13160bec4b.json
new file mode 100644
index 0000000000..04c8a52250
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/Add heading (h1) and code block_1_1d3b032c0f42ea308a1e7a13160bec4b.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"at the end of doc, add a h1 heading `Code` and a javascript code block (block, not inline style) with `console.log('hello world');`\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0bd9ad86efa2cef600691c954fa8c0819098f8ddb39dd98c47\",\"object\":\"response\",\"created_at\":1763480911,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0bd9ad86efa2cef600691c954fa8c0819098f8ddb39dd98c47\",\"object\":\"response\",\"created_at\":1763480911,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"eYEsDHBqYVv0Az\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"fjdg9m\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"9ODKfzGL1vrPf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"Gnba1TUowaPl6W\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"CInGZCunxFh4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"GTRGTSPesOK8t\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"add\",\"logprobs\":[],\"obfuscation\":\"crE4O9VHzVuCf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"1i9EvnIZukO8a\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"reference\",\"logprobs\":[],\"obfuscation\":\"WWhK64C\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"Id\",\"logprobs\":[],\"obfuscation\":\"LfMggXYivuSGch\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"nBZwVmHr2vxfD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"1hiqx8z3YwDqa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"6h3Q3lSJSV6k7al\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"65a3VIrWC23COi6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"RVMpK4JL8rpqU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"position\",\"logprobs\":[],\"obfuscation\":\"Td61WYA0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"7GyimdrnHbNyJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"after\",\"logprobs\":[],\"obfuscation\":\"sSf9LpzHoD6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"4tKwGxHGQsfEM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"blocks\",\"logprobs\":[],\"obfuscation\":\"p2fBO9xzwp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\\\"\",\"logprobs\":[],\"obfuscation\":\"ZUyP6SOFbhul\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"i15gzdsa9e7uGjK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"h\",\"logprobs\":[],\"obfuscation\":\"syEWCCllvATdmBY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"STvYdd5R32AFamn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"BFx4tkG4nxo3kxu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"Code\",\"logprobs\":[],\"obfuscation\":\"KvcYIkjfqqPf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"iWVu4iy2QXJexP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"h\",\"logprobs\":[],\"obfuscation\":\"2gyRPxPnigg7Fyc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"piYGz1NYj2CYnuc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"2d6en4EJXrLRCxb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"1JyNFOc8cMjdN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"p2NXOEAPeIfHmU0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"pre\",\"logprobs\":[],\"obfuscation\":\"DAFdvxT5fvCUP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"><\",\"logprobs\":[],\"obfuscation\":\"7fU1Bcq0JO7myK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"code\",\"logprobs\":[],\"obfuscation\":\"Lq8FQVMhXxvU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"aw9ayCQMdQO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"-language\",\"logprobs\":[],\"obfuscation\":\"n2CasjA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"9twI0BXsYyqBB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"javascript\",\"logprobs\":[],\"obfuscation\":\"caVw1Y\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"iIQC38t5dM01o\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"console\",\"logprobs\":[],\"obfuscation\":\"Iw0OC6XMe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\".log\",\"logprobs\":[],\"obfuscation\":\"K6AAi5cFioUv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"('\",\"logprobs\":[],\"obfuscation\":\"zBOBCnfOF7KKja\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"hello\",\"logprobs\":[],\"obfuscation\":\"nNnc9OwMkOa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\" world\",\"logprobs\":[],\"obfuscation\":\"FrlVjopIFy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"');\",\"logprobs\":[],\"obfuscation\":\"sdusn40XHsmFg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"bHPwqeqGUaTpBH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":51,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"code\",\"logprobs\":[],\"obfuscation\":\"zx1SYcQDezGb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":52,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"0qs3dwJlGXP2o\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":53,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"pre\",\"logprobs\":[],\"obfuscation\":\"Y4n9XRN7pMrQM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":54,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"GTjpmxdqJzuljfc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":55,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"]\",\"logprobs\":[],\"obfuscation\":\"RyLgPRWCl5cbW5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":56,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"}\",\"logprobs\":[],\"obfuscation\":\"ZOoIrwP0xZrfLkh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":57,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"jCH8iNpbKe40aq\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":58,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"Code
\\\",\\\"console.log('hello world');
\\\"]}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":59,\"item_id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"Code
\\\",\\\"console.log('hello world');
\\\"]}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":60,\"output_index\":0,\"item\":{\"id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"Code
\\\",\\\"console.log('hello world');
\\\"]}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":61,\"response\":{\"id\":\"resp_0bd9ad86efa2cef600691c954fa8c0819098f8ddb39dd98c47\",\"object\":\"response\",\"created_at\":1763480911,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_0bd9ad86efa2cef600691c955010d08190af1c4708257af517\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"Code
\\\",\\\"console.log('hello world');
\\\"]}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":679,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":55,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":734},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/Add heading (h1) and code block_1_d64b87442b874d6c9d4a16dcc4f0df14.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/Add heading (h1) and code block_1_d64b87442b874d6c9d4a16dcc4f0df14.json
deleted file mode 100644
index 0bb7b6f8ec..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/Add heading (h1) and code block_1_d64b87442b874d6c9d4a16dcc4f0df14.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"at the end of doc, add a h1 heading `Code` and a javascript code block (block, not inline style) with `console.log('hello world');`\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7d109e48194af28a13eee7d8cd400bf99f43c7482b6\",\"object\":\"response\",\"created_at\":1758783441,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7d109e48194af28a13eee7d8cd400bf99f43c7482b6\",\"object\":\"response\",\"created_at\":1758783441,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"EIZFZg0a3nDpIY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"nMgJFW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"gd55G30Dnyk22\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"fnvmihsT8fVVPK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"96uvVCFq6bHd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"3HmPIIWn5juYd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"add\",\"logprobs\":[],\"obfuscation\":\"OPPT4vN4yi2FX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"94s5EV0AHWzD2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"reference\",\"logprobs\":[],\"obfuscation\":\"mMLamse\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"Id\",\"logprobs\":[],\"obfuscation\":\"VLFDYbXjd6t23S\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"S6bnscfefwCxv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"lQiUQ5ylSC4M7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"uSfNInPrnmUgzYT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"rOYTkLoGV5iXADC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"WHdas5WbuQcxe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"position\",\"logprobs\":[],\"obfuscation\":\"cqmDMdI1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"aLeS0WxpSbSGt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"after\",\"logprobs\":[],\"obfuscation\":\"wbxj9LTqFaK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"4E036OGgsNIHz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"blocks\",\"logprobs\":[],\"obfuscation\":\"kPjczadlef\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\\\"\",\"logprobs\":[],\"obfuscation\":\"v3T0giOy1atf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"EFgFO0Xc2gxYnAm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"h\",\"logprobs\":[],\"obfuscation\":\"teVs6A54PbYy1Wu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"OhMyTcDd8TpkJP6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"XJ7fpCDd40mgrZg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"Code\",\"logprobs\":[],\"obfuscation\":\"5yDG6PUkm785\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"VCji3zjV3JsvnS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"h\",\"logprobs\":[],\"obfuscation\":\"XnZa7RGQ2JxIGCU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"tiLVoIy4Dw2VW3Z\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"ursXZdyixVjbBBL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"ampLxmFzmAxDQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"klpFlrAC2kiCD50\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"pre\",\"logprobs\":[],\"obfuscation\":\"inBnovFIXmSnV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"><\",\"logprobs\":[],\"obfuscation\":\"2XvEQ02rtu1WTZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"code\",\"logprobs\":[],\"obfuscation\":\"Y8Vb3ttp4vU9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"vtYHkneJvgp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"-language\",\"logprobs\":[],\"obfuscation\":\"HHMfUVX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"BCPyt3UVDdEcf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"javascript\",\"logprobs\":[],\"obfuscation\":\"mc3cXs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"0dlX4DWWeGOMZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"console\",\"logprobs\":[],\"obfuscation\":\"9dvkdEgE2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\".log\",\"logprobs\":[],\"obfuscation\":\"CDbDtRHD3P95\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"('\",\"logprobs\":[],\"obfuscation\":\"MqY897u3ByUMza\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"hello\",\"logprobs\":[],\"obfuscation\":\"O35CCA2zLjw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\" world\",\"logprobs\":[],\"obfuscation\":\"UdyCgI6C2g\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"');\",\"logprobs\":[],\"obfuscation\":\"cdWrWC5AHs2Zg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"04GMlT9Yxnv4PK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":51,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"code\",\"logprobs\":[],\"obfuscation\":\"09VpwbfLlVa4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":52,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"4VosjOg1OmZkr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":53,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"pre\",\"logprobs\":[],\"obfuscation\":\"5hDeC98yUFpEH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":54,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"l5zmGM1uBqHLb1e\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":55,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"]\",\"logprobs\":[],\"obfuscation\":\"dWG20wvxbxqz8m\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":56,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"}\",\"logprobs\":[],\"obfuscation\":\"Bz82R0AhhJCA3oj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":57,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"SDnPkn9YUGX0D9\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":58,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"Code
\\\",\\\"console.log('hello world');
\\\"]}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":59,\"item_id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"Code
\\\",\\\"console.log('hello world');
\\\"]}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":60,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"Code
\\\",\\\"console.log('hello world');
\\\"]}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":61,\"response\":{\"id\":\"resp_68d4e7d109e48194af28a13eee7d8cd400bf99f43c7482b6\",\"object\":\"response\",\"created_at\":1758783441,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7d198cc8194b6e5a9a0488c185f00bf99f43c7482b6\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"Code
\\\",\\\"console.log('hello world');
\\\"]}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":632,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":55,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":687},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a list (end)_1_acd39fdc6762628fe6f6f97d96d70a78.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a list (end)_1_acd39fdc6762628fe6f6f97d96d70a78.json
deleted file mode 100644
index 6188aaf56a..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a list (end)_1_acd39fdc6762628fe6f6f97d96d70a78.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a list with the items 'Apples' and 'Bananas' after the last sentence\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7cf047c8196af4dedb3d1d0f73d0676329e74b5c2cf\",\"object\":\"response\",\"created_at\":1758783439,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7cf047c8196af4dedb3d1d0f73d0676329e74b5c2cf\",\"object\":\"response\",\"created_at\":1758783439,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"49Hr9vhJGX1Dy5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"b68X2n\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"NMZH4lcm3lUa1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"aCsnCFtXaW4sdB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"9E90fNTfPaCs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"b6SFLsGkJxcKd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"add\",\"logprobs\":[],\"obfuscation\":\"YncmfzQMZWh51\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"z3nclVHSvUSzv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"reference\",\"logprobs\":[],\"obfuscation\":\"rHGQ3Jf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"Id\",\"logprobs\":[],\"obfuscation\":\"2wEo7EkIQFM0Pa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"0lFG83t2enlb7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"CBijVxjfD2TQw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"lvO1y53tuSDejNh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"OUCp4NnUa5W5R7I\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"2Q1W3vSeQ5H1k\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"position\",\"logprobs\":[],\"obfuscation\":\"I7guEP3H\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"YGChfgsbnptDs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"after\",\"logprobs\":[],\"obfuscation\":\"yGd4RvhRRQN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"cB1r5muixu56e\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"blocks\",\"logprobs\":[],\"obfuscation\":\"t6iG6MfU6t\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\\\"\",\"logprobs\":[],\"obfuscation\":\"2rHOcQEoxyX2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"I60OWWq39jDWjOC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"ul\",\"logprobs\":[],\"obfuscation\":\"zb4YIOfZvD0sQi\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"><\",\"logprobs\":[],\"obfuscation\":\"CO4dcFUMZF1We2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"li\",\"logprobs\":[],\"obfuscation\":\"Fxw5foUMnRK1NA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"oQzyn25FuECCQmF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"Ap\",\"logprobs\":[],\"obfuscation\":\"hbfA278xfJxVXH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"ples\",\"logprobs\":[],\"obfuscation\":\"ZuqQiaPdHnY6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"ZKsePeDuQi0i1T\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"li\",\"logprobs\":[],\"obfuscation\":\"J5g9mHp9qCSrvw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"ELnzUOmpKxWDd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"ul\",\"logprobs\":[],\"obfuscation\":\"d73MlHV0Lu7Yyf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"cPZffO3PG2yF9IG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"jSCiJj7p1wdF7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"WGlqldW3CoXfSIB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"ul\",\"logprobs\":[],\"obfuscation\":\"yGdH3e243NvnWw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"><\",\"logprobs\":[],\"obfuscation\":\"SpzBQAXCUXCtfp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"li\",\"logprobs\":[],\"obfuscation\":\"8bLMcLbHVudTpn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"HYkbYiCO6X82vW7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"Ban\",\"logprobs\":[],\"obfuscation\":\"JYAjBCdSVlOpU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"anas\",\"logprobs\":[],\"obfuscation\":\"HVtp7aengpSK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"l2wp9y6LzYyyTH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"li\",\"logprobs\":[],\"obfuscation\":\"eHT6234xLA34gz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"0TobE03RZyjsF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"ul\",\"logprobs\":[],\"obfuscation\":\"EGT4MAXSxMPUWh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"2ahHSSkBiXbdeGO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"]\",\"logprobs\":[],\"obfuscation\":\"O0tMurlaPQtwr3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":51,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"}\",\"logprobs\":[],\"obfuscation\":\"9paQuHj6c6hyjnH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":52,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"vZyMQpuAK9YBs3\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":53,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"- Apples
\\\",\\\"- Bananas
\\\"]}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":54,\"item_id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"- Apples
\\\",\\\"- Bananas
\\\"]}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":55,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"- Apples
\\\",\\\"- Bananas
\\\"]}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":56,\"response\":{\"id\":\"resp_68d4e7cf047c8196af4dedb3d1d0f73d0676329e74b5c2cf\",\"object\":\"response\",\"created_at\":1758783439,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7cfb48481968218dc89e46ff0b20676329e74b5c2cf\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"- Apples
\\\",\\\"- Bananas
\\\"]}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":616,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":50,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":666},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a list (end)_1_e341e2801f875f5ac4e8a4508c274b08.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a list (end)_1_e341e2801f875f5ac4e8a4508c274b08.json
new file mode 100644
index 0000000000..e1df4d597f
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a list (end)_1_e341e2801f875f5ac4e8a4508c274b08.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a list with the items 'Apples' and 'Bananas' after the last sentence\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0f9eb4d3b3d267f100691c95f308f88197b1c21f62875f5a66\",\"object\":\"response\",\"created_at\":1763481075,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0f9eb4d3b3d267f100691c95f308f88197b1c21f62875f5a66\",\"object\":\"response\",\"created_at\":1763481075,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"VNrTL13hkEsKnP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"VvEcd3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"rtNZfS1Oecu3F\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"34N2N8XMdciKmv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"On1CKwQFFn70\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"U2OX1afSumQNg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"add\",\"logprobs\":[],\"obfuscation\":\"BiuXSCsTVBHgH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"0GevWkBWyW6yv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"reference\",\"logprobs\":[],\"obfuscation\":\"dqOP4lp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"Id\",\"logprobs\":[],\"obfuscation\":\"Nxs4VI6UCLNqY6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"YnnkjZXl2Yd0S\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"lYdvnikvYlMiq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"3Z4CxZS4OPu2qBP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"whCvTPICSa14abi\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"zEdmmW4YURgED\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"position\",\"logprobs\":[],\"obfuscation\":\"sFqCTm9E\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"YZNRo1jcjonbg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"after\",\"logprobs\":[],\"obfuscation\":\"3SvW3AOE3bD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"1L1V2EtZzR8o4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"blocks\",\"logprobs\":[],\"obfuscation\":\"5rP8A85BeP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\\\"\",\"logprobs\":[],\"obfuscation\":\"rr2FiV5P8GKg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"JISwd5lokQtKxA5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"ul\",\"logprobs\":[],\"obfuscation\":\"DucvW8tPSC345b\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"><\",\"logprobs\":[],\"obfuscation\":\"ggOb3A7RwuzNPp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"li\",\"logprobs\":[],\"obfuscation\":\"EjI9VajotMYo5N\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"1Iy68easoXdYy6o\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"Ap\",\"logprobs\":[],\"obfuscation\":\"KXTvvmqOBDnVyd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"ples\",\"logprobs\":[],\"obfuscation\":\"kmEu5HIjv5ne\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"K5AJKcfK0ISV5V\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"li\",\"logprobs\":[],\"obfuscation\":\"KKA8vw23ydIh5g\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"pI7ng6HNaPOZH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"ul\",\"logprobs\":[],\"obfuscation\":\"A3s3ReGE38Lbqa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"hfp2tAXZKhnfMhs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"YtK744zGNYbu4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"iVvcVoLjNlDINJa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"ul\",\"logprobs\":[],\"obfuscation\":\"V4x5A6H49DuouJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"><\",\"logprobs\":[],\"obfuscation\":\"FQm3o9GlA0uQr3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"li\",\"logprobs\":[],\"obfuscation\":\"1TcX0w57dLK8CJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"m9qjhC22xj67lLB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"Ban\",\"logprobs\":[],\"obfuscation\":\"HlHEP0LB6Rn36\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"anas\",\"logprobs\":[],\"obfuscation\":\"UAOjf6zYa7BB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"MEajVF1vJziTNT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"li\",\"logprobs\":[],\"obfuscation\":\"WhomCtX0DMRvP9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"rbp3dzxNc3NBy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"ul\",\"logprobs\":[],\"obfuscation\":\"uEj6Z04fbDTFV7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"CkiGuF6eGS0FBUY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"]\",\"logprobs\":[],\"obfuscation\":\"Ueg8pV2g5Pval2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":51,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"}\",\"logprobs\":[],\"obfuscation\":\"wjzVDt9WmfzedeG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":52,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"4Ez5Z2BNEEWcQy\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":53,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"- Apples
\\\",\\\"- Bananas
\\\"]}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":54,\"item_id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"- Apples
\\\",\\\"- Bananas
\\\"]}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":55,\"output_index\":0,\"item\":{\"id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"- Apples
\\\",\\\"- Bananas
\\\"]}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":56,\"response\":{\"id\":\"resp_0f9eb4d3b3d267f100691c95f308f88197b1c21f62875f5a66\",\"object\":\"response\",\"created_at\":1763481075,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_0f9eb4d3b3d267f100691c95f397188197a727ce71147eb36d\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"- Apples
\\\",\\\"- Bananas
\\\"]}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":663,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":50,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":713},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a new paragraph (empty doc)_1_3912ffdff061476f701b59e0f28a5515.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a new paragraph (empty doc)_1_3912ffdff061476f701b59e0f28a5515.json
deleted file mode 100644
index f239da856c..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a new paragraph (empty doc)_1_3912ffdff061476f701b59e0f28a5515.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"\\\"},{\\\"cursor\\\":true}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Because the document is empty, first update the empty block before adding new blocks.\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"write a new paragraph with the text 'You look great today!'\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7d305508190889ec835751773250bfa6fe27e617b3b\",\"object\":\"response\",\"created_at\":1758783443,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7d305508190889ec835751773250bfa6fe27e617b3b\",\"object\":\"response\",\"created_at\":1758783443,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"5qyCQmD6LNyZHm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"NR1aao\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"M9Y7D6Ua0rVhY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"XOPac27XcmbMSu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"Ot1WWp2AuD6H\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"FHf9hQg56yxGk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"wSJ9sINvev\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"6NBZdV5wtowRb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"a8KDwdhU8Vib32\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"WmFmNFSmFnirt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"bbKsKliXLhu0e\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"maOUKCZDbLSmTz6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"NKjNtohkVJA71oh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"rFCt2O7itzG3N\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"C6TTEeKrdWE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"nSxsUudX8bLIm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"AtSsst0UjUjPONf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"gFxud1fmg1zDRBw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\">You\",\"logprobs\":[],\"obfuscation\":\"cECUfT1Ma84Y\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\" look\",\"logprobs\":[],\"obfuscation\":\"QRcP28jhm9M\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\" great\",\"logprobs\":[],\"obfuscation\":\"KWMe6POTaf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\" today\",\"logprobs\":[],\"obfuscation\":\"9sz17rUHq3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"tpTSUZeqLTEGp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"oDC4r4uRS61urbj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"qP41TrMjf8QsaQT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"7pHXS00r44KxtM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"x7oW3wrJh3cFeK\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"You look great today!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":32,\"item_id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"You look great today!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":33,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"You look great today!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":34,\"response\":{\"id\":\"resp_68d4e7d305508190889ec835751773250bfa6fe27e617b3b\",\"object\":\"response\",\"created_at\":1758783443,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7d38fdc8190ba96d9f6858a67fa0bfa6fe27e617b3b\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"You look great today!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":586,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":28,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":614},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a new paragraph (empty doc)_1_42ec272374b0f12670f81c091e9ceaca.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a new paragraph (empty doc)_1_42ec272374b0f12670f81c091e9ceaca.json
new file mode 100644
index 0000000000..ceae4e4520
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a new paragraph (empty doc)_1_42ec272374b0f12670f81c091e9ceaca.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nBecause the document is empty, YOU MUST first update the empty block before adding new blocks.\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"\\\"},{\\\"cursor\\\":true}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"write a new paragraph with the text 'You look great today!'\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_034f4aa16653bd8400691c9e35bf348197bb01dc5629a448ae\",\"object\":\"response\",\"created_at\":1763483189,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_034f4aa16653bd8400691c9e35bf348197bb01dc5629a448ae\",\"object\":\"response\",\"created_at\":1763483189,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"PEDx7zEqomvAwt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"k4UeCp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"yy33C4KMeQgfh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"QGdph0yZ7gmaMO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"EhGfaBtyNrKA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"dkQNTdHvvVKLP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"32mn9RJPyC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"bGrirviM0B9on\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"0SFKBoLF4zg3LB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"OUGqw2ytkYxTW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"Y7rFmaFn4t6kx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"iPrvkgqQDszujUI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"a6oGOYdVHhcw0j4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"GYyQMCOBskVm8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"gBFB1GF5qJH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"1GvrRn3lItBqk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"R2KsTTx8vS5uQQY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"eQYTJuiDMCiHyJc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\">You\",\"logprobs\":[],\"obfuscation\":\"J45ioKFLgfrY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\" look\",\"logprobs\":[],\"obfuscation\":\"pyjtZFCoVj4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\" great\",\"logprobs\":[],\"obfuscation\":\"RCOGB7nYZY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\" today\",\"logprobs\":[],\"obfuscation\":\"oretYPsm1f\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"IT3sDCvQDo8lq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"2MK1yv2S1lo1O7F\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"k5fMxyy8nHdJ1vs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"HqQri9fzS16VCo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"IFKZgXcE5fa1Bh\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":31,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"You look great today!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":32,\"item_id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"You look great today!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":33,\"output_index\":0,\"item\":{\"id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"You look great today!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":34,\"response\":{\"id\":\"resp_034f4aa16653bd8400691c9e35bf348197bb01dc5629a448ae\",\"object\":\"response\",\"created_at\":1763483189,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_034f4aa16653bd8400691c9e3626bc8197885ae4b0e7fa8d49\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"You look great today!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":635,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":28,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":663},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a new paragraph (end)_1_86ff29befb09692b6ca78454082eb4a9.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a new paragraph (end)_1_86ff29befb09692b6ca78454082eb4a9.json
new file mode 100644
index 0000000000..f2cc5cd177
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a new paragraph (end)_1_86ff29befb09692b6ca78454082eb4a9.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a new paragraph with the text 'You look great today!' after the last sentence\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0b9e05862bbadb1c00691c954e106481909c4c1b201bd36398\",\"object\":\"response\",\"created_at\":1763480910,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0b9e05862bbadb1c00691c954e106481909c4c1b201bd36398\",\"object\":\"response\",\"created_at\":1763480910,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"XJ67ItScSldpRI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"dorvuR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"3TVQLFmNKMUZF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"aKnW1TOcmZHV3x\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"mm9YdVaZHqGm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"jBYRGGYRvZVT9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"add\",\"logprobs\":[],\"obfuscation\":\"OAEVmpluU9AN0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"OHfRDstxTNUS4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"reference\",\"logprobs\":[],\"obfuscation\":\"bubvv1U\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"Id\",\"logprobs\":[],\"obfuscation\":\"SeGiX2Xi2VIuNi\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"K3YuEpL08twIp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"BZ9IpdIBb73Pt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"Vqr21MWS4Lpu1Ht\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"WlstAm6cFxG1Cpg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"vV8fGpxbmXZ92\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"position\",\"logprobs\":[],\"obfuscation\":\"mzNWHqiW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"3EAMBu1cAHFQU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"after\",\"logprobs\":[],\"obfuscation\":\"qKVyxOZmqBY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"UurBsmdthbEbz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"blocks\",\"logprobs\":[],\"obfuscation\":\"TKtNKrNHGp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\\\"\",\"logprobs\":[],\"obfuscation\":\"0aqlPHo1mJpn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"LLiKGnK4S9OQi5d\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"V8taUajlU7E0PxR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\">You\",\"logprobs\":[],\"obfuscation\":\"1F8cM5F6vXDf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\" look\",\"logprobs\":[],\"obfuscation\":\"ryC5aI7KAaL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\" great\",\"logprobs\":[],\"obfuscation\":\"fp3pVJsLWy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\" today\",\"logprobs\":[],\"obfuscation\":\"WbCKCcvzWj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"vP4rvNq9poVPR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"NjL6u7ZqodFfXGp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"ka4j3uP0S4gWJmV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"]\",\"logprobs\":[],\"obfuscation\":\"XhA7I4REz2CriJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"}\",\"logprobs\":[],\"obfuscation\":\"BznYH1ppuGfWsy3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"zkYfW6iZt3cxGR\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":37,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":38,\"item_id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":39,\"output_index\":0,\"item\":{\"id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":40,\"response\":{\"id\":\"resp_0b9e05862bbadb1c00691c954e106481909c4c1b201bd36398\",\"object\":\"response\",\"created_at\":1763480910,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_0b9e05862bbadb1c00691c954e9ba881908187f886b1a64c79\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":661,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":34,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":695},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a new paragraph (end)_1_f047b5323417dfe603d6f28a0f063aa2.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a new paragraph (end)_1_f047b5323417dfe603d6f28a0f063aa2.json
deleted file mode 100644
index c4e0cac99d..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a new paragraph (end)_1_f047b5323417dfe603d6f28a0f063aa2.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a new paragraph with the text 'You look great today!' after the last sentence\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e826f48481938871a249762291aa06b9ff8f151acc02\",\"object\":\"response\",\"created_at\":1758783527,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e826f48481938871a249762291aa06b9ff8f151acc02\",\"object\":\"response\",\"created_at\":1758783527,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"c6drK3edF3hOiH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"nr9H28\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"axs82pA58ODl3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"OAyPRFsI7lAgZf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"AUMxeVG7eAag\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"HMIlk5yuu5CuR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"add\",\"logprobs\":[],\"obfuscation\":\"MB8KflhA0OS79\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"7QcGWtw8KMMHF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"reference\",\"logprobs\":[],\"obfuscation\":\"FKlASbV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"Id\",\"logprobs\":[],\"obfuscation\":\"LSCLStVQ6C6U5z\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"QGkBa43HDwrtb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"FbfflwoKoXxqy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"5WGEqTizNZ42yTo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"EMNoRwe2Erojhuq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"8LmB408S9goTy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"position\",\"logprobs\":[],\"obfuscation\":\"PMkngih0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"9hSQSnPunEumt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"after\",\"logprobs\":[],\"obfuscation\":\"OC1gJ4NfxJk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"WEX6GtONSYNPo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"blocks\",\"logprobs\":[],\"obfuscation\":\"9KVTu3tqFP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\\\"\",\"logprobs\":[],\"obfuscation\":\"HdhQFRSMrKo8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"6mIEMZ48qRNFdAS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"pgCNBgMMgTqiPkG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\">You\",\"logprobs\":[],\"obfuscation\":\"xVMQ7LCUonoB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\" look\",\"logprobs\":[],\"obfuscation\":\"MOqzDszHs33\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\" great\",\"logprobs\":[],\"obfuscation\":\"hX3MypEI1p\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\" today\",\"logprobs\":[],\"obfuscation\":\"nOqxGlNcNP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"9YF4kCFnGeoYs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"2GnEbhlyv9QjMR3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"YTIac3ov28dZZZU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"]\",\"logprobs\":[],\"obfuscation\":\"llotqBPQcj9zks\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"}\",\"logprobs\":[],\"obfuscation\":\"BJ6V5DYmjiaNseS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"1HoOd232cTlVQ9\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":37,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":38,\"item_id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":39,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":40,\"response\":{\"id\":\"resp_68d4e826f48481938871a249762291aa06b9ff8f151acc02\",\"object\":\"response\",\"created_at\":1758783527,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e827e37c8193abb0897625825e2406b9ff8f151acc02\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":614,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":34,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":648},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a new paragraph (start)_1_3fd9b56671a58b30eff463b30963b76b.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a new paragraph (start)_1_3fd9b56671a58b30eff463b30963b76b.json
new file mode 100644
index 0000000000..52551b7a70
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a new paragraph (start)_1_3fd9b56671a58b30eff463b30963b76b.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a new paragraph with the text 'You look great today!' before the first sentence\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0d20f4365740671100691c954cd8a08194825fc1cc5285e523\",\"object\":\"response\",\"created_at\":1763480908,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0d20f4365740671100691c954cd8a08194825fc1cc5285e523\",\"object\":\"response\",\"created_at\":1763480908,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"lQqY2qBY35pzOu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"prL4fO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"t6zbVqTTHtw0X\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"WHqtOdIOwnMWZn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"EVQ8B4JzJbyP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"1ADVsQd3xD7bM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"add\",\"logprobs\":[],\"obfuscation\":\"xE7AxFKoWRa61\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"JNF2BQGB6KJAO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"reference\",\"logprobs\":[],\"obfuscation\":\"elFgumT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"Id\",\"logprobs\":[],\"obfuscation\":\"3nd9vs03fCOYKL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"qZdqZ5tUsFgDm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"rcM1f9asWBK8j\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"MRLTkY3nOfmlili\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"ZsebJRu9wjQ1cq9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"h0ekNiOLGYMvm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"position\",\"logprobs\":[],\"obfuscation\":\"VQ4CKGA5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"5AhNp6eiKYRkx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"before\",\"logprobs\":[],\"obfuscation\":\"5YN3tQbDv5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"pQr97zq97QfA6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"blocks\",\"logprobs\":[],\"obfuscation\":\"mXTvxqCEOJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\\\"\",\"logprobs\":[],\"obfuscation\":\"8lqALZCIgjm1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"NbfqiWTa6sw9AFv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"YzdqWCIGR50gPX0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\">You\",\"logprobs\":[],\"obfuscation\":\"a9TCLnUml7yu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\" look\",\"logprobs\":[],\"obfuscation\":\"6e5QKgXWKmF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\" great\",\"logprobs\":[],\"obfuscation\":\"xStPtRjW9v\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\" today\",\"logprobs\":[],\"obfuscation\":\"QL2kT3eane\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"X80VRD00cahch\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"O3yEE0R1LC7Pvfk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"u6lDgz4CLytvvnE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"]\",\"logprobs\":[],\"obfuscation\":\"pglo4bg7jG95JU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"}\",\"logprobs\":[],\"obfuscation\":\"i1PCoRBPCiLOwXM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"0zoZVYDwrP9Mzd\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":37,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":38,\"item_id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":39,\"output_index\":0,\"item\":{\"id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":40,\"response\":{\"id\":\"resp_0d20f4365740671100691c954cd8a08194825fc1cc5285e523\",\"object\":\"response\",\"created_at\":1763480908,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_0d20f4365740671100691c954d46dc8194ab2ffaa9a5bd4306\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":661,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":34,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":695},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a new paragraph (start)_1_6e56df97b3441430062e0b5d979d53c9.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a new paragraph (start)_1_6e56df97b3441430062e0b5d979d53c9.json
deleted file mode 100644
index c2ea5cb085..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add a new paragraph (start)_1_6e56df97b3441430062e0b5d979d53c9.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a new paragraph with the text 'You look great today!' before the first sentence\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7cd2d6c819484eaa8624ed4e97f08c082ad346c9447\",\"object\":\"response\",\"created_at\":1758783437,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7cd2d6c819484eaa8624ed4e97f08c082ad346c9447\",\"object\":\"response\",\"created_at\":1758783437,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"sYVU3kqFBLigbU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"RHY7Ug\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"wJpgGLiQDAbsF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"Lei02McACSj5YB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"N4d5ZxWji43A\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"CH9u5sX9BXVrV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"add\",\"logprobs\":[],\"obfuscation\":\"DBIz3ehZMUlIg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"DJ3dcbsHySSGf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"reference\",\"logprobs\":[],\"obfuscation\":\"ubmn1s0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"Id\",\"logprobs\":[],\"obfuscation\":\"0YOO5Tgt6voRcy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"3XjKokYkQKrqz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"sxkYsHcjW0YZW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"dL4gWeHV9YRBPLc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"ldvzuNJ0P2X39IJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"X3bsVYu7V9Fhd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"position\",\"logprobs\":[],\"obfuscation\":\"7yiMy5DP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"S5rkcBN00wAwc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"before\",\"logprobs\":[],\"obfuscation\":\"e6wPpSFSNV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"BGhXcigrTrSgn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"blocks\",\"logprobs\":[],\"obfuscation\":\"XkXR0YmsaJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\\\"\",\"logprobs\":[],\"obfuscation\":\"0vQe561mXeij\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"L51yPAKAP8zk9ib\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"LK2mSQPYuLDXDFT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\">You\",\"logprobs\":[],\"obfuscation\":\"zvZfG1pnXAfC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\" look\",\"logprobs\":[],\"obfuscation\":\"A82eQJC4A1P\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\" great\",\"logprobs\":[],\"obfuscation\":\"YnciPEhSjN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\" today\",\"logprobs\":[],\"obfuscation\":\"KD85Dmo48p\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"5mWeVPZGhsYpt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"uzoJbtwcjfTDfc0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"amD0PUQUUhN8MGR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"]\",\"logprobs\":[],\"obfuscation\":\"sBYLXtlnfNzb6S\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"}\",\"logprobs\":[],\"obfuscation\":\"VY11jV7RzgMGMnW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"RHLq7rCCubKMmp\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":37,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":38,\"item_id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":39,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":40,\"response\":{\"id\":\"resp_68d4e7cd2d6c819484eaa8624ed4e97f08c082ad346c9447\",\"object\":\"response\",\"created_at\":1758783437,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7cdbe208194b0095d7c0a327a2b08c082ad346c9447\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":614,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":34,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":648},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/Add heading (h1) and code block_1_787274f40054195631a7e1b7f70b88f0.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/Add heading (h1) and code block_1_787274f40054195631a7e1b7f70b88f0.json
deleted file mode 100644
index fca945662f..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/Add heading (h1) and code block_1_787274f40054195631a7e1b7f70b88f0.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"at the end of doc, add a h1 heading `Code` and a javascript code block (block, not inline style) with `console.log('hello world');`\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7af7dac8190a74530a69cb68f170289e878de34b6ac\",\"object\":\"response\",\"created_at\":1758783407,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7af7dac8190a74530a69cb68f170289e878de34b6ac\",\"object\":\"response\",\"created_at\":1758783407,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_X4U9TjMOwTocVPpy8TRfvDbt\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"BAcgfErFARrtvr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"suwgrP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"K2zLW61V9kMP3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"fLxBgL7pwvIxUd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"EyW0cLutUe2x\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"V9jiDLCjepBCn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"add\",\"obfuscation\":\"a314LOqjMT8T3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"IFqOLUEOsS54F\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"reference\",\"obfuscation\":\"9kN7iEs\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"Id\",\"obfuscation\":\"hqfWtccw649iTU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"FF4eQgsQ53tsF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"Sh0DsL9xL2vCY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"FqOv35LiETlMphd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"YzUM3lltyLFZVFD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"g50GMiv8QgCG5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"position\",\"obfuscation\":\"71JOwO7n\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"CAtmGuGT9iAHo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"after\",\"obfuscation\":\"zJD0RiBYOeJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"jftvM3Zkkpe0K\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"blocks\",\"obfuscation\":\"2arbWxqgA5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"\\\":[\\\"\",\"obfuscation\":\"pk2E44FV3ESX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"lAJYydCKTbiLoeg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"h\",\"obfuscation\":\"zh8QPiRWKnc5KGC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"AWZ0wiSJ909duR7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"Ps0NYlKHcddesjq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"Code\",\"obfuscation\":\"zYsDc4upWkco\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"tX4m6xSMceYuxn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"h\",\"obfuscation\":\"CTDdMx0MDt2quZ0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"ypETQFxvV0FSlsu\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"6q50GJidTVfzngB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"wRmoXj47QTgeo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"bAzhiq24rddW8UR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"pre\",\"obfuscation\":\"TriErLydJdb5o\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"><\",\"obfuscation\":\"z0ZK2hST24uhMa\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"code\",\"obfuscation\":\"jsWIWrUpvGUu\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"lXoQhx6SXpS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"-language\",\"obfuscation\":\"rmJCbXb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"uxfedY9NdAmhy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"javascript\",\"obfuscation\":\"wpVwuK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"3RlGrRxGbby2B\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"console\",\"obfuscation\":\"EpCTwCYS7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\".log\",\"obfuscation\":\"mu2hCMxvltSn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"('\",\"obfuscation\":\"Kefy1kKVsP0jAf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"hello\",\"obfuscation\":\"KgJcXjXOWbn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\" world\",\"obfuscation\":\"RvhFTBLTDS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"');\",\"obfuscation\":\"tNx5rOzkleGTZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"4yzFYpwS14eu0S\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":50,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"code\",\"obfuscation\":\"4qJe69lBXiav\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":51,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"iBxBQoRTs20oR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":52,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"pre\",\"obfuscation\":\"9HFHrYyowZ4ZK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":53,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"i3YvgHoXfn0zCz2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":54,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"\\\"]\",\"obfuscation\":\"S6tAdeztXGzXDa\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":55,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"}\",\"obfuscation\":\"2Xa05dKDS6ebCLQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":56,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"FbVmo0LZBIActO\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":57,\"item_id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"Code
\\\",\\\"console.log('hello world');
\\\"]}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":58,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"Code
\\\",\\\"console.log('hello world');
\\\"]}]}\",\"call_id\":\"call_X4U9TjMOwTocVPpy8TRfvDbt\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":59,\"response\":{\"id\":\"resp_68d4e7af7dac8190a74530a69cb68f170289e878de34b6ac\",\"object\":\"response\",\"created_at\":1758783407,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e7b0176c8190b1b0d330bb2c1b620289e878de34b6ac\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"Code
\\\",\\\"console.log('hello world');
\\\"]}]}\",\"call_id\":\"call_X4U9TjMOwTocVPpy8TRfvDbt\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":569,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":55,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":624},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/Add heading (h1) and code block_1_a7541d4dff5630b127b0284a513d8cb6.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/Add heading (h1) and code block_1_a7541d4dff5630b127b0284a513d8cb6.json
new file mode 100644
index 0000000000..593088f180
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/Add heading (h1) and code block_1_a7541d4dff5630b127b0284a513d8cb6.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"at the end of doc, add a h1 heading `Code` and a javascript code block (block, not inline style) with `console.log('hello world');`\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_000921a19586a16000691c960617cc8197bcc3086b5d2896a7\",\"object\":\"response\",\"created_at\":1763481094,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_000921a19586a16000691c960617cc8197bcc3086b5d2896a7\",\"object\":\"response\",\"created_at\":1763481094,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_g30g2KwS7O22FhCVKHaBJjdB\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"k3uNywNq70Z3A8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"OPyK8x\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"SNFyA1wDIH8J8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"TB6Ux5njzvFocR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"z3vscyh5SzYT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"6h10twgK0ObdO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"add\",\"obfuscation\":\"qmyIQfAAvBKkT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"H6yPvtjY0rt9k\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"reference\",\"obfuscation\":\"r7L1PZU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"Id\",\"obfuscation\":\"XMMIUMxJADfXBL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"qyf2umUkYGOLF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"irtGRKdGe5474\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"SNZvOSAj3plTRwp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"49TvweigtfIvN9d\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"x83JQ9WvTNFD8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"position\",\"obfuscation\":\"FyysXYFj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"f0VWbAXgt7HFh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"after\",\"obfuscation\":\"jBboo1tRlr4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"Vt0yuGlyhBhBp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"blocks\",\"obfuscation\":\"pdLC1DCpWb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"\\\":[\\\"\",\"obfuscation\":\"zgsaDuTaHY5t\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"FcLVoiEBTOX5r0i\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"h\",\"obfuscation\":\"cUJz0QoLdDAzkxn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"mC5IplQsQSLzA3O\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"5uH8spIaFd9Z4tr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"Code\",\"obfuscation\":\"ICMfWC7HBqKK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"fhoUkHmKnhZt9U\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"h\",\"obfuscation\":\"vwCEJn6R3S2iyxd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"UhHWRofSfP62eQj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"SftNSppS365Ide3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"ijmxRguVVD6s8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"Oaka3ESvQDqMHtA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"pre\",\"obfuscation\":\"qpk5ihjOrRuAB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"><\",\"obfuscation\":\"T2SEu5fHfSYdBy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"code\",\"obfuscation\":\"5k7Jy1sKmYJ6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"faAfd3dX0nA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"-language\",\"obfuscation\":\"gRQXWR2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"AeC4I0m5GAQrC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"javascript\",\"obfuscation\":\"OGeDA4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"RCqvfv4LJz2E0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"console\",\"obfuscation\":\"AjaiL8MHC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\".log\",\"obfuscation\":\"UdKff5mxAVrC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"('\",\"obfuscation\":\"KBYwFTKC8hNMIT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"hello\",\"obfuscation\":\"QxMgSFhCP2J\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\" world\",\"obfuscation\":\"fZIDGmhKDH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"');\",\"obfuscation\":\"8aoXdDvPBEcM8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"EtFeMZZg0la8lG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":50,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"code\",\"obfuscation\":\"acWX66v6Ri0f\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":51,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"XB8DNou9RdUvi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":52,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"pre\",\"obfuscation\":\"jcgCubmGVfN4E\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":53,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"jkJZcSRne47061m\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":54,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"\\\"]\",\"obfuscation\":\"7ccw38KCdm8e4D\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":55,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"}\",\"obfuscation\":\"4bxabEpQ3jTN0x1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":56,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"SbKmh2yIcEj2ND\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":57,\"item_id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"Code
\\\",\\\"console.log('hello world');
\\\"]}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":58,\"output_index\":0,\"item\":{\"id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"Code
\\\",\\\"console.log('hello world');
\\\"]}]}\",\"call_id\":\"call_g30g2KwS7O22FhCVKHaBJjdB\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":59,\"response\":{\"id\":\"resp_000921a19586a16000691c960617cc8197bcc3086b5d2896a7\",\"object\":\"response\",\"created_at\":1763481094,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_000921a19586a16000691c9606b0e48197a0b6ea90187282f2\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"Code
\\\",\\\"console.log('hello world');
\\\"]}]}\",\"call_id\":\"call_g30g2KwS7O22FhCVKHaBJjdB\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":616,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":55,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":671},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a list (end)_1_5fa40270f0d516da79eb1a7f58c7f43f.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a list (end)_1_5fa40270f0d516da79eb1a7f58c7f43f.json
new file mode 100644
index 0000000000..9735a71bb8
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a list (end)_1_5fa40270f0d516da79eb1a7f58c7f43f.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a list with the items 'Apples' and 'Bananas' after the last sentence\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0ec63f11c4f84e6e00691c9576b6e08195af7f7d1b5c6be95e\",\"object\":\"response\",\"created_at\":1763480950,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0ec63f11c4f84e6e00691c9576b6e08195af7f7d1b5c6be95e\",\"object\":\"response\",\"created_at\":1763480950,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_KvXFLw33Gl3FouvJPcPoeEGC\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"Y2OoEwSOIQP56p\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"LlwBbl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"Yet1iIFHprZYv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"GSwz5gq9YUxVMz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"m7AqL3HLGyKL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"OpHmZmsgJ5oII\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"add\",\"obfuscation\":\"M53VWOsHVhTsb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"K6KEMcYZ1dNSx\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"reference\",\"obfuscation\":\"fGYV4qz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"Id\",\"obfuscation\":\"Z8JCeuICQpYZau\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"uhAVEWZWLK8Ch\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"3Ql0dA2X4Mlq2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"cpFnHWpya7Qzhe9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"PzotDkjhb5pA4zH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"HvfHNNPHDzw8k\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"position\",\"obfuscation\":\"HM3716Vi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"qhqqWQ2JkuSM1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"after\",\"obfuscation\":\"Rv7LgRN4kIL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"svIaagjVjvss8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"blocks\",\"obfuscation\":\"u7DLgBpoDW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"\\\":[\\\"\",\"obfuscation\":\"FgDMIsgbQVbW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"uvJEfoWtB3OUNjc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"ul\",\"obfuscation\":\"97liLwxLmZODWf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"><\",\"obfuscation\":\"OX81VmMRQK65LL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"li\",\"obfuscation\":\"dEtn5fwVUaGsak\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"aiRCnzWJRNTl0Pn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"Ap\",\"obfuscation\":\"f6Vz5H5aFpoVHD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"ples\",\"obfuscation\":\"LHlN4UVQ6Dpo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"QNetxXwY2PyT0m\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"li\",\"obfuscation\":\"eGfgKQzLelylBw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"FfLtHrF0ia7oJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"ul\",\"obfuscation\":\"GcB6KHXxmWH9ru\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"F8a6HHowYc3AV4t\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"eGvAy9ULUPKLv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"38TAc72ciflEh3q\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"ul\",\"obfuscation\":\"OkKgP478FpYKVa\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"><\",\"obfuscation\":\"Mv6h9njEioMxRx\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"li\",\"obfuscation\":\"Z7K2xNiwuwotUh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"YpqgoBAR8VKEBEf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"Ban\",\"obfuscation\":\"ZoYGpwoOZ9Hjk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"anas\",\"obfuscation\":\"ULuIGFZOEMqm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"lqVmQIi27YSEWX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"li\",\"obfuscation\":\"OSV3BhagPetnZ9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"kIUbY2GhzZhoU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"ul\",\"obfuscation\":\"o5TtOOVQdyeB6a\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"YbkJyynGrfU9g3A\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"\\\"]\",\"obfuscation\":\"vuk9XZrv3hM9fH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":50,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"}\",\"obfuscation\":\"f9wYMECscvEEO01\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":51,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"jFhXB6iza212cx\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":52,\"item_id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"- Apples
\\\",\\\"- Bananas
\\\"]}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":53,\"output_index\":0,\"item\":{\"id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"- Apples
\\\",\\\"- Bananas
\\\"]}]}\",\"call_id\":\"call_KvXFLw33Gl3FouvJPcPoeEGC\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":54,\"response\":{\"id\":\"resp_0ec63f11c4f84e6e00691c9576b6e08195af7f7d1b5c6be95e\",\"object\":\"response\",\"created_at\":1763480950,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_0ec63f11c4f84e6e00691c957747d88195816f667a466d5243\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"- Apples
\\\",\\\"- Bananas
\\\"]}]}\",\"call_id\":\"call_KvXFLw33Gl3FouvJPcPoeEGC\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":600,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":50,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":650},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a list (end)_1_ac04492f6c52be72c3dc24214a0cf744.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a list (end)_1_ac04492f6c52be72c3dc24214a0cf744.json
deleted file mode 100644
index d73b1c06c3..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a list (end)_1_ac04492f6c52be72c3dc24214a0cf744.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a list with the items 'Apples' and 'Bananas' after the last sentence\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7ae47f88194b73d9c04ce0b84320b8012f9bd63ebbd\",\"object\":\"response\",\"created_at\":1758783406,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7ae47f88194b73d9c04ce0b84320b8012f9bd63ebbd\",\"object\":\"response\",\"created_at\":1758783406,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_uxYgx7L7SEANkbb6LpJJ52Bs\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"7OKWXuOXdiGGQr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"3d4lTy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"oeZoC00Cha74l\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"EXfWMS7WVyrMTU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"lVTktT1Ns9pU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"rFlpOGKevcWNT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"add\",\"obfuscation\":\"h5wB6FEiPBdjj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"Y013wewmFaCmK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"reference\",\"obfuscation\":\"RK7dvbo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"Id\",\"obfuscation\":\"8j1SvAVRjTcbkP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"Eb4E68fGQqTpe\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"Mqj7uPJWtFpST\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"9dCAj6VhDBTmmh3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"ub8oCHgOrYJaiRU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"OUOF7gyzvZi5B\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"position\",\"obfuscation\":\"O1qo4Z6N\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"0VD5W9DUs9gsk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"after\",\"obfuscation\":\"O6h77ijAFrH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"Kh1fiwYsjpUGy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"blocks\",\"obfuscation\":\"bW01b2SA1a\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"\\\":[\\\"\",\"obfuscation\":\"QcrRylNKGrNB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"xJhBlL6Ts1hHoU1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"ul\",\"obfuscation\":\"qJMccEoyl4S3Ay\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"><\",\"obfuscation\":\"6BbWZAdEAE41dT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"li\",\"obfuscation\":\"SoT6UE5N0EKpk1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"lediz9blFi5m09b\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"Ap\",\"obfuscation\":\"XllQVbXQ1HVQ7p\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"ples\",\"obfuscation\":\"crAxKnp7eqAv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"kSmuv2yq0HfPfn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"li\",\"obfuscation\":\"ySq0UTMz7fOd2k\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"pQsl69I26EAQl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"ul\",\"obfuscation\":\"3DPDPXxdFlfpKu\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"l4INlFLc7GfDSGX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"B7GAYIlzhm0Lm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"gCtFagl7bqQCDU5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"ul\",\"obfuscation\":\"zs3yTTmSwiolNE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"><\",\"obfuscation\":\"rUuLjZWJUQFgTV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"li\",\"obfuscation\":\"HVx9TgtkXG1xxS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"klocOspElIlUCJF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"Ban\",\"obfuscation\":\"QoL73SgTFECLT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"anas\",\"obfuscation\":\"Ur8U7j7dbiLd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"mRbkvnYyYIBQGB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"li\",\"obfuscation\":\"g7MTJUH29hq8OX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"voc4yTUMMLz2n\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"ul\",\"obfuscation\":\"JKj9UPKHnwSwKB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"654MCflS7ZcISxr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"\\\"]\",\"obfuscation\":\"IL8PIF77pM90U9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":50,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"}\",\"obfuscation\":\"kaI84kzcRJJSNH0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":51,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"PYAtOBfCamIYk6\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":52,\"item_id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"- Apples
\\\",\\\"- Bananas
\\\"]}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":53,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"- Apples
\\\",\\\"- Bananas
\\\"]}]}\",\"call_id\":\"call_uxYgx7L7SEANkbb6LpJJ52Bs\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":54,\"response\":{\"id\":\"resp_68d4e7ae47f88194b73d9c04ce0b84320b8012f9bd63ebbd\",\"object\":\"response\",\"created_at\":1758783406,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e7aec0248194a8344f69ffa6cd890b8012f9bd63ebbd\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"- Apples
\\\",\\\"- Bananas
\\\"]}]}\",\"call_id\":\"call_uxYgx7L7SEANkbb6LpJJ52Bs\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":553,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":50,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":603},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a new paragraph (empty doc)_1_42ba165a69a6e53683cb40d6018445bf.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a new paragraph (empty doc)_1_42ba165a69a6e53683cb40d6018445bf.json
new file mode 100644
index 0000000000..1323918a1b
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a new paragraph (empty doc)_1_42ba165a69a6e53683cb40d6018445bf.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nBecause the document is empty, YOU MUST first update the empty block before adding new blocks.\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"\\\"},{\\\"cursor\\\":true}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"write a new paragraph with the text 'You look great today!'\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0b010d5a88683df300691c9dc4ff6c819796f645e368a3472c\",\"object\":\"response\",\"created_at\":1763483077,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0b010d5a88683df300691c9dc4ff6c819796f645e368a3472c\",\"object\":\"response\",\"created_at\":1763483077,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_CIA74ai0iO3bBhlf05bFeCCd\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"Flr57usgKw34BX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"JybfC7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"AcUicrESd5yzs\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"D5bVVgZKB6Wb1t\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"dzRKEsHvfGKI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"JOX6XFIwPw12T\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"Z6nnjrHG8N\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"OIXtIywgVZNJP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"cr3VLvuRST70nD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"IvcXMyn49aqVW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"GQjk2LtVgsx8e\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"bpufrifKBU3Lg5c\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"BjOpk39F6pdtpH7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"a3JJcGfTVbF68\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"ZUqImreBmZ2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"ZmbtExW2OmZuQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"9lxnG1kL1NBMRvn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"8ye225eag9KTxUr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\">You\",\"obfuscation\":\"FJN2emqVTtq4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\" look\",\"obfuscation\":\"EYTxi97VXTD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\" great\",\"obfuscation\":\"LdNrAJJW19\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\" today\",\"obfuscation\":\"72cplHTS1I\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"r8BC2LzCb1DMb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"rAH3ieuK7frORDK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"EdLqpF2dOs7vp3f\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"PPzeUr4OX42D6l\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"4hPPtlGmMSSazI\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":30,\"item_id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"You look great today!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":31,\"output_index\":0,\"item\":{\"id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"You look great today!
\\\"}]}\",\"call_id\":\"call_CIA74ai0iO3bBhlf05bFeCCd\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":32,\"response\":{\"id\":\"resp_0b010d5a88683df300691c9dc4ff6c819796f645e368a3472c\",\"object\":\"response\",\"created_at\":1763483077,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_0b010d5a88683df300691c9dc56c3c8197ab208f34ebd822ae\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"You look great today!
\\\"}]}\",\"call_id\":\"call_CIA74ai0iO3bBhlf05bFeCCd\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":572,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":28,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":600},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a new paragraph (empty doc)_1_5b51dd620d4b53f36159ec97780b2929.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a new paragraph (empty doc)_1_5b51dd620d4b53f36159ec97780b2929.json
deleted file mode 100644
index af7b6242f5..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a new paragraph (empty doc)_1_5b51dd620d4b53f36159ec97780b2929.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"\\\"},{\\\"cursor\\\":true}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Because the document is empty, first update the empty block before adding new blocks.\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"write a new paragraph with the text 'You look great today!'\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7b120988195a3564e6287b82df70b4e59e9535dcdce\",\"object\":\"response\",\"created_at\":1758783409,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7b120988195a3564e6287b82df70b4e59e9535dcdce\",\"object\":\"response\",\"created_at\":1758783409,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_b1wtebmTEkTsa9YT1pnoWvLB\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"xGvIJS1FtddzQ2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"o3Szqk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"knOtJdD2DV8BT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"utq28MZLfxYFhn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"7HeeZZLhNge6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"cHYpAhqaiObys\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"JSbBNn9hSF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"TqHozEhG0MiZ7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"yWZ6TNksEQVzXe\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"HZucIMr6B1MNJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"p9uGx4iubxXb4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"eBUNJ82WGpfip9T\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"SbdZZI6xQzuJmqg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"RPe6ITSCzyL59\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"34TFSQwlQb0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"MDg6cyFVh3szL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"RaGsFxlMHjLDMI8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"wwtY8D1EwQyGI7y\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\">You\",\"obfuscation\":\"BrKAcxTmRJrE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\" look\",\"obfuscation\":\"Zbz7CZLvUam\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\" great\",\"obfuscation\":\"3B8kD7Bini\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\" today\",\"obfuscation\":\"3CKc7lQkxh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"zfqNqLMkpTdkv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"9eyVM0DCSc5dKEX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"cypofRQlEkZcvmk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"cyKjv5fAXBx0YG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"IW8CHEYMPVquGV\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":30,\"item_id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"You look great today!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":31,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"You look great today!
\\\"}]}\",\"call_id\":\"call_b1wtebmTEkTsa9YT1pnoWvLB\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":32,\"response\":{\"id\":\"resp_68d4e7b120988195a3564e6287b82df70b4e59e9535dcdce\",\"object\":\"response\",\"created_at\":1758783409,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e7b1f11c8195b30f1dab4eb2ad410b4e59e9535dcdce\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"You look great today!
\\\"}]}\",\"call_id\":\"call_b1wtebmTEkTsa9YT1pnoWvLB\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":523,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":28,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":551},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a new paragraph (end)_1_17d834e2d1cae83d1da0998fdfb46c08.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a new paragraph (end)_1_17d834e2d1cae83d1da0998fdfb46c08.json
deleted file mode 100644
index 00efe4ec42..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a new paragraph (end)_1_17d834e2d1cae83d1da0998fdfb46c08.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a new paragraph with the text 'You look great today!' after the last sentence\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7ad0ee8819593003956761fcc420ca87f1c76341e67\",\"object\":\"response\",\"created_at\":1758783405,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7ad0ee8819593003956761fcc420ca87f1c76341e67\",\"object\":\"response\",\"created_at\":1758783405,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_xrPAXW9fVFaQeZXslKeNL95e\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"XVHZb6UbVs4m8E\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"ilVKKm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"ak5JfJg7F9fB7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"SKolH0Y9uW435L\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"Msd2NHk3gCjJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"b8nAKU418fvSt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"add\",\"obfuscation\":\"aJadv8EOwH1eB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"aBXel17FAwXjx\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"reference\",\"obfuscation\":\"0K2qE3c\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"Id\",\"obfuscation\":\"Xaag2ei0natUTQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"liSQMweOdM6Yh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"VSNODKibkIx1r\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"ugzKZrrcZ8r54Om\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"4LoWOFExwesELd7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"Ld4EGvXUk9QUt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"position\",\"obfuscation\":\"tLDBvSl0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"Bo8mE0KGp6AJe\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"after\",\"obfuscation\":\"83n2aPfDYZR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"C1MQFYQTAGmcr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"blocks\",\"obfuscation\":\"K3OXWusVQh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"\\\":[\\\"\",\"obfuscation\":\"Hm65DSIqkPE1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"3ZH1jMZA0s5BYGC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"wc9LVAyk8BG8zbX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\">You\",\"obfuscation\":\"tjlcrlhnKtIR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\" look\",\"obfuscation\":\"MsQQMEGJvcM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\" great\",\"obfuscation\":\"vvTVbh8SrK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\" today\",\"obfuscation\":\"DFmPwd7C9p\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"9Rw85sE7UuFas\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"q2h4jz0jmKgydMj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"Exz0ulAjBdO3I9a\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"\\\"]\",\"obfuscation\":\"7GBpAQnmUHAWV0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"}\",\"obfuscation\":\"YHEZqQWNdC95VSz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"x1q5f6FskEkLs4\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":36,\"item_id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":37,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\",\"call_id\":\"call_xrPAXW9fVFaQeZXslKeNL95e\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":38,\"response\":{\"id\":\"resp_68d4e7ad0ee8819593003956761fcc420ca87f1c76341e67\",\"object\":\"response\",\"created_at\":1758783405,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e7ad99308195b20c3236c088fbc50ca87f1c76341e67\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\",\"call_id\":\"call_xrPAXW9fVFaQeZXslKeNL95e\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":551,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":34,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":585},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a new paragraph (end)_1_b5d7570beb28712970433d8b53528829.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a new paragraph (end)_1_b5d7570beb28712970433d8b53528829.json
new file mode 100644
index 0000000000..ffe74db53c
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a new paragraph (end)_1_b5d7570beb28712970433d8b53528829.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a new paragraph with the text 'You look great today!' after the last sentence\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_00462306a5d02e9400691c9575a30081939df6b26739e10789\",\"object\":\"response\",\"created_at\":1763480949,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_00462306a5d02e9400691c9575a30081939df6b26739e10789\",\"object\":\"response\",\"created_at\":1763480949,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_EuZmncsMUNBcFFAaXykSZw8f\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"WJkwCPeoJORSaD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"9Q8Msc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"2k27ji5auO7Hm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"YhFLpQwJUWRrX0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"fXkGse3IvAIl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"8Wfqk62RdBdBM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"add\",\"obfuscation\":\"HzLLMv36xC5AN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"FGHeXbSOitLbe\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"reference\",\"obfuscation\":\"FantL4d\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"Id\",\"obfuscation\":\"XtErgR42OhwYWn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"pFZNJVdN6Fl05\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"i0RW95Vc5G0hB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"2EfdHk7LZDDMiS3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"HQnfIIt1Rcs01dz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"R75IK3onNPR7V\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"position\",\"obfuscation\":\"yNQNFfjl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"6m4aPErNaDegz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"after\",\"obfuscation\":\"F77b2kzFl17\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"ruPsazoZ056ve\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"blocks\",\"obfuscation\":\"rgRgBpa695\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"\\\":[\\\"\",\"obfuscation\":\"nZdOzO9uSRp8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"MJYc0wOBbVDxcPJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"3WIv39XN2znFsGO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\">You\",\"obfuscation\":\"udt0QRMuIjra\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\" look\",\"obfuscation\":\"SdNqBGSFYkw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\" great\",\"obfuscation\":\"ZneugTgiwb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\" today\",\"obfuscation\":\"6l1llRk0F2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"O7N8oJKCcI92c\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"OLUTod4cohWcQ9r\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"i2RPZi0wpiPD5Z9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"\\\"]\",\"obfuscation\":\"YZMcfdPRoduCJA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"}\",\"obfuscation\":\"XTngBMQpPCZu3Fk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"hullr3KJS9aa8s\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":36,\"item_id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":37,\"output_index\":0,\"item\":{\"id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\",\"call_id\":\"call_EuZmncsMUNBcFFAaXykSZw8f\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":38,\"response\":{\"id\":\"resp_00462306a5d02e9400691c9575a30081939df6b26739e10789\",\"object\":\"response\",\"created_at\":1763480949,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_00462306a5d02e9400691c95762c0c8193addddad404886e11\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\",\"call_id\":\"call_EuZmncsMUNBcFFAaXykSZw8f\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":598,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":34,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":632},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a new paragraph (start)_1_94232233e44ede5453eea20dd949c070.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a new paragraph (start)_1_94232233e44ede5453eea20dd949c070.json
new file mode 100644
index 0000000000..e419f751aa
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a new paragraph (start)_1_94232233e44ede5453eea20dd949c070.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a new paragraph with the text 'You look great today!' before the first sentence\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_046567842342593b00691c9574783881949d526bcd0ed51122\",\"object\":\"response\",\"created_at\":1763480948,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_046567842342593b00691c9574783881949d526bcd0ed51122\",\"object\":\"response\",\"created_at\":1763480948,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_gyfzGOuE5AQSzhjnsiUZcKnG\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"UONwoEM36pM2r6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"xtj3Jd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"iJb7yHZJalteU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"hO61jBBqrWWi0P\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"Uy1JU0Yf30gX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"2mOurPDQIZup1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"add\",\"obfuscation\":\"RwNn5ksTcJ8fp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"QjL7G1ZvflMg4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"reference\",\"obfuscation\":\"nWd9eL1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"Id\",\"obfuscation\":\"KeYR2r1FSPUDiL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"hX6FpbA8N8zn7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"ENun3qGuTMDhK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"kWdtatXEssOykeV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"91Z6ycIqRehleJF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"AUdpsBL0NWua7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"position\",\"obfuscation\":\"JNQfqoa4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"fympbOMqSzd80\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"before\",\"obfuscation\":\"9XvThxXnMG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"p4UPQBwgEBFJ1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"blocks\",\"obfuscation\":\"Zb27YJfC5v\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"\\\":[\\\"\",\"obfuscation\":\"jrQ3zDYODP6b\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"IrTP5EekUWh0HJY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"3WIe9Jknn4Nv4z1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\">You\",\"obfuscation\":\"3PpBb7Qtrylb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\" look\",\"obfuscation\":\"o14g024m2aQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\" great\",\"obfuscation\":\"Efpe3gyFyL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\" today\",\"obfuscation\":\"dgyZj0rpno\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"BUH0MNHn8Pyh2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"EZIROxAKbKeVDVP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"LJuvJlOSXFhesPe\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"\\\"]\",\"obfuscation\":\"CLR8NfjdmVAuEC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"}\",\"obfuscation\":\"nFSU0FavQRZthVl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"Ji3dyAEa1aujVa\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":36,\"item_id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":37,\"output_index\":0,\"item\":{\"id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\",\"call_id\":\"call_gyfzGOuE5AQSzhjnsiUZcKnG\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":38,\"response\":{\"id\":\"resp_046567842342593b00691c9574783881949d526bcd0ed51122\",\"object\":\"response\",\"created_at\":1763480948,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_046567842342593b00691c9574e438819492a647fcb4aa580b\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\",\"call_id\":\"call_gyfzGOuE5AQSzhjnsiUZcKnG\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":598,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":34,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":632},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a new paragraph (start)_1_fded5061f67d6e01b6704bcaf1181daa.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a new paragraph (start)_1_fded5061f67d6e01b6704bcaf1181daa.json
deleted file mode 100644
index a615a0ce74..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add a new paragraph (start)_1_fded5061f67d6e01b6704bcaf1181daa.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"How are you?
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a new paragraph with the text 'You look great today!' before the first sentence\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e837e958819592d702c6e5b7c6d7030ea987e3653172\",\"object\":\"response\",\"created_at\":1758783544,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e837e958819592d702c6e5b7c6d7030ea987e3653172\",\"object\":\"response\",\"created_at\":1758783544,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_aVQCJvApzBnwUPNgrlTN1omj\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"XEOn14ig5kROtX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"Nq4PqK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"QQlCigoQzGh1y\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"ycj3nGMPNrKnTa\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"SPVHh9mzEH1u\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"zHKf4HK2ShoPp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"add\",\"obfuscation\":\"PUZk9Vxq1xXnK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"XpcwWUFxgACfa\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"reference\",\"obfuscation\":\"rYk9oRI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"Id\",\"obfuscation\":\"bJra7b2vIs8NEy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"PAomYFOQn8143\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"7KtkqDlYEKQ1d\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"3vwjUInPwz5RhHi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"3g2QSDlspDA8uZZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"4q6ftWyFWDMAW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"position\",\"obfuscation\":\"VvwMLTNf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"R2N9jfvStioj0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"before\",\"obfuscation\":\"89syDIpdus\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"LfXN2w4mIv2b3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"blocks\",\"obfuscation\":\"zDyo4ABkA1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"\\\":[\\\"\",\"obfuscation\":\"LgVEgHGhBvg8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"jCadpUNkzS7tgSr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"oGEQKK8kmkFXS3G\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\">You\",\"obfuscation\":\"Kzzn4eTv2Dga\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\" look\",\"obfuscation\":\"CYwBkJFaSPN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\" great\",\"obfuscation\":\"1O4ZNJNBFz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\" today\",\"obfuscation\":\"6jii7wVPaB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"EMksmynWmDhFZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"teR1qidErZ4V9Ke\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"kDPTbO2FewmHIJ2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"\\\"]\",\"obfuscation\":\"wXOfmgcJ8glTIM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"}\",\"obfuscation\":\"iZZ2hafSle4oP91\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"vLzWc53wqJpcXU\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":36,\"item_id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":37,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\",\"call_id\":\"call_aVQCJvApzBnwUPNgrlTN1omj\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":38,\"response\":{\"id\":\"resp_68d4e837e958819592d702c6e5b7c6d7030ea987e3653172\",\"object\":\"response\",\"created_at\":1758783544,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e8388590819590a4bb2844542474030ea987e3653172\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\",\"call_id\":\"call_aVQCJvApzBnwUPNgrlTN1omj\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":551,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":34,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":585},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add and update paragraph_1_2dbe9e9945d6cabc0b02e812a6ba1b93.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add and update paragraph_1_2dbe9e9945d6cabc0b02e812a6ba1b93.json
new file mode 100644
index 0000000000..69e3314738
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add and update paragraph_1_2dbe9e9945d6cabc0b02e812a6ba1b93.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"add a new paragraph with the text 'You look great today!' after the first paragraph and translate first 'Hello, world' to dutch\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01VUH3Grz6WUjVwKRS7shUtn\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1333,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01WGdjFyWVQ6yxQ8X36sS2fh\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operations\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\": [{\\\"typ\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e\\\":\\\"update\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"id\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"ref1$\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",\\\"block\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"Hallo\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\", wereld!\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"p>\\\"}\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",{\\\"type\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"add\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"referenceI\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"d\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"ref1$\\\",\\\"p\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"osition\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"after\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\",\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"bl\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ocks\\\":[\\\"
You look g\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"reat \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"today!
\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"]}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1333,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":114} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add and update paragraph_1_c859fc3e363e6b44c406982880adeaf8.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add and update paragraph_1_c859fc3e363e6b44c406982880adeaf8.json
deleted file mode 100644
index 22c59c9ded..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add and update paragraph_1_c859fc3e363e6b44c406982880adeaf8.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"add a new paragraph with the text 'You look great today!' after the first paragraph and translate first 'Hello, world' to dutch\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_015RkRYm4PAXbHuTtc4ppdwK\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1268,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":11,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01A2RqnXSgKh4Yav7pubXmht\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"o\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"pera\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"tions\\\": \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"[{\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"type\\\":\\\"upda\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"te\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",\\\"id\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"ref1$\\\",\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"block\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Hallo\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\", wereld!
\\\"},{\\\"ty\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"pe\\\":\\\"add\\\",\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"referenceId\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"ref1\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"$\\\",\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"position\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"after\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\",\\\"blocks\\\":[\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"You \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"look grea\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"t \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"toda\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"y!
\\\"]}\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1268,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":135} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add paragraph and update selection_1_039451748eb07d71d3d7f96c97950d62.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add paragraph and update selection_1_039451748eb07d71d3d7f96c97950d62.json
new file mode 100644
index 0000000000..a59d13c7a4
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add paragraph and update selection_1_039451748eb07d71d3d7f96c97950d62.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]\"},{\"type\":\"text\",\"text\":\"This is the latest state of the entire document (INCLUDING the selected text), \\nyou can use this to find the selected text to understand the context (but you MUST NOT issue operations against this document, you MUST issue operations against the selection):\"},{\"type\":\"text\",\"text\":\"[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"add a paragraph with the text 'You look great today!' before the selection and translate selection to German\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01PeZWivChfregJe8qA87Xpx\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1329,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01ENb3CNwVikAkd9SjSbpxjY\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"opera\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ti\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ons\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\": [{\\\"type\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"add\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\",\\\"reference\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Id\\\":\\\"ref2$\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\",\\\"positi\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"on\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"befo\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"re\\\",\\\"block\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"s\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":[\\\"<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"p>You l\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"oo\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"k grea\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"t today!<\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"/p>\\\"]\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"},{\\\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"type\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"upda\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"te\\\",\\\"id\\\":\\\"r\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ef2$\\\",\\\"bloc\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"k\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"H\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"allo\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"
\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1329,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":132} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add paragraph and update selection_1_a721c27bc0944c3390dbcf6cbc4aa30d.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add paragraph and update selection_1_a721c27bc0944c3390dbcf6cbc4aa30d.json
deleted file mode 100644
index 7a5603dcc9..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add paragraph and update selection_1_a721c27bc0944c3390dbcf6cbc4aa30d.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids.\\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]\"},{\"type\":\"text\",\"text\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"add a paragraph with the text 'You look great today!' at the beginning and translate selection to German\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_014aRD33fEG5zyyb7GpRq3tr\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1078,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":15,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01CwNAAmwE9Grq9oqUrknSjB\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operati\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ons\\\": [{\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"type\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"a\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"dd\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"referenc\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"eI\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"d\\\":\\\"ref\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"2$\\\",\\\"pos\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ition\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"before\\\",\\\"b\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"locks\\\":[\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"You look \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"great today\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"!
\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"]},{\\\"type\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"updat\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e\\\",\\\"i\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"d\\\":\\\"ref2$\\\",\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"block\\\":\\\"H\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"allo
\\\"}]}\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1078,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":132} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add paragraph and update selection_1_d3abc4ed3770423794fb376c277c2cf3.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add paragraph and update selection_1_d3abc4ed3770423794fb376c277c2cf3.json
new file mode 100644
index 0000000000..d37bd438f2
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add paragraph and update selection_1_d3abc4ed3770423794fb376c277c2cf3.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]\"},{\"type\":\"text\",\"text\":\"This is the latest state of the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"type\":\"text\",\"text\":\"[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"add a paragraph with the text 'You look great today!' before the selection and translate selection to German\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01Ko7ugCdQ4ddnkMS7Y5Ro8w\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1303,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01CR5TNdtwqV5dUDkFZJPt46\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"oper\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ations\\\": [{\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"type\\\":\\\"a\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"dd\\\",\\\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"reference\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Id\\\":\\\"r\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ef2$\\\",\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"position\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"befo\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"re\\\",\\\"bloc\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ks\\\":[\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"You look\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" great toda\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"y!\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"p>\\\"]},{\\\"t\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"yp\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"update\\\",\\\"id\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"ref2\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"$\\\",\\\"bloc\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"k\\\":\\\"<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"p>Hallo
\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1303,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":132} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add and update paragraph_1_7a6f24c686aeb896da8088bd8ea14089.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add and update paragraph_1_7a6f24c686aeb896da8088bd8ea14089.json
new file mode 100644
index 0000000000..04213a1fb5
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add and update paragraph_1_7a6f24c686aeb896da8088bd8ea14089.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' after the first paragraph and translate first 'Hello, world' to dutch\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-b0d8d882-b43a-4f4b-925e-dce8d5ff1376\",\"object\":\"chat.completion.chunk\",\"created\":1763483141,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_dae98b5ecb\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabwjgvbe9k91zb9k342aw2e\",\"seed\":41109264}}\n\ndata: {\"id\":\"chatcmpl-b0d8d882-b43a-4f4b-925e-dce8d5ff1376\",\"object\":\"chat.completion.chunk\",\"created\":1763483141,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_dae98b5ecb\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"0c8agtwr3\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHallo, wereld!\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"},{\\\"blocks\\\":[\\\"\\\\u003cp\\\\u003eYou look great today!\\\\u003c/p\\\\u003e\\\"],\\\"position\\\":\\\"after\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"type\\\":\\\"add\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-b0d8d882-b43a-4f4b-925e-dce8d5ff1376\",\"object\":\"chat.completion.chunk\",\"created\":1763483141,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_dae98b5ecb\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabwjgvbe9k91zb9k342aw2e\",\"usage\":{\"queue_time\":0.095101527,\"prompt_tokens\":1010,\"prompt_time\":0.114818763,\"completion_tokens\":60,\"completion_time\":0.127434158,\"total_tokens\":1070,\"total_time\":0.242252921}},\"usage\":{\"queue_time\":0.095101527,\"prompt_tokens\":1010,\"prompt_time\":0.114818763,\"completion_tokens\":60,\"completion_time\":0.127434158,\"total_tokens\":1070,\"total_time\":0.242252921}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add and update paragraph_1_fc80a600d06d9b0a834b3a8dc062d077.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add and update paragraph_1_fc80a600d06d9b0a834b3a8dc062d077.json
deleted file mode 100644
index 4a5ba40a22..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add and update paragraph_1_fc80a600d06d9b0a834b3a8dc062d077.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' after the first paragraph and translate first 'Hello, world' to dutch\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-e09622d3-5278-4c18-851c-0acabe9c2bf8\",\"object\":\"chat.completion.chunk\",\"created\":1758783449,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9e1e8f8435\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztkaaje0bssv4fvk6fbs25\"}}\n\ndata: {\"id\":\"chatcmpl-e09622d3-5278-4c18-851c-0acabe9c2bf8\",\"object\":\"chat.completion.chunk\",\"created\":1758783449,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9e1e8f8435\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"fz0shvae6\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHallo, wereld!\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"},{\\\"blocks\\\":[\\\"\\\\u003cp\\\\u003eYou look great today!\\\\u003c/p\\\\u003e\\\"],\\\"position\\\":\\\"after\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"type\\\":\\\"add\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-e09622d3-5278-4c18-851c-0acabe9c2bf8\",\"object\":\"chat.completion.chunk\",\"created\":1758783449,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9e1e8f8435\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztkaaje0bssv4fvk6fbs25\",\"usage\":{\"queue_time\":0.085076153,\"prompt_tokens\":959,\"prompt_time\":0.07923487,\"completion_tokens\":60,\"completion_time\":0.136116418,\"total_tokens\":1019,\"total_time\":0.215351288}},\"usage\":{\"queue_time\":0.085076153,\"prompt_tokens\":959,\"prompt_time\":0.07923487,\"completion_tokens\":60,\"completion_time\":0.136116418,\"total_tokens\":1019,\"total_time\":0.215351288}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add paragraph and update selection_1_a7597ddda3f5117e1572545c53c19414.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add paragraph and update selection_1_a7597ddda3f5117e1572545c53c19414.json
new file mode 100644
index 0000000000..47d34f1759
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add paragraph and update selection_1_a7597ddda3f5117e1572545c53c19414.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]This is the latest state of the entire document (INCLUDING the selected text), \\nyou can use this to find the selected text to understand the context (but you MUST NOT issue operations against this document, you MUST issue operations against the selection):[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"add a paragraph with the text 'You look great today!' before the selection and translate selection to German\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-9a19d96e-eb60-44b0-a832-ba7f79d87e63\",\"object\":\"chat.completion.chunk\",\"created\":1763488566,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_c06d5113ec\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kac1r357f0x9wpfyf48v579p\",\"seed\":1098253286}}\n\ndata: {\"id\":\"chatcmpl-9a19d96e-eb60-44b0-a832-ba7f79d87e63\",\"object\":\"chat.completion.chunk\",\"created\":1763488566,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_c06d5113ec\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"d0c9qcezq\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"blocks\\\":[\\\"\\\\u003cp\\\\u003eYou look great today!\\\\u003c/p\\\\u003e\\\"],\\\"position\\\":\\\"before\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"type\\\":\\\"add\\\"},{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHallo\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-9a19d96e-eb60-44b0-a832-ba7f79d87e63\",\"object\":\"chat.completion.chunk\",\"created\":1763488566,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_c06d5113ec\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kac1r357f0x9wpfyf48v579p\",\"usage\":{\"queue_time\":0.091250646,\"prompt_tokens\":1007,\"prompt_time\":0.049752528,\"completion_tokens\":69,\"completion_time\":0.181414765,\"total_tokens\":1076,\"total_time\":0.231167293}},\"usage\":{\"queue_time\":0.091250646,\"prompt_tokens\":1007,\"prompt_time\":0.049752528,\"completion_tokens\":69,\"completion_time\":0.181414765,\"total_tokens\":1076,\"total_time\":0.231167293}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add paragraph and update selection_1_c8ab20a4c19b320b76462be23f25426b.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add paragraph and update selection_1_c8ab20a4c19b320b76462be23f25426b.json
new file mode 100644
index 0000000000..b0ead33a0b
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add paragraph and update selection_1_c8ab20a4c19b320b76462be23f25426b.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]This is the latest state of the entire document (INCLUDING the selected text), find the selected text in there to understand the context:[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"add a paragraph with the text 'You look great today!' before the selection and translate selection to German\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-527b5192-fee5-4cab-a30d-dc1e6d86ddbb\",\"object\":\"chat.completion.chunk\",\"created\":1763483086,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabwgvfse7f84a2mb8bcs3de\",\"seed\":1685161808}}\n\ndata: {\"id\":\"chatcmpl-527b5192-fee5-4cab-a30d-dc1e6d86ddbb\",\"object\":\"chat.completion.chunk\",\"created\":1763483086,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"d0rmeyy49\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"blocks\\\":[\\\"\\\\u003cp\\\\u003eYou look great today!\\\\u003c/p\\\\u003e\\\"],\\\"position\\\":\\\"before\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"type\\\":\\\"add\\\"},{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHallo\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-527b5192-fee5-4cab-a30d-dc1e6d86ddbb\",\"object\":\"chat.completion.chunk\",\"created\":1763483086,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabwgvfse7f84a2mb8bcs3de\",\"usage\":{\"queue_time\":0.04241123,\"prompt_tokens\":984,\"prompt_time\":0.092467558,\"completion_tokens\":58,\"completion_time\":0.161850497,\"total_tokens\":1042,\"total_time\":0.254318055}},\"usage\":{\"queue_time\":0.04241123,\"prompt_tokens\":984,\"prompt_time\":0.092467558,\"completion_tokens\":58,\"completion_time\":0.161850497,\"total_tokens\":1042,\"total_time\":0.254318055}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add paragraph and update selection_1_ea6525e3996561d49f3baaa53e5f4367.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add paragraph and update selection_1_ea6525e3996561d49f3baaa53e5f4367.json
deleted file mode 100644
index 79e9bf79db..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add paragraph and update selection_1_ea6525e3996561d49f3baaa53e5f4367.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids.\\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"add a paragraph with the text 'You look great today!' at the beginning and translate selection to German\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-7e1e61de-eb79-4dc9-829a-b2c19d13a0af\",\"object\":\"chat.completion.chunk\",\"created\":1758783450,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_487c5a8475\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztkante0ba6vd2atrsgr75\"}}\n\ndata: {\"id\":\"chatcmpl-7e1e61de-eb79-4dc9-829a-b2c19d13a0af\",\"object\":\"chat.completion.chunk\",\"created\":1758783450,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_487c5a8475\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"4zz71sppd\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"blocks\\\":[\\\"\\\\u003cp\\\\u003eYou look great today!\\\\u003c/p\\\\u003e\\\"],\\\"position\\\":\\\"before\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"type\\\":\\\"add\\\"},{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHallo\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-7e1e61de-eb79-4dc9-829a-b2c19d13a0af\",\"object\":\"chat.completion.chunk\",\"created\":1758783450,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_487c5a8475\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztkante0ba6vd2atrsgr75\",\"usage\":{\"queue_time\":0.133257189,\"prompt_tokens\":784,\"prompt_time\":0.065948,\"completion_tokens\":58,\"completion_time\":0.135874592,\"total_tokens\":842,\"total_time\":0.201822592}},\"usage\":{\"queue_time\":0.133257189,\"prompt_tokens\":784,\"prompt_time\":0.065948,\"completion_tokens\":58,\"completion_time\":0.135874592,\"total_tokens\":842,\"total_time\":0.201822592}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add and update paragraph_1_1f86584753177f1b06f2cab6a822316b.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add and update paragraph_1_1f86584753177f1b06f2cab6a822316b.json
new file mode 100644
index 0000000000..67b7278300
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add and update paragraph_1_1f86584753177f1b06f2cab6a822316b.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a new paragraph with the text 'You look great today!' after the first paragraph and translate first 'Hello, world' to dutch\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_000383332e42469200691c9dc1410081948a5fcb75bdc097d5\",\"object\":\"response\",\"created_at\":1763483073,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_000383332e42469200691c9dc1410081948a5fcb75bdc097d5\",\"object\":\"response\",\"created_at\":1763483073,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"DLUaTQPBZWZe8S\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"fbSqBH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"kLJbgyq7qhEPQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"IC7Zir4L2407i9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"G87RiLNGtsjo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"JNHb7CSSSTvSE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"UmHcLct3bg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"1HRYLdj5zcWmw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"qaaU4iRYHMTtxs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"03jxBXU4NeTV6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"vlOyrQuKoucSe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"QhMP81GkH9QT2Wm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"biu1hk7d4MhbhFD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"XTfED6YmKE2dA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"B4nAnFh6q8s\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"tmnMjozGqw8k2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"InOttmvOuLPsp3R\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"LTnmGQCoMa8xmFV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"X1zCtNRrHyZBQft\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"Hallo\",\"logprobs\":[],\"obfuscation\":\"HXarE0MbsM2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"vmQagjwqB7HpHGy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\" wereld\",\"logprobs\":[],\"obfuscation\":\"QntUPoTGZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"MTv8Cnd9XxK7h\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"dPQUhka7dmlzlqn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\">\\\"\",\"logprobs\":[],\"obfuscation\":\"mhN48X8KMTP6Wx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"},{\\\"\",\"logprobs\":[],\"obfuscation\":\"F0er7A2TP40P\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"vc8TLIPEN5N4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"hLBB9rr71NE3x\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"add\",\"logprobs\":[],\"obfuscation\":\"w8RUdJiVCdFhf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"9QlLSIlRPqD7p\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"reference\",\"logprobs\":[],\"obfuscation\":\"KnxrFS4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"Id\",\"logprobs\":[],\"obfuscation\":\"fVKDLCJXCSfXAG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"bOSrnRqxYtzm5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"6p1jOkZgKj4Xi\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"UBsZlglU24qbTYU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"s71aUEcEagc6CD1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"dEkROojSjTQF0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"position\",\"logprobs\":[],\"obfuscation\":\"kJyTAaES\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"CyLlsS3kcAsjY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"after\",\"logprobs\":[],\"obfuscation\":\"SPoQJ3GqKxs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"Qany077MQr4xS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"blocks\",\"logprobs\":[],\"obfuscation\":\"inG2E1Q2Fh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\\\"\",\"logprobs\":[],\"obfuscation\":\"tEyhAKo6VTgp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"C6t2DPIodfdZPsA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"zmkiPPljBzw8Awg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\">You\",\"logprobs\":[],\"obfuscation\":\"uyr65rWO6NIo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\" look\",\"logprobs\":[],\"obfuscation\":\"cg8buFNKum3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":51,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\" great\",\"logprobs\":[],\"obfuscation\":\"JwqRNWAqtK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":52,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\" today\",\"logprobs\":[],\"obfuscation\":\"CLoHsC1AmM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":53,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"gb0T3YMIEcr3U\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":54,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"4TNT6BOydEYD8IB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":55,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"PA4fBmM85d7LNqF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":56,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"]\",\"logprobs\":[],\"obfuscation\":\"XvgmnXv2AnFmoX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":57,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"}\",\"logprobs\":[],\"obfuscation\":\"meitU3re48YpgB5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":58,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"ru1BcM9YTE351O\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":59,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, wereld!
\\\"},{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":60,\"item_id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, wereld!
\\\"},{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":61,\"output_index\":0,\"item\":{\"id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, wereld!
\\\"},{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":62,\"response\":{\"id\":\"resp_000383332e42469200691c9dc1410081948a5fcb75bdc097d5\",\"object\":\"response\",\"created_at\":1763483073,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_000383332e42469200691c9dc1b38c81949f594eba82aa2449\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, wereld!
\\\"},{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":793,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":56,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":849},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add and update paragraph_1_a6ed8e1b1d7287f11052e60d21aa3c61.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add and update paragraph_1_a6ed8e1b1d7287f11052e60d21aa3c61.json
deleted file mode 100644
index e8c8e6ea7e..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add and update paragraph_1_a6ed8e1b1d7287f11052e60d21aa3c61.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a new paragraph with the text 'You look great today!' after the first paragraph and translate first 'Hello, world' to dutch\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7a887b08196956e49c1985137000d500e386204899d\",\"object\":\"response\",\"created_at\":1758783400,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7a887b08196956e49c1985137000d500e386204899d\",\"object\":\"response\",\"created_at\":1758783400,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"1JN6xolQtoJhe2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"TLEOjn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"ax4i0s7AxSJS0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"qNeBqmZ8QgZl71\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"6016FlaRMo3O\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"VcgyOf2saZfJ2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"J3Y2JWYFxg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"tai9sqpNJuT7p\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"F2wsBRcRvEiX6S\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"I4aDvJ5TmFWpn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"a17PyVxIjnXM2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"VRboxtL1vnFZUSj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"HrIIpoR03zDVk3T\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"YV7dYM9xhcViI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"uHBEKtcCaRf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"Na8fSb6Zf7e4m\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"uvbo5bblREo4vbY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"X36Xf6G1tKhieFn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"aCVOcEkULaLwB6s\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"Hallo\",\"logprobs\":[],\"obfuscation\":\"7uGiWiCFVot\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"GquOIECXnbwmdmQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\" wereld\",\"logprobs\":[],\"obfuscation\":\"JC3SYRqR4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"l6nTh73fCohHM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"0TcnOKOoPUWcBCa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\">\\\"\",\"logprobs\":[],\"obfuscation\":\"EC2MO0KtfzKMUi\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"},{\\\"\",\"logprobs\":[],\"obfuscation\":\"ZiekgJ0f5IZA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"YAu0WCjggU8W\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"bd199c3CKinix\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"add\",\"logprobs\":[],\"obfuscation\":\"pWXBh1jNDH236\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"UlvmoTOrZ6ibA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"reference\",\"logprobs\":[],\"obfuscation\":\"lkH2WIh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"Id\",\"logprobs\":[],\"obfuscation\":\"gvjPD9myDOGreT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"H5tLFUdSyYhrZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"wwWCWRCu2UQon\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"vXedPGRTISPj3VE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"qInO7FbKsiz1M3t\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"YALqGfQdBm1li\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"position\",\"logprobs\":[],\"obfuscation\":\"0YK7pXVR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"9vPFsxzjFXtTl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"after\",\"logprobs\":[],\"obfuscation\":\"2JaVdqoKUiT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"LGahM58Z1Ltdm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"blocks\",\"logprobs\":[],\"obfuscation\":\"KZwS7kTOek\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\\\"\",\"logprobs\":[],\"obfuscation\":\"b8YqkGZf6zA1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"IdxJzIILkHVMJlD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"3fDzDRHBQlNaIgx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\">You\",\"logprobs\":[],\"obfuscation\":\"kb0fQSbU9Ocj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\" look\",\"logprobs\":[],\"obfuscation\":\"IW0euUCWXnf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":51,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\" great\",\"logprobs\":[],\"obfuscation\":\"BIKLLom9iK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":52,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\" today\",\"logprobs\":[],\"obfuscation\":\"LTteCKiwFf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":53,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"rLjX7OpkCG44H\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":54,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"rNb5IlNCz2DqE0a\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":55,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"MYtidCgBexTvqhX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":56,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"]\",\"logprobs\":[],\"obfuscation\":\"02UWG5VuDvnsWf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":57,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"}\",\"logprobs\":[],\"obfuscation\":\"61AIuh5SeKkVV8A\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":58,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"XuPwqBl7OAc3RM\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":59,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, wereld!
\\\"},{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":60,\"item_id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, wereld!
\\\"},{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":61,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, wereld!
\\\"},{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":62,\"response\":{\"id\":\"resp_68d4e7a887b08196956e49c1985137000d500e386204899d\",\"object\":\"response\",\"created_at\":1758783400,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7a962148196b18f925138d2d5d40d500e386204899d\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, wereld!
\\\"},{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":746,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":56,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":802},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add paragraph and update selection_1_177247e6d93dd455ced77d622962b593.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add paragraph and update selection_1_177247e6d93dd455ced77d622962b593.json
new file mode 100644
index 0000000000..aaa9fd8404
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add paragraph and update selection_1_177247e6d93dd455ced77d622962b593.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a paragraph with the text 'You look great today!' before the selection and translate selection to German\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0fe18e87454166d100691c9dc3194081968dd3cfa782210f3e\",\"object\":\"response\",\"created_at\":1763483075,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0fe18e87454166d100691c9dc3194081968dd3cfa782210f3e\",\"object\":\"response\",\"created_at\":1763483075,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"ZXHy0sFSTfxKIx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"Qx4E9a\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"KQRIYhk228Me3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"T7UoP0rvAvtM77\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"5LyTp3vK3moW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"9zLDiVlGprSq8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"add\",\"logprobs\":[],\"obfuscation\":\"Vc0k955vdQ9Z2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"EPubDQ9MUWVDm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"reference\",\"logprobs\":[],\"obfuscation\":\"sZiULK6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"Id\",\"logprobs\":[],\"obfuscation\":\"m0tQuBy757pzA7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"SCs43CkOigITU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"GgeJileUhWyIk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"osVp4MvWHMrTOtW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"Vc6vlhh3VGk7P6e\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"8W1WNvDVSRbNa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"position\",\"logprobs\":[],\"obfuscation\":\"NBsnTzC4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"41552KxRdlNxj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"before\",\"logprobs\":[],\"obfuscation\":\"gQFeqGosHe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"51eUZzNy6CVYK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"blocks\",\"logprobs\":[],\"obfuscation\":\"q22on3u5EK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\\\"\",\"logprobs\":[],\"obfuscation\":\"dpOU9MzlYSdK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"ioLA7f4JqFQIHTr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"T4M6Yo6iLSSJYyQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\">You\",\"logprobs\":[],\"obfuscation\":\"I3mydxJuOq1h\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\" look\",\"logprobs\":[],\"obfuscation\":\"0XG7BwEep9Z\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\" great\",\"logprobs\":[],\"obfuscation\":\"CbrkcOQB7C\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\" today\",\"logprobs\":[],\"obfuscation\":\"Sz1RgUl4mC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"qm69fJRPpTkGk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"GK1yN7XvpVog36W\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"FF3CS904O0V8xCd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"]\",\"logprobs\":[],\"obfuscation\":\"GsJGD8FK3R0mjn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"},{\\\"\",\"logprobs\":[],\"obfuscation\":\"ctbMTHWBfNEu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"oeOLhF07FOOD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"izmxwushgouJA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"3VUQ9ua2af\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"NGTK9aNxMqarw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"7RptFC2tXiYyYR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"KFVd6CiYyiU0M\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"iN75w4fTQRP8k\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"upz29HDGbNF0K0x\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"U8PVlhByHkE8sTu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"xMFrzdjBtyjuR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"51uQteHop05\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"RD6hhpVPFwxla\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"ekmysPx6TzDwfhD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"zdrYSHVYLHZfSBp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"EI3IC6FiBLyUJli\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":51,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"Hallo\",\"logprobs\":[],\"obfuscation\":\"Tzcf7iA0BeA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":52,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"cqJ28AQhxYuhEu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":53,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"o8YiVdlQxUMLKU7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":54,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"Yh5zyPOI6pW1No2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":55,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"LTQN3mePcVKfwQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":56,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"p5ITdBrMjhfR4Z\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":57,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":58,\"item_id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":59,\"output_index\":0,\"item\":{\"id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":60,\"response\":{\"id\":\"resp_0fe18e87454166d100691c9dc3194081968dd3cfa782210f3e\",\"object\":\"response\",\"created_at\":1763483075,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_0fe18e87454166d100691c9dc37c0481968041ebb78ceecd1f\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":777,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":54,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":831},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add paragraph and update selection_1_3f688e4336780f36c03fe2e06fb38ae1.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add paragraph and update selection_1_3f688e4336780f36c03fe2e06fb38ae1.json
deleted file mode 100644
index df90b7fdcf..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add paragraph and update selection_1_3f688e4336780f36c03fe2e06fb38ae1.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids.\\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a paragraph with the text 'You look great today!' at the beginning and translate selection to German\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7aae43c81969506cc85aa31852e06932a6952fba75d\",\"object\":\"response\",\"created_at\":1758783402,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7aae43c81969506cc85aa31852e06932a6952fba75d\",\"object\":\"response\",\"created_at\":1758783402,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"M0cwk4bFoiLBPV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"2jnvwJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"Mh2AkN8ho0Cm8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"711IHRWkncjUTU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"EzWcT5889qZS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"iWqsvSCJ9ryjm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"qLt57P2taW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"kqpLrV9I1Si9d\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"w1eQn9HFOwwgsD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"KcmtWNofw0qEt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"ZKdK4BhRalM3P\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"Y7eiUoheSqtJcm1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"fQ9IIAes1wqsdcg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"WevoTct2ojvSE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"4taJ8VpL3gr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"lolZjDmwMIFRy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"mECg2SnkNpMGErS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"RTsR71eOcAqGVZu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"JIc3k3tBxiJfhwG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"Hallo\",\"logprobs\":[],\"obfuscation\":\"IeoP6RsVmM2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"hwT42434ie4e9N\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"kpGLT5brHU6vNjq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\">\\\"\",\"logprobs\":[],\"obfuscation\":\"h1TMcNu74ZqlsQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"},{\\\"\",\"logprobs\":[],\"obfuscation\":\"TTXX9VWc6Gip\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"3rb2XwvDDmVo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"FxwPGVWsylHtW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"add\",\"logprobs\":[],\"obfuscation\":\"jYIYtzt5ZNgNq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"cACuU0SZPV3g9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"reference\",\"logprobs\":[],\"obfuscation\":\"rQHXFdA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"Id\",\"logprobs\":[],\"obfuscation\":\"4F4hVw1v8k93AH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"RAbyRUHaGrOso\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"pA1592msFhdxI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"etpnw5JxBenOamU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"eYt5nUnsaIuHdFr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"W63ITpWbuZtyD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"position\",\"logprobs\":[],\"obfuscation\":\"Vd9lR7CL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"pwO5RvTbTUfq4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"before\",\"logprobs\":[],\"obfuscation\":\"mZoyWaGCU8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"qNMSGbbFlWU74\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"blocks\",\"logprobs\":[],\"obfuscation\":\"a2O4Ptylm3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\\\"\",\"logprobs\":[],\"obfuscation\":\"g7UEXd0b2UFi\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"hlcrJa56luMf0Gg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"EfyoGdHamyqS4sY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\">You\",\"logprobs\":[],\"obfuscation\":\"vovleMWpyqbo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\" look\",\"logprobs\":[],\"obfuscation\":\"7WNJuGulPH2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\" great\",\"logprobs\":[],\"obfuscation\":\"0xesdgEfuh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\" today\",\"logprobs\":[],\"obfuscation\":\"gUgnD9bIFj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":51,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"scOM2OzSGdeYH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":52,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"DeYgigUPKMQqw0C\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":53,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"PqZVRKXci5fhQHA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":54,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"]\",\"logprobs\":[],\"obfuscation\":\"vyNCepTwG4dul2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":55,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"}\",\"logprobs\":[],\"obfuscation\":\"6XbFGsOftPJUZrU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":56,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"KdCXuGlkURAftG\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":57,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"},{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":58,\"item_id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"},{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":59,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"},{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":60,\"response\":{\"id\":\"resp_68d4e7aae43c81969506cc85aa31852e06932a6952fba75d\",\"object\":\"response\",\"created_at\":1758783402,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7ab6f748196ab059f4d165f9d8d06932a6952fba75d\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"},{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":571,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":54,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":625},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add paragraph and update selection_1_bb81e06e77589983badfe53e3839ab83.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add paragraph and update selection_1_bb81e06e77589983badfe53e3839ab83.json
new file mode 100644
index 0000000000..55bfcfa05d
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/add paragraph and update selection_1_bb81e06e77589983badfe53e3839ab83.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the entire document (INCLUDING the selected text), \\nyou can use this to find the selected text to understand the context (but you MUST NOT issue operations against this document, you MUST issue operations against the selection):\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a paragraph with the text 'You look great today!' before the selection and translate selection to German\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_092fbfd77fae499500691cb329d0248194a524e323063401bd\",\"object\":\"response\",\"created_at\":1763488553,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_092fbfd77fae499500691cb329d0248194a524e323063401bd\",\"object\":\"response\",\"created_at\":1763488553,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"E2978wcjhkK8qa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"mBeNWb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"ICpCm5DkNXuBb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"Q55xzseWDMzbRS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"MnnTNJCZFKR7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"xKietQ3vTgSmq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"add\",\"logprobs\":[],\"obfuscation\":\"qOtGlFskhkVdl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"rTYKToj4daKEb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"reference\",\"logprobs\":[],\"obfuscation\":\"xH6u8rc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"Id\",\"logprobs\":[],\"obfuscation\":\"MQty6o8Iy7APO9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"oB3G3vFiLlEAS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"nUqhvYGleJB4H\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"fct0x74ibonRQXt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"YWgGfY0nw5pXNxM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"iBNKZhJczRKoA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"position\",\"logprobs\":[],\"obfuscation\":\"bu8Hfnfh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"jjPCkuHDpT18i\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"before\",\"logprobs\":[],\"obfuscation\":\"JstKImlGsT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"5yJwPAck3JH5T\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"blocks\",\"logprobs\":[],\"obfuscation\":\"MMqZXLAcYl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\\\"\",\"logprobs\":[],\"obfuscation\":\"6jwANHsbtReF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"V2JTd9UmWdqlJXW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"CzIuBivADGkj8GM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\">You\",\"logprobs\":[],\"obfuscation\":\"PTi6kXiqS2Xw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\" look\",\"logprobs\":[],\"obfuscation\":\"KJGytEzkooY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\" great\",\"logprobs\":[],\"obfuscation\":\"wFV2hQO5Ma\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\" today\",\"logprobs\":[],\"obfuscation\":\"9UfDzLSFJX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"ledxFJRDQvkzd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"o1CSRglpGMeHmbz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"wW0qhSA7WqGZqIq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"]\",\"logprobs\":[],\"obfuscation\":\"raFWLVVhDm0uB5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"},{\\\"\",\"logprobs\":[],\"obfuscation\":\"pNI66nxyrbiQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"3FbJBwgwIHwG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"X90gmqMBbgSHX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"XhGGK6HHBx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"BKl07MYk4UN87\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"yfm9eVoCFqvW51\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"eRCc3UrknHWr1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"kzHQlzwxwQSfA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"ZaaM1zUgJrPDqYg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"dupDabaqcHk6sOK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"5szivLUZATPcO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"q55dvJKSVOj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"ljmMOZuOOUlec\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"HUp85Ma7IH4YS97\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"HEmkR1YbD6S0cxb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"6iERlZazRGoM2bh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":51,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"Hallo\",\"logprobs\":[],\"obfuscation\":\"cfmpwUyChKc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":52,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"NOwYm2DqPdUwRb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":53,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"BEqiWxxf7qFCMUd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":54,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"RIhugC7XrSZMXBn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":55,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"OMiBGV4AuPUGTa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":56,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"uiVa76UippO4gs\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":57,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":58,\"item_id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":59,\"output_index\":0,\"item\":{\"id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":60,\"response\":{\"id\":\"resp_092fbfd77fae499500691cb329d0248194a524e323063401bd\",\"object\":\"response\",\"created_at\":1763488553,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_092fbfd77fae499500691cb32a4b788194bdd379ae012ce136\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":799,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":54,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":853},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add and update paragraph_1_2ac4e99d05838a4666b65cfe9ffceee9.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add and update paragraph_1_2ac4e99d05838a4666b65cfe9ffceee9.json
deleted file mode 100644
index b794be6541..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add and update paragraph_1_2ac4e99d05838a4666b65cfe9ffceee9.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a new paragraph with the text 'You look great today!' after the first paragraph and translate first 'Hello, world' to dutch\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e8d9a91481958122d20ef793503c0aa9397f946a9c4f\",\"object\":\"response\",\"created_at\":1758783705,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e8d9a91481958122d20ef793503c0aa9397f946a9c4f\",\"object\":\"response\",\"created_at\":1758783705,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_lgWwCpIXsSQMa5D3hjYKBjuI\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"HNooR21BkDNYXo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"sFf4SB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"dqGdo7ivBJrs6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"DRjFIErO93uo9Y\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"takYz9JJq2OS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"F2AFSc1ieBPrq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"zXz8YMhAOO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"LXtG1n6K6CQP2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"86IxHsYGtQeSls\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"3nkSNtzfenifD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"DbmBexrwXq6d0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"FJ0I0A6gjQKCoo1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"H1BO3PFbke81UzT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"8WvM3JZt0m45t\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"RSoiVvhXCzb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"bqldqzWeMAqHs\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"i4cop93O2GUH8kx\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"CN1A3z56Eff36aY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"uuLY7C1X0Zfo35G\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"Hallo\",\"obfuscation\":\"C40iAg0FZER\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"GnMnyToCCI9JOTi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\" wereld\",\"obfuscation\":\"gtnXX6u7y\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"9S3uo7fEh58so\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"d88JemDCBN6amBq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\">\\\"\",\"obfuscation\":\"EgF8lHtVQ3oMJU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"},{\\\"\",\"obfuscation\":\"IlgFq1fbx9ee\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"29m0b36DB4cT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"FypHX3gaaydsE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"add\",\"obfuscation\":\"x9rV6zEFWJbQa\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"Kb1L08kBIPH3x\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"reference\",\"obfuscation\":\"7zUTjVa\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"Id\",\"obfuscation\":\"EE0lXHpsUd060n\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"yEWJfrxoEIZfR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"aQ8JkhAWg8XmL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"8gsp8ODRIRZkkJY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"dTWxEGlKzN9vMHJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"ARP9MgWlz9LAm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"position\",\"obfuscation\":\"4rxEBJ47\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"CcMJXjTWpnUbB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"after\",\"obfuscation\":\"eW3gYVGR24k\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"AlFXwYb1NakFQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"blocks\",\"obfuscation\":\"SgXuUiYZbQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"\\\":[\\\"\",\"obfuscation\":\"WTGKz0tQwnUT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"a1K4PEjvF8P2q84\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"uiPog18ta4Ed0YK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\">You\",\"obfuscation\":\"Az97z2SYIKhe\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\" look\",\"obfuscation\":\"ozqaYNVeFr5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":50,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\" great\",\"obfuscation\":\"K7Xtz3xo2o\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":51,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\" today\",\"obfuscation\":\"aT6kfQYiWW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":52,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"etNKetDzjRCo7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":53,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"dd2yMSyHUsOFs0z\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":54,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"tT1j8gWYMzdqi5q\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":55,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"\\\"]\",\"obfuscation\":\"wgFNhSgh3J5Fa1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":56,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"}\",\"obfuscation\":\"QfVXkMliG1V0uoN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":57,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"CJhkjA9oNG45QT\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":58,\"item_id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, wereld!
\\\"},{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":59,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, wereld!
\\\"},{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\",\"call_id\":\"call_lgWwCpIXsSQMa5D3hjYKBjuI\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":60,\"response\":{\"id\":\"resp_68d4e8d9a91481958122d20ef793503c0aa9397f946a9c4f\",\"object\":\"response\",\"created_at\":1758783705,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e8da81f4819582cb32557b57a8f10aa9397f946a9c4f\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, wereld!
\\\"},{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\",\"call_id\":\"call_lgWwCpIXsSQMa5D3hjYKBjuI\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":683,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":56,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":739},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add and update paragraph_1_d6725684f23346e66f8289d5ba72d7c1.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add and update paragraph_1_d6725684f23346e66f8289d5ba72d7c1.json
new file mode 100644
index 0000000000..af62b34823
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add and update paragraph_1_d6725684f23346e66f8289d5ba72d7c1.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a new paragraph with the text 'You look great today!' after the first paragraph and translate first 'Hello, world' to dutch\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_09b0a868ab8be94600691c9dc67a148190a8c1e59bb2324752\",\"object\":\"response\",\"created_at\":1763483078,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_09b0a868ab8be94600691c9dc67a148190a8c1e59bb2324752\",\"object\":\"response\",\"created_at\":1763483078,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_Jb6lFOkvm8t03s1DC4Ntninx\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"XqhzzsFi1vtBZL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"GpWjmo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"NEFYgnCxNvlWw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"N8wpMEjv2iR5gP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"0Qu21F4Tll1i\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"F5EyDpkoeIojt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"BJjLdQ3HaD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"lhs7sv4YRS37H\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"QRQgN9UzBsejIQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"W64uHEuA8hPKj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"n2vsewtChPOkG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"aCfqsjMXahokuks\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"PvzXA2DK9qFUcBJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"zfSXnxxRcCSQK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"pTlj5hd2DZt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"Afr5ae6SwaEvO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"oOWAA3SCIGk2Z6p\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"1i0KtYLcqR3Rrqm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"jSYMidatotkZ71J\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"Hallo\",\"obfuscation\":\"tWsenrG0aeu\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"LeoF6n0gbEVqpKc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\" wereld\",\"obfuscation\":\"bnm3f08Z9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"3hrnReCZukDRl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"wfML9FRiOV9YzI0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\">\\\"\",\"obfuscation\":\"yCDj0Gn1ByecJ7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"},{\\\"\",\"obfuscation\":\"StwYtBJ8BwDV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"CdrY1kpdj1DS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"vZwi2SLjalfcd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"add\",\"obfuscation\":\"XOM82zchNR0TX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"2Oqxu1M3NXUh8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"reference\",\"obfuscation\":\"rySDsFe\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"Id\",\"obfuscation\":\"QM0ADXqMGjLuWg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"3ka1wdVfW4Y7n\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"HXEFlKUM6Bwuj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"OsFoW7rzRqsreIa\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"azRpeDtgLCWnbR3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"zIGhmBHk6G469\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"position\",\"obfuscation\":\"NVbe7I0g\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"ajhOjbL821hxz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"after\",\"obfuscation\":\"zX2obWlnzwW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"1VhlzoqUxyKWp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"blocks\",\"obfuscation\":\"4yGeFqXEuh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"\\\":[\\\"\",\"obfuscation\":\"DnQkrh7kQOFv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"6H6nrimlConhsD3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"vWwi0yrUpCwkrIc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\">You\",\"obfuscation\":\"5bXEDGXjo3gq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\" look\",\"obfuscation\":\"1W03JLSmhTe\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":50,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\" great\",\"obfuscation\":\"m7WdREoqbX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":51,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\" today\",\"obfuscation\":\"rijxTqs0w2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":52,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"G0ZEo6QpKeFrV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":53,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"WujecMcBbQNsbWm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":54,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"kj3bkzQjM3RH0Ho\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":55,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"\\\"]\",\"obfuscation\":\"yjMWhgF4yaxvpf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":56,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"}\",\"obfuscation\":\"eFvFbmpBBPVctEx\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":57,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"TMd2JY5XCYOSzs\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":58,\"item_id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, wereld!
\\\"},{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":59,\"output_index\":0,\"item\":{\"id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, wereld!
\\\"},{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\",\"call_id\":\"call_Jb6lFOkvm8t03s1DC4Ntninx\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":60,\"response\":{\"id\":\"resp_09b0a868ab8be94600691c9dc67a148190a8c1e59bb2324752\",\"object\":\"response\",\"created_at\":1763483078,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_09b0a868ab8be94600691c9dc70e088190802609107de8a5c3\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, wereld!
\\\"},{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]}]}\",\"call_id\":\"call_Jb6lFOkvm8t03s1DC4Ntninx\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":730,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":56,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":786},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add paragraph and update selection_1_8b11b2a66564f9985f33774d3862cd8c.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add paragraph and update selection_1_8b11b2a66564f9985f33774d3862cd8c.json
new file mode 100644
index 0000000000..72a91c3da4
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add paragraph and update selection_1_8b11b2a66564f9985f33774d3862cd8c.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the entire document (INCLUDING the selected text), \\nyou can use this to find the selected text to understand the context (but you MUST NOT issue operations against this document, you MUST issue operations against the selection):\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a paragraph with the text 'You look great today!' before the selection and translate selection to German\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_05da7fc6920e943100691cb331f2c08193923ad294b0a08776\",\"object\":\"response\",\"created_at\":1763488562,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_05da7fc6920e943100691cb331f2c08193923ad294b0a08776\",\"object\":\"response\",\"created_at\":1763488562,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_N3ienDLfmigojrWLvn27x5pt\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"f6sd5AFutWUsW3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"pPJ4e1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"SSDTnwQw6ukWq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"uRtnpUTpA0df6K\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"ZScaZKYrM2Z8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"nOBTbCcFA9bmh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"add\",\"obfuscation\":\"4AC8FTpqSpJ3V\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"SFCbdhEmnENcn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"reference\",\"obfuscation\":\"1Xy9nas\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"Id\",\"obfuscation\":\"Zbeymhpvfku1uc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"LJfRcSw8ngAuv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"Lg6JCZyVMbxb6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"2wesSEVFUh6hqym\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"v9cb6Tfkcj9q4nv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"Dap7nECOOgjmh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"position\",\"obfuscation\":\"nj7XTi7I\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"O84GuJ1xzuwa8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"before\",\"obfuscation\":\"Xy9NdwrzZX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"lpGOZcCjRnOBp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"blocks\",\"obfuscation\":\"hM7J3fNsAY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"\\\":[\\\"\",\"obfuscation\":\"4taq73U0mKTX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"rwjdvUAxrMBQi47\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"o4rz1maaPmyLfth\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\">You\",\"obfuscation\":\"rasYPXZMVZOJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\" look\",\"obfuscation\":\"Xe6tqJFqMYa\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\" great\",\"obfuscation\":\"1RV8QxRBO0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\" today\",\"obfuscation\":\"DrfYea2C2z\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"QcKSb8UGINlN1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"WHQOHbkjyL3mCmY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"vkV7Jy9FS1vFtOt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"\\\"]\",\"obfuscation\":\"36mmqHEwvsMyAR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"},{\\\"\",\"obfuscation\":\"V8LQZDE4pKaV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"Dy312Ag5yCLM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"EegfhGWCwMCtp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"2Fk6IH5LT0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"b8ldNHMkFI0E9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"9A1yI4N5iY9P8L\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"YyZds6qhZGKzD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"qoTzKRm0hB9YG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"VltP2N5NpcVzYUP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"VTXKWPhvyg2QXcU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"Zo2sby7Y1MXw1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"malIrPiABjM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"JNm1FzQMvvLbS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"Lylf3rSimYMR0pm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"9d9EIQdpKLRkY5E\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"djUQ1awMMWoy5YU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":50,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"Hallo\",\"obfuscation\":\"2TSxC0TVA6a\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":51,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"Zw7ame6l5DeRdW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":52,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"ZmAO2lsykdRmI9y\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":53,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"s7IIBHplFaH8yrc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":54,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"4qzdZ9Pu5C5ld4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":55,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"q1xFCvwjiwXhUA\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":56,\"item_id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":57,\"output_index\":0,\"item\":{\"id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\",\"call_id\":\"call_N3ienDLfmigojrWLvn27x5pt\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":58,\"response\":{\"id\":\"resp_05da7fc6920e943100691cb331f2c08193923ad294b0a08776\",\"object\":\"response\",\"created_at\":1763488562,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_05da7fc6920e943100691cb33339e08193b245843dfb48085d\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\",\"call_id\":\"call_N3ienDLfmigojrWLvn27x5pt\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":736,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":54,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":790},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add paragraph and update selection_1_8f2fe0e396c7ae8f369898062fbdeb11.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add paragraph and update selection_1_8f2fe0e396c7ae8f369898062fbdeb11.json
new file mode 100644
index 0000000000..1806be6f1c
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add paragraph and update selection_1_8f2fe0e396c7ae8f369898062fbdeb11.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a paragraph with the text 'You look great today!' before the selection and translate selection to German\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0d6aa1f5106f9b2a00691c9dc8ad4881979006211e36613c56\",\"object\":\"response\",\"created_at\":1763483080,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0d6aa1f5106f9b2a00691c9dc8ad4881979006211e36613c56\",\"object\":\"response\",\"created_at\":1763483080,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_WXOSEPibG9ibyErqTQ6A8t9u\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"3khIgF35Tu4bJz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"lhEKmG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"yUWNz3DYzGYxP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"FNhG3nZPTOOJoU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"Car9VfO4tkPm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"R4zDT4I6Lpgc2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"add\",\"obfuscation\":\"nFxmlAC0jo16z\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"AwxqG5NG3NR7c\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"reference\",\"obfuscation\":\"MNIoSXh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"Id\",\"obfuscation\":\"d4K5VZaOIufvHH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"ISbb4oDlUAWMR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"JBdYf6H3YTciN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"lTR4I3gyk1ckTH0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"GWxDSzzxT2bBkqB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"0eb3BJLPmlRM6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"position\",\"obfuscation\":\"eWtxWP8a\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"gmhOKaVAQRErq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"before\",\"obfuscation\":\"FdoKpmcL0w\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"JjswYctzyryVM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"blocks\",\"obfuscation\":\"bYQuSoTFYI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"\\\":[\\\"\",\"obfuscation\":\"eUkkPIqxqNjh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"iJOki24zt9pwLWQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"zHZEsugBdCsbQJ2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\">You\",\"obfuscation\":\"xrTl7vR911yM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\" look\",\"obfuscation\":\"mQkIDZMiUN3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\" great\",\"obfuscation\":\"VFmsbBUL20\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\" today\",\"obfuscation\":\"VWeHEEfwIU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"sKxho15lIOBJS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"HNjOvMMSblTptje\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"KxVMBOljo3Qh60h\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"\\\"]\",\"obfuscation\":\"7GnVyy4MT7NgT0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"},{\\\"\",\"obfuscation\":\"PmZcNILfBPXQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"fF1omcbUNDn9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"9WC4T0DyiU6FG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"bwqDMtDINh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"c5FAkDTTyklJL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"VvtQS2oIE46IcS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"1kRCaFpR6N2sv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"WgXVe8Ibu9MPT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"lqFt8XKVGR1RVx6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"kgVZWl5EODegk8h\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"xvexDeGj22SHE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"3Ymif15twQs\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"vwbnQ86Jpl6ns\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"En3xs1wI8LWS1QB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"h66etoTxhrswjg2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"TiSNpPl3NKGlkcI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":50,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"Hallo\",\"obfuscation\":\"d5SFx18McSg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":51,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"bQuC9paVRGHEhi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":52,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"he5BSt8TgeJwo3U\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":53,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"FTvddI6DZLnuUXG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":54,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"5g9Jt99CVNO5AT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":55,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"6BwGSNxA2yuJxi\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":56,\"item_id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":57,\"output_index\":0,\"item\":{\"id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\",\"call_id\":\"call_WXOSEPibG9ibyErqTQ6A8t9u\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":58,\"response\":{\"id\":\"resp_0d6aa1f5106f9b2a00691c9dc8ad4881979006211e36613c56\",\"object\":\"response\",\"created_at\":1763483080,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_0d6aa1f5106f9b2a00691c9dc94be4819797fc635c099cef17\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\",\"call_id\":\"call_WXOSEPibG9ibyErqTQ6A8t9u\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":714,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":54,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":768},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add paragraph and update selection_1_dafc9c956b17f814f2e5daf2effc4612.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add paragraph and update selection_1_dafc9c956b17f814f2e5daf2effc4612.json
deleted file mode 100644
index 548cc86938..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add paragraph and update selection_1_dafc9c956b17f814f2e5daf2effc4612.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids.\\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"add a paragraph with the text 'You look great today!' at the beginning and translate selection to German\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e8ebc7208197bf22689757382a730fd9d0fa77e24453\",\"object\":\"response\",\"created_at\":1758783723,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e8ebc7208197bf22689757382a730fd9d0fa77e24453\",\"object\":\"response\",\"created_at\":1758783723,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_rhQeGE3QJlPBDbHeR69nmsru\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"XgdfABq7zFmJAm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"qOnL9E\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"QdFaSZb6Gi2m6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"JgKQMMXTGWgcAy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"LmaiqhpJfB6g\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"HfCRi3pSvSPwr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"add\",\"obfuscation\":\"oKagt54adPwFW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"M14AyzRHwpViU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"reference\",\"obfuscation\":\"0VBjBUy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"Id\",\"obfuscation\":\"roGyiz7PmEbSLT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"jtXztla8Qqw6w\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"JRH5knSuhDT5T\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"hpHtmtBGA2Hbw5S\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"pvYqJf93ML9SPu5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"7uh3IKWL3yV5t\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"position\",\"obfuscation\":\"zBSXGVL2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"6FZoqw6qEIfOv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"before\",\"obfuscation\":\"qkIDh0mg0O\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"moS6wKQorf3tQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"blocks\",\"obfuscation\":\"8mrPUPdOsn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"\\\":[\\\"\",\"obfuscation\":\"G7cQL0CNnNxs\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"K5qnfiJKoGmlSYE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"6BCX8ITTaAQZu9z\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\">You\",\"obfuscation\":\"YtPXUYGmMgje\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\" look\",\"obfuscation\":\"2XUL9ftLfCz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\" great\",\"obfuscation\":\"AE1ur4gI1V\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\" today\",\"obfuscation\":\"XvrmwAlz9Z\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"RnYbEjHqcUoyT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"eoMxXgMPiCH8Vsr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"hMknIAf3RLXebxb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"\\\"]\",\"obfuscation\":\"KlwOWlsySpbj3I\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"},{\\\"\",\"obfuscation\":\"s4qJnvlYe12e\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"dkt9ABRPbUAf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"4lKlC7suMtV5i\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"EhwAtCwWQ3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"deTNRS3T8hcWb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"kdE9e6C6UJrt5t\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"LMJ7pkE4v0WDe\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"86ytK61llbfij\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"FMcmi7ThY8Ga8Ud\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"y6PwE70XvQntxw6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"H7eZNNpMNIJJy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"lJ8gW0gBHwe\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"zk0T9eZN8QsBt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"Fh6Io6hW8z1HOCH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"SnxLtP3Ve9zzJoI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"eCapKmcDGJfKRb1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":50,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"Hallo\",\"obfuscation\":\"XungihbFoSy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":51,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"DpL97MV7Mumrnb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":52,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"yYf1FscdkIr9oHq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":53,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"VUO5nE6zZvwberl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":54,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"LlmbKQ4PkXf2V1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":55,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"UQtMufCNihJ5f5\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":56,\"item_id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":57,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\",\"call_id\":\"call_rhQeGE3QJlPBDbHeR69nmsru\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":58,\"response\":{\"id\":\"resp_68d4e8ebc7208197bf22689757382a730fd9d0fa77e24453\",\"object\":\"response\",\"created_at\":1758783723,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e8ec476c819796c327199c03c8a40fd9d0fa77e24453\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"You look great today!
\\\"]},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\",\"call_id\":\"call_rhQeGE3QJlPBDbHeR69nmsru\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":508,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":54,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":562},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/delete first block_1_24119724ddeddbe1d724375ad7546eef.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/delete first block_1_24119724ddeddbe1d724375ad7546eef.json
deleted file mode 100644
index 312d7d2bf8..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/delete first block_1_24119724ddeddbe1d724375ad7546eef.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"delete the first paragraph\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_019HtdB5YEF84ffc3DNh82wo\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1243,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":11,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01Cf7DziTPodeFvNnwS4x9Lf\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operat\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ions\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\": [\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"type\\\":\\\"del\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ete\\\",\\\"id\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ref\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"1$\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1243,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":67} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/delete first block_1_71dfbd70fa9bcd8c2378c0b255360279.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/delete first block_1_71dfbd70fa9bcd8c2378c0b255360279.json
new file mode 100644
index 0000000000..8259bf0e9e
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/delete first block_1_71dfbd70fa9bcd8c2378c0b255360279.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"delete the first paragraph\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_011iRH3VqXqNhpQ1kMRhYEiD\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1308,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01HuSqjLjWz2rtv6d32t2Dzj\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operat\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ion\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"s\\\": [{\\\"t\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ype\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"delete\\\",\\\"id\\\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ref1$\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1308,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":67} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/delete first block_1_72e05e8a661b9149b89f8ca9a80a2129.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/delete first block_1_72e05e8a661b9149b89f8ca9a80a2129.json
new file mode 100644
index 0000000000..577ad5a422
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/delete first block_1_72e05e8a661b9149b89f8ca9a80a2129.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"delete the first paragraph\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-0502698c-1a91-46e9-9fec-4368946cea78\",\"object\":\"chat.completion.chunk\",\"created\":1763481007,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabthd1ve82rnsth4pr86tt4\",\"seed\":1215811873}}\n\ndata: {\"id\":\"chatcmpl-0502698c-1a91-46e9-9fec-4368946cea78\",\"object\":\"chat.completion.chunk\",\"created\":1763481007,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"0r5eajwgf\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"delete\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-0502698c-1a91-46e9-9fec-4368946cea78\",\"object\":\"chat.completion.chunk\",\"created\":1763481007,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabthd1ve82rnsth4pr86tt4\",\"usage\":{\"queue_time\":0.043558097,\"prompt_tokens\":986,\"prompt_time\":0.05724643,\"completion_tokens\":20,\"completion_time\":0.049984143,\"total_tokens\":1006,\"total_time\":0.107230573}},\"usage\":{\"queue_time\":0.043558097,\"prompt_tokens\":986,\"prompt_time\":0.05724643,\"completion_tokens\":20,\"completion_time\":0.049984143,\"total_tokens\":1006,\"total_time\":0.107230573}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/delete first block_1_fd0a1c180a2d6c7165823af96ca7a444.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/delete first block_1_fd0a1c180a2d6c7165823af96ca7a444.json
deleted file mode 100644
index 9cdc16cd7b..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/delete first block_1_fd0a1c180a2d6c7165823af96ca7a444.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"delete the first paragraph\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-b228cb63-e47c-402d-8883-bc768ade32c0\",\"object\":\"chat.completion.chunk\",\"created\":1758783449,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_487c5a8475\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk9xney6apvkw3r1exvpm\"}}\n\ndata: {\"id\":\"chatcmpl-b228cb63-e47c-402d-8883-bc768ade32c0\",\"object\":\"chat.completion.chunk\",\"created\":1758783449,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_487c5a8475\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"9adj263hh\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"delete\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-b228cb63-e47c-402d-8883-bc768ade32c0\",\"object\":\"chat.completion.chunk\",\"created\":1758783449,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_487c5a8475\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk9xney6apvkw3r1exvpm\",\"usage\":{\"queue_time\":0.133096314,\"prompt_tokens\":935,\"prompt_time\":0.077927542,\"completion_tokens\":20,\"completion_time\":0.055029021,\"total_tokens\":955,\"total_time\":0.132956563}},\"usage\":{\"queue_time\":0.133096314,\"prompt_tokens\":935,\"prompt_time\":0.077927542,\"completion_tokens\":20,\"completion_time\":0.055029021,\"total_tokens\":955,\"total_time\":0.132956563}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/delete first block_1_00d51791f8357a4bc061a2cf8ce067f1.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/delete first block_1_00d51791f8357a4bc061a2cf8ce067f1.json
new file mode 100644
index 0000000000..1533273f75
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/delete first block_1_00d51791f8357a4bc061a2cf8ce067f1.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"delete the first paragraph\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_03e115c859b8444c00691c956f80e88195942b740bf65059ed\",\"object\":\"response\",\"created_at\":1763480943,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_03e115c859b8444c00691c956f80e88195942b740bf65059ed\",\"object\":\"response\",\"created_at\":1763480943,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_03e115c859b8444c00691c956fe748819596e09b7b4f577493\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_03e115c859b8444c00691c956fe748819596e09b7b4f577493\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_03e115c859b8444c00691c956fe748819596e09b7b4f577493\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"8XKa3IjsPtkmzU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_03e115c859b8444c00691c956fe748819596e09b7b4f577493\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"wXoTdj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_03e115c859b8444c00691c956fe748819596e09b7b4f577493\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"S6MqzJdB0inCp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_03e115c859b8444c00691c956fe748819596e09b7b4f577493\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"6crmWdc8fbQMyp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_03e115c859b8444c00691c956fe748819596e09b7b4f577493\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"I6D683wG1wOb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_03e115c859b8444c00691c956fe748819596e09b7b4f577493\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"IFWU3lCNHoyod\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_03e115c859b8444c00691c956fe748819596e09b7b4f577493\",\"output_index\":0,\"content_index\":0,\"delta\":\"delete\",\"logprobs\":[],\"obfuscation\":\"mo6Qht8l6a\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_03e115c859b8444c00691c956fe748819596e09b7b4f577493\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"9oeKCNvWKtkiV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_03e115c859b8444c00691c956fe748819596e09b7b4f577493\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"PIXBh9cF5l7I63\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_03e115c859b8444c00691c956fe748819596e09b7b4f577493\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"6yZ0WvFQtIz4l\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_03e115c859b8444c00691c956fe748819596e09b7b4f577493\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"dXhKprVs80HQ5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_03e115c859b8444c00691c956fe748819596e09b7b4f577493\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"NeaCG5xWKkfghO9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_03e115c859b8444c00691c956fe748819596e09b7b4f577493\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"kO3ULEl4Kwekhxm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_03e115c859b8444c00691c956fe748819596e09b7b4f577493\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"ZbFr8nye6XDVdz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_03e115c859b8444c00691c956fe748819596e09b7b4f577493\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"nvqvZMt94endZJ\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":19,\"item_id\":\"msg_03e115c859b8444c00691c956fe748819596e09b7b4f577493\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"delete\\\",\\\"id\\\":\\\"ref1$\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":20,\"item_id\":\"msg_03e115c859b8444c00691c956fe748819596e09b7b4f577493\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"delete\\\",\\\"id\\\":\\\"ref1$\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":21,\"output_index\":0,\"item\":{\"id\":\"msg_03e115c859b8444c00691c956fe748819596e09b7b4f577493\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"delete\\\",\\\"id\\\":\\\"ref1$\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":22,\"response\":{\"id\":\"resp_03e115c859b8444c00691c956f80e88195942b740bf65059ed\",\"object\":\"response\",\"created_at\":1763480943,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_03e115c859b8444c00691c956fe748819596e09b7b4f577493\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"delete\\\",\\\"id\\\":\\\"ref1$\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":769,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":16,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":785},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/delete first block_1_5c60f0de80e4a010dcf6e7b2f534b1d7.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/delete first block_1_5c60f0de80e4a010dcf6e7b2f534b1d7.json
deleted file mode 100644
index 944080f43e..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/delete first block_1_5c60f0de80e4a010dcf6e7b2f534b1d7.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"delete the first paragraph\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7a670a48195b24ff74d5acf59bb0dc524613ddaf8d1\",\"object\":\"response\",\"created_at\":1758783398,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7a670a48195b24ff74d5acf59bb0dc524613ddaf8d1\",\"object\":\"response\",\"created_at\":1758783398,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7a747a88195abc6541d2e4df7c90dc524613ddaf8d1\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7a747a88195abc6541d2e4df7c90dc524613ddaf8d1\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7a747a88195abc6541d2e4df7c90dc524613ddaf8d1\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"blNgUlrHX3QsmY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7a747a88195abc6541d2e4df7c90dc524613ddaf8d1\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"KWUVXf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7a747a88195abc6541d2e4df7c90dc524613ddaf8d1\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"WO93ll8QFvwyU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7a747a88195abc6541d2e4df7c90dc524613ddaf8d1\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"032CLzUW4zrTdv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7a747a88195abc6541d2e4df7c90dc524613ddaf8d1\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"fPOkTKuRBY7N\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7a747a88195abc6541d2e4df7c90dc524613ddaf8d1\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"y4xguOmNrkw8z\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7a747a88195abc6541d2e4df7c90dc524613ddaf8d1\",\"output_index\":0,\"content_index\":0,\"delta\":\"delete\",\"logprobs\":[],\"obfuscation\":\"CUZkIJvRU6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7a747a88195abc6541d2e4df7c90dc524613ddaf8d1\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"BAH5h6pbZl3j8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7a747a88195abc6541d2e4df7c90dc524613ddaf8d1\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"NLPYQnKL12tjdT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7a747a88195abc6541d2e4df7c90dc524613ddaf8d1\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"BZuAGx0drC0Rp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7a747a88195abc6541d2e4df7c90dc524613ddaf8d1\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"yUGNJKPg6YJSA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7a747a88195abc6541d2e4df7c90dc524613ddaf8d1\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"YzmVn6zc6QVGPK8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7a747a88195abc6541d2e4df7c90dc524613ddaf8d1\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"K6Kvl0Sjc5rtTNI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7a747a88195abc6541d2e4df7c90dc524613ddaf8d1\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"V3taS9TPjSQVdY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7a747a88195abc6541d2e4df7c90dc524613ddaf8d1\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"VzxywBJfGZ9sGF\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7a747a88195abc6541d2e4df7c90dc524613ddaf8d1\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"delete\\\",\\\"id\\\":\\\"ref1$\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7a747a88195abc6541d2e4df7c90dc524613ddaf8d1\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"delete\\\",\\\"id\\\":\\\"ref1$\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":21,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7a747a88195abc6541d2e4df7c90dc524613ddaf8d1\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"delete\\\",\\\"id\\\":\\\"ref1$\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":22,\"response\":{\"id\":\"resp_68d4e7a670a48195b24ff74d5acf59bb0dc524613ddaf8d1\",\"object\":\"response\",\"created_at\":1758783398,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7a747a88195abc6541d2e4df7c90dc524613ddaf8d1\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"delete\\\",\\\"id\\\":\\\"ref1$\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":722,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":16,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":738},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/delete first block_1_83607282733aee32b5769107be6b9428.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/delete first block_1_83607282733aee32b5769107be6b9428.json
new file mode 100644
index 0000000000..eaf9167f50
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/delete first block_1_83607282733aee32b5769107be6b9428.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"delete the first paragraph\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0f043a1b036764bf00691c959e3568819680f1553eb9eb4468\",\"object\":\"response\",\"created_at\":1763480990,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0f043a1b036764bf00691c959e3568819680f1553eb9eb4468\",\"object\":\"response\",\"created_at\":1763480990,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_0f043a1b036764bf00691c959ed8cc8196b3481c346c5eef91\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_OS3XTXedui7ZtaAueftYKaqR\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_0f043a1b036764bf00691c959ed8cc8196b3481c346c5eef91\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"MjKcBBMeXMvmLc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_0f043a1b036764bf00691c959ed8cc8196b3481c346c5eef91\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"uX3HCq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_0f043a1b036764bf00691c959ed8cc8196b3481c346c5eef91\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"u9HuwFlh9cdoq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_0f043a1b036764bf00691c959ed8cc8196b3481c346c5eef91\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"zsB3ok97Bu0zua\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_0f043a1b036764bf00691c959ed8cc8196b3481c346c5eef91\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"daDnpJMlHyaG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_0f043a1b036764bf00691c959ed8cc8196b3481c346c5eef91\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"2gXVTRuMXaa0f\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_0f043a1b036764bf00691c959ed8cc8196b3481c346c5eef91\",\"output_index\":0,\"delta\":\"delete\",\"obfuscation\":\"y5mDuX4nMz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_0f043a1b036764bf00691c959ed8cc8196b3481c346c5eef91\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"psuDdEPe1C71S\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_0f043a1b036764bf00691c959ed8cc8196b3481c346c5eef91\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"lHHMJZafsYiZ6S\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_0f043a1b036764bf00691c959ed8cc8196b3481c346c5eef91\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"csA2OijMctP0v\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_0f043a1b036764bf00691c959ed8cc8196b3481c346c5eef91\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"DmAxyUmnGWocv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_0f043a1b036764bf00691c959ed8cc8196b3481c346c5eef91\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"40bx7IjAqxoou8t\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_0f043a1b036764bf00691c959ed8cc8196b3481c346c5eef91\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"xensBasxB8I3PLw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_0f043a1b036764bf00691c959ed8cc8196b3481c346c5eef91\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"h9QnEWwGQrM9Jy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_0f043a1b036764bf00691c959ed8cc8196b3481c346c5eef91\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"UBoKmofE4wkrOI\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":18,\"item_id\":\"fc_0f043a1b036764bf00691c959ed8cc8196b3481c346c5eef91\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"delete\\\",\\\"id\\\":\\\"ref1$\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":19,\"output_index\":0,\"item\":{\"id\":\"fc_0f043a1b036764bf00691c959ed8cc8196b3481c346c5eef91\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"delete\\\",\\\"id\\\":\\\"ref1$\\\"}]}\",\"call_id\":\"call_OS3XTXedui7ZtaAueftYKaqR\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":20,\"response\":{\"id\":\"resp_0f043a1b036764bf00691c959e3568819680f1553eb9eb4468\",\"object\":\"response\",\"created_at\":1763480990,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_0f043a1b036764bf00691c959ed8cc8196b3481c346c5eef91\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"delete\\\",\\\"id\\\":\\\"ref1$\\\"}]}\",\"call_id\":\"call_OS3XTXedui7ZtaAueftYKaqR\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":706,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":16,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":722},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/delete first block_1_9ee58319810833bcc30596aa06091958.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/delete first block_1_9ee58319810833bcc30596aa06091958.json
deleted file mode 100644
index 2e94241fa2..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/delete first block_1_9ee58319810833bcc30596aa06091958.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"delete the first paragraph\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7caffc0819089920b11d0730016009aaf5e4703f39f\",\"object\":\"response\",\"created_at\":1758783435,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7caffc0819089920b11d0730016009aaf5e4703f39f\",\"object\":\"response\",\"created_at\":1758783435,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7cb811c81908f0f74d0032fe786009aaf5e4703f39f\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_hFZE0cKaKFIbeEDzIZ6271mG\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e7cb811c81908f0f74d0032fe786009aaf5e4703f39f\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"h74OqbzA6AZfZW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e7cb811c81908f0f74d0032fe786009aaf5e4703f39f\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"htm5ry\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e7cb811c81908f0f74d0032fe786009aaf5e4703f39f\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"Ua2QpjpZM4wLd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e7cb811c81908f0f74d0032fe786009aaf5e4703f39f\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"kTtkCR1JrMOM6b\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e7cb811c81908f0f74d0032fe786009aaf5e4703f39f\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"cStwxFwA5kSF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e7cb811c81908f0f74d0032fe786009aaf5e4703f39f\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"GCRPF38wY9NGz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e7cb811c81908f0f74d0032fe786009aaf5e4703f39f\",\"output_index\":0,\"delta\":\"delete\",\"obfuscation\":\"BuQrUhq6pr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e7cb811c81908f0f74d0032fe786009aaf5e4703f39f\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"fP3U121et1VSG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e7cb811c81908f0f74d0032fe786009aaf5e4703f39f\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"hg4coRXAD5GFam\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e7cb811c81908f0f74d0032fe786009aaf5e4703f39f\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"1RQnwIutVorpv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e7cb811c81908f0f74d0032fe786009aaf5e4703f39f\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"G2eks7k3x72rD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e7cb811c81908f0f74d0032fe786009aaf5e4703f39f\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"n3JQ5akYHu0tD8Z\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e7cb811c81908f0f74d0032fe786009aaf5e4703f39f\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"x7ZF5M7yrVYvepD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e7cb811c81908f0f74d0032fe786009aaf5e4703f39f\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"0cBxkTlGWZ7k8F\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e7cb811c81908f0f74d0032fe786009aaf5e4703f39f\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"HUweSbwYFCyHft\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":18,\"item_id\":\"fc_68d4e7cb811c81908f0f74d0032fe786009aaf5e4703f39f\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"delete\\\",\\\"id\\\":\\\"ref1$\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":19,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7cb811c81908f0f74d0032fe786009aaf5e4703f39f\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"delete\\\",\\\"id\\\":\\\"ref1$\\\"}]}\",\"call_id\":\"call_hFZE0cKaKFIbeEDzIZ6271mG\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":20,\"response\":{\"id\":\"resp_68d4e7caffc0819089920b11d0730016009aaf5e4703f39f\",\"object\":\"response\",\"created_at\":1758783435,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e7cb811c81908f0f74d0032fe786009aaf5e4703f39f\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"delete\\\",\\\"id\\\":\\\"ref1$\\\"}]}\",\"call_id\":\"call_hFZE0cKaKFIbeEDzIZ6271mG\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":659,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":16,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":675},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/clear block formatting_1_327facc19973ed5bf5dfbb06bc842f58.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/clear block formatting_1_327facc19973ed5bf5dfbb06bc842f58.json
deleted file mode 100644
index 2546bc9356..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/clear block formatting_1_327facc19973ed5bf5dfbb06bc842f58.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"clear the formatting (colors and alignment)\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01HvBq8VF91gLM814mLDBhpV\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1144,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":15,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_014M3pzxp3AJTFWfNtiXPuYu\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operatio\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ns\\\": [{\\\"type\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"update\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\",\\\"id\\\":\\\"re\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"f1\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"$\\\",\\\"blo\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ck\\\":\\\"Co\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"lored\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" tex\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"t
\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"},{\\\"t\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ype\\\":\\\"u\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"pdate\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\",\\\"id\\\":\\\"re\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"f2$\\\",\\\"blo\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ck\\\":\\\"A\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"lign\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ed text
\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1144,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":121} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/clear block formatting_1_f3ecead131eac14f117b601ad92bae90.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/clear block formatting_1_f3ecead131eac14f117b601ad92bae90.json
new file mode 100644
index 0000000000..55a93f5a4d
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/clear block formatting_1_f3ecead131eac14f117b601ad92bae90.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"clear the formatting (colors and alignment)\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01D7defykxNCfFq2SjHgjSj3\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1209,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":11,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01Ab1rFNMdACRPwtiFSHPDeC\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operations\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\": [{\\\"type\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"upda\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"te\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",\\\"id\\\":\\\"re\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"f1$\\\",\\\"bloc\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"k\\\":\\\"Co\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"lored\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" text\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"
\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"},{\\\"type\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"u\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"pdate\\\",\\\"id\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"ref2$\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"block\\\":\\\"Aligne\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"d text\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"
\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1209,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":101} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/drop mark and link and change text within mark_1_68d51d1950b2878e08616f9effbee616.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/drop mark and link and change text within mark_1_68d51d1950b2878e08616f9effbee616.json
deleted file mode 100644
index fc5684885a..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/drop mark and link and change text within mark_1_68d51d1950b2878e08616f9effbee616.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"change the last paragraph to 'Hi, world! Bold the text. Link.' without any markup like bold or link\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01Lx4NeH1hMDsDVHqdWMAHfa\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1263,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":9,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_011mf7p6EoCtaAFoDxdMDv4W\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"opera\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"tions\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\": [{\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"type\\\":\\\"upda\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"te\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"id\\\":\\\"ref3$\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\",\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"block\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Hi, \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"worl\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"d! Bold \"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"the tex\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"t. Li\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"nk\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\".
\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1263,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":87} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/drop mark and link and change text within mark_1_6b686110fa540e40d81fd68ee23cde86.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/drop mark and link and change text within mark_1_6b686110fa540e40d81fd68ee23cde86.json
new file mode 100644
index 0000000000..8ab7e5596b
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/drop mark and link and change text within mark_1_6b686110fa540e40d81fd68ee23cde86.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"change the last paragraph to 'Hi, world! Bold the text. Link.' without any markup like bold or link\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01367ZkFvuEr1drVFobHai9i\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1328,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01SY8EB4EwVzwWJmiEmScFqR\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operatio\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ns\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" [{\\\"t\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ype\\\":\\\"update\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\",\\\"id\\\":\\\"ref\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"3$\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"bl\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ock\\\":\\\"H\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"i, world! \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Bold\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" th\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e text. L\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ink.
\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1328,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":87} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/drop mark and link_1_1acc3cfa3a758ee4118f48b99e56f7b5.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/drop mark and link_1_1acc3cfa3a758ee4118f48b99e56f7b5.json
deleted file mode 100644
index 9a5acd85b5..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/drop mark and link_1_1acc3cfa3a758ee4118f48b99e56f7b5.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"remove the formatting (turn into plain text without styles or urls) from the last paragraph\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01QJtEc94rRvaC6F8bRX9kvJ\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1256,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":11,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_016KLSLDeWLinm4igYEAbibT\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operatio\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ns\\\": [{\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ty\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"pe\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"updat\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e\\\",\\\"id\\\":\\\"re\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"f3$\\\",\\\"blo\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ck\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"Hel\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"lo, world!\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" Bold text\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\". Link\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\".
\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1256,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":88} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/drop mark and link_1_fee0a33a7c0951dacc8fd9ba02adef0a.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/drop mark and link_1_fee0a33a7c0951dacc8fd9ba02adef0a.json
new file mode 100644
index 0000000000..571f7051f0
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/drop mark and link_1_fee0a33a7c0951dacc8fd9ba02adef0a.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"remove the formatting (turn into plain text without styles or urls) from the last paragraph\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01Lh2SX6bcHAcHjH9FK3EMra\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1321,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01GC7fvknvqi24wjwfqTTq7r\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"operat\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ions\\\": [{\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"type\\\":\\\"upd\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ate\\\",\\\"id\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ref3$\\\",\\\"bloc\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"k\\\":\\\"Hello\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\", w\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"orld!\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" Bol\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"d t\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ext. Link.\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"
\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1321,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":87}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/modify nested content_1_1d18b29fde3a6494f2d1df98d0689bcf.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/modify nested content_1_1d18b29fde3a6494f2d1df98d0689bcf.json
new file mode 100644
index 0000000000..2656288c6c
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/modify nested content_1_1d18b29fde3a6494f2d1df98d0689bcf.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"make apples uppercase\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01Hgc7BLsswofeh4dbkkrtcu\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1164,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":11,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01Cm4EcQCartrQisS4KKbpLZ\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operations\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\": [{\\\"type\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"updat\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e\\\",\\\"id\\\":\\\"re\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"f2$\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"block\\\":\\\"APPLES
\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1164,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":81}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/modify nested content_1_9158921bdd72e8f26eed1d4a3ccff6a4.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/modify nested content_1_9158921bdd72e8f26eed1d4a3ccff6a4.json
deleted file mode 100644
index 7d0138fa72..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/modify nested content_1_9158921bdd72e8f26eed1d4a3ccff6a4.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"make apples uppercase\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01F2Hv2WjXNJ253X363854sb\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1099,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":15,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01HTMzooLKfJyw7BaNhceMWr\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operat\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ions\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" [{\\\"type\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"update\\\",\\\"i\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"d\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"ref2$\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",\\\"b\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"lock\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"p>APPLES\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1099,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":83} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/modify parent content_1_7d96675c4edc13f69084f42983de6d73.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/modify parent content_1_7d96675c4edc13f69084f42983de6d73.json
new file mode 100644
index 0000000000..e4efa1c0d4
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/modify parent content_1_7d96675c4edc13f69084f42983de6d73.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"make the first paragraph uppercase\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01DE3ZdgNEfRxTWjzrstc1ZM\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1165,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01EMAcQiL1WPYwA9zV5J2fLs\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"ope\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ratio\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ns\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\": [{\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"type\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"upda\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"te\\\",\\\"id\\\":\\\"re\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"f1$\\\",\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"blo\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ck\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"p>I NEED TO\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" BU\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Y:<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"/p>\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1165,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":85} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/modify parent content_1_a2946c73d9c3eeca81e4b4b08213a8a2.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/modify parent content_1_a2946c73d9c3eeca81e4b4b08213a8a2.json
deleted file mode 100644
index 830cf3449f..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/modify parent content_1_a2946c73d9c3eeca81e4b4b08213a8a2.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"make the first paragraph uppercase\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_014L8gC6UAq8bp7QppPB3y2N\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1100,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":15,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01Lg2YNghf1zmp6JnSuLhS9C\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"ope\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"rations\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" [\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"typ\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e\\\":\\\"update\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"id\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"ref\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"1$\\\",\\\"block\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"I NE\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ED TO BUY:<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"/p>\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1100,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":85} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/plain source block, add mention_1_785d7f53424b53e8b64f4732aa578c61.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/plain source block, add mention_1_785d7f53424b53e8b64f4732aa578c61.json
new file mode 100644
index 0000000000..f10987a1c3
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/plain source block, add mention_1_785d7f53424b53e8b64f4732aa578c61.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `
- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"Change the first paragraph to Hello, Jane Doe! (use a mention)\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_015de9vuAS3GVFJhTxgmANPM\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1320,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01UGnm7C4F1QMFuFbK3RTMWj\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"opera\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"tions\\\": \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"[{\\\"type\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"upda\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"te\\\",\\\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"id\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"ref1$\\\",\\\"blo\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ck\\\":\\\"Hello, \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"@Jane \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Doe\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"!
\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1320,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":108} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/plain source block, add mention_1_91c94c8501e2f1d5d25c8e9c360dd3d1.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/plain source block, add mention_1_91c94c8501e2f1d5d25c8e9c360dd3d1.json
deleted file mode 100644
index 96105480fe..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/plain source block, add mention_1_91c94c8501e2f1d5d25c8e9c360dd3d1.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"Change the first paragraph to Hello, Jane Doe! (use a mention)\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01RHWdfe3GttBYFD8uymp3hb\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1255,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":11,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01EtHJqkA1WcbHgsnKBQqn9S\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"o\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"per\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ati\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ons\\\": [{\\\"typ\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"update\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"id\\\":\\\"r\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ef1$\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",\\\"block\\\":\\\"Hello,\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"@Jane Do\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"!
\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1255,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":108} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/standard update_1_adde6c9d6144449d4c436ed39a9afcb1.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/standard update_1_adde6c9d6144449d4c436ed39a9afcb1.json
deleted file mode 100644
index 7b6c6fe833..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/standard update_1_adde6c9d6144449d4c436ed39a9afcb1.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"translate the first paragraph to german\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01K89m33oXhseDaoihmZZhks\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1245,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":11,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01VbfEL5BFHto2moN6AhvgVX\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operatio\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ns\\\": [{\\\"type\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"u\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"pdate\\\",\\\"id\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"ref1$\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"block\\\":\\\"<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"p>Hallo, We\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"lt!\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1245,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":85} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/standard update_1_c01c22b2bf79f30908ce9ffb0798a79f.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/standard update_1_c01c22b2bf79f30908ce9ffb0798a79f.json
new file mode 100644
index 0000000000..bffcc3bbdd
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/standard update_1_c01c22b2bf79f30908ce9ffb0798a79f.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"translate the first paragraph to german\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_012dqbh8nk4eg4cEbCnXuumt\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1310,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01J695gwQLLeYL1tzqTHLxRc\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operation\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"s\\\": \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"[{\\\"type\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"update\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\",\\\"id\\\":\\\"re\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"f1\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"$\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",\\\"block\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"p>Hallo, We\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"lt!<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"/p\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\">\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1310,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":85} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, remove mark_1_4d2b9b00dc36b2bb12aae561adde829e.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, remove mark_1_4d2b9b00dc36b2bb12aae561adde829e.json
deleted file mode 100644
index e5579c4e72..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, remove mark_1_4d2b9b00dc36b2bb12aae561adde829e.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"remove the bold style from the second block\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01DBgNaUXJ7tf1JNN2UW4S7q\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1247,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":11,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01WyvDfvjy9ktfdr49g5c5vC\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"operatio\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ns\\\": \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"[{\\\"ty\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"pe\\\":\\\"updat\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"id\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"ref2$\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",\\\"block\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Hel\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"lo, @John\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" Doe\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"! How a\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"re you d\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"oing\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"? This te\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"xt is blue!<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"/span>
\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1247,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":159} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, remove mark_1_66f540dda8b5f8e8713b9c6f0bdd4d3f.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, remove mark_1_66f540dda8b5f8e8713b9c6f0bdd4d3f.json
new file mode 100644
index 0000000000..d3539a1a0c
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, remove mark_1_66f540dda8b5f8e8713b9c6f0bdd4d3f.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"remove the bold style from the second block\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01LduS7PMk1BmjYh8REVcPB3\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1312,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_017Q8AHGqhH8sfdq4Rz1DbxZ\",\"name\":\"applyDocumentOperations\",\"input\":{}}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operatio\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ns\\\": \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"[{\\\"type\\\":\\\"up\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"date\\\",\\\"id\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"ref2$\\\",\\\"bl\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ock\\\":\\\"Hello\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\", @J\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ohn Doe\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"! How are y\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ou doin\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"g? This te\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"xt is \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"blue!\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"span>
\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1312,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":159} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, remove mention_1_06ade1c91064a7b257315d7cfb3dae1c.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, remove mention_1_06ade1c91064a7b257315d7cfb3dae1c.json
deleted file mode 100644
index 407ae41c80..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, remove mention_1_06ade1c91064a7b257315d7cfb3dae1c.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"change to say 'Hello! How are you doing? This text is blue!' (remove mention but keep bold text)\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01VWWDSMaVw5PSXGyGgPVaNT\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1264,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":9,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01Cko3mbKoa29sywhK5CW6PB\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"ope\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"rat\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ions\\\": [{\\\"t\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ype\\\":\\\"u\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"pdate\\\",\\\"i\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"d\\\":\\\"ref2\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"$\\\",\\\"block\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"Hello! H\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ow are \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"you doing?\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"strong> \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Thi\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"s text i\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"s blu\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e!\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"
\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1264,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":136} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, remove mention_1_9111f9b26383721d9186c99d035f44e8.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, remove mention_1_9111f9b26383721d9186c99d035f44e8.json
new file mode 100644
index 0000000000..0edb1873c0
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, remove mention_1_9111f9b26383721d9186c99d035f44e8.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"change to say 'Hello! How are you doing? This text is blue!' (remove mention but keep bold text)\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_015ZWUZKAqaqL9HJNgpT7U78\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1329,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_0116PVk2bqhreytbWfm78XFk\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operation\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"s\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\": [{\\\"type\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"update\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"id\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ref2$\\\",\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"block\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Hell\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"o! Ho\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"w are you d\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"oing? <\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"span style=\\\\\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"c\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ol\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"or: rgb(11\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\", 110, 153);\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\\\\\" data\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"-style-typ\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e=\\\\\\\"text\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Color\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\\\\\" dat\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"a-value=\\\\\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"blue\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\\\\\" d\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ata-e\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ditable=\\\\\\\"\\\\\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\">This text\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" is bl\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ue!
\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1329,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":136} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, replace content_1_24881d7683d6ecbd852f58f6580259f4.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, replace content_1_24881d7683d6ecbd852f58f6580259f4.json
deleted file mode 100644
index 3237953e59..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, replace content_1_24881d7683d6ecbd852f58f6580259f4.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"update the content of the second block to 'Hello, updated content'\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_019WbBWd2h9YZpiX4Rrm4GUp\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1254,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":9,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01DgxzxsKRTwNzqccDGNLBAj\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"oper\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ations\\\": [{\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"type\\\":\\\"up\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"da\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"te\\\",\\\"id\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"re\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"f2$\\\",\\\"block\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"Hello,\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" updated\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" content\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"
\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1254,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":82} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, replace content_1_6a2c68962725ab2dc43dc12b5e9e5d8f.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, replace content_1_6a2c68962725ab2dc43dc12b5e9e5d8f.json
new file mode 100644
index 0000000000..31a7c41b85
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, replace content_1_6a2c68962725ab2dc43dc12b5e9e5d8f.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"update the content of the second block to 'Hello, updated content'\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01WZMjdeyQ81RB2iix6RwUgX\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1319,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":11,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_017rUHJxS24ntd2pY4CTNQBd\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operations\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\": [\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"type\\\":\\\"up\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"date\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",\\\"id\\\":\\\"r\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ef2$\\\",\\\"bl\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ock\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Hello, u\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"pda\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ted co\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"nte\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"nt
\\\"}]}\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1319,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":82} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, update mention prop_1_1c9a4f955e0248798e87ab2412de660d.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, update mention prop_1_1c9a4f955e0248798e87ab2412de660d.json
deleted file mode 100644
index 67f4604f4b..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, update mention prop_1_1c9a4f955e0248798e87ab2412de660d.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"update the mention to Jane Doe\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_015pJyps6S5YiRLVqSCZnoRA\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1246,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":11,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01LnuGKKLbDv3pepj4Aed8nQ\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operatio\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ns\\\": [{\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"ty\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"pe\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"update\\\",\\\"i\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"d\\\":\\\"ref2$\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"bloc\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"k\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"Hel\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"lo, @J\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ane Do\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e! How a\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"re\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" you\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" doing\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"?\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"strong> <\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"spa\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"n st\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"yle=\\\\\\\"color\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\": rgb(11, \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"11\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"0, 153);\\\\\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\" data-sty\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"le-t\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ype=\\\\\\\"te\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"xtColor\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\\\\\" data\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"-value=\\\\\\\"bl\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ue\\\\\\\" \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"da\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ta-editab\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"le=\\\\\\\"\\\\\\\">Th\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"is text is b\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"lue\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"!
\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1246,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":165} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, update mention prop_1_60f48a7bd81fb6a72b96b284d61c6e53.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, update mention prop_1_60f48a7bd81fb6a72b96b284d61c6e53.json
new file mode 100644
index 0000000000..38598f774c
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, update mention prop_1_60f48a7bd81fb6a72b96b284d61c6e53.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"update the mention to Jane Doe\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01T951iMHiTLd9ueuWoxofiw\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1311,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_016i21cN4WbbndKzCMSyEXRv\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operatio\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ns\\\": \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"[{\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"type\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"update\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"id\\\":\\\"re\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"f2$\\\",\\\"block\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"Hello\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\", @Jan\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e Doe ! <\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"strong>How \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"are you\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" doing?\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"str\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ong> \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"This t\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ext is b\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"lue!<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"/p>\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1311,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":165} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, update text_1_284f982ebe3b60bc15c674d63795a879.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, update text_1_284f982ebe3b60bc15c674d63795a879.json
new file mode 100644
index 0000000000..acc5e4d793
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, update text_1_284f982ebe3b60bc15c674d63795a879.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `
- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"translate second block including the greeting to German (use dir instead of Ihnen)\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01ANfvHSU1WzNxmHFPNqkpv4\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1321,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01AHpth9qBgbc7cc7oUBPK9R\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operation\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"s\\\": [{\\\"type\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"update\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",\\\"id\\\":\\\"re\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"f2$\\\",\\\"bl\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ock\\\":\\\"Hallo, \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"@John\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" Doe\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"span>! \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Wie g\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"eht es dir?\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Die\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ser\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" Text\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" ist blau\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"!\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"span>
\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1321,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":171} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, update text_1_9e3a8c2b7c0c40aa89c4b52ccf040007.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, update text_1_9e3a8c2b7c0c40aa89c4b52ccf040007.json
deleted file mode 100644
index 58623e1b39..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, update text_1_9e3a8c2b7c0c40aa89c4b52ccf040007.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"translate second block including the greeting to German (use dir instead of Ihnen)\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01N6gguFbmrpB3zPNjTV8Qze\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1256,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":11,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01TGKKHKnfNjJzgv5tkY2z8C\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"op\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"erations\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" [{\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"typ\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e\\\":\\\"upd\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ate\\\",\\\"id\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"re\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"f2$\\\",\\\"block\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"Hallo, \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"@J\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"oh\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"n D\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"oe\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"! <\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"strong>Wie \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"geht e\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"s dir?<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"/s\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"trong> Die\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ser Text i\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"st blau\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"!\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"span\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\">
\\\"}]}\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1256,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":171} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in target block, add mark (paragraph)_1_6c8e4ac91518d57e4827481f00ddc38e.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in target block, add mark (paragraph)_1_6c8e4ac91518d57e4827481f00ddc38e.json
new file mode 100644
index 0000000000..8162a7bc10
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in target block, add mark (paragraph)_1_6c8e4ac91518d57e4827481f00ddc38e.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"make first paragraph bold\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01Jex2UQZrreZgnpLVkCscE3\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1308,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_017EnvzQPRvKaWXDHLo1tZnH\",\"name\":\"applyDocumentOperations\",\"input\":{}}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operati\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ons\\\": \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"[{\\\"typ\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e\\\":\\\"upda\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"te\\\",\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"id\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"ref1$\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"b\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"lock\\\":\\\"<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"p>He\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"llo, wor\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ld!\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"}]}\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1308,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":85} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in target block, add mark (paragraph)_1_d4c19bfff5993efff243e799e4055cc9.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in target block, add mark (paragraph)_1_d4c19bfff5993efff243e799e4055cc9.json
deleted file mode 100644
index abe7d54ccc..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in target block, add mark (paragraph)_1_d4c19bfff5993efff243e799e4055cc9.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"make first paragraph bold\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01627EKhkLMKM1YfPmyjQizq\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1243,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":14,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01LdYkLMWitySqsvr8FNPdWQ\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operat\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ion\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"s\\\": [{\\\"type\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"upda\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"te\\\",\\\"id\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"re\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"f1$\\\",\\\"b\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"lock\\\":\\\"<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"strong>He\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"llo, world\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"!\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"p>\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1243,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":85} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in target block, add mark (word)_1_06f3ae0ab5b505f03cf8e0c6bd654b1e.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in target block, add mark (word)_1_06f3ae0ab5b505f03cf8e0c6bd654b1e.json
new file mode 100644
index 0000000000..63ab00d7a8
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in target block, add mark (word)_1_06f3ae0ab5b505f03cf8e0c6bd654b1e.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `
- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"make 'world!' (in the first block) bold\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01UfA1KSZZW6SKVELCMLvyU8\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1316,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_015vHTbBrpsJhV7jDdxufyoD\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"ope\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"rations\\\":\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" [{\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"type\\\":\\\"upda\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"te\\\",\\\"id\\\":\\\"r\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ef\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"1$\\\",\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"block\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"Hello, \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"wo\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"rld!\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"strong>\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"
\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1316,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":86} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in target block, add mark (word)_1_e31071ae9ad80a23786ec0afc5106c32.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in target block, add mark (word)_1_e31071ae9ad80a23786ec0afc5106c32.json
deleted file mode 100644
index 3cbe3ab07d..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in target block, add mark (word)_1_e31071ae9ad80a23786ec0afc5106c32.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"make 'world!' (in the first block) bold\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_014QMhbYAsD6Mam73kEccqyw\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1251,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":11,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_016xYmjNXJLrvVDbtQDhDXqg\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operatio\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ns\\\": [{\\\"typ\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e\\\":\\\"update\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",\\\"id\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ref1$\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\",\\\"b\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"lock\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"He\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"llo, world!\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"<\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"/p>\\\"}\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1251,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":86}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/translate selection_1_251d71d658c11377f94830fc4efbe27c.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/translate selection_1_251d71d658c11377f94830fc4efbe27c.json
new file mode 100644
index 0000000000..209d481bcb
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/translate selection_1_251d71d658c11377f94830fc4efbe27c.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]\"},{\"type\":\"text\",\"text\":\"This is the latest state of the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"type\":\"text\",\"text\":\"[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"translate to German\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01ATEudwt1bb1BWsmWorAbsE\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1285,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01GuyK7KdGm59qHPB1Rc7iWN\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operation\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"s\\\": \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"[{\\\"typ\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"u\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"pdate\\\",\\\"id\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"ref2$\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",\\\"blo\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ck\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"Hallo
\\\"}\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1285,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":81} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/translate selection_1_885e9088214dbb6d50dcda19d0056f3c.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/translate selection_1_885e9088214dbb6d50dcda19d0056f3c.json
new file mode 100644
index 0000000000..b048aed753
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/translate selection_1_885e9088214dbb6d50dcda19d0056f3c.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]\"},{\"type\":\"text\",\"text\":\"This is the latest state of the entire document (INCLUDING the selected text), \\nyou can use this to find the selected text to understand the context (but you MUST NOT issue operations against this document, you MUST issue operations against the selection):\"},{\"type\":\"text\",\"text\":\"[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"translate to German\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01AHaW1zXrhGPyWihZp5q27g\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1311,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01Vyey27GrWfPfhZqQzndh5t\",\"name\":\"applyDocumentOperations\",\"input\":{}}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"opera\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"tions\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\": \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"[{\\\"typ\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e\\\":\\\"update\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\",\\\"i\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"d\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"ref2$\\\",\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"block\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Hallo
\\\"}\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1311,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":81} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/translate selection_1_efc8d37a125c48a5d0af15ecaf8e4b20.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/translate selection_1_efc8d37a125c48a5d0af15ecaf8e4b20.json
deleted file mode 100644
index 2a5339ab7e..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/translate selection_1_efc8d37a125c48a5d0af15ecaf8e4b20.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids.\\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]\"},{\"type\":\"text\",\"text\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"translate to German\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_016ydVFMkR31aTbroxEAtZGc\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1060,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01RPXHoaopVHdtZWFheCZuyb\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"o\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"pe\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"rations\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" [{\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"type\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"update\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",\\\"id\\\":\\\"r\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ef2$\\\",\\\"b\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"lock\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"Hallo<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"/p\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\">\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1060,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":81} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/turn paragraphs into list_1_0e8f14f06679e951d88ec74919c24b90.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/turn paragraphs into list_1_0e8f14f06679e951d88ec74919c24b90.json
new file mode 100644
index 0000000000..533d6fc4ac
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/turn paragraphs into list_1_0e8f14f06679e951d88ec74919c24b90.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `
- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Bananas
\\\"}]\"},{\"type\":\"text\",\"text\":\"This is the latest state of the entire document (INCLUDING the selected text), \\nyou can use this to find the selected text to understand the context (but you MUST NOT issue operations against this document, you MUST issue operations against the selection):\"},{\"type\":\"text\",\"text\":\"[{\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"block\\\":\\\"Apples
\\\"},{\\\"block\\\":\\\"Bananas
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"turn into list (update existing blocks)\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01M2L13gRoB6oDRVe9SCLqh8\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1212,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":11,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01QcDMNVgRLsYsxA9n16NFrQ\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operat\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ions\\\": [{\\\"t\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ype\\\":\\\"up\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"dat\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e\\\",\\\"id\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"ref2\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"$\\\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",\\\"bloc\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"k\\\":\\\"- Apple\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"s
\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"},\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"typ\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\":\\\"update\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"id\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ref3$\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\",\\\"block\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Ban\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"anas\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1212,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":109} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/turn paragraphs into list_1_3ba9845d9c519b43ddbadaddb122d431.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/turn paragraphs into list_1_3ba9845d9c519b43ddbadaddb122d431.json
deleted file mode 100644
index 79a24cab4e..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/turn paragraphs into list_1_3ba9845d9c519b43ddbadaddb122d431.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids.\\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Bananas
\\\"}]\"},{\"type\":\"text\",\"text\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:[{\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"block\\\":\\\"Apples
\\\"},{\\\"block\\\":\\\"Bananas
\\\"}]\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"turn into list (update existing blocks)\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_014K6CNAX5tbFU1Gw6uWChfS\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":961,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":15,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01RzTizFiGwvLVxC3GFVvTS3\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"op\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"eratio\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ns\\\": [{\\\"type\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"up\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"date\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"id\\\":\\\"ref2$\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\",\\\"bl\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ock\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"- A\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"pples\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"li>
\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"},{\\\"type\\\":\\\"u\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"pdate\\\",\\\"id\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"r\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ef3$\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"block\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"- Banana\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"s<\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"/li>
\\\"}\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":961,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":129} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/turn paragraphs into list_1_79a9d3970be08db8b2d4d99378661848.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/turn paragraphs into list_1_79a9d3970be08db8b2d4d99378661848.json
new file mode 100644
index 0000000000..dfedf82136
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/turn paragraphs into list_1_79a9d3970be08db8b2d4d99378661848.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Bananas
\\\"}]\"},{\"type\":\"text\",\"text\":\"This is the latest state of the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"type\":\"text\",\"text\":\"[{\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"block\\\":\\\"Apples
\\\"},{\\\"block\\\":\\\"Bananas
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"turn into list (update existing blocks)\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01VbyyUjwkb9q3KnrCP3LYeZ\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1186,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":11,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01CM7zccJ1uyUGn44pMBGwsi\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operatio\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ns\\\": [{\\\"type\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"updat\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e\\\",\\\"id\\\":\\\"r\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ef2$\\\",\\\"b\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"loc\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"k\\\":\\\"- Apples
\\\"},{\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"type\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"update\\\",\\\"id\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"ref3$\\\",\\\"b\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"lock\\\":\\\"<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"li>B\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ananas\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"}]}\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1186,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":109}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block prop and content_1_4f6fdb800f1928aed2629f707b95b0da.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block prop and content_1_4f6fdb800f1928aed2629f707b95b0da.json
deleted file mode 100644
index c9936efa47..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block prop and content_1_4f6fdb800f1928aed2629f707b95b0da.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"make the first paragraph right aligned and update the content to 'What's up, world!'\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01L99utQ9mBCxR3ppqt7YCnN\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1258,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":11,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_016tU1TWK2qZCVTcMUeQEdpq\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operati\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ons\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" [{\\\"t\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ype\\\":\\\"updat\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e\\\",\\\"id\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"ref\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"1$\\\",\\\"bloc\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"k\\\":\\\"What\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"'s up, \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"world!\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"p>\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1258,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":93} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block prop and content_1_f6c1cfee51cd75204495d3db1d80350e.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block prop and content_1_f6c1cfee51cd75204495d3db1d80350e.json
new file mode 100644
index 0000000000..682bda4d0d
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block prop and content_1_f6c1cfee51cd75204495d3db1d80350e.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `
- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"make the first paragraph right aligned and update the content to 'What's up, world!'\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_011fpgjs1yJUoKsrZLvNBGr9\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1323,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01HxDVNmsc3EktNdDVCvCxKx\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"operatio\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ns\\\": [{\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"type\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"update\\\",\\\"id\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"re\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"f1$\\\",\\\"blo\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ck\\\":\\\"Wh\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"at's up,\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" world!
\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1323,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":91} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block prop_1_759983067f25f0daafb42bc9fefcdb64.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block prop_1_759983067f25f0daafb42bc9fefcdb64.json
new file mode 100644
index 0000000000..d6340c6886
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block prop_1_759983067f25f0daafb42bc9fefcdb64.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"make the first paragraph right aligned\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_016FazgL3DqrUAL52hx37oPo\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1310,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01DaQxaZTZFR66XFYDYT4VL9\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"ope\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"rations\\\": [\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"type\\\":\\\"up\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"date\\\",\\\"id\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"ref1$\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",\\\"bloc\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"k\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Hello\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\", w\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"orld!<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"/p>\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1310,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":89} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block prop_1_b25dd6e47055e54d58f1fd1f18feb14d.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block prop_1_b25dd6e47055e54d58f1fd1f18feb14d.json
deleted file mode 100644
index a2e80e76b9..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block prop_1_b25dd6e47055e54d58f1fd1f18feb14d.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"make the first paragraph right aligned\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_019kwHkF3Kx6zNyKfrFMrCPE\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1245,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":11,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01VD5oiJ6pNFixdAfJbqREu7\",\"name\":\"applyDocumentOperations\",\"input\":{}}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"op\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"erations\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\": [{\\\"type\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"upd\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ate\\\",\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"id\\\":\\\"ref1$\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"block\\\":\\\"<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"p styl\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e=\\\\\\\"text-\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"align: righ\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"t;\\\\\\\">\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Hello, w\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"orld!<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"/p>\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1245,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":91} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block type and content_1_de3f09510d3c3eee14653fe5799dbae7.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block type and content_1_de3f09510d3c3eee14653fe5799dbae7.json
deleted file mode 100644
index 092fbeb7d6..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block type and content_1_de3f09510d3c3eee14653fe5799dbae7.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"make the first paragraph a heading and update the content to 'What's up, world!'\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01NjK3YpTUqen9fN6aq95pWX\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1258,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":11,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01B4gv765bCEAvV2r6Kkn64q\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"oper\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"atio\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ns\\\": [{\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"type\\\":\\\"upd\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ate\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"id\\\":\\\"ref1$\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"block\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"What's up, w\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"orld!\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"
\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1258,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":85} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block type and content_1_e9d9d699bbe4a3b6e754c530ffe56e2c.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block type and content_1_e9d9d699bbe4a3b6e754c530ffe56e2c.json
new file mode 100644
index 0000000000..1581eb6ef2
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block type and content_1_e9d9d699bbe4a3b6e754c530ffe56e2c.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"make the first paragraph a heading and update the content to 'What's up, world!'\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01NUvcTvXwWXctH8EGvv3nJd\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1323,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_013a8gSZVBnfyQoWB5Kfi7cW\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"opera\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"tio\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ns\\\": [{\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"type\\\":\\\"updat\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"e\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"id\\\":\\\"r\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ef\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"1$\\\",\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"block\\\":\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"What'\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"s up, worl\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"d!<\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"/h1>\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1323,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":85} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block type_1_ac405ec31a0cb874515b0c5b6aa2eb2d.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block type_1_ac405ec31a0cb874515b0c5b6aa2eb2d.json
new file mode 100644
index 0000000000..f12a7b4954
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block type_1_ac405ec31a0cb874515b0c5b6aa2eb2d.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.anthropic.com/v1/messages",
+ "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":64000,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"}],\"messages\":[{\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"make the first paragraph a heading\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-3-7-sonnet-20250219\",\"id\":\"msg_01KFd5cnetNRzYLa6jKMdws7\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1310,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":12,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_014EwyH2LUJ3J6xNBZ2iZwnt\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"oper\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ations\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" [{\\\"type\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\\\"up\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"date\\\",\\\"id\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"ref1$\\\",\\\"b\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"lock\\\":\\\"Hell\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"o, wor\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ld!
\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1310,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":83} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block type_1_d805af33ab12e1bf8f2cb1a055a91fbd.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block type_1_d805af33ab12e1bf8f2cb1a055a91fbd.json
deleted file mode 100644
index 1b912ca85a..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block type_1_d805af33ab12e1bf8f2cb1a055a91fbd.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.anthropic.com/v1/messages",
- "body": "{\"model\":\"claude-3-7-sonnet-latest\",\"max_tokens\":4096,\"system\":[{\"type\":\"text\",\"text\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"type\":\"text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"type\":\"text\",\"text\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"messages\":[{\"role\":\"user\",\"content\":[{\"type\":\"text\",\"text\":\"make the first paragraph a heading\"}]}],\"tools\":[{\"name\":\"applyDocumentOperations\",\"input_schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}],\"tool_choice\":{\"type\":\"any\"},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01Dct1y6cHK3zr6sAm4TYqES\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-7-sonnet-20250219\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":1245,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":11,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01U8jVttrTVfGGFKWvBbrCD2\",\"name\":\"applyDocumentOperations\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"ope\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ra\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"tions\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\": [\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"type\\\":\\\"u\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"pda\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"te\\\",\\\"id\\\":\\\"r\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ef1\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"$\\\",\\\"block\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Hello, world\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"!
\\\"}]}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":1245,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":83} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/clear block formatting_1_1b60a2dae45a21cc2916e15e97bfd289.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/clear block formatting_1_1b60a2dae45a21cc2916e15e97bfd289.json
new file mode 100644
index 0000000000..18399d3164
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/clear block formatting_1_1b60a2dae45a21cc2916e15e97bfd289.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]\"},{\"role\":\"user\",\"content\":\"clear the formatting (colors and alignment)\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-bb5a0b8d-cb89-4bc6-9ced-fd3299e9f03c\",\"object\":\"chat.completion.chunk\",\"created\":1763481006,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_dae98b5ecb\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabthcmvf7799sxkb76c73z5\",\"seed\":328315842}}\n\ndata: {\"id\":\"chatcmpl-bb5a0b8d-cb89-4bc6-9ced-fd3299e9f03c\",\"object\":\"chat.completion.chunk\",\"created\":1763481006,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_dae98b5ecb\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"dvj4qtve8\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eColored text\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"},{\\\"block\\\":\\\"\\\\u003cp\\\\u003eAligned text\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-bb5a0b8d-cb89-4bc6-9ced-fd3299e9f03c\",\"object\":\"chat.completion.chunk\",\"created\":1763481006,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_dae98b5ecb\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabthcmvf7799sxkb76c73z5\",\"usage\":{\"queue_time\":0.090349204,\"prompt_tokens\":904,\"prompt_time\":0.044104889,\"completion_tokens\":53,\"completion_time\":0.102945857,\"total_tokens\":957,\"total_time\":0.147050746}},\"usage\":{\"queue_time\":0.090349204,\"prompt_tokens\":904,\"prompt_time\":0.044104889,\"completion_tokens\":53,\"completion_time\":0.102945857,\"total_tokens\":957,\"total_time\":0.147050746}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/clear block formatting_1_3b802465d0bbbdbbcb387b14492eefcc.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/clear block formatting_1_3b802465d0bbbdbbcb387b14492eefcc.json
deleted file mode 100644
index 2c3ab6187d..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/clear block formatting_1_3b802465d0bbbdbbcb387b14492eefcc.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"clear the formatting (colors and alignment)\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-965353ac-e40d-49b6-a752-90b518464e71\",\"object\":\"chat.completion.chunk\",\"created\":1758783448,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2477e04561\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk9hpey6934px74m454ay\"}}\n\ndata: {\"id\":\"chatcmpl-965353ac-e40d-49b6-a752-90b518464e71\",\"object\":\"chat.completion.chunk\",\"created\":1758783448,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2477e04561\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"pznsbf1sf\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eColored text\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"},{\\\"block\\\":\\\"\\\\u003cp\\\\u003eAligned text\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-965353ac-e40d-49b6-a752-90b518464e71\",\"object\":\"chat.completion.chunk\",\"created\":1758783448,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2477e04561\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk9hpey6934px74m454ay\",\"usage\":{\"queue_time\":0.143383351,\"prompt_tokens\":853,\"prompt_time\":0.083652147,\"completion_tokens\":53,\"completion_time\":0.102347837,\"total_tokens\":906,\"total_time\":0.185999984}},\"usage\":{\"queue_time\":0.143383351,\"prompt_tokens\":853,\"prompt_time\":0.083652147,\"completion_tokens\":53,\"completion_time\":0.102347837,\"total_tokens\":906,\"total_time\":0.185999984}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link and change text within mark_1_1138449389739970ddab00e2ca2b4bca.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link and change text within mark_1_1138449389739970ddab00e2ca2b4bca.json
deleted file mode 100644
index 72f13cf027..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link and change text within mark_1_1138449389739970ddab00e2ca2b4bca.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"change the last paragraph to 'Hi, world! Bold the text. Link.' without any markup like bold or link\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-ecabb3fc-edae-463e-846f-e52b349f800f\",\"object\":\"chat.completion.chunk\",\"created\":1758783447,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_a2c262bc3a\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk7rxe098nrb9ap54bj3t\"}}\n\ndata: {\"id\":\"chatcmpl-ecabb3fc-edae-463e-846f-e52b349f800f\",\"object\":\"chat.completion.chunk\",\"created\":1758783447,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_a2c262bc3a\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"q9jmph8gx\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHi, world! Bold the text. Link.\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref3$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ecabb3fc-edae-463e-846f-e52b349f800f\",\"object\":\"chat.completion.chunk\",\"created\":1758783447,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_a2c262bc3a\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk7rxe098nrb9ap54bj3t\",\"usage\":{\"queue_time\":0.167779801,\"prompt_tokens\":954,\"prompt_time\":0.077852963,\"completion_tokens\":42,\"completion_time\":0.082497339,\"total_tokens\":996,\"total_time\":0.160350302}},\"usage\":{\"queue_time\":0.167779801,\"prompt_tokens\":954,\"prompt_time\":0.077852963,\"completion_tokens\":42,\"completion_time\":0.082497339,\"total_tokens\":996,\"total_time\":0.160350302}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link and change text within mark_1_a7e99401a3cc86c79b30fdf47b0dc28e.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link and change text within mark_1_a7e99401a3cc86c79b30fdf47b0dc28e.json
new file mode 100644
index 0000000000..fcf293579d
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link and change text within mark_1_a7e99401a3cc86c79b30fdf47b0dc28e.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"change the last paragraph to 'Hi, world! Bold the text. Link.' without any markup like bold or link\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-643a25c0-0bd0-47fb-a9e3-dcdfa0da186a\",\"object\":\"chat.completion.chunk\",\"created\":1763481005,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabthbgce2jrt8tx1xy2ffsk\",\"seed\":1255647191}}\n\ndata: {\"id\":\"chatcmpl-643a25c0-0bd0-47fb-a9e3-dcdfa0da186a\",\"object\":\"chat.completion.chunk\",\"created\":1763481005,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"dyenxnej9\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHi, world! Bold the text. Link.\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref3$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-643a25c0-0bd0-47fb-a9e3-dcdfa0da186a\",\"object\":\"chat.completion.chunk\",\"created\":1763481005,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabthbgce2jrt8tx1xy2ffsk\",\"usage\":{\"queue_time\":0.042462489,\"prompt_tokens\":1005,\"prompt_time\":0.054242806,\"completion_tokens\":38,\"completion_time\":0.069663354,\"total_tokens\":1043,\"total_time\":0.12390616}},\"usage\":{\"queue_time\":0.042462489,\"prompt_tokens\":1005,\"prompt_time\":0.054242806,\"completion_tokens\":38,\"completion_time\":0.069663354,\"total_tokens\":1043,\"total_time\":0.12390616}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link_1_2f40ee8072a0c34e771a2bd001d04b3a.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link_1_2f40ee8072a0c34e771a2bd001d04b3a.json
deleted file mode 100644
index 9bccc0baf6..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link_1_2f40ee8072a0c34e771a2bd001d04b3a.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"remove the formatting (turn into plain text without styles or urls) from the last paragraph\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-5f6f9c4b-d56f-41c8-a2ef-81b0a0de6d92\",\"object\":\"chat.completion.chunk\",\"created\":1758783446,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_ede95a097b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk7cae08rnk2nqttpvx27\"}}\n\ndata: {\"id\":\"chatcmpl-5f6f9c4b-d56f-41c8-a2ef-81b0a0de6d92\",\"object\":\"chat.completion.chunk\",\"created\":1758783446,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_ede95a097b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"d8b6jv74w\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHello, world! Bold text. Link.\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref3$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-5f6f9c4b-d56f-41c8-a2ef-81b0a0de6d92\",\"object\":\"chat.completion.chunk\",\"created\":1758783446,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_ede95a097b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk7cae08rnk2nqttpvx27\",\"usage\":{\"queue_time\":0.144757613,\"prompt_tokens\":948,\"prompt_time\":0.077655455,\"completion_tokens\":36,\"completion_time\":0.100339898,\"total_tokens\":984,\"total_time\":0.177995353}},\"usage\":{\"queue_time\":0.144757613,\"prompt_tokens\":948,\"prompt_time\":0.077655455,\"completion_tokens\":36,\"completion_time\":0.100339898,\"total_tokens\":984,\"total_time\":0.177995353}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link_1_75e458d048de9ef0fb1eef34109ec81b.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link_1_75e458d048de9ef0fb1eef34109ec81b.json
new file mode 100644
index 0000000000..165c373a0a
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link_1_75e458d048de9ef0fb1eef34109ec81b.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"remove the formatting (turn into plain text without styles or urls) from the last paragraph\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-3ba48a03-1c4d-474a-a58a-c2e7a807ea2b\",\"object\":\"chat.completion.chunk\",\"created\":1763481005,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabthb3ge2jrd5hjj344gvtn\",\"seed\":516983482}}\n\ndata: {\"id\":\"chatcmpl-3ba48a03-1c4d-474a-a58a-c2e7a807ea2b\",\"object\":\"chat.completion.chunk\",\"created\":1763481005,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"m9bqdares\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHello, world! Bold text. Link.\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref3$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-3ba48a03-1c4d-474a-a58a-c2e7a807ea2b\",\"object\":\"chat.completion.chunk\",\"created\":1763481005,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabthb3ge2jrd5hjj344gvtn\",\"usage\":{\"queue_time\":0.091219313,\"prompt_tokens\":999,\"prompt_time\":0.054174503,\"completion_tokens\":36,\"completion_time\":0.091133043,\"total_tokens\":1035,\"total_time\":0.145307546}},\"usage\":{\"queue_time\":0.091219313,\"prompt_tokens\":999,\"prompt_time\":0.054174503,\"completion_tokens\":36,\"completion_time\":0.091133043,\"total_tokens\":1035,\"total_time\":0.145307546}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify nested content_1_3d19c192afee48b2656b6bdf3ac80415.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify nested content_1_3d19c192afee48b2656b6bdf3ac80415.json
deleted file mode 100644
index 4be2c93f81..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify nested content_1_3d19c192afee48b2656b6bdf3ac80415.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"make apples uppercase\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-972071f1-e35e-4d51-87b9-85234cefc524\",\"object\":\"chat.completion.chunk\",\"created\":1758783448,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2477e04561\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk8wte0av0596h5byvmyp\"}}\n\ndata: {\"id\":\"chatcmpl-972071f1-e35e-4d51-87b9-85234cefc524\",\"object\":\"chat.completion.chunk\",\"created\":1758783448,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2477e04561\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"ff7ddq74b\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eAPPLES\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-972071f1-e35e-4d51-87b9-85234cefc524\",\"object\":\"chat.completion.chunk\",\"created\":1758783448,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2477e04561\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk8wte0av0596h5byvmyp\",\"usage\":{\"queue_time\":0.145155619,\"prompt_tokens\":813,\"prompt_time\":0.068726179,\"completion_tokens\":31,\"completion_time\":0.067908684,\"total_tokens\":844,\"total_time\":0.136634863}},\"usage\":{\"queue_time\":0.145155619,\"prompt_tokens\":813,\"prompt_time\":0.068726179,\"completion_tokens\":31,\"completion_time\":0.067908684,\"total_tokens\":844,\"total_time\":0.136634863}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify nested content_1_f81acd3a9fb46c387163c91724ec4c55.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify nested content_1_f81acd3a9fb46c387163c91724ec4c55.json
new file mode 100644
index 0000000000..8c351481e6
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify nested content_1_f81acd3a9fb46c387163c91724ec4c55.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"}]\"},{\"role\":\"user\",\"content\":\"make apples uppercase\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-7c5cfe4c-31b3-48b5-bd01-4dc68fc7e335\",\"object\":\"chat.completion.chunk\",\"created\":1763481006,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabthc2de80akyk3ccm0qhff\",\"seed\":499646720}}\n\ndata: {\"id\":\"chatcmpl-7c5cfe4c-31b3-48b5-bd01-4dc68fc7e335\",\"object\":\"chat.completion.chunk\",\"created\":1763481006,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"j73j97gq6\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eAPPLES\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-7c5cfe4c-31b3-48b5-bd01-4dc68fc7e335\",\"object\":\"chat.completion.chunk\",\"created\":1763481006,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabthc2de80akyk3ccm0qhff\",\"usage\":{\"queue_time\":0.042790003,\"prompt_tokens\":864,\"prompt_time\":0.065387661,\"completion_tokens\":31,\"completion_time\":0.093521259,\"total_tokens\":895,\"total_time\":0.15890892}},\"usage\":{\"queue_time\":0.042790003,\"prompt_tokens\":864,\"prompt_time\":0.065387661,\"completion_tokens\":31,\"completion_time\":0.093521259,\"total_tokens\":895,\"total_time\":0.15890892}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify parent content_1_49c9371e221a7966cac554b99ba56b02.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify parent content_1_49c9371e221a7966cac554b99ba56b02.json
new file mode 100644
index 0000000000..6897f38888
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify parent content_1_49c9371e221a7966cac554b99ba56b02.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"}]\"},{\"role\":\"user\",\"content\":\"make the first paragraph uppercase\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-747cd4ea-72be-44cc-80d0-9adfb6c0e939\",\"object\":\"chat.completion.chunk\",\"created\":1763481006,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabthcb7e2macj4krhq1fsp1\",\"seed\":22285162}}\n\ndata: {\"id\":\"chatcmpl-747cd4ea-72be-44cc-80d0-9adfb6c0e939\",\"object\":\"chat.completion.chunk\",\"created\":1763481006,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"ah9ytwz77\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eI NEED TO BUY:\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-747cd4ea-72be-44cc-80d0-9adfb6c0e939\",\"object\":\"chat.completion.chunk\",\"created\":1763481006,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabthcb7e2macj4krhq1fsp1\",\"usage\":{\"queue_time\":0.090160166,\"prompt_tokens\":866,\"prompt_time\":0.044103427,\"completion_tokens\":32,\"completion_time\":0.079286729,\"total_tokens\":898,\"total_time\":0.123390156}},\"usage\":{\"queue_time\":0.090160166,\"prompt_tokens\":866,\"prompt_time\":0.044103427,\"completion_tokens\":32,\"completion_time\":0.079286729,\"total_tokens\":898,\"total_time\":0.123390156}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify parent content_1_88d6bccbefaf007c2c02e7e007c0f70b.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify parent content_1_88d6bccbefaf007c2c02e7e007c0f70b.json
deleted file mode 100644
index 0cc62d93c8..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify parent content_1_88d6bccbefaf007c2c02e7e007c0f70b.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"make the first paragraph uppercase\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-465233f2-e380-4a62-afed-9e3186f9ac2e\",\"object\":\"chat.completion.chunk\",\"created\":1758783448,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_487c5a8475\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk97je0ats42dhpqxpy95\"}}\n\ndata: {\"id\":\"chatcmpl-465233f2-e380-4a62-afed-9e3186f9ac2e\",\"object\":\"chat.completion.chunk\",\"created\":1758783448,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_487c5a8475\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"1ydxzxq8x\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eI NEED TO BUY:\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-465233f2-e380-4a62-afed-9e3186f9ac2e\",\"object\":\"chat.completion.chunk\",\"created\":1758783448,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_487c5a8475\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk97je0ats42dhpqxpy95\",\"usage\":{\"queue_time\":0.133331912,\"prompt_tokens\":815,\"prompt_time\":0.068012475,\"completion_tokens\":32,\"completion_time\":0.073286743,\"total_tokens\":847,\"total_time\":0.141299218}},\"usage\":{\"queue_time\":0.133331912,\"prompt_tokens\":815,\"prompt_time\":0.068012475,\"completion_tokens\":32,\"completion_time\":0.073286743,\"total_tokens\":847,\"total_time\":0.141299218}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/plain source block, add mention_1_89cf6c28cb2ec992330f7c1bdc342068.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/plain source block, add mention_1_89cf6c28cb2ec992330f7c1bdc342068.json
deleted file mode 100644
index 75fd29b377..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/plain source block, add mention_1_89cf6c28cb2ec992330f7c1bdc342068.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"Change the first paragraph to Hello, Jane Doe! (use a mention)\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-caf5af7e-3c15-4dac-bb3c-ef8753e3d55e\",\"object\":\"chat.completion.chunk\",\"created\":1758783445,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_a2c262bc3a\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk6fze06andww0kjfkhy4\"}}\n\ndata: {\"id\":\"chatcmpl-caf5af7e-3c15-4dac-bb3c-ef8753e3d55e\",\"object\":\"chat.completion.chunk\",\"created\":1758783445,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_a2c262bc3a\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"jtmhkcm8c\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHello, \\\\u003cspan data-inline-content-type=\\\\\\\"mention\\\\\\\" data-user=\\\\\\\"Jane Doe\\\\\\\"\\\\u003e@Jane Doe\\\\u003c/span\\\\u003e!\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-caf5af7e-3c15-4dac-bb3c-ef8753e3d55e\",\"object\":\"chat.completion.chunk\",\"created\":1758783445,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_a2c262bc3a\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk6fze06andww0kjfkhy4\",\"usage\":{\"queue_time\":0.169828534,\"prompt_tokens\":946,\"prompt_time\":0.077438792,\"completion_tokens\":51,\"completion_time\":0.110801372,\"total_tokens\":997,\"total_time\":0.188240164}},\"usage\":{\"queue_time\":0.169828534,\"prompt_tokens\":946,\"prompt_time\":0.077438792,\"completion_tokens\":51,\"completion_time\":0.110801372,\"total_tokens\":997,\"total_time\":0.188240164}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/plain source block, add mention_1_b2be33e4a07122a85e49b521c20f26db.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/plain source block, add mention_1_b2be33e4a07122a85e49b521c20f26db.json
new file mode 100644
index 0000000000..65941da972
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/plain source block, add mention_1_b2be33e4a07122a85e49b521c20f26db.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"Change the first paragraph to Hello, Jane Doe! (use a mention)\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-08edd8b3-1efa-4f9f-a389-14ce946b84a8\",\"object\":\"chat.completion.chunk\",\"created\":1763481004,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_c06d5113ec\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabtha86e2j99eht7vrctssx\",\"seed\":468624780}}\n\ndata: {\"id\":\"chatcmpl-08edd8b3-1efa-4f9f-a389-14ce946b84a8\",\"object\":\"chat.completion.chunk\",\"created\":1763481004,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_c06d5113ec\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"p4zp86egg\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHello, \\\\u003cspan data-inline-content-type=\\\\\\\"mention\\\\\\\" data-user=\\\\\\\"Jane Doe\\\\\\\"\\\\u003e@Jane Doe\\\\u003c/span\\\\u003e!\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-08edd8b3-1efa-4f9f-a389-14ce946b84a8\",\"object\":\"chat.completion.chunk\",\"created\":1763481004,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_c06d5113ec\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabtha86e2j99eht7vrctssx\",\"usage\":{\"queue_time\":0.095267229,\"prompt_tokens\":997,\"prompt_time\":0.098830262,\"completion_tokens\":51,\"completion_time\":0.108786307,\"total_tokens\":1048,\"total_time\":0.207616569}},\"usage\":{\"queue_time\":0.095267229,\"prompt_tokens\":997,\"prompt_time\":0.098830262,\"completion_tokens\":51,\"completion_time\":0.108786307,\"total_tokens\":1048,\"total_time\":0.207616569}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/standard update_1_08d79a078de070c800627c412f9a0d9f.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/standard update_1_08d79a078de070c800627c412f9a0d9f.json
new file mode 100644
index 0000000000..2ae72bb0b2
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/standard update_1_08d79a078de070c800627c412f9a0d9f.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"translate the first paragraph to german\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-12040864-d179-4142-8e3a-fd76553838ac\",\"object\":\"chat.completion.chunk\",\"created\":1763480999,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabth5mxf6ra3smdk8qeptb8\",\"seed\":1977315517}}\n\ndata: {\"id\":\"chatcmpl-12040864-d179-4142-8e3a-fd76553838ac\",\"object\":\"chat.completion.chunk\",\"created\":1763480999,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"497eytbym\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHallo, Welt!\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-12040864-d179-4142-8e3a-fd76553838ac\",\"object\":\"chat.completion.chunk\",\"created\":1763480999,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabth5mxf6ra3smdk8qeptb8\",\"usage\":{\"queue_time\":0.043799562,\"prompt_tokens\":988,\"prompt_time\":0.078316668,\"completion_tokens\":32,\"completion_time\":0.090801361,\"total_tokens\":1020,\"total_time\":0.169118029}},\"usage\":{\"queue_time\":0.043799562,\"prompt_tokens\":988,\"prompt_time\":0.078316668,\"completion_tokens\":32,\"completion_time\":0.090801361,\"total_tokens\":1020,\"total_time\":0.169118029}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/standard update_1_b300195a352d5bddf97a0136eeb314e6.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/standard update_1_b300195a352d5bddf97a0136eeb314e6.json
deleted file mode 100644
index 7227624fd3..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/standard update_1_b300195a352d5bddf97a0136eeb314e6.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"translate the first paragraph to german\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-8b44ecae-2ea2-4247-bec0-a796217286ce\",\"object\":\"chat.completion.chunk\",\"created\":1758783440,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_a2c262bc3a\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk1mvfzz9wa75773temf3\"}}\n\ndata: {\"id\":\"chatcmpl-8b44ecae-2ea2-4247-bec0-a796217286ce\",\"object\":\"chat.completion.chunk\",\"created\":1758783440,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_a2c262bc3a\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"w4nesfnw7\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHallo, Welt!\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-8b44ecae-2ea2-4247-bec0-a796217286ce\",\"object\":\"chat.completion.chunk\",\"created\":1758783440,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_a2c262bc3a\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk1mvfzz9wa75773temf3\",\"usage\":{\"queue_time\":0.250621162,\"prompt_tokens\":937,\"prompt_time\":0.075776116,\"completion_tokens\":36,\"completion_time\":0.078861683,\"total_tokens\":973,\"total_time\":0.154637799}},\"usage\":{\"queue_time\":0.250621162,\"prompt_tokens\":937,\"prompt_time\":0.075776116,\"completion_tokens\":36,\"completion_time\":0.078861683,\"total_tokens\":973,\"total_time\":0.154637799}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mark_1_008db1a44c8ee4e4d98c2e62c05f1906.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mark_1_008db1a44c8ee4e4d98c2e62c05f1906.json
deleted file mode 100644
index 19feca5c5a..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mark_1_008db1a44c8ee4e4d98c2e62c05f1906.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"remove the bold style from the second block\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-d59addf6-6767-47ec-b11d-3c153c0f95e5\",\"object\":\"chat.completion.chunk\",\"created\":1758783444,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9e1e8f8435\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk4xhe08a90de0a5q7c0p\"}}\n\ndata: {\"id\":\"chatcmpl-d59addf6-6767-47ec-b11d-3c153c0f95e5\",\"object\":\"chat.completion.chunk\",\"created\":1758783444,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9e1e8f8435\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"7gkfmcyzf\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHello, \\\\u003cspan data-inline-content-type=\\\\\\\"mention\\\\\\\" data-user=\\\\\\\"John Doe\\\\\\\"\\\\u003e@John Doe\\\\u003c/span\\\\u003e! How are you doing? \\\\u003cspan style=\\\\\\\"color: rgb(11, 110, 153);\\\\\\\" data-style-type=\\\\\\\"textColor\\\\\\\" data-value=\\\\\\\"blue\\\\\\\" data-editable=\\\\\\\"\\\\\\\"\\\\u003eThis text is blue!\\\\u003c/span\\\\u003e\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-d59addf6-6767-47ec-b11d-3c153c0f95e5\",\"object\":\"chat.completion.chunk\",\"created\":1758783444,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9e1e8f8435\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk4xhe08a90de0a5q7c0p\",\"usage\":{\"queue_time\":0.094632691,\"prompt_tokens\":939,\"prompt_time\":0.098137394,\"completion_tokens\":97,\"completion_time\":0.166019247,\"total_tokens\":1036,\"total_time\":0.264156641}},\"usage\":{\"queue_time\":0.094632691,\"prompt_tokens\":939,\"prompt_time\":0.098137394,\"completion_tokens\":97,\"completion_time\":0.166019247,\"total_tokens\":1036,\"total_time\":0.264156641}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mark_1_0d87ce48c7e9e690bde7fc3668fe735b.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mark_1_0d87ce48c7e9e690bde7fc3668fe735b.json
new file mode 100644
index 0000000000..a4f5cf5183
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mark_1_0d87ce48c7e9e690bde7fc3668fe735b.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"remove the bold style from the second block\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-40f8410d-22e6-433e-950c-943ae56f315f\",\"object\":\"chat.completion.chunk\",\"created\":1763481003,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabth8pme7w9wc6mdj6kthf0\",\"seed\":1159872481}}\n\ndata: {\"id\":\"chatcmpl-40f8410d-22e6-433e-950c-943ae56f315f\",\"object\":\"chat.completion.chunk\",\"created\":1763481003,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"dyssv915k\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHello, \\\\u003cspan data-inline-content-type=\\\\\\\"mention\\\\\\\" data-user=\\\\\\\"John Doe\\\\\\\"\\\\u003e@John Doe\\\\u003c/span\\\\u003e! How are you doing? \\\\u003cspan style=\\\\\\\"color: rgb(11, 110, 153);\\\\\\\" data-style-type=\\\\\\\"textColor\\\\\\\" data-value=\\\\\\\"blue\\\\\\\" data-editable=\\\\\\\"\\\\\\\"\\\\u003eThis text is blue!\\\\u003c/span\\\\u003e\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-40f8410d-22e6-433e-950c-943ae56f315f\",\"object\":\"chat.completion.chunk\",\"created\":1763481003,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabth8pme7w9wc6mdj6kthf0\",\"usage\":{\"queue_time\":0.09083092,\"prompt_tokens\":990,\"prompt_time\":0.098148761,\"completion_tokens\":97,\"completion_time\":0.162261042,\"total_tokens\":1087,\"total_time\":0.260409803}},\"usage\":{\"queue_time\":0.09083092,\"prompt_tokens\":990,\"prompt_time\":0.098148761,\"completion_tokens\":97,\"completion_time\":0.162261042,\"total_tokens\":1087,\"total_time\":0.260409803}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mention_1_9a1800c42b72be41038a25622ff00709.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mention_1_9a1800c42b72be41038a25622ff00709.json
deleted file mode 100644
index 6ecfa94975..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mention_1_9a1800c42b72be41038a25622ff00709.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"change to say 'Hello! How are you doing? This text is blue!' (remove mention but keep bold text)\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-950a4d2c-85ec-4033-980b-4f45e6b7329b\",\"object\":\"chat.completion.chunk\",\"created\":1758783444,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_487c5a8475\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk5ane08ba9d151jbrmg3\"}}\n\ndata: {\"id\":\"chatcmpl-950a4d2c-85ec-4033-980b-4f45e6b7329b\",\"object\":\"chat.completion.chunk\",\"created\":1758783444,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_487c5a8475\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"02x22hctr\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHello! \\\\u003cstrong\\\\u003eHow are you doing?\\\\u003c/strong\\\\u003e \\\\u003cspan style=\\\\\\\"color: rgb(11, 110, 153);\\\\\\\" data-style-type=\\\\\\\"textColor\\\\\\\" data-value=\\\\\\\"blue\\\\\\\" data-editable=\\\\\\\"\\\\\\\"\\\\u003eThis text is blue!\\\\u003c/span\\\\u003e\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-950a4d2c-85ec-4033-980b-4f45e6b7329b\",\"object\":\"chat.completion.chunk\",\"created\":1758783444,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_487c5a8475\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk5ane08ba9d151jbrmg3\",\"usage\":{\"queue_time\":0.141083415,\"prompt_tokens\":955,\"prompt_time\":0.109837475,\"completion_tokens\":80,\"completion_time\":0.15087099,\"total_tokens\":1035,\"total_time\":0.260708465}},\"usage\":{\"queue_time\":0.141083415,\"prompt_tokens\":955,\"prompt_time\":0.109837475,\"completion_tokens\":80,\"completion_time\":0.15087099,\"total_tokens\":1035,\"total_time\":0.260708465}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mention_1_a96e84a734674ca195c2b40bab34c2fa.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mention_1_a96e84a734674ca195c2b40bab34c2fa.json
new file mode 100644
index 0000000000..d22d9f0ed7
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mention_1_a96e84a734674ca195c2b40bab34c2fa.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"change to say 'Hello! How are you doing? This text is blue!' (remove mention but keep bold text)\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-57f761cb-9cd7-4737-bdcd-ca51ebfdf926\",\"object\":\"chat.completion.chunk\",\"created\":1763481003,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_c06d5113ec\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabth94me7xbdrmat1sdaeae\",\"seed\":213858104}}\n\ndata: {\"id\":\"chatcmpl-57f761cb-9cd7-4737-bdcd-ca51ebfdf926\",\"object\":\"chat.completion.chunk\",\"created\":1763481003,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_c06d5113ec\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"mf0zpb5rz\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHello! \\\\u003cstrong\\\\u003eHow are you doing?\\\\u003c/strong\\\\u003e \\\\u003cspan style=\\\\\\\"color: rgb(11, 110, 153);\\\\\\\" data-style-type=\\\\\\\"textColor\\\\\\\" data-value=\\\\\\\"blue\\\\\\\" data-editable=\\\\\\\"\\\\\\\"\\\\u003eThis text is blue!\\\\u003c/span\\\\u003e\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-57f761cb-9cd7-4737-bdcd-ca51ebfdf926\",\"object\":\"chat.completion.chunk\",\"created\":1763481003,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_c06d5113ec\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabth94me7xbdrmat1sdaeae\",\"usage\":{\"queue_time\":0.095167711,\"prompt_tokens\":1006,\"prompt_time\":0.051396138,\"completion_tokens\":80,\"completion_time\":0.158802721,\"total_tokens\":1086,\"total_time\":0.210198859}},\"usage\":{\"queue_time\":0.095167711,\"prompt_tokens\":1006,\"prompt_time\":0.051396138,\"completion_tokens\":80,\"completion_time\":0.158802721,\"total_tokens\":1086,\"total_time\":0.210198859}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, replace content_1_0463e82390d623aec168d4e483a8e7c1.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, replace content_1_0463e82390d623aec168d4e483a8e7c1.json
deleted file mode 100644
index 66a55138ee..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, replace content_1_0463e82390d623aec168d4e483a8e7c1.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"update the content of the second block to 'Hello, updated content'\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-74e63525-5e5c-4280-ba3c-fe2e27984426\",\"object\":\"chat.completion.chunk\",\"created\":1758783443,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9e1e8f8435\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk3y2e01963m228rp0156\"}}\n\ndata: {\"id\":\"chatcmpl-74e63525-5e5c-4280-ba3c-fe2e27984426\",\"object\":\"chat.completion.chunk\",\"created\":1758783443,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9e1e8f8435\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"b69014kwr\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHello, updated content\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-74e63525-5e5c-4280-ba3c-fe2e27984426\",\"object\":\"chat.completion.chunk\",\"created\":1758783443,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9e1e8f8435\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk3y2e01963m228rp0156\",\"usage\":{\"queue_time\":0.091541682,\"prompt_tokens\":945,\"prompt_time\":0.078752951,\"completion_tokens\":32,\"completion_time\":0.07319935,\"total_tokens\":977,\"total_time\":0.151952301}},\"usage\":{\"queue_time\":0.091541682,\"prompt_tokens\":945,\"prompt_time\":0.078752951,\"completion_tokens\":32,\"completion_time\":0.07319935,\"total_tokens\":977,\"total_time\":0.151952301}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, replace content_1_f5be35337d2ac3c65ec6363d4f347364.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, replace content_1_f5be35337d2ac3c65ec6363d4f347364.json
new file mode 100644
index 0000000000..0eb00ed373
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, replace content_1_f5be35337d2ac3c65ec6363d4f347364.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"update the content of the second block to 'Hello, updated content'\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-f0f065af-69e2-4568-9c6e-460bc31a9c15\",\"object\":\"chat.completion.chunk\",\"created\":1763481925,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabvddyyescvf2qf46yxqgac\",\"seed\":1255115405}}\n\ndata: {\"id\":\"chatcmpl-f0f065af-69e2-4568-9c6e-460bc31a9c15\",\"object\":\"chat.completion.chunk\",\"created\":1763481925,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"mva540n21\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHello, updated content\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-f0f065af-69e2-4568-9c6e-460bc31a9c15\",\"object\":\"chat.completion.chunk\",\"created\":1763481925,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabvddyyescvf2qf46yxqgac\",\"usage\":{\"queue_time\":0.091392002,\"prompt_tokens\":996,\"prompt_time\":0.108044544,\"completion_tokens\":32,\"completion_time\":0.078454781,\"total_tokens\":1028,\"total_time\":0.186499325}},\"usage\":{\"queue_time\":0.091392002,\"prompt_tokens\":996,\"prompt_time\":0.108044544,\"completion_tokens\":32,\"completion_time\":0.078454781,\"total_tokens\":1028,\"total_time\":0.186499325}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update mention prop_1_a09c043f6d105b1496a7c79ce34e28d3.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update mention prop_1_a09c043f6d105b1496a7c79ce34e28d3.json
new file mode 100644
index 0000000000..037d6a359e
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update mention prop_1_a09c043f6d105b1496a7c79ce34e28d3.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"update the mention to Jane Doe\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-9182c192-551a-4f0b-9f4b-dad5a4cb9550\",\"object\":\"chat.completion.chunk\",\"created\":1763481005,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabthaphe7z8jrhf8cj7mxnt\",\"seed\":2074404313}}\n\ndata: {\"id\":\"chatcmpl-9182c192-551a-4f0b-9f4b-dad5a4cb9550\",\"object\":\"chat.completion.chunk\",\"created\":1763481005,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"tzctpqgvm\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHello, \\\\u003cspan data-inline-content-type=\\\\\\\"mention\\\\\\\" data-user=\\\\\\\"Jane Doe\\\\\\\"\\\\u003e@Jane Doe\\\\u003c/span\\\\u003e! \\\\u003cstrong\\\\u003eHow are you doing?\\\\u003c/strong\\\\u003e \\\\u003cspan style=\\\\\\\"color: rgb(11, 110, 153);\\\\\\\" data-style-type=\\\\\\\"textColor\\\\\\\" data-value=\\\\\\\"blue\\\\\\\" data-editable=\\\\\\\"\\\\\\\"\\\\u003eThis text is blue!\\\\u003c/span\\\\u003e\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-9182c192-551a-4f0b-9f4b-dad5a4cb9550\",\"object\":\"chat.completion.chunk\",\"created\":1763481005,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabthaphe7z8jrhf8cj7mxnt\",\"usage\":{\"queue_time\":0.042979174,\"prompt_tokens\":988,\"prompt_time\":0.102775293,\"completion_tokens\":102,\"completion_time\":0.179131311,\"total_tokens\":1090,\"total_time\":0.281906604}},\"usage\":{\"queue_time\":0.042979174,\"prompt_tokens\":988,\"prompt_time\":0.102775293,\"completion_tokens\":102,\"completion_time\":0.179131311,\"total_tokens\":1090,\"total_time\":0.281906604}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update mention prop_1_cf6b0ebb12aa86b848af40e9fa5aa4c6.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update mention prop_1_cf6b0ebb12aa86b848af40e9fa5aa4c6.json
deleted file mode 100644
index 8d924a685a..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update mention prop_1_cf6b0ebb12aa86b848af40e9fa5aa4c6.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"update the mention to Jane Doe\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-b97cd156-2341-49b1-bd91-a48ae11e77aa\",\"object\":\"chat.completion.chunk\",\"created\":1758783555,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_487c5a8475\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztphvfe3ya7tax976zxv1a\"}}\n\ndata: {\"id\":\"chatcmpl-b97cd156-2341-49b1-bd91-a48ae11e77aa\",\"object\":\"chat.completion.chunk\",\"created\":1758783555,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_487c5a8475\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"yspgvwnek\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHello, \\\\u003cspan data-inline-content-type=\\\\\\\"mention\\\\\\\" data-user=\\\\\\\"Jane Doe\\\\\\\"\\\\u003e@Jane Doe\\\\u003c/span\\\\u003e! \\\\u003cstrong\\\\u003eHow are you doing?\\\\u003c/strong\\\\u003e \\\\u003cspan style=\\\\\\\"color: rgb(11, 110, 153);\\\\\\\" data-style-type=\\\\\\\"textColor\\\\\\\" data-value=\\\\\\\"blue\\\\\\\" data-editable=\\\\\\\"\\\\\\\"\\\\u003eThis text is blue!\\\\u003c/span\\\\u003e\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-b97cd156-2341-49b1-bd91-a48ae11e77aa\",\"object\":\"chat.completion.chunk\",\"created\":1758783555,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_487c5a8475\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztphvfe3ya7tax976zxv1a\",\"usage\":{\"queue_time\":0.13352253,\"prompt_tokens\":937,\"prompt_time\":0.080579121,\"completion_tokens\":106,\"completion_time\":0.184377315,\"total_tokens\":1043,\"total_time\":0.264956436}},\"usage\":{\"queue_time\":0.13352253,\"prompt_tokens\":937,\"prompt_time\":0.080579121,\"completion_tokens\":106,\"completion_time\":0.184377315,\"total_tokens\":1043,\"total_time\":0.264956436}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update text_1_2b8a7aa1c2a0945eb657e1784120dabc.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update text_1_2b8a7aa1c2a0945eb657e1784120dabc.json
deleted file mode 100644
index d70c997e7d..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update text_1_2b8a7aa1c2a0945eb657e1784120dabc.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"translate second block including the greeting to German (use dir instead of Ihnen)\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-d1905bd6-099e-424f-a871-b23f8a052ab0\",\"object\":\"chat.completion.chunk\",\"created\":1758783809,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_ede95a097b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5zty9dfehcs27pxj6bthe7d\"}}\n\ndata: {\"id\":\"chatcmpl-d1905bd6-099e-424f-a871-b23f8a052ab0\",\"object\":\"chat.completion.chunk\",\"created\":1758783809,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_ede95a097b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"pgnbjbgar\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHallo, \\\\u003cspan data-inline-content-type=\\\\\\\"mention\\\\\\\" data-user=\\\\\\\"John Doe\\\\\\\"\\\\u003e@John Doe\\\\u003c/span\\\\u003e! \\\\u003cstrong\\\\u003eWie geht es dir?\\\\u003c/strong\\\\u003e \\\\u003cspan style=\\\\\\\"color: rgb(11, 110, 153);\\\\\\\" data-style-type=\\\\\\\"textColor\\\\\\\" data-value=\\\\\\\"blue\\\\\\\" data-editable=\\\\\\\"\\\\\\\"\\\\u003eDieser Text ist blau!\\\\u003c/span\\\\u003e\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-d1905bd6-099e-424f-a871-b23f8a052ab0\",\"object\":\"chat.completion.chunk\",\"created\":1758783809,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_ede95a097b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5zty9dfehcs27pxj6bthe7d\",\"usage\":{\"queue_time\":0.144850274,\"prompt_tokens\":946,\"prompt_time\":0.077445191,\"completion_tokens\":105,\"completion_time\":0.204622915,\"total_tokens\":1051,\"total_time\":0.282068106}},\"usage\":{\"queue_time\":0.144850274,\"prompt_tokens\":946,\"prompt_time\":0.077445191,\"completion_tokens\":105,\"completion_time\":0.204622915,\"total_tokens\":1051,\"total_time\":0.282068106}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update text_1_dfc536ede5303a75993dea08764b318e.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update text_1_dfc536ede5303a75993dea08764b318e.json
new file mode 100644
index 0000000000..21e4f81eb3
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update text_1_dfc536ede5303a75993dea08764b318e.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"translate second block including the greeting to German (use dir instead of Ihnen)\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-d54d4e6a-fa60-4d0a-a384-84bdd7e282fb\",\"object\":\"chat.completion.chunk\",\"created\":1763481002,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabth882e7v8nw2nhj2xvwrd\",\"seed\":662647477}}\n\ndata: {\"id\":\"chatcmpl-d54d4e6a-fa60-4d0a-a384-84bdd7e282fb\",\"object\":\"chat.completion.chunk\",\"created\":1763481002,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"74r04y007\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHallo, \\\\u003cspan data-inline-content-type=\\\\\\\"mention\\\\\\\" data-user=\\\\\\\"John Doe\\\\\\\"\\\\u003e@John Doe\\\\u003c/span\\\\u003e! \\\\u003cstrong\\\\u003eWie geht es dir?\\\\u003c/strong\\\\u003e \\\\u003cspan style=\\\\\\\"color: rgb(11, 110, 153);\\\\\\\" data-style-type=\\\\\\\"textColor\\\\\\\" data-value=\\\\\\\"blue\\\\\\\" data-editable=\\\\\\\"\\\\\\\"\\\\u003eDieser Text ist blau!\\\\u003c/span\\\\u003e\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-d54d4e6a-fa60-4d0a-a384-84bdd7e282fb\",\"object\":\"chat.completion.chunk\",\"created\":1763481002,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabth882e7v8nw2nhj2xvwrd\",\"usage\":{\"queue_time\":0.042926133,\"prompt_tokens\":997,\"prompt_time\":0.098776826,\"completion_tokens\":105,\"completion_time\":0.195497064,\"total_tokens\":1102,\"total_time\":0.29427389}},\"usage\":{\"queue_time\":0.042926133,\"prompt_tokens\":997,\"prompt_time\":0.098776826,\"completion_tokens\":105,\"completion_time\":0.195497064,\"total_tokens\":1102,\"total_time\":0.29427389}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (paragraph)_1_7f14399291525650d7f05c5015dd3b59.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (paragraph)_1_7f14399291525650d7f05c5015dd3b59.json
deleted file mode 100644
index 2a0fceb7b3..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (paragraph)_1_7f14399291525650d7f05c5015dd3b59.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"make first paragraph bold\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-07b94377-0d5f-4a2d-9284-13b8ac6ef720\",\"object\":\"chat.completion.chunk\",\"created\":1758783445,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9e1e8f8435\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk66ce05a1eg9e4cd1342\"}}\n\ndata: {\"id\":\"chatcmpl-07b94377-0d5f-4a2d-9284-13b8ac6ef720\",\"object\":\"chat.completion.chunk\",\"created\":1758783445,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9e1e8f8435\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"v5ge2cf8c\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003e\\\\u003cstrong\\\\u003eHello, world!\\\\u003c/strong\\\\u003e\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-07b94377-0d5f-4a2d-9284-13b8ac6ef720\",\"object\":\"chat.completion.chunk\",\"created\":1758783445,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9e1e8f8435\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk66ce05a1eg9e4cd1342\",\"usage\":{\"queue_time\":0.087740881,\"prompt_tokens\":935,\"prompt_time\":0.077809774,\"completion_tokens\":35,\"completion_time\":0.094247314,\"total_tokens\":970,\"total_time\":0.172057088}},\"usage\":{\"queue_time\":0.087740881,\"prompt_tokens\":935,\"prompt_time\":0.077809774,\"completion_tokens\":35,\"completion_time\":0.094247314,\"total_tokens\":970,\"total_time\":0.172057088}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (paragraph)_1_ebbeca51137a25dc54cdb7bafab53bed.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (paragraph)_1_ebbeca51137a25dc54cdb7bafab53bed.json
new file mode 100644
index 0000000000..d34b200bc1
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (paragraph)_1_ebbeca51137a25dc54cdb7bafab53bed.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"make first paragraph bold\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-d10af77e-a8b9-4a56-8f3c-9b4014e58114\",\"object\":\"chat.completion.chunk\",\"created\":1763481004,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabth9z1e2hrbw4d2ma9rz69\",\"seed\":390278100}}\n\ndata: {\"id\":\"chatcmpl-d10af77e-a8b9-4a56-8f3c-9b4014e58114\",\"object\":\"chat.completion.chunk\",\"created\":1763481004,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"ytkg45095\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003e\\\\u003cstrong\\\\u003eHello, world!\\\\u003c/strong\\\\u003e\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-d10af77e-a8b9-4a56-8f3c-9b4014e58114\",\"object\":\"chat.completion.chunk\",\"created\":1763481004,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabth9z1e2hrbw4d2ma9rz69\",\"usage\":{\"queue_time\":0.042054201,\"prompt_tokens\":986,\"prompt_time\":0.051208224,\"completion_tokens\":35,\"completion_time\":0.07117916,\"total_tokens\":1021,\"total_time\":0.122387384}},\"usage\":{\"queue_time\":0.042054201,\"prompt_tokens\":986,\"prompt_time\":0.051208224,\"completion_tokens\":35,\"completion_time\":0.07117916,\"total_tokens\":1021,\"total_time\":0.122387384}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (word)_1_710f89bc66a6352e1c21328e600f2536.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (word)_1_710f89bc66a6352e1c21328e600f2536.json
deleted file mode 100644
index 1deeb5a169..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (word)_1_710f89bc66a6352e1c21328e600f2536.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"make 'world!' (in the first block) bold\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-19888ada-667c-4190-84d2-1d585644157f\",\"object\":\"chat.completion.chunk\",\"created\":1758783445,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_4ea8b86ba0\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk5rxey4tzk8qn3s929eq\"}}\n\ndata: {\"id\":\"chatcmpl-19888ada-667c-4190-84d2-1d585644157f\",\"object\":\"chat.completion.chunk\",\"created\":1758783445,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_4ea8b86ba0\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"qw3tk1n43\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHello, \\\\u003cstrong\\\\u003eworld!\\\\u003c/strong\\\\u003e\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-19888ada-667c-4190-84d2-1d585644157f\",\"object\":\"chat.completion.chunk\",\"created\":1758783445,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_4ea8b86ba0\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk5rxey4tzk8qn3s929eq\",\"usage\":{\"queue_time\":0.203406796,\"prompt_tokens\":942,\"prompt_time\":0.077748982,\"completion_tokens\":36,\"completion_time\":0.088546668,\"total_tokens\":978,\"total_time\":0.16629565}},\"usage\":{\"queue_time\":0.203406796,\"prompt_tokens\":942,\"prompt_time\":0.077748982,\"completion_tokens\":36,\"completion_time\":0.088546668,\"total_tokens\":978,\"total_time\":0.16629565}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (word)_1_d6f14d8cecee690c72107e57eee0efbf.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (word)_1_d6f14d8cecee690c72107e57eee0efbf.json
new file mode 100644
index 0000000000..8d7540c5ec
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (word)_1_d6f14d8cecee690c72107e57eee0efbf.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"make 'world!' (in the first block) bold\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-447e2221-d785-4bba-b3b7-2fdf9661b821\",\"object\":\"chat.completion.chunk\",\"created\":1763481859,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_c06d5113ec\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabvbcrbe9ztp61scv2f40nb\",\"seed\":1106339396}}\n\ndata: {\"id\":\"chatcmpl-447e2221-d785-4bba-b3b7-2fdf9661b821\",\"object\":\"chat.completion.chunk\",\"created\":1763481859,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_c06d5113ec\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"6124b0665\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHello, \\\\u003cb\\\\u003eworld!\\\\u003c/b\\\\u003e\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-447e2221-d785-4bba-b3b7-2fdf9661b821\",\"object\":\"chat.completion.chunk\",\"created\":1763481859,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_c06d5113ec\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabvbcrbe9ztp61scv2f40nb\",\"usage\":{\"queue_time\":0.093259061,\"prompt_tokens\":993,\"prompt_time\":0.051741831,\"completion_tokens\":36,\"completion_time\":0.091094766,\"total_tokens\":1029,\"total_time\":0.142836597}},\"usage\":{\"queue_time\":0.093259061,\"prompt_tokens\":993,\"prompt_time\":0.051741831,\"completion_tokens\":36,\"completion_time\":0.091094766,\"total_tokens\":1029,\"total_time\":0.142836597}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/translate selection_1_1e9c30fa14f61508e6d90cbfa4d9b891.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/translate selection_1_1e9c30fa14f61508e6d90cbfa4d9b891.json
new file mode 100644
index 0000000000..f32fcfc11b
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/translate selection_1_1e9c30fa14f61508e6d90cbfa4d9b891.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]This is the latest state of the entire document (INCLUDING the selected text), \\nyou can use this to find the selected text to understand the context (but you MUST NOT issue operations against this document, you MUST issue operations against the selection):[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"translate to German\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-40239f3e-cbc0-42c3-b2fa-589024f372e1\",\"object\":\"chat.completion.chunk\",\"created\":1763488565,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kac1r23vfsy87xzz6a35t4cw\",\"seed\":401763953}}\n\ndata: {\"id\":\"chatcmpl-40239f3e-cbc0-42c3-b2fa-589024f372e1\",\"object\":\"chat.completion.chunk\",\"created\":1763488565,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"gdq36k323\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHallo\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-40239f3e-cbc0-42c3-b2fa-589024f372e1\",\"object\":\"chat.completion.chunk\",\"created\":1763488565,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kac1r23vfsy87xzz6a35t4cw\",\"usage\":{\"queue_time\":0.090979831,\"prompt_tokens\":990,\"prompt_time\":0.097079022,\"completion_tokens\":34,\"completion_time\":0.080291008,\"total_tokens\":1024,\"total_time\":0.17737003}},\"usage\":{\"queue_time\":0.090979831,\"prompt_tokens\":990,\"prompt_time\":0.097079022,\"completion_tokens\":34,\"completion_time\":0.080291008,\"total_tokens\":1024,\"total_time\":0.17737003}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/translate selection_1_aa16ce33c87b6593f3e3da4f95642d22.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/translate selection_1_aa16ce33c87b6593f3e3da4f95642d22.json
new file mode 100644
index 0000000000..f34e72d86f
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/translate selection_1_aa16ce33c87b6593f3e3da4f95642d22.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]This is the latest state of the entire document (INCLUDING the selected text), find the selected text in there to understand the context:[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"translate to German\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-328b3825-8fc0-4f0e-b719-39dc490badda\",\"object\":\"chat.completion.chunk\",\"created\":1763483085,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabwgtmbe7d8vj458tve22mm\",\"seed\":641041042}}\n\ndata: {\"id\":\"chatcmpl-328b3825-8fc0-4f0e-b719-39dc490badda\",\"object\":\"chat.completion.chunk\",\"created\":1763483085,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"zbknep1j6\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHallo\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-328b3825-8fc0-4f0e-b719-39dc490badda\",\"object\":\"chat.completion.chunk\",\"created\":1763483085,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabwgtmbe7d8vj458tve22mm\",\"usage\":{\"queue_time\":0.093830782,\"prompt_tokens\":967,\"prompt_time\":0.049278682,\"completion_tokens\":34,\"completion_time\":0.078503278,\"total_tokens\":1001,\"total_time\":0.12778196}},\"usage\":{\"queue_time\":0.093830782,\"prompt_tokens\":967,\"prompt_time\":0.049278682,\"completion_tokens\":34,\"completion_time\":0.078503278,\"total_tokens\":1001,\"total_time\":0.12778196}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/translate selection_1_d2ee0ac3b245b97f7a730d85a4575ac3.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/translate selection_1_d2ee0ac3b245b97f7a730d85a4575ac3.json
deleted file mode 100644
index 03aa16fe8a..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/translate selection_1_d2ee0ac3b245b97f7a730d85a4575ac3.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids.\\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"translate to German\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-4aa29eb8-1efc-432e-bdf2-e6e12e3c3cfa\",\"object\":\"chat.completion.chunk\",\"created\":1758783441,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_4ea8b86ba0\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk233fzztw9yhzpp1g1rp\"}}\n\ndata: {\"id\":\"chatcmpl-4aa29eb8-1efc-432e-bdf2-e6e12e3c3cfa\",\"object\":\"chat.completion.chunk\",\"created\":1758783441,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_4ea8b86ba0\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"43teqva05\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp\\\\u003eHallo\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-4aa29eb8-1efc-432e-bdf2-e6e12e3c3cfa\",\"object\":\"chat.completion.chunk\",\"created\":1758783441,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_4ea8b86ba0\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk233fzztw9yhzpp1g1rp\",\"usage\":{\"queue_time\":0.202438742,\"prompt_tokens\":767,\"prompt_time\":0.061756423,\"completion_tokens\":34,\"completion_time\":0.071081873,\"total_tokens\":801,\"total_time\":0.132838296}},\"usage\":{\"queue_time\":0.202438742,\"prompt_tokens\":767,\"prompt_time\":0.061756423,\"completion_tokens\":34,\"completion_time\":0.071081873,\"total_tokens\":801,\"total_time\":0.132838296}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/turn paragraphs into list_1_4f9d2fbfe29b2188465b7a60b2454efc.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/turn paragraphs into list_1_4f9d2fbfe29b2188465b7a60b2454efc.json
new file mode 100644
index 0000000000..366cda2573
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/turn paragraphs into list_1_4f9d2fbfe29b2188465b7a60b2454efc.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Bananas
\\\"}]This is the latest state of the entire document (INCLUDING the selected text), find the selected text in there to understand the context:[{\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"block\\\":\\\"Apples
\\\"},{\\\"block\\\":\\\"Bananas
\\\"}]\"},{\"role\":\"user\",\"content\":\"turn into list (update existing blocks)\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-8c9a7556-0466-4928-8352-0e8a6fb825a9\",\"object\":\"chat.completion.chunk\",\"created\":1763481006,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabthbr9e80ax8d3y2xbsht6\",\"seed\":186447507}}\n\ndata: {\"id\":\"chatcmpl-8c9a7556-0466-4928-8352-0e8a6fb825a9\",\"object\":\"chat.completion.chunk\",\"created\":1763481006,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"06qav5mcs\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cul\\\\u003e\\\\u003cli\\\\u003eApples\\\\u003c/li\\\\u003e\\\\u003c/ul\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"},{\\\"block\\\":\\\"\\\\u003cul\\\\u003e\\\\u003cli\\\\u003eBananas\\\\u003c/li\\\\u003e\\\\u003c/ul\\\\u003e\\\",\\\"id\\\":\\\"ref3$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-8c9a7556-0466-4928-8352-0e8a6fb825a9\",\"object\":\"chat.completion.chunk\",\"created\":1763481006,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabthbr9e80ax8d3y2xbsht6\",\"usage\":{\"queue_time\":0.042522315,\"prompt_tokens\":887,\"prompt_time\":0.05022332,\"completion_tokens\":68,\"completion_time\":0.140198694,\"total_tokens\":955,\"total_time\":0.190422014}},\"usage\":{\"queue_time\":0.042522315,\"prompt_tokens\":887,\"prompt_time\":0.05022332,\"completion_tokens\":68,\"completion_time\":0.140198694,\"total_tokens\":955,\"total_time\":0.190422014}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/turn paragraphs into list_1_50b1aa228a2b2557dea5026daaef2fad.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/turn paragraphs into list_1_50b1aa228a2b2557dea5026daaef2fad.json
new file mode 100644
index 0000000000..141b0cbc6e
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/turn paragraphs into list_1_50b1aa228a2b2557dea5026daaef2fad.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Bananas
\\\"}]This is the latest state of the entire document (INCLUDING the selected text), \\nyou can use this to find the selected text to understand the context (but you MUST NOT issue operations against this document, you MUST issue operations against the selection):[{\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"block\\\":\\\"Apples
\\\"},{\\\"block\\\":\\\"Bananas
\\\"}]\"},{\"role\":\"user\",\"content\":\"turn into list (update existing blocks)\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-5435e878-1a29-4894-8ee5-fb73711ad4de\",\"object\":\"chat.completion.chunk\",\"created\":1763488566,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kac1r2pvf3sv3yseeh0jtzf4\",\"seed\":1533469045}}\n\ndata: {\"id\":\"chatcmpl-5435e878-1a29-4894-8ee5-fb73711ad4de\",\"object\":\"chat.completion.chunk\",\"created\":1763488566,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"g80e2x013\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cul\\\\u003e\\\\u003cli\\\\u003eApples\\\\u003c/li\\\\u003e\\\\u003c/ul\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"},{\\\"block\\\":\\\"\\\\u003cul\\\\u003e\\\\u003cli\\\\u003eBananas\\\\u003c/li\\\\u003e\\\\u003c/ul\\\\u003e\\\",\\\"id\\\":\\\"ref3$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-5435e878-1a29-4894-8ee5-fb73711ad4de\",\"object\":\"chat.completion.chunk\",\"created\":1763488566,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kac1r2pvf3sv3yseeh0jtzf4\",\"usage\":{\"queue_time\":0.042707288,\"prompt_tokens\":910,\"prompt_time\":0.047510813,\"completion_tokens\":60,\"completion_time\":0.118009525,\"total_tokens\":970,\"total_time\":0.165520338}},\"usage\":{\"queue_time\":0.042707288,\"prompt_tokens\":910,\"prompt_time\":0.047510813,\"completion_tokens\":60,\"completion_time\":0.118009525,\"total_tokens\":970,\"total_time\":0.165520338}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/turn paragraphs into list_1_d2eeb79d3f7120d2c9d698e3b82c7362.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/turn paragraphs into list_1_d2eeb79d3f7120d2c9d698e3b82c7362.json
deleted file mode 100644
index 1447528156..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/turn paragraphs into list_1_d2eeb79d3f7120d2c9d698e3b82c7362.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids.\\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Bananas
\\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:[{\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"block\\\":\\\"Apples
\\\"},{\\\"block\\\":\\\"Bananas
\\\"}]\"},{\"role\":\"user\",\"content\":\"turn into list (update existing blocks)\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-dbce3a44-9172-4c20-b800-1b62ad89d217\",\"object\":\"chat.completion.chunk\",\"created\":1758783447,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_155ab82e98\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk84xe09sgh5p9m6kz2em\"}}\n\ndata: {\"id\":\"chatcmpl-dbce3a44-9172-4c20-b800-1b62ad89d217\",\"object\":\"chat.completion.chunk\",\"created\":1758783447,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_155ab82e98\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"h8cg4zpwp\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cul\\\\u003e\\\\u003cli\\\\u003eApples\\\\u003c/li\\\\u003e\\\\u003c/ul\\\\u003e\\\",\\\"id\\\":\\\"ref2$\\\",\\\"type\\\":\\\"update\\\"},{\\\"block\\\":\\\"\\\\u003cul\\\\u003e\\\\u003cli\\\\u003eBananas\\\\u003c/li\\\\u003e\\\\u003c/ul\\\\u003e\\\",\\\"id\\\":\\\"ref3$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-dbce3a44-9172-4c20-b800-1b62ad89d217\",\"object\":\"chat.completion.chunk\",\"created\":1758783447,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_155ab82e98\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk84xe09sgh5p9m6kz2em\",\"usage\":{\"queue_time\":0.537078687,\"prompt_tokens\":687,\"prompt_time\":0.052994038,\"completion_tokens\":68,\"completion_time\":0.124627288,\"total_tokens\":755,\"total_time\":0.177621326}},\"usage\":{\"queue_time\":0.537078687,\"prompt_tokens\":687,\"prompt_time\":0.052994038,\"completion_tokens\":68,\"completion_time\":0.124627288,\"total_tokens\":755,\"total_time\":0.177621326}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block prop and content_1_4a65e945b3b6fac5d4a0cf8d623486d3.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block prop and content_1_4a65e945b3b6fac5d4a0cf8d623486d3.json
new file mode 100644
index 0000000000..a5f4a9fa40
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block prop and content_1_4a65e945b3b6fac5d4a0cf8d623486d3.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"make the first paragraph right aligned and update the content to 'What's up, world!'\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-a7cfecad-e454-40b3-be6a-4ade915d3dfe\",\"object\":\"chat.completion.chunk\",\"created\":1763481001,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabth7k8e2csmsk0dvt9m0j5\",\"seed\":1473938667}}\n\ndata: {\"id\":\"chatcmpl-a7cfecad-e454-40b3-be6a-4ade915d3dfe\",\"object\":\"chat.completion.chunk\",\"created\":1763481001,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"x2fan8nr6\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp style=\\\\\\\"text-align: right;\\\\\\\"\\\\u003eWhat's up, world!\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-a7cfecad-e454-40b3-be6a-4ade915d3dfe\",\"object\":\"chat.completion.chunk\",\"created\":1763481001,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_f8b414701e\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabth7k8e2csmsk0dvt9m0j5\",\"usage\":{\"queue_time\":0.043007601,\"prompt_tokens\":1000,\"prompt_time\":0.050968998,\"completion_tokens\":40,\"completion_time\":0.112761496,\"total_tokens\":1040,\"total_time\":0.163730494}},\"usage\":{\"queue_time\":0.043007601,\"prompt_tokens\":1000,\"prompt_time\":0.050968998,\"completion_tokens\":40,\"completion_time\":0.112761496,\"total_tokens\":1040,\"total_time\":0.163730494}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block prop and content_1_e22ef915ccf69ed6d2eb9f1a04b86c20.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block prop and content_1_e22ef915ccf69ed6d2eb9f1a04b86c20.json
deleted file mode 100644
index d548f0561e..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block prop and content_1_e22ef915ccf69ed6d2eb9f1a04b86c20.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"make the first paragraph right aligned and update the content to 'What's up, world!'\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-fbe1b604-eb05-4a84-aa98-58d121ce74ac\",\"object\":\"chat.completion.chunk\",\"created\":1758783442,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9e1e8f8435\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk3mmey4aya79sfng8ha3\"}}\n\ndata: {\"id\":\"chatcmpl-fbe1b604-eb05-4a84-aa98-58d121ce74ac\",\"object\":\"chat.completion.chunk\",\"created\":1758783442,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9e1e8f8435\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"ecnrb52mg\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp style=\\\\\\\"text-align: right;\\\\\\\"\\\\u003eWhat's up, world!\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-fbe1b604-eb05-4a84-aa98-58d121ce74ac\",\"object\":\"chat.completion.chunk\",\"created\":1758783442,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9e1e8f8435\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk3mmey4aya79sfng8ha3\",\"usage\":{\"queue_time\":0.087015992,\"prompt_tokens\":949,\"prompt_time\":0.078642555,\"completion_tokens\":44,\"completion_time\":0.077594348,\"total_tokens\":993,\"total_time\":0.156236903}},\"usage\":{\"queue_time\":0.087015992,\"prompt_tokens\":949,\"prompt_time\":0.078642555,\"completion_tokens\":44,\"completion_time\":0.077594348,\"total_tokens\":993,\"total_time\":0.156236903}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block prop_1_6d4c550d09a7bfdb440308f277b85a11.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block prop_1_6d4c550d09a7bfdb440308f277b85a11.json
deleted file mode 100644
index d7992d5388..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block prop_1_6d4c550d09a7bfdb440308f277b85a11.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"make the first paragraph right aligned\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-d843fb16-a68e-49a6-88ae-4aced1a5e66b\",\"object\":\"chat.completion.chunk\",\"created\":1758783442,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_ede95a097b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk2x4e07r3enkvn246nd8\"}}\n\ndata: {\"id\":\"chatcmpl-d843fb16-a68e-49a6-88ae-4aced1a5e66b\",\"object\":\"chat.completion.chunk\",\"created\":1758783442,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_ede95a097b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"c800nyyst\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp style=\\\\\\\"text-align: right;\\\\\\\"\\\\u003eHello, world!\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-d843fb16-a68e-49a6-88ae-4aced1a5e66b\",\"object\":\"chat.completion.chunk\",\"created\":1758783442,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_ede95a097b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk2x4e07r3enkvn246nd8\",\"usage\":{\"queue_time\":0.143502652,\"prompt_tokens\":937,\"prompt_time\":0.077230823,\"completion_tokens\":38,\"completion_time\":0.091863369,\"total_tokens\":975,\"total_time\":0.169094192}},\"usage\":{\"queue_time\":0.143502652,\"prompt_tokens\":937,\"prompt_time\":0.077230823,\"completion_tokens\":38,\"completion_time\":0.091863369,\"total_tokens\":975,\"total_time\":0.169094192}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block prop_1_83a73dcfd05a6cf6754e1eb24114c1f1.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block prop_1_83a73dcfd05a6cf6754e1eb24114c1f1.json
new file mode 100644
index 0000000000..969eb373ab
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block prop_1_83a73dcfd05a6cf6754e1eb24114c1f1.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"make the first paragraph right aligned\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-a9f6618a-dc5e-40c5-8285-c6469f225a19\",\"object\":\"chat.completion.chunk\",\"created\":1763481000,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_c06d5113ec\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabth6smf6xsqs80acqw4z6j\",\"seed\":1335092392}}\n\ndata: {\"id\":\"chatcmpl-a9f6618a-dc5e-40c5-8285-c6469f225a19\",\"object\":\"chat.completion.chunk\",\"created\":1763481000,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_c06d5113ec\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"ystw8hzdm\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003cp style=\\\\\\\"text-align: right;\\\\\\\"\\\\u003eHello, world!\\\\u003c/p\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-a9f6618a-dc5e-40c5-8285-c6469f225a19\",\"object\":\"chat.completion.chunk\",\"created\":1763481000,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_c06d5113ec\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabth6smf6xsqs80acqw4z6j\",\"usage\":{\"queue_time\":0.092979069,\"prompt_tokens\":988,\"prompt_time\":0.050249742,\"completion_tokens\":38,\"completion_time\":0.085381356,\"total_tokens\":1026,\"total_time\":0.135631098}},\"usage\":{\"queue_time\":0.092979069,\"prompt_tokens\":988,\"prompt_time\":0.050249742,\"completion_tokens\":38,\"completion_time\":0.085381356,\"total_tokens\":1026,\"total_time\":0.135631098}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type and content_1_2448cba67be91338d1977d4a980761a6.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type and content_1_2448cba67be91338d1977d4a980761a6.json
deleted file mode 100644
index baa451a00f..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type and content_1_2448cba67be91338d1977d4a980761a6.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"make the first paragraph a heading and update the content to 'What's up, world!'\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-e78c4907-7578-4da5-ba2f-155401c2ff56\",\"object\":\"chat.completion.chunk\",\"created\":1758783442,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_a2c262bc3a\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk38ke009j9wnaeejb24r\"}}\n\ndata: {\"id\":\"chatcmpl-e78c4907-7578-4da5-ba2f-155401c2ff56\",\"object\":\"chat.completion.chunk\",\"created\":1758783442,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_a2c262bc3a\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"bcwjg029p\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003ch1\\\\u003eWhat's up, world!\\\\u003c/h1\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-e78c4907-7578-4da5-ba2f-155401c2ff56\",\"object\":\"chat.completion.chunk\",\"created\":1758783442,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_a2c262bc3a\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk38ke009j9wnaeejb24r\",\"usage\":{\"queue_time\":0.168121985,\"prompt_tokens\":949,\"prompt_time\":0.078238666,\"completion_tokens\":36,\"completion_time\":0.087214503,\"total_tokens\":985,\"total_time\":0.165453169}},\"usage\":{\"queue_time\":0.168121985,\"prompt_tokens\":949,\"prompt_time\":0.078238666,\"completion_tokens\":36,\"completion_time\":0.087214503,\"total_tokens\":985,\"total_time\":0.165453169}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type and content_1_7500fd44498888e45aedc9dfa669737c.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type and content_1_7500fd44498888e45aedc9dfa669737c.json
new file mode 100644
index 0000000000..4eeec81c90
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type and content_1_7500fd44498888e45aedc9dfa669737c.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"make the first paragraph a heading and update the content to 'What's up, world!'\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-d1b848fa-4e45-4003-bec3-72445761ce32\",\"object\":\"chat.completion.chunk\",\"created\":1763481001,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_dae98b5ecb\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabth76qe2bagg3mwbpezmwm\",\"seed\":449343763}}\n\ndata: {\"id\":\"chatcmpl-d1b848fa-4e45-4003-bec3-72445761ce32\",\"object\":\"chat.completion.chunk\",\"created\":1763481001,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_dae98b5ecb\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"tt9qrxzh7\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003ch1\\\\u003eWhat's up, world!\\\\u003c/h1\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-d1b848fa-4e45-4003-bec3-72445761ce32\",\"object\":\"chat.completion.chunk\",\"created\":1763481001,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_dae98b5ecb\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabth76qe2bagg3mwbpezmwm\",\"usage\":{\"queue_time\":0.091975996,\"prompt_tokens\":1000,\"prompt_time\":0.097801187,\"completion_tokens\":36,\"completion_time\":0.091039646,\"total_tokens\":1036,\"total_time\":0.188840833}},\"usage\":{\"queue_time\":0.091975996,\"prompt_tokens\":1000,\"prompt_time\":0.097801187,\"completion_tokens\":36,\"completion_time\":0.091039646,\"total_tokens\":1036,\"total_time\":0.188840833}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type_1_88fade9a250bf912d8d65f9db17e6de7.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type_1_88fade9a250bf912d8d65f9db17e6de7.json
deleted file mode 100644
index d2ed7c7142..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type_1_88fade9a250bf912d8d65f9db17e6de7.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.groq.com/openai/v1/chat/completions",
- "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":\"make the first paragraph a heading\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "data: {\"id\":\"chatcmpl-c23e1112-59d0-48cf-859e-d6ccdf15253e\",\"object\":\"chat.completion.chunk\",\"created\":1758783441,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_ede95a097b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01k5ztk2h9fzzvs2pcmwaftr36\"}}\n\ndata: {\"id\":\"chatcmpl-c23e1112-59d0-48cf-859e-d6ccdf15253e\",\"object\":\"chat.completion.chunk\",\"created\":1758783441,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_ede95a097b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"07r9p88c7\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003ch1\\\\u003eHello, world!\\\\u003c/h1\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-c23e1112-59d0-48cf-859e-d6ccdf15253e\",\"object\":\"chat.completion.chunk\",\"created\":1758783441,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_ede95a097b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01k5ztk2h9fzzvs2pcmwaftr36\",\"usage\":{\"queue_time\":0.143721537,\"prompt_tokens\":937,\"prompt_time\":0.076420397,\"completion_tokens\":33,\"completion_time\":0.08854522,\"total_tokens\":970,\"total_time\":0.164965617}},\"usage\":{\"queue_time\":0.143721537,\"prompt_tokens\":937,\"prompt_time\":0.076420397,\"completion_tokens\":33,\"completion_time\":0.08854522,\"total_tokens\":970,\"total_time\":0.164965617}}\n\ndata: [DONE]\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type_1_92eb84e55a7b9efe5daf52bef299b4a6.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type_1_92eb84e55a7b9efe5daf52bef299b4a6.json
new file mode 100644
index 0000000000..8f3f6d569c
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type_1_92eb84e55a7b9efe5daf52bef299b4a6.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "body": "{\"model\":\"llama-3.3-70b-versatile\",\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":\"make the first paragraph a heading\"}],\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "data: {\"id\":\"chatcmpl-4dff0dcf-3e04-4351-8c4f-66301d6e870f\",\"object\":\"chat.completion.chunk\",\"created\":1763481000,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01kabth6fpe298vcebkx3ns9gr\",\"seed\":786935097}}\n\ndata: {\"id\":\"chatcmpl-4dff0dcf-3e04-4351-8c4f-66301d6e870f\",\"object\":\"chat.completion.chunk\",\"created\":1763481000,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"cygf52rze\",\"type\":\"function\",\"function\":{\"name\":\"applyDocumentOperations\",\"arguments\":\"{\\\"operations\\\":[{\\\"block\\\":\\\"\\\\u003ch1\\\\u003eHello, world!\\\\u003c/h1\\\\u003e\\\",\\\"id\\\":\\\"ref1$\\\",\\\"type\\\":\\\"update\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-4dff0dcf-3e04-4351-8c4f-66301d6e870f\",\"object\":\"chat.completion.chunk\",\"created\":1763481000,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_68f543a7cc\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01kabth6fpe298vcebkx3ns9gr\",\"usage\":{\"queue_time\":0.090005546,\"prompt_tokens\":988,\"prompt_time\":0.050794718,\"completion_tokens\":33,\"completion_time\":0.085079388,\"total_tokens\":1021,\"total_time\":0.135874106}},\"usage\":{\"queue_time\":0.090005546,\"prompt_tokens\":988,\"prompt_time\":0.050794718,\"completion_tokens\":33,\"completion_time\":0.085079388,\"total_tokens\":1021,\"total_time\":0.135874106}}\n\ndata: [DONE]\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/clear block formatting_1_67c4abf409c5217946a8fd26353f3d5c.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/clear block formatting_1_67c4abf409c5217946a8fd26353f3d5c.json
deleted file mode 100644
index 8fbb0df2ab..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/clear block formatting_1_67c4abf409c5217946a8fd26353f3d5c.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"clear the formatting (colors and alignment)\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7a512188193ae5596374382237e067710100aafc9ab\",\"object\":\"response\",\"created_at\":1758783397,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7a512188193ae5596374382237e067710100aafc9ab\",\"object\":\"response\",\"created_at\":1758783397,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"6i1M6yN7vBfkDY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"q5H0Oz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"d5Ljk7zXZE7ZN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"SBQGjcQoEaOByY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"HtJY3PREWEqs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"hqdJNSeLJOPAR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"CDayC8kcYm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"VxqhkmdwRiRjh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"yTB3a081bUn9IG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"ztqcmmv5ahyBg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"poYnZfINzZAiR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"gfpIJ2Tp1onhNga\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"GIyCBanLVEPowYC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"0Gzl4tddDO2St\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"sZQjzE34J2F\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"dJpgAagjRYKE0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"jVinnhWuLjMniZK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"h72YEEzAJ0SetTW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"QMDUZiSErZpX7pW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"Colored\",\"logprobs\":[],\"obfuscation\":\"6GEOZxOPR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\" text\",\"logprobs\":[],\"obfuscation\":\"T27S1mJZXMX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"db7u15RA8x115l\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"wqjH7m0AR3fp8FZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\">\\\"\",\"logprobs\":[],\"obfuscation\":\"LMoNQm27HYsmfu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"},{\\\"\",\"logprobs\":[],\"obfuscation\":\"gmk4UHl0rX3o\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"QoAGQ3FpZpmG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"2qwOKdUNWsKOy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"UL4TZPCw2p\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"SY9EzuDO0Gel5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"pDjowpvG40YyNe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"x82Xe0rf6G8ML\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"sJAeeIyj1y2Ks\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"tLkpl6UlRXXkhVB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"pZTMVtYRypymPcm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"XXDMIt2FEWr0A\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"Kc4mYTz95cH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"5tE9P5PYKtfpv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"1h3FlzzgH4r3eoy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"WAvXTEnifWodpx6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"8JNynTYOTdWw4iU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"Aligned\",\"logprobs\":[],\"obfuscation\":\"IiuU3Ay0C\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\" text\",\"logprobs\":[],\"obfuscation\":\"SCFpvNOFn9G\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"lREOFkiFEpm1A1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"I7wFT30zTFUrA49\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"DJoLQg0EoQqfEWC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"ctbQqB92pQbmjg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"3e8yBsv5VbW7ta\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":51,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":52,\"item_id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":53,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":54,\"response\":{\"id\":\"resp_68d4e7a512188193ae5596374382237e067710100aafc9ab\",\"object\":\"response\",\"created_at\":1758783397,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7a5960081938efebdd7e137a0fd067710100aafc9ab\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":639,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":48,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":687},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/clear block formatting_1_c3fe0bb003a4e1d613472af309c46ab0.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/clear block formatting_1_c3fe0bb003a4e1d613472af309c46ab0.json
new file mode 100644
index 0000000000..2c38e7c111
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/clear block formatting_1_c3fe0bb003a4e1d613472af309c46ab0.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"clear the formatting (colors and alignment)\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0ae7e999f760098100691c956e0a548196ae8fe469287abb9c\",\"object\":\"response\",\"created_at\":1763480942,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0ae7e999f760098100691c956e0a548196ae8fe469287abb9c\",\"object\":\"response\",\"created_at\":1763480942,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"7fUQBoYqARIoKV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"D6loqX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"DbrbOV2JQTmJo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"rXvtRmMd9MeEMS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"cWwjNpc3t9N2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"3WmJvItmKjotZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"PGeZBZSfyp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"y5NNJ4ljCbGsl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"DlN45o9jt44KQW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"06sYni0SHZwvk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"97s57DVeulgdh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"nacSsSF1nYD8HTg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"oXBIKRqfGVyodQK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"d1cgWeu2Q9v3m\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"NTlcdPSDdlr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"l28cmbgqsZbgK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"QpvtTj407yO3PMD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"I0gVfwn55WBZoSv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"dipY1MnVLVB0Mx3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"Colored\",\"logprobs\":[],\"obfuscation\":\"LTgQeNwEK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\" text\",\"logprobs\":[],\"obfuscation\":\"VSX3CCfr6Ld\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"oHDVJHrWEsGxjm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"ZI4f5IGPAb3dvCQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\">\\\"\",\"logprobs\":[],\"obfuscation\":\"pI9a1z6vP0Zb7z\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"},{\\\"\",\"logprobs\":[],\"obfuscation\":\"StGnZPeOIi5k\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"UzWQyJsz4ZcB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"LMkcIqIFc2mlm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"aX6WluO1P6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"jX6WZ9Yd3cS6h\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"wYpAUqiBv8hGsh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"h8RrKKU54GroM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"49DdtnyPLxVU2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"W0CjInd8QqCHdHS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"vdATWiOyDKRS7jS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"76a9HXgP6TrZX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"ReKyT0eah5H\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"KPeWG7qINVtiN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"SrVgVErco5v39pJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"4mAPjcYAGd8LwhJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"uG6THRn9ht4eDh8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"Aligned\",\"logprobs\":[],\"obfuscation\":\"C4SEJSYIJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\" text\",\"logprobs\":[],\"obfuscation\":\"yupjjqvH2aJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"1tF4kkk2h84etg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"wmvxW5uvZzfpifA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"fQm8SNcehZPIRbp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"8fLdbzq1uEys9Y\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"aKATsaHU4crjjf\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":51,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":52,\"item_id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":53,\"output_index\":0,\"item\":{\"id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":54,\"response\":{\"id\":\"resp_0ae7e999f760098100691c956e0a548196ae8fe469287abb9c\",\"object\":\"response\",\"created_at\":1763480942,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_0ae7e999f760098100691c956e8ab88196bf7557fab685e3e1\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":686,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":48,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":734},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/drop mark and link and change text within mark_1_4d1645603f58ac95cefa5802e9d0b576.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/drop mark and link and change text within mark_1_4d1645603f58ac95cefa5802e9d0b576.json
deleted file mode 100644
index 1906c78660..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/drop mark and link and change text within mark_1_4d1645603f58ac95cefa5802e9d0b576.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"change the last paragraph to 'Hi, world! Bold the text. Link.' without any markup like bold or link\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e79f306c8190a18fe5e9bcd9b189028f62c28db4caa3\",\"object\":\"response\",\"created_at\":1758783391,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e79f306c8190a18fe5e9bcd9b189028f62c28db4caa3\",\"object\":\"response\",\"created_at\":1758783391,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"kqfshPneAwKvKX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"8sfKvx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"tooImfHKEOHWe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"T7ZAhb32nL9hj1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"DF9vvfI5e7kx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"ughf7CwqROxsA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"pYS1iTVZOl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"i8Lf3ucxBYphM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"eDLk5XoSaioOOs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"YhTRXAGUdKhvy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"Nc3XVXJ602K5R\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"3\",\"logprobs\":[],\"obfuscation\":\"01PFTs1PZyk7him\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"rm5UHNXTAKL58T4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"jqIJtekFldk2o\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"eJU2CUCdbrs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"J2iplNO4hlDQK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"py6a04fyL7eoHYK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"4wFg8Op0MvlvnXA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"PCBw3yFlXpvqhBv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"Hi\",\"logprobs\":[],\"obfuscation\":\"hiA9xYgs6KzilM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"0crCko3q0KgMZ7U\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\" world\",\"logprobs\":[],\"obfuscation\":\"ppnfB2J9Hv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"MV8DC5rwtD6RPlF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\" Bold\",\"logprobs\":[],\"obfuscation\":\"QqPFTeKw6Tl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\" the\",\"logprobs\":[],\"obfuscation\":\"9eNcneQYPZVp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\" text\",\"logprobs\":[],\"obfuscation\":\"sNqtx4mJPgk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\".\",\"logprobs\":[],\"obfuscation\":\"YO5KJ8XwufgSeJ6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\" Link\",\"logprobs\":[],\"obfuscation\":\"BW4oFOT0EeN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\".\",\"logprobs\":[],\"obfuscation\":\"M6r2c85YsgQkO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"2p8Y803f0ruyO3H\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"RH4sHWD3Ik0vCOY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"vfIIRX3Pzqlu1W\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"KyAMxBlIQuZml6\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":37,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hi, world! Bold the text. Link.
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":38,\"item_id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hi, world! Bold the text. Link.
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":39,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hi, world! Bold the text. Link.
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":40,\"response\":{\"id\":\"resp_68d4e79f306c8190a18fe5e9bcd9b189028f62c28db4caa3\",\"object\":\"response\",\"created_at\":1758783391,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7a02c348190bf3e06c00ea81538028f62c28db4caa3\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hi, world! Bold the text. Link.
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":741,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":34,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":775},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/drop mark and link and change text within mark_1_9724ffa3960f9e2f0853ca65fa305d5a.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/drop mark and link and change text within mark_1_9724ffa3960f9e2f0853ca65fa305d5a.json
new file mode 100644
index 0000000000..9f9afceb60
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/drop mark and link and change text within mark_1_9724ffa3960f9e2f0853ca65fa305d5a.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"change the last paragraph to 'Hi, world! Bold the text. Link.' without any markup like bold or link\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_07330ea9e821d86b00691c9568cf1c8194a1ec3e17749378ed\",\"object\":\"response\",\"created_at\":1763480936,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_07330ea9e821d86b00691c9568cf1c8194a1ec3e17749378ed\",\"object\":\"response\",\"created_at\":1763480936,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"GjZoXuzzZ61Er9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"eTrN8N\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"rJ2jDB0lwYaV0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"b0Hz6aL41VzGlX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"AQoUujRm9BQ9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"PFYKr4fKfIuQT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"vhKFtsSXC2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"iNjpMWkX1QSrH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"bNiJppK5iyqHdI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"RAvGD8zUN81fN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"ePqb0bMsLl2YA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"3\",\"logprobs\":[],\"obfuscation\":\"kcu06hnVFScabN1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"HkcjZMnLzEie12u\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"OL96T36CZBwer\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"T2409h1wMxJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"2Lw1CTB6rDYPS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"hvMbztWxGHSc6nu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"UWmslnmsoECHsny\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"V7vVE3Q1eFsA6ja\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"Hi\",\"logprobs\":[],\"obfuscation\":\"35H7BSAO3s4Lb0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"SJOsyQusnqPEgOD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\" world\",\"logprobs\":[],\"obfuscation\":\"uGzu9GxGyk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"xIaBNZj0pu37C9Z\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\" Bold\",\"logprobs\":[],\"obfuscation\":\"kT85Ijn11K2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\" the\",\"logprobs\":[],\"obfuscation\":\"nq7yuNvu3paV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\" text\",\"logprobs\":[],\"obfuscation\":\"4IB6dE9nVfD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\".\",\"logprobs\":[],\"obfuscation\":\"MqA0ia3uD9GJ2cU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\" Link\",\"logprobs\":[],\"obfuscation\":\"9ME8q4RHbRO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\".\",\"logprobs\":[],\"obfuscation\":\"IHzhGo1YxgmSB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"XVpYQQrUNGH2FA2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"BARhHVtnv18AShG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"v4jaSXCO5W9ZcH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"RbRetOsaO6jxYT\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":37,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hi, world! Bold the text. Link.
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":38,\"item_id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hi, world! Bold the text. Link.
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":39,\"output_index\":0,\"item\":{\"id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hi, world! Bold the text. Link.
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":40,\"response\":{\"id\":\"resp_07330ea9e821d86b00691c9568cf1c8194a1ec3e17749378ed\",\"object\":\"response\",\"created_at\":1763480936,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_07330ea9e821d86b00691c956946208194975584393be10b5b\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hi, world! Bold the text. Link.
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":788,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":34,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":822},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/drop mark and link_1_8235f32b241ce454e355284db306f2b5.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/drop mark and link_1_8235f32b241ce454e355284db306f2b5.json
deleted file mode 100644
index c88aaca20e..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/drop mark and link_1_8235f32b241ce454e355284db306f2b5.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"remove the formatting (turn into plain text without styles or urls) from the last paragraph\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e79de8c4819589e751a60e41e7ee06f565dce5007b02\",\"object\":\"response\",\"created_at\":1758783389,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e79de8c4819589e751a60e41e7ee06f565dce5007b02\",\"object\":\"response\",\"created_at\":1758783389,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"R7o1iU4YOEHnPP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"g5fcYw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"FGjPGrQUclSGq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"tOnTgNNEYU1Q7Y\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"tBVdmWXE8gcJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"Gysi9mbFBcuwP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"PcDxTqZnWl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"UzToza8409Lmc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"mQ9GDghDru2n73\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"0dbs9emDWjsad\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"ujMiRKY2ksrrP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"3\",\"logprobs\":[],\"obfuscation\":\"bL7blvnuZSWSsS6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"2xeXs8ex09PWU8p\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"rJU5YM4WVeRWn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"icnCVSd8bkA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"TeoMKkPbNocRX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"MKgceoRprmy2gnn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"ql6yzfdoIE7qj46\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\">Hello\",\"logprobs\":[],\"obfuscation\":\"juI3yozAUx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"zHCNhAyQiqWn8vj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\" world\",\"logprobs\":[],\"obfuscation\":\"dUPVVovryX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"JklPFb4FuNBhGKN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\" Bold\",\"logprobs\":[],\"obfuscation\":\"WtYvcahs9RF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\" text\",\"logprobs\":[],\"obfuscation\":\"lZioBbRBErs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\".\",\"logprobs\":[],\"obfuscation\":\"x89bCez0r51Qesr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\" Link\",\"logprobs\":[],\"obfuscation\":\"rJTRrFupFai\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\".\",\"logprobs\":[],\"obfuscation\":\"hGVaN3lRGwLXL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"HJ7r8PoPOsvceta\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"m8vmeI0jsDcPPN8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"acJiE9DVkqOv1b\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"N0zkvFL4jTvvGc\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":35,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":36,\"item_id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":37,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":38,\"response\":{\"id\":\"resp_68d4e79de8c4819589e751a60e41e7ee06f565dce5007b02\",\"object\":\"response\",\"created_at\":1758783389,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e79e656c8195a9d198fb5805f6d806f565dce5007b02\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":735,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":32,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":767},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/drop mark and link_1_ab436caf1e1c8338ab798b9e41f27035.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/drop mark and link_1_ab436caf1e1c8338ab798b9e41f27035.json
new file mode 100644
index 0000000000..757626e215
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/drop mark and link_1_ab436caf1e1c8338ab798b9e41f27035.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"remove the formatting (turn into plain text without styles or urls) from the last paragraph\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0fac9c1b018d71ba00691c956736888190986195487638c95f\",\"object\":\"response\",\"created_at\":1763480935,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0fac9c1b018d71ba00691c956736888190986195487638c95f\",\"object\":\"response\",\"created_at\":1763480935,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"w8gL04WGh9PMg6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"vYcAzI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"7hmIbP11FJA6l\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"32F92sCAi093Yx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"adajs9ok2ztJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"HXJDtPbhP7izB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"NyM97Fzz27\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"3pKGgt7lgJTKV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"0r2FHABlhU6AMA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"dPtk9DgcauHJk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"zRGPGzV3GvYXf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"3\",\"logprobs\":[],\"obfuscation\":\"MQk5PYoh329G5VO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"9X9plMxu9zTmumD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"EER09tzHW4Uze\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"ce8mpl6RSOV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"8Kv3Wk2Hiz8wq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"WTnju1EFcbXmvpU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"NxsPswAS4z5gxCO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\">Hello\",\"logprobs\":[],\"obfuscation\":\"O579erAzPD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"pdZ24nMCMpg1QDp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\" world\",\"logprobs\":[],\"obfuscation\":\"fHBVZRHgyX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"a5DMuc1JUNaNRgJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\" Bold\",\"logprobs\":[],\"obfuscation\":\"egCKVacp1Bo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\" text\",\"logprobs\":[],\"obfuscation\":\"77po8e2jXfI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\".\",\"logprobs\":[],\"obfuscation\":\"7vccrtJq6goBbBm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\" Link\",\"logprobs\":[],\"obfuscation\":\"XJLAVfV2dba\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\".\",\"logprobs\":[],\"obfuscation\":\"jPeyCGSK2OF6U\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"VgfWgeWtv0a0UlR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"xWFIZ1mL9qf6Jlv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"b0YE0ISqo1JvQ3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"lapdIWvT5ofEqU\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":35,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":36,\"item_id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":37,\"output_index\":0,\"item\":{\"id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":38,\"response\":{\"id\":\"resp_0fac9c1b018d71ba00691c956736888190986195487638c95f\",\"object\":\"response\",\"created_at\":1763480935,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_0fac9c1b018d71ba00691c9567e980819081da5b47e925acd8\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":782,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":32,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":814},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/modify nested content_1_030d3ad5a7f2e03a8f141379accd970d.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/modify nested content_1_030d3ad5a7f2e03a8f141379accd970d.json
new file mode 100644
index 0000000000..fba3592087
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/modify nested content_1_030d3ad5a7f2e03a8f141379accd970d.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make apples uppercase\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_099305c0a338cc4300691c956ab88c8195ab55b859cc24a65c\",\"object\":\"response\",\"created_at\":1763480938,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_099305c0a338cc4300691c956ab88c8195ab55b859cc24a65c\",\"object\":\"response\",\"created_at\":1763480938,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"MJ9GTUrmNUI09W\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"MdfedH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"f8A0R4dXB9muK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"4xmYBy1056kRK2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"wDaNd99kaAUb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"q0UoObSI5Rw72\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"cND0vDuGjC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"1jt2VW15HRnur\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"NSTv4F4AHvitvP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"3FdeD0CvUusKy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"CZzpbgxKsFUJw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"lO7GWoQ6cC6yYf4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"LmSpSEOamQtfRvj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"3YfNBg1s6XBQt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"06MPtUCClij\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"lSexx9KWdNcY6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"VSP36gClHy72Fcr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"O1z3zyCKjxuAcjG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"xiQGDwFfOA0AuSa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"APP\",\"logprobs\":[],\"obfuscation\":\"51MRnuwhV7KOo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"LES\",\"logprobs\":[],\"obfuscation\":\"7h4Z9kmfEkQpj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"79x7x9VvFzEe5U\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"roHGf5YuOc2qREU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"X1TAfnd16iLlaga\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"xrQylN20DIQcf6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"GEAxFQsU9kjc3c\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":30,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"APPLES
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":31,\"item_id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"APPLES
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":32,\"output_index\":0,\"item\":{\"id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"APPLES
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":33,\"response\":{\"id\":\"resp_099305c0a338cc4300691c956ab88c8195ab55b859cc24a65c\",\"object\":\"response\",\"created_at\":1763480938,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_099305c0a338cc4300691c956b462881959cb317a7c954473a\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"APPLES
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":647,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":27,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":674},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/modify nested content_1_1e7e3f801e8b2fcad2e947f25b842d59.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/modify nested content_1_1e7e3f801e8b2fcad2e947f25b842d59.json
deleted file mode 100644
index 7910e55411..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/modify nested content_1_1e7e3f801e8b2fcad2e947f25b842d59.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make apples uppercase\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7a258188190a5e6491e31d393f20a2d113da3850dcf\",\"object\":\"response\",\"created_at\":1758783394,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7a258188190a5e6491e31d393f20a2d113da3850dcf\",\"object\":\"response\",\"created_at\":1758783394,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"IkNZ5C3D1pL1m8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"c9WHsU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"abgAw0VhKFZW3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"CQMnlMdzwnUSbl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"Xvu7dCRNx1Op\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"YgHUzbeP4ArbL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"GQ1mzRiU26\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"Bkh5i7CJk1tFc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"8wAwc34W1gJqCJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"kFk1n38o7wulv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"cofeERc2K0Rfc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"tmuM1xs03qMJRgn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"mdiOndfEtHiNYBQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"7XPJnh10Xg8BS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"5l1pDy1gLUD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"ZkaAxHMzCtifD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"6KDYAGJ3r5c18pD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"D170vThK17FqEDU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"Ei9UhFkUhzQyp5N\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"APP\",\"logprobs\":[],\"obfuscation\":\"eiW14kOCAJ9Bt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"LES\",\"logprobs\":[],\"obfuscation\":\"Cb1OdO2nwV3fw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"qfFRbtmSyBEbQt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"MvQUHV0cyjJZL5Y\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"MP6fflBX64sG6AK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"oRy8H8itOZ1IvD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"bqMKeou6HSc7Gm\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"APPLES
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"APPLES
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":32,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"APPLES
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":33,\"response\":{\"id\":\"resp_68d4e7a258188190a5e6491e31d393f20a2d113da3850dcf\",\"object\":\"response\",\"created_at\":1758783394,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7a2e96c8190abcb8a0fb3dbd78f0a2d113da3850dcf\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"APPLES
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":600,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":27,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":627},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/modify parent content_1_06951fbd3511111eb460efd853b4c6ee.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/modify parent content_1_06951fbd3511111eb460efd853b4c6ee.json
deleted file mode 100644
index 2845771a80..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/modify parent content_1_06951fbd3511111eb460efd853b4c6ee.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make the first paragraph uppercase\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7a38b2881939a261c45d0fd6a000194aad94a81b6db\",\"object\":\"response\",\"created_at\":1758783395,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7a38b2881939a261c45d0fd6a000194aad94a81b6db\",\"object\":\"response\",\"created_at\":1758783395,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"3rRpyqFIfrgIuE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"D2jw0X\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"9kf5U8kTmZHUj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"tnTxqK2wbOENTB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"HQDQkmZk46db\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"gpznIXnCPk2TT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"RHYjLjmsWx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"RkX6jwZkL5nvl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"eDuJs4ENWU7fCw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"c2fIyOrRIC797\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"mlYKK3J1DS9xg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"uTeDRcRiSAjf9sP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"VwrMsfp6mrhaf7g\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"hgQvm6q88uIxj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"prfcryHZU0D\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"eVEpDyoyiDnkp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"CvoIGATdYKSfwov\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"Joc0hyyqeTm5NJq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\">I\",\"logprobs\":[],\"obfuscation\":\"0jKkbIIJQMt5Cw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\" NEED\",\"logprobs\":[],\"obfuscation\":\"CtOMtXIKTea\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\" TO\",\"logprobs\":[],\"obfuscation\":\"3w9KA6MxYt1kl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\" BUY\",\"logprobs\":[],\"obfuscation\":\"Inz6Ywkqcg3y\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\":\",\"logprobs\":[],\"obfuscation\":\"IyJkKUQAMUw78\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"LmWgrmmvBoVfJr9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"24qxPRv8ioazIGg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"84zCqYcwANpZ2q\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"2aCP0lIgCc4m5C\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I NEED TO BUY:
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":32,\"item_id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I NEED TO BUY:
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":33,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I NEED TO BUY:
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":34,\"response\":{\"id\":\"resp_68d4e7a38b2881939a261c45d0fd6a000194aad94a81b6db\",\"object\":\"response\",\"created_at\":1758783395,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7a4314c8193b0e2b07ea000bb5e0194aad94a81b6db\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I NEED TO BUY:
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":602,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":28,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":630},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/modify parent content_1_8123bc6c0c42f952c5081494aae87db3.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/modify parent content_1_8123bc6c0c42f952c5081494aae87db3.json
new file mode 100644
index 0000000000..4c87729b09
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/modify parent content_1_8123bc6c0c42f952c5081494aae87db3.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make the first paragraph uppercase\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0c7c942cc81f12b600691c956cdd0c81978fcc1ce5fc617409\",\"object\":\"response\",\"created_at\":1763480940,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0c7c942cc81f12b600691c956cdd0c81978fcc1ce5fc617409\",\"object\":\"response\",\"created_at\":1763480940,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"iv9m7FCvJ20bl1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"wqPQTs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"JshGKySJHcMFU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"9GQ8nQY6V8f4t3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"sMaNu1uOJJpk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"d1Yix8hO15nIl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"03EetiR6GP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"VzjeLJLbzIfhw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"svAyPY9dbVFuWb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"QYy3RfEyM6AjQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"df9Jx3pkSMpYb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"MhR1HMN45kvEci6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"zn3EszuyfRZ8P0C\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"0XnFir0Ff1zYR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"NKSVWdy2AvZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"WkOdRgcNV1uvL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"9Hr9u1hchpHTu9M\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"mJ66QAFyCiRbKWC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\">I\",\"logprobs\":[],\"obfuscation\":\"znFL6PE5e0rq5P\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\" NEED\",\"logprobs\":[],\"obfuscation\":\"JQDHxF9BrCC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\" TO\",\"logprobs\":[],\"obfuscation\":\"8mDxJSEsTeXzx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\" BUY\",\"logprobs\":[],\"obfuscation\":\"ZMu82WZRBPTP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\":\",\"logprobs\":[],\"obfuscation\":\"8edGrEGVNvNfy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"ObRggBdzRODAEfj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"lItwUr4etPwBkuQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"zQt1O2bep5qV4l\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"ErhZEPYOgYID3I\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":31,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I NEED TO BUY:
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":32,\"item_id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I NEED TO BUY:
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":33,\"output_index\":0,\"item\":{\"id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I NEED TO BUY:
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":34,\"response\":{\"id\":\"resp_0c7c942cc81f12b600691c956cdd0c81978fcc1ce5fc617409\",\"object\":\"response\",\"created_at\":1763480940,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_0c7c942cc81f12b600691c956d4f0081978b8949407dc91910\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I NEED TO BUY:
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":649,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":28,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":677},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/plain source block, add mention_1_7740e1127e576e342300ad8ca046c116.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/plain source block, add mention_1_7740e1127e576e342300ad8ca046c116.json
new file mode 100644
index 0000000000..47175887c5
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/plain source block, add mention_1_7740e1127e576e342300ad8ca046c116.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"Change the first paragraph to Hello, Jane Doe! (use a mention)\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0799340bf740d39100691c95623d6481948ee2d57881254db6\",\"object\":\"response\",\"created_at\":1763480930,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0799340bf740d39100691c95623d6481948ee2d57881254db6\",\"object\":\"response\",\"created_at\":1763480930,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"7xNJFrkeyeh5ML\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"ARczYQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"7Kfzk0doyNcca\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"kFmyygoTrj7vbf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"fmVTgnUWJN6X\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"jvRqWqUmvjD5V\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"bMHYdZHSqy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"IsZQWUg2VtkNs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"gWlrGYCiM1QaKT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"ohd56uB5EOijc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"kwKAh4Qmr5umc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"PBv5UG7yIktAzhF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"0TJH1xRQF2vnnRM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"IhZAX0SUbEBwd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"QOHkO7Xbw1q\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"2Sgd9bkUE1imD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"H0x9wmz2QGgVQ7j\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"q6uIdiD8THtM0n2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\">Hello\",\"logprobs\":[],\"obfuscation\":\"jYPDFjrGlw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"lO9MpOU83XAF7R5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"c2lLTak77IZi2J\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"FKNqr3KDXnyK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"pXWa0PUQymi\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"-inline\",\"logprobs\":[],\"obfuscation\":\"Fqgmz2hEl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"-content\",\"logprobs\":[],\"obfuscation\":\"HWfFHJiw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"-type\",\"logprobs\":[],\"obfuscation\":\"wCYZnT9ykEr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"9qUvjuD1PRMpe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"mention\",\"logprobs\":[],\"obfuscation\":\"jn6A555as\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"UcASOquWHRYFzZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"sUU8HVtPkgT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"-user\",\"logprobs\":[],\"obfuscation\":\"jwtnNf74JTT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"1ejhFvoh113bd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"Jane\",\"logprobs\":[],\"obfuscation\":\"Mcx5QR3RxIE3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\" Doe\",\"logprobs\":[],\"obfuscation\":\"ehNFECTvbIUN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"Nfrwh55e6pXPv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"@\",\"logprobs\":[],\"obfuscation\":\"Odg2M160Zam6rCJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"Jane\",\"logprobs\":[],\"obfuscation\":\"66X6bi4t6nhO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\" Doe\",\"logprobs\":[],\"obfuscation\":\"eezplS3UbXYJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"ZDIN6dxA3kdyGE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"Dpp0lVsslHDx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"BR4CBJvGFT2Fo4h\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"tGj64J1L5IDXk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"LHBSst11k3DGtij\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"R4OUwvmGpHnbTfv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"tnhdlhhZCGgsMp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"RVx8SXzmkzNEw2\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":50,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, @Jane Doe!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":51,\"item_id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, @Jane Doe!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":52,\"output_index\":0,\"item\":{\"id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, @Jane Doe!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":53,\"response\":{\"id\":\"resp_0799340bf740d39100691c95623d6481948ee2d57881254db6\",\"object\":\"response\",\"created_at\":1763480930,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_0799340bf740d39100691c95647af481948e4507d63b8c57ed\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, @Jane Doe!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":780,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":47,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":827},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/plain source block, add mention_1_d27b598add3108097cd76a3113395221.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/plain source block, add mention_1_d27b598add3108097cd76a3113395221.json
deleted file mode 100644
index f2938a0208..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/plain source block, add mention_1_d27b598add3108097cd76a3113395221.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"Change the first paragraph to Hello, Jane Doe! (use a mention)\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7f299b48194b802cabd073bb5d30bda2949cf37fb47\",\"object\":\"response\",\"created_at\":1758783474,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7f299b48194b802cabd073bb5d30bda2949cf37fb47\",\"object\":\"response\",\"created_at\":1758783474,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"AKc8tJeQgCWqFa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"1ggHWt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"UirbbE4ZZFQMW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"CL4ZdhMUBM7WBL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"OGPQVBNGqnhY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"soRGVqkKwIhhG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"L2H1oyu3kK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"cX3rWb1lDYgCt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"tsQc2c0Cyd39Uz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"Di5dBSjeOfSGw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"f3J5ps6s3LQ2n\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"3bqJR45iBo3nH6i\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"RcedSU8WpMyZnKW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"wuLRDwr9foU7d\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"kaSA0zu9SiP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"EFe5OZFmuJkEa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"QTknRs7wHJ8BQ5d\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"b2mCpgXhIX3bEyU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\">Hello\",\"logprobs\":[],\"obfuscation\":\"9KAIqu8ywe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"KCdbn7jrG2DpUPl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"GbixbKi6ye82d2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"Qmwxy5joE2sm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"ddNWjAEiA96\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"-inline\",\"logprobs\":[],\"obfuscation\":\"LkkXiPVDf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"-content\",\"logprobs\":[],\"obfuscation\":\"4tLGxz0Y\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"-type\",\"logprobs\":[],\"obfuscation\":\"wNl0NXfOm27\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"OZ5oI9eI9VYTq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"mention\",\"logprobs\":[],\"obfuscation\":\"jgsMSulnY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"ZQBmemRqLNaod5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"pWRChliFKzO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"-user\",\"logprobs\":[],\"obfuscation\":\"rwEKTx8MZ2T\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"a78Pk2FuLydxz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"Jane\",\"logprobs\":[],\"obfuscation\":\"HtHYw5dqASaX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\" Doe\",\"logprobs\":[],\"obfuscation\":\"TESaEj4E7LiJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"n5v8IHQAmQ09m\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"@\",\"logprobs\":[],\"obfuscation\":\"UxUO7xRDhYtlkJf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"Jane\",\"logprobs\":[],\"obfuscation\":\"dog2fErNWKVW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\" Doe\",\"logprobs\":[],\"obfuscation\":\"c1noB5fPNSG0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"1lYnMDMLYLgI2Z\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"oocVTucAY8RV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"DRcoU6m61YWpv3b\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"U7BNBdQb2JUcV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"9FUA33oZoY9pku0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"A3NabEROJk5jXLZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"9fz2mrzuwgOFmE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"eCRhKbqO3QtKhM\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":50,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, @Jane Doe!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":51,\"item_id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, @Jane Doe!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":52,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, @Jane Doe!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":53,\"response\":{\"id\":\"resp_68d4e7f299b48194b802cabd073bb5d30bda2949cf37fb47\",\"object\":\"response\",\"created_at\":1758783474,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7f324888194b8aaf59e6b0ce2cf0bda2949cf37fb47\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, @Jane Doe!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":733,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":47,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":780},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/standard update_1_3e742ef6a27c2a70d6a34483f81b80cd.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/standard update_1_3e742ef6a27c2a70d6a34483f81b80cd.json
deleted file mode 100644
index ae6eedeb05..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/standard update_1_3e742ef6a27c2a70d6a34483f81b80cd.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"translate the first paragraph to german\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7d4636c8197920edb9230a4b7d80e855c1b04c85ee3\",\"object\":\"response\",\"created_at\":1758783444,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7d4636c8197920edb9230a4b7d80e855c1b04c85ee3\",\"object\":\"response\",\"created_at\":1758783444,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"iruhrNhxrz65wS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"AIKQRW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"kjczoGVH7GHkV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"BZ7SDwHJ7Bfd7l\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"mmTcq9SUySek\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"qeWINvAl1kzU5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"9ZncFWxnrx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"fdorwYhWIZAQn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"d31RTkW5EkxsQS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"3CEeMhleYlWV2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"sw0F5MCuaKTU8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"EChk9G2SPmxSmyR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"UF0bsgzYbi5wUDF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"zULuQFaaCFuUS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"9PtoeEASQh7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"gixSNk82YTSMN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"QUl8rngQ9icKCqE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"eacCMw1k4Krrg74\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"FmWBBIkeMsfVvnQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"Hallo\",\"logprobs\":[],\"obfuscation\":\"Kr0NF0tRiYo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"3LFhwfta2t8jCWo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\" Welt\",\"logprobs\":[],\"obfuscation\":\"46A4fuEUxxr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"L9OXgNRdx9JkW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"WQPvGs46xuJltqq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"0HVGNkkPWvoMSaD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"1UhXtCdNzuaXhp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"B4CEnW9EiKuT3M\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, Welt!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":32,\"item_id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, Welt!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":33,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, Welt!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":34,\"response\":{\"id\":\"resp_68d4e7d4636c8197920edb9230a4b7d80e855c1b04c85ee3\",\"object\":\"response\",\"created_at\":1758783444,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7d4c42481979075f4f3825099040e855c1b04c85ee3\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, Welt!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":724,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":28,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":752},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/standard update_1_b940b7342e81fb99f50941824dca6dc9.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/standard update_1_b940b7342e81fb99f50941824dca6dc9.json
new file mode 100644
index 0000000000..eba358e09f
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/standard update_1_b940b7342e81fb99f50941824dca6dc9.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"translate the first paragraph to german\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_025ed895d0a50bdb00691c9552646881938091714fc1d0afc6\",\"object\":\"response\",\"created_at\":1763480914,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_025ed895d0a50bdb00691c9552646881938091714fc1d0afc6\",\"object\":\"response\",\"created_at\":1763480914,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"T5hdt8LfTdADAO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"6QrZZx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"NVcuvRZ1ve1uB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"wphT1YNvGQ5bVW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"qH8KUNBYHzJL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"8nx78Z1QqzP0k\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"DtLv3DGq1C\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"T33q0TU9t1cVH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"e4t4abIvGGO7XM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"t5X3ivnfE21Oz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"LcyO4SAS7yq8B\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"wVjounl5XDcbDTn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"j2racMHP125nIAy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"sICrjHgFwDe0P\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"gtl3juDLlcT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"9p5imnHEuyMUI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"nt7qEYrHo1XJqO2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"7cbMldE8wxN0ngF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"KVPa9DbczbPHnR7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"Hallo\",\"logprobs\":[],\"obfuscation\":\"sCM7HULMhWO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"3QMPV8BBGYqvJT4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\" Welt\",\"logprobs\":[],\"obfuscation\":\"yleLOS8rBia\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"eycRtEH8v1a3Y\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"OKxmIVjAGtDCpbM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"2bkcNZZdjisE1Xa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"jqWhKbRSyuPlok\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"RDy0vS2eEEQSuW\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":31,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, Welt!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":32,\"item_id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, Welt!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":33,\"output_index\":0,\"item\":{\"id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, Welt!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":34,\"response\":{\"id\":\"resp_025ed895d0a50bdb00691c9552646881938091714fc1d0afc6\",\"object\":\"response\",\"created_at\":1763480914,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_025ed895d0a50bdb00691c9552ecd08193bea344abc0a94f0f\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, Welt!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":771,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":28,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":799},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, remove mark_1_3157ee5ddce8f578c94b14a1d8ee0694.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, remove mark_1_3157ee5ddce8f578c94b14a1d8ee0694.json
deleted file mode 100644
index 92e67d5512..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, remove mark_1_3157ee5ddce8f578c94b14a1d8ee0694.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"remove the bold style from the second block\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7dd842881908103395cf486dd6c03be3243e18c1574\",\"object\":\"response\",\"created_at\":1758783453,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7dd842881908103395cf486dd6c03be3243e18c1574\",\"object\":\"response\",\"created_at\":1758783453,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"tfVBTiQJMSTIoE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"9HLscM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"f2AGOLzPFHqrG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"Zm6ZMYGh7QO3UF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"scAm6XEGoPAY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"5wgcv5m9zlEGF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"5NqvkCMAGr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"G8kU9TQ7hihjZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"kLBm2BpkDaJX58\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"eRAxCXKVXFLzb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"bQPDWnLBcrojj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"Mui2la76YlU3r7p\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"rqJcXY87J8BInt6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"85TBEEWuV0EVZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"FRFjWzT5WhJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"8mSz2yeZ0J6fF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"OzHfPgzUz85A7PB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"l3hMCOBsIIEeACf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\">Hello\",\"logprobs\":[],\"obfuscation\":\"VtIeQvcrHc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"2XVAs4oQfjITJPn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"ABGYXtQABksvko\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"KREFIdFcaztd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"upt3AhKSKu7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"-inline\",\"logprobs\":[],\"obfuscation\":\"zl2tG0Cu2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"-content\",\"logprobs\":[],\"obfuscation\":\"aTvDGwRf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"-type\",\"logprobs\":[],\"obfuscation\":\"wovV1GVOh66\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"56kS9ZU4zli3u\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"mention\",\"logprobs\":[],\"obfuscation\":\"iAwSsa2jh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"eH7lmQdyKfHWI3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"4TE1XyA2FSZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"-user\",\"logprobs\":[],\"obfuscation\":\"177DxVw6Dbh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"rIZY5hQOXVbCC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"John\",\"logprobs\":[],\"obfuscation\":\"U2nTMh5ZqP36\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\" Doe\",\"logprobs\":[],\"obfuscation\":\"sFV1Q0VDG69b\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"UxVUWGGXxkkl6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"@\",\"logprobs\":[],\"obfuscation\":\"VtLXdHTtCvBvjGl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"John\",\"logprobs\":[],\"obfuscation\":\"zicW1YwmP8eZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\" Doe\",\"logprobs\":[],\"obfuscation\":\"DZ6Ek4FXkn9H\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"P9IWbFg1jqKRFR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"iMlMY9ryYIt3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"xQvKPRWCzkxfpZs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"6ntR0DCXtJeX60I\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\" How\",\"logprobs\":[],\"obfuscation\":\"C2SUzko8q77g\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\" are\",\"logprobs\":[],\"obfuscation\":\"zNeHWFnyLuOK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\" you\",\"logprobs\":[],\"obfuscation\":\"BM5kY9JhiMRy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\" doing\",\"logprobs\":[],\"obfuscation\":\"1LWpxqoZWg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"?\",\"logprobs\":[],\"obfuscation\":\"YHt93rz0hjx0fTZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":51,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"nGZ5rITjfi9RrL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":52,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"GzwWAuwp8wNa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":53,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\" style\",\"logprobs\":[],\"obfuscation\":\"9dgmnpOUBt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":54,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"OqmxuuhOJpMPU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":55,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"color\",\"logprobs\":[],\"obfuscation\":\"o417aLskty0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":56,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\":\",\"logprobs\":[],\"obfuscation\":\"GxSv2kpTt4NHsnG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":57,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\" rgb\",\"logprobs\":[],\"obfuscation\":\"cMuDNgRzLFkl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":58,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"(\",\"logprobs\":[],\"obfuscation\":\"SLtxzVPEZ1QesQP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":59,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"11\",\"logprobs\":[],\"obfuscation\":\"40NFzoxKuj4cBY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":60,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"rfl03T512yKZnCD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":61,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\" \",\"logprobs\":[],\"obfuscation\":\"BBl9ksIdA5X6HP7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":62,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"110\",\"logprobs\":[],\"obfuscation\":\"bICBProIsXJLS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":63,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"ivpqzcn6qXwca2M\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":64,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\" \",\"logprobs\":[],\"obfuscation\":\"pTvv0eXnDNhdBzN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":65,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"153\",\"logprobs\":[],\"obfuscation\":\"cvWQJkeHe4G74\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":66,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\");\",\"logprobs\":[],\"obfuscation\":\"5PyYU6cnPrIgIm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":67,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"d9mcRokoIGkoyJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":68,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"ztLBlvnjJWQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":69,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"-style\",\"logprobs\":[],\"obfuscation\":\"zDpGJyBKcK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":70,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"-type\",\"logprobs\":[],\"obfuscation\":\"FBQiNiwaOSI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":71,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"G3YqGC8Brt2HW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":72,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"text\",\"logprobs\":[],\"obfuscation\":\"1jqsspjkJzki\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":73,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"Color\",\"logprobs\":[],\"obfuscation\":\"Ku5TAa5vxOD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":74,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"hJA70hLY6oHXlN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":75,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"LL1Alpe6DaV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":76,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"-value\",\"logprobs\":[],\"obfuscation\":\"ailtlhRaFX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":77,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"QDkHaVE8AFkYa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":78,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"blue\",\"logprobs\":[],\"obfuscation\":\"BOEQZlxMKFp8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":79,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"fpGGrpqcoykknl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":80,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"X4ezlkbBgkW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":81,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"-edit\",\"logprobs\":[],\"obfuscation\":\"XMGgX8DHSZv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":82,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"able\",\"logprobs\":[],\"obfuscation\":\"IENuDaB0a7wm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":83,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"sXpomARks3HYm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":84,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"S0j5Nea1Ahxm9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":85,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"This\",\"logprobs\":[],\"obfuscation\":\"DVpXSsAXBcTL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":86,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\" text\",\"logprobs\":[],\"obfuscation\":\"0K3EdVBWd74\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":87,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\" is\",\"logprobs\":[],\"obfuscation\":\"MA8gxDn9y61L9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":88,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\" blue\",\"logprobs\":[],\"obfuscation\":\"hcb1s2pv6Im\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":89,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"qUoNANsMPUC8D\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":90,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"7Banp5Q20Vnz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":91,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"TSpLuIt0V2ikq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":92,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"3hEAZ6AbUNxnFSs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":93,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"LPHiMNuawXbhIoO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":94,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"EBubykbmbaTi7N\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":95,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"siaPhqGmFWa2oG\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":96,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":97,\"item_id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":98,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":99,\"response\":{\"id\":\"resp_68d4e7dd842881908103395cf486dd6c03be3243e18c1574\",\"object\":\"response\",\"created_at\":1758783453,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7df49f881908a898cedf8fa22e403be3243e18c1574\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":726,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":93,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":819},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, remove mark_1_69370edf5666084e6ab44e3c9a41fa12.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, remove mark_1_69370edf5666084e6ab44e3c9a41fa12.json
new file mode 100644
index 0000000000..5d61ab1bda
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, remove mark_1_69370edf5666084e6ab44e3c9a41fa12.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"remove the bold style from the second block\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_03a84c0c98c43d6700691c955dac4c81909cd18c45d22b86e0\",\"object\":\"response\",\"created_at\":1763480925,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_03a84c0c98c43d6700691c955dac4c81909cd18c45d22b86e0\",\"object\":\"response\",\"created_at\":1763480925,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"0NXeMmnvKYE3hk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"YKWSPO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"ouHrBY4tieKwe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"KUwOsVX6oGTeFX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"PqIvx7WZnNNV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"iHZLdVSdgrKxk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"bImjJPL4uX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"n0ce7zzHbJB85\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"DNmMmvILYeaJgs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"KxcmRrHZlYbgu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"BvHYwZ5Dykqwx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"QF01yZDNdVCRId9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"vbyi7loHWyL4Xbv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"IiGMEjbyA8m8e\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"J5BMOFdkAa6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"EedT5yRmCDBUz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"URTrMAI4DnaocUz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"LZ1qRgaKww88mqZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\">Hello\",\"logprobs\":[],\"obfuscation\":\"C6T3whhQHw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"WlJmGYiWGbbGvCf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"0BlofFnCSJVfUs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"gHDOX7lUU3Kv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"Q5QJAVWWdAl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"-inline\",\"logprobs\":[],\"obfuscation\":\"YI5CbWt7X\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"-content\",\"logprobs\":[],\"obfuscation\":\"slWuzbEp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"-type\",\"logprobs\":[],\"obfuscation\":\"gSLxpcRgIWb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"9kynhqL0EwWFf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"mention\",\"logprobs\":[],\"obfuscation\":\"T9ZMwgUFR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"x0FnawWCCZooW1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"tVGOec7alAH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"-user\",\"logprobs\":[],\"obfuscation\":\"DaxswaPs7Ss\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"ERHuV54jBiQKu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"John\",\"logprobs\":[],\"obfuscation\":\"8uc1JW2JhXmG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\" Doe\",\"logprobs\":[],\"obfuscation\":\"nbx9zniWOi3n\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"DbY9XMWJoUcFu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"@\",\"logprobs\":[],\"obfuscation\":\"jdScHhY1Qno5hst\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"John\",\"logprobs\":[],\"obfuscation\":\"8c4LAO1IZLk8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\" Doe\",\"logprobs\":[],\"obfuscation\":\"Y2TdxTOAgO1I\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"nRGM6wuq3RGS9G\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"3qpm2KF01SdE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"M2HkY80tuTPfxPw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"K3KWo8YMMdG6BiW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\" How\",\"logprobs\":[],\"obfuscation\":\"JYX5ZFow9sc1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\" are\",\"logprobs\":[],\"obfuscation\":\"4GJ1eLfC8URb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\" you\",\"logprobs\":[],\"obfuscation\":\"WyGwZotMgTDT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\" doing\",\"logprobs\":[],\"obfuscation\":\"YkrcWIghK5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"?\",\"logprobs\":[],\"obfuscation\":\"wbmnwElvOs3ArdF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":51,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"Y2rakJV4fxTx8W\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":52,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"XQ9Fb1D4RNvH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":53,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\" style\",\"logprobs\":[],\"obfuscation\":\"arxrN1Rc4i\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":54,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"GtFLy9c1ibwjr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":55,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"color\",\"logprobs\":[],\"obfuscation\":\"jlW5xfQTxJK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":56,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\":\",\"logprobs\":[],\"obfuscation\":\"uECTzozsqSmj6C7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":57,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\" rgb\",\"logprobs\":[],\"obfuscation\":\"9ClSbBjLBKMR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":58,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"(\",\"logprobs\":[],\"obfuscation\":\"tvXR3yFRnNj7oRB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":59,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"11\",\"logprobs\":[],\"obfuscation\":\"i21E9YH2MUXenF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":60,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"BzYtDZOPt7lwUqy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":61,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\" \",\"logprobs\":[],\"obfuscation\":\"cAiMsR8V6yOAuny\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":62,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"110\",\"logprobs\":[],\"obfuscation\":\"7478KO4sBxFRI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":63,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"PEehezV5AYbGIk4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":64,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\" \",\"logprobs\":[],\"obfuscation\":\"oBTOelSMSxhiwAn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":65,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"153\",\"logprobs\":[],\"obfuscation\":\"n7rmICMmWNasK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":66,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\");\",\"logprobs\":[],\"obfuscation\":\"rqVEhZhtAhAKcq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":67,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"HIPfBZnX0zwdOl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":68,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"ZgwCbjaimMu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":69,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"-style\",\"logprobs\":[],\"obfuscation\":\"9seuj7ySNl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":70,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"-type\",\"logprobs\":[],\"obfuscation\":\"rIGiaQHlmDK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":71,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"dmmq6o44kY6kq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":72,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"text\",\"logprobs\":[],\"obfuscation\":\"bXN6t0WLzvt4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":73,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"Color\",\"logprobs\":[],\"obfuscation\":\"Ef5sL9HMpVb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":74,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"eHuTSqtbabksFi\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":75,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"EUU0nPBoKYu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":76,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"-value\",\"logprobs\":[],\"obfuscation\":\"Qxbh7OEnJ8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":77,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"4GeXWpxsOJauZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":78,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"blue\",\"logprobs\":[],\"obfuscation\":\"PS9v6JaZf6kK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":79,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"7gM0iTNTWR020s\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":80,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"eDTxwyXroQe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":81,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"-edit\",\"logprobs\":[],\"obfuscation\":\"Xh4jfrPohzJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":82,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"able\",\"logprobs\":[],\"obfuscation\":\"l9Aegnpcz50T\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":83,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"O6YqroBHcH04i\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":84,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"qYnlVFAQtRDVi\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":85,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"This\",\"logprobs\":[],\"obfuscation\":\"cNGKL6wOvd1G\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":86,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\" text\",\"logprobs\":[],\"obfuscation\":\"6GusgAAl1r8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":87,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\" is\",\"logprobs\":[],\"obfuscation\":\"8SLT55i89CXhs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":88,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\" blue\",\"logprobs\":[],\"obfuscation\":\"VBthgfAa7Vv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":89,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"1m2LPwwteKtnR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":90,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"hGGdb2B5MH0M\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":91,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"5qH0SBQviMfw3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":92,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"FWNksiDtcAsf7Rc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":93,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"pWsLRsqjpfmDdcO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":94,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"EVGIqTdWhGWquG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":95,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"NTiWHSWzVfQLL5\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":96,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":97,\"item_id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":98,\"output_index\":0,\"item\":{\"id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":99,\"response\":{\"id\":\"resp_03a84c0c98c43d6700691c955dac4c81909cd18c45d22b86e0\",\"object\":\"response\",\"created_at\":1763480925,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_03a84c0c98c43d6700691c955e40e48190a373258c97f67e1e\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":773,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":93,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":866},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, remove mention_1_53046bb3c98a3ecc79d2ccc9f9ee1f88.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, remove mention_1_53046bb3c98a3ecc79d2ccc9f9ee1f88.json
deleted file mode 100644
index c00fa83198..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, remove mention_1_53046bb3c98a3ecc79d2ccc9f9ee1f88.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"change to say 'Hello! How are you doing? This text is blue!' (remove mention but keep bold text)\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7e06dd48194a1996b4b88fee9d90fa7087de470933b\",\"object\":\"response\",\"created_at\":1758783457,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7e06dd48194a1996b4b88fee9d90fa7087de470933b\",\"object\":\"response\",\"created_at\":1758783457,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"4bRtdVnGJugQ0d\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"wEWDbk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"Zxfo3ZwdRYFIR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"P0IleLvt9ILRJl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"vkigZqp3JsnL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"v2OuYIFLkv4AI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"j2Zmnp4C3n\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"DM0bXfgViubyJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"4c78io3PhGRGhQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"DOxcl9YzXWArv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"yWdEz5e35WKqh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"wlyrfYKCtIAOlsc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"Y0bDoRwyWIoQeq8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"UKykBfOUaeTfN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"MmVsBTtErdw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"egsMeUUDJfvbh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"stvuGtCVNxelHcZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"SgsgVkhqUN1YzQO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\">Hello\",\"logprobs\":[],\"obfuscation\":\"mUrorZb9hc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"ak2Dobfa5uliN7e\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"KFAZBKuKUE3Bbe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"strong\",\"logprobs\":[],\"obfuscation\":\"PHKo6Cc3iD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"2mdXHkg8qla6XHb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"How\",\"logprobs\":[],\"obfuscation\":\"WdQJHTFkMrQlS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\" are\",\"logprobs\":[],\"obfuscation\":\"yhJ9w45DGzGV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\" you\",\"logprobs\":[],\"obfuscation\":\"gg7SQXBBfieR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\" doing\",\"logprobs\":[],\"obfuscation\":\"UiR2QRlprN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"?\",\"logprobs\":[],\"obfuscation\":\"7hISf3hZPdTI7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"strong\",\"logprobs\":[],\"obfuscation\":\"DYoVvFhyxN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"efzqC9W2KvuGwBL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"tGU9NZhpw7SQVU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"v70Dkc2tbcsw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\" style\",\"logprobs\":[],\"obfuscation\":\"6s2FoV5kdD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"cHJ5UcUYoWTDQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"color\",\"logprobs\":[],\"obfuscation\":\"3zQjcUyBtOL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\":\",\"logprobs\":[],\"obfuscation\":\"Hus6XoI3N0vGNan\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\" rgb\",\"logprobs\":[],\"obfuscation\":\"xcBQndUrhKxr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"(\",\"logprobs\":[],\"obfuscation\":\"q3hEmmj9QWIi5rw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"11\",\"logprobs\":[],\"obfuscation\":\"69dPjh8N4BKeLB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"HxOSHihjDDXVRXL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\" \",\"logprobs\":[],\"obfuscation\":\"SpsGrZw4p9i2966\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"110\",\"logprobs\":[],\"obfuscation\":\"77ElQkqf7ls1y\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"spoJATutAKsp4Dn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\" \",\"logprobs\":[],\"obfuscation\":\"6swglIioVqXgQSS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"153\",\"logprobs\":[],\"obfuscation\":\"Dc9T0zBrFcGiG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\");\",\"logprobs\":[],\"obfuscation\":\"NCQh1jbQ0lgVQN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"KzXjTWHEDiGlDM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":51,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"2QvxdpkLGcL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":52,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"-style\",\"logprobs\":[],\"obfuscation\":\"OizswLsabK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":53,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"-type\",\"logprobs\":[],\"obfuscation\":\"aXooKEHGf7G\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":54,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"4NzZtznqZqsc0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":55,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"text\",\"logprobs\":[],\"obfuscation\":\"rKnZNqHJ1mUy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":56,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"Color\",\"logprobs\":[],\"obfuscation\":\"gTh46NgZ0gu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":57,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"ZCh5Xx644gGEW7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":58,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"DlhCv6GhD4T\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":59,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"-value\",\"logprobs\":[],\"obfuscation\":\"i3s0ueUMpa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":60,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"TdGv3PJy6h6i7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":61,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"blue\",\"logprobs\":[],\"obfuscation\":\"XHiTOaiooDnC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":62,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"OBAXV37rYubGRE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":63,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"ooCDau23vQM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":64,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"-edit\",\"logprobs\":[],\"obfuscation\":\"sdz3jVXtaDd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":65,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"able\",\"logprobs\":[],\"obfuscation\":\"KNh3cWr9sKJp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":66,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"ULdvWmh3s7rpB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":67,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"uodLwehbUnF7d\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":68,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"This\",\"logprobs\":[],\"obfuscation\":\"Rl4gGOwlf9uE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":69,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\" text\",\"logprobs\":[],\"obfuscation\":\"QxqptfaRNJx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":70,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\" is\",\"logprobs\":[],\"obfuscation\":\"Bl5fnRF4kEDSL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":71,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\" blue\",\"logprobs\":[],\"obfuscation\":\"DvAzXimVrIP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":72,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"1Jtdtk2e5mBIL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":73,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"HJd9iVf3NBgM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":74,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"HrYW32pzl4hct\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":75,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"ZUYTKUBIriHVFy1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":76,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"KSzYq4mP23D5UcU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":77,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"ULfHEa2PTDi6Rm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":78,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"RBkfRMEqXx75jC\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":79,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello! How are you doing? This text is blue!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":80,\"item_id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello! How are you doing? This text is blue!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":81,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello! How are you doing? This text is blue!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":82,\"response\":{\"id\":\"resp_68d4e7e06dd48194a1996b4b88fee9d90fa7087de470933b\",\"object\":\"response\",\"created_at\":1758783457,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7e2db7081949c8d04bfdf8402770fa7087de470933b\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello! How are you doing? This text is blue!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":742,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":76,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":818},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, remove mention_1_73ae7ea818d0050772e68d743b8c8f07.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, remove mention_1_73ae7ea818d0050772e68d743b8c8f07.json
new file mode 100644
index 0000000000..b4b0018a9f
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, remove mention_1_73ae7ea818d0050772e68d743b8c8f07.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"change to say 'Hello! How are you doing? This text is blue!' (remove mention but keep bold text)\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0db5f256db85b89400691c955f89c88193babf846d055f75ed\",\"object\":\"response\",\"created_at\":1763480927,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0db5f256db85b89400691c955f89c88193babf846d055f75ed\",\"object\":\"response\",\"created_at\":1763480927,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"1ozvIcPhVwJx5h\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"ogQIeh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"XalTpyRTpl3X6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"BfC963pGNWXFlk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"Z11Fc8WmSks2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"Ot92GAAwHstrY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"zTnrZy81ts\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"6dXEHPiBTAgIY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"dGZZwvpIMFenGF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"vepO5xfcu9JrG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"rikiOiVzuhKtT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"NQdcCaglvZGqkRr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"r9x3urFpevsbD5g\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"DydvVJYJsM6QV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"LJPLgVV4H45\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"bSMhccJZBqk1h\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"YB2cv6vKYvPuHxe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"3BuoED7JYrtaobD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\">Hello\",\"logprobs\":[],\"obfuscation\":\"6g4G4sgXQ0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"TX3GUowbRHol1cU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"IJPpVWOZzjzLVm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"strong\",\"logprobs\":[],\"obfuscation\":\"2Afb1Pm2RQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"bHp8pLYnMnqOY7I\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"How\",\"logprobs\":[],\"obfuscation\":\"LhpUDGEmU69E7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\" are\",\"logprobs\":[],\"obfuscation\":\"mpmvCLQk8VmM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\" you\",\"logprobs\":[],\"obfuscation\":\"6oInG3nOvxgw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\" doing\",\"logprobs\":[],\"obfuscation\":\"MKhshvEiLT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"?\",\"logprobs\":[],\"obfuscation\":\"LEgK1M4BFfxoq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"strong\",\"logprobs\":[],\"obfuscation\":\"NMj4KsqlOE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"dIe1m6KoGCXiWck\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"PhDTUEr7gxTeFo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"ZRCdQU7glm4L\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\" style\",\"logprobs\":[],\"obfuscation\":\"NZ21zOY0h6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"PwlqbiSnpqlrV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"color\",\"logprobs\":[],\"obfuscation\":\"mkX7oWdxfSd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\":\",\"logprobs\":[],\"obfuscation\":\"YFYSyVxI4R9fKD1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\" rgb\",\"logprobs\":[],\"obfuscation\":\"YsEVy6NNAwp3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"(\",\"logprobs\":[],\"obfuscation\":\"Bfjk7Wi68Fahdrj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"11\",\"logprobs\":[],\"obfuscation\":\"3UQ32zqogywdDX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"PqXCcgjYP8V0HSL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\" \",\"logprobs\":[],\"obfuscation\":\"gdEDNok3wsCpKl9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"110\",\"logprobs\":[],\"obfuscation\":\"PrbW6l1u396Qa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"1mXvCaHHZmtuGNr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\" \",\"logprobs\":[],\"obfuscation\":\"HFe1V2vWif66haW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"153\",\"logprobs\":[],\"obfuscation\":\"NnZYhTNblui8R\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\");\",\"logprobs\":[],\"obfuscation\":\"9mCWS1WgJDz5G2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"TFW7plkOLl1qxY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":51,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"cQiLGuUUilv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":52,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"-style\",\"logprobs\":[],\"obfuscation\":\"dRhQEYCjsJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":53,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"-type\",\"logprobs\":[],\"obfuscation\":\"doxO7YrbKac\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":54,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"Y8mTj6r7R3ilu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":55,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"text\",\"logprobs\":[],\"obfuscation\":\"LRDGUc4dxiSK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":56,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"Color\",\"logprobs\":[],\"obfuscation\":\"5R3G8EUi9CG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":57,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"wFJvMmvaOWXYJC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":58,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"HefKfUukOae\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":59,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"-value\",\"logprobs\":[],\"obfuscation\":\"EfTsU2oszE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":60,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"0cHMZpzE0LJwY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":61,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"blue\",\"logprobs\":[],\"obfuscation\":\"wAI6SJI6CFGK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":62,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"nFuVUmitOKtoVl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":63,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"6xxNK0dnotT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":64,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"-edit\",\"logprobs\":[],\"obfuscation\":\"ZoDmhSDrt00\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":65,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"able\",\"logprobs\":[],\"obfuscation\":\"Q6LBZwIb1tAc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":66,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"pQ5sQdcy4qqgj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":67,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"qAPAQ6ZN8xKWT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":68,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"This\",\"logprobs\":[],\"obfuscation\":\"tNNSnaKw1PfZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":69,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\" text\",\"logprobs\":[],\"obfuscation\":\"4L8YAnFvcz9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":70,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\" is\",\"logprobs\":[],\"obfuscation\":\"uZWlpGfEkcNFi\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":71,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\" blue\",\"logprobs\":[],\"obfuscation\":\"MhzLyC5Fbpo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":72,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"FBP6v8VPZmCxW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":73,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"U0Hhp2WgUBH2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":74,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"aMBB1f4vIL64G\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":75,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"a4Pe0Uk6SHIYYev\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":76,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"R5Matst2icnVfJb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":77,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"9DQQZDjdG81VFH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":78,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"CisTv3uBibxlUL\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":79,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello! How are you doing? This text is blue!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":80,\"item_id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello! How are you doing? This text is blue!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":81,\"output_index\":0,\"item\":{\"id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello! How are you doing? This text is blue!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":82,\"response\":{\"id\":\"resp_0db5f256db85b89400691c955f89c88193babf846d055f75ed\",\"object\":\"response\",\"created_at\":1763480927,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_0db5f256db85b89400691c955fca748193b067d777403d0984\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello! How are you doing? This text is blue!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":789,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":76,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":865},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, replace content_1_493b1cae062778312080cf9e73436d03.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, replace content_1_493b1cae062778312080cf9e73436d03.json
new file mode 100644
index 0000000000..4833f9bb39
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, replace content_1_493b1cae062778312080cf9e73436d03.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"update the content of the second block to 'Hello, updated content'\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_05f6467e5e68446c00691c9558f90c819784b52596652b7896\",\"object\":\"response\",\"created_at\":1763480921,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_05f6467e5e68446c00691c9558f90c819784b52596652b7896\",\"object\":\"response\",\"created_at\":1763480921,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"rv4s3yPNuKm6QC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"hGcFX5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"jSzVY8eO1gckO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"uRMs1FuRHge5Di\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"NZRm7oW6ZBty\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"XxlamQvqUVqDL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"L8Bk2ypCWW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"9XdtH4J4amYMr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"WDudKNADOpPLWe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"pajd0fiWEUT4n\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"UETz4JcTSFrTM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"jLtqWLyugK9RQWl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"xC1rSXFWnKTdnck\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"PM9zTLEsDiogC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"pgTCJGJaKsE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"NRZpukeme9HBy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"9tPUr8dMUkvZi26\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"l6w7CitWPkkMHYs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\">Hello\",\"logprobs\":[],\"obfuscation\":\"nMJZA93MsN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"7fkeOQPXxpys2oi\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\" updated\",\"logprobs\":[],\"obfuscation\":\"Qkdj2AmZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\" content\",\"logprobs\":[],\"obfuscation\":\"ulxftr7q\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"C8SMw2QBJqC7NS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"86aFdjYnuWsLD7c\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"pjAqU04N3eFrK7V\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"PP3u9voQbrxVfU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"8bIJN1EM6VQ24u\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":31,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, updated content
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":32,\"item_id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, updated content
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":33,\"output_index\":0,\"item\":{\"id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, updated content
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":34,\"response\":{\"id\":\"resp_05f6467e5e68446c00691c9558f90c819784b52596652b7896\",\"object\":\"response\",\"created_at\":1763480921,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_05f6467e5e68446c00691c955956f08197af6105254aa30a6f\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, updated content
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":779,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":28,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":807},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, replace content_1_d2aedab8bc5dae6b29a5dd2da56165d7.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, replace content_1_d2aedab8bc5dae6b29a5dd2da56165d7.json
deleted file mode 100644
index 82239fa96e..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, replace content_1_d2aedab8bc5dae6b29a5dd2da56165d7.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"update the content of the second block to 'Hello, updated content'\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7dbe9808190822c64ee05b4e2ac0dbf61d96679cfa6\",\"object\":\"response\",\"created_at\":1758783451,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7dbe9808190822c64ee05b4e2ac0dbf61d96679cfa6\",\"object\":\"response\",\"created_at\":1758783451,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"NqxPsUz499eP4j\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"M9oEaK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"7i28eiYahnnYz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"hiD8mHKnxAPwhe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"QlPQREHJ17Ln\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"xfNjqRw7oEzNV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"IJfTWUeFvz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"qelset0JkGsFa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"U8USgSiNIMoodO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"koQC4lc3nFsS4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"B9QHmas79Iisz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"ssQZCAgup4GB5Du\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"5Gy5Iqwxtl3VIlK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"nJwEzXRJGP3qr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"C0Ajj1aBq3d\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"ow5hSnRfvpy6A\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"OK2ZQ9ok3nakxVG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"NvGFhP6mslsu5PM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\">Hello\",\"logprobs\":[],\"obfuscation\":\"zJfzKbL8Wo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"iQsgOtAR129iE4l\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\" updated\",\"logprobs\":[],\"obfuscation\":\"eUaWyWbL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\" content\",\"logprobs\":[],\"obfuscation\":\"4xfx2a2U\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"8ALekgFy1ad2uy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"UjiXoPLe225L84P\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"lh4HMIwHIb33cPK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"bVHPNrSQYpmEWf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"H4BuMMP9NouOcN\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, updated content
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":32,\"item_id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, updated content
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":33,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, updated content
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":34,\"response\":{\"id\":\"resp_68d4e7dbe9808190822c64ee05b4e2ac0dbf61d96679cfa6\",\"object\":\"response\",\"created_at\":1758783451,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7dc63f88190b6d4464d19296e990dbf61d96679cfa6\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, updated content
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":732,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":28,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":760},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, update mention prop_1_812164c840f1ad02eb52b9b82e8adad1.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, update mention prop_1_812164c840f1ad02eb52b9b82e8adad1.json
new file mode 100644
index 0000000000..3a331bf522
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, update mention prop_1_812164c840f1ad02eb52b9b82e8adad1.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"update the mention to Jane Doe\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_002d87defea6bd2f00691c9565aa708197a045b02f86d48bdc\",\"object\":\"response\",\"created_at\":1763480933,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_002d87defea6bd2f00691c9565aa708197a045b02f86d48bdc\",\"object\":\"response\",\"created_at\":1763480933,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"RfQpTDItafVjN6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"Ti58Gf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"Q1dCBhB9DOfkt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"VslLo1nVX2AxtO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"onz7Kwj00T1c\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"JX6M8BvfMtc2L\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"DLh64VnkRU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"qoLh1O2F660tP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"5uwO4do5xf3fhJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"7BGbvNT5uybQ7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"VtQfRUmM7sgaD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"i5mHNGzwrAVVd9B\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"orWwRXNNmOAZvzI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"JSsZdi4tAOD1e\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"HPxUA5Qp4sd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"EH2xz6Z5wAE1V\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"JMUTPDbRHIe1K8D\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"apCX3kGfi2Edujj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\">Hello\",\"logprobs\":[],\"obfuscation\":\"uzBL1pvxEy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"QBXsY8kKn2Q0j2c\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"dUOihLXGWl0yS5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"cUD1iLfdLgiJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"yKS96KImD6i\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"-inline\",\"logprobs\":[],\"obfuscation\":\"kxJYHCFa0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"-content\",\"logprobs\":[],\"obfuscation\":\"qfVtIO4e\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"-type\",\"logprobs\":[],\"obfuscation\":\"4oGK4FyTeMq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"VQP5JqWVL7oJt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"mention\",\"logprobs\":[],\"obfuscation\":\"r5PKGEGu8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"isSa88f9sVk0Wa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"KIST0HjXOwY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"-user\",\"logprobs\":[],\"obfuscation\":\"Ag7Im2scKkj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"ugLyeFZJL9aA9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"Jane\",\"logprobs\":[],\"obfuscation\":\"4dsZQ3XALXC1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\" Doe\",\"logprobs\":[],\"obfuscation\":\"uje3n4Xft5mr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"mf13dGBXwT43P\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"@\",\"logprobs\":[],\"obfuscation\":\"5f0TGNuxFUwF8xW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"Jane\",\"logprobs\":[],\"obfuscation\":\"uM3Z2mpa8MN8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\" Doe\",\"logprobs\":[],\"obfuscation\":\"gWOKzO15SmUm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"TdNAbAEvRGAypw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"PbJOJ0mMlPHY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"cFlGgnxzjl5y3kg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"LG4qtf3Jv4JVO9K\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"EjFTFjaiLoIche\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"strong\",\"logprobs\":[],\"obfuscation\":\"eedrt3eIhG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"EFaSOW9e6SbMzvn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"How\",\"logprobs\":[],\"obfuscation\":\"UCwkao1sm7epL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\" are\",\"logprobs\":[],\"obfuscation\":\"f3NyXiDRE9EW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":51,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\" you\",\"logprobs\":[],\"obfuscation\":\"kKJI4poEPxaD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":52,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\" doing\",\"logprobs\":[],\"obfuscation\":\"K31AaydhnG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":53,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"?\",\"logprobs\":[],\"obfuscation\":\"VK3goMEVLyrFm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":54,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"strong\",\"logprobs\":[],\"obfuscation\":\"3kkWOqtOGc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":55,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"Cp0CDsjNsZ4KXpa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":56,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"Y3mZAqxNaxBYwe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":57,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"DxdHTne8Qnc0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":58,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\" style\",\"logprobs\":[],\"obfuscation\":\"bJUw2MT1t9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":59,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"zvueFYC9ytrzq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":60,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"color\",\"logprobs\":[],\"obfuscation\":\"NsHztifBXoc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":61,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\":\",\"logprobs\":[],\"obfuscation\":\"m4qFifwpt9CLJZ7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":62,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\" rgb\",\"logprobs\":[],\"obfuscation\":\"4SM7J4ygO4EJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":63,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"(\",\"logprobs\":[],\"obfuscation\":\"K0A4WtUNaurqbRB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":64,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"11\",\"logprobs\":[],\"obfuscation\":\"NciXmtuzCoxaQS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":65,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"rkPl62k6TqCePGm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":66,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\" \",\"logprobs\":[],\"obfuscation\":\"vj7twiPf9EO0DwR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":67,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"110\",\"logprobs\":[],\"obfuscation\":\"lVXuBCT5dNlPz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":68,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"8FapwcqIJveTyQx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":69,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\" \",\"logprobs\":[],\"obfuscation\":\"7mvQpHVQyVpr7n0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":70,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"153\",\"logprobs\":[],\"obfuscation\":\"UdYGgqqJkCrmK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":71,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\");\",\"logprobs\":[],\"obfuscation\":\"ElaA1xWHlt7vlK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":72,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"ayqANcUrpaFlpN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":73,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"iM5hNH1QAqU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":74,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"-style\",\"logprobs\":[],\"obfuscation\":\"7o5ZTgObS0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":75,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"-type\",\"logprobs\":[],\"obfuscation\":\"6InO0VJALHf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":76,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"JEPbniDlKcpiM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":77,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"text\",\"logprobs\":[],\"obfuscation\":\"rxPGQe9UA7Qc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":78,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"Color\",\"logprobs\":[],\"obfuscation\":\"V9nqGnDZq6y\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":79,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"J6CNuzS2nvWhxD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":80,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"SZFJuVLUaYb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":81,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"-value\",\"logprobs\":[],\"obfuscation\":\"4QwhBGZb93\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":82,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"mNyhlHXbZLiYD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":83,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"blue\",\"logprobs\":[],\"obfuscation\":\"Kd4k8g9IbrmD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":84,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"nqyyzHUPGDET6a\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":85,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"hFP6KXFfcoI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":86,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"-edit\",\"logprobs\":[],\"obfuscation\":\"E9WIGSvAoHF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":87,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"able\",\"logprobs\":[],\"obfuscation\":\"e0elbox9MmnX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":88,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"FoIVX7WjK5nlj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":89,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"Jz4mCImxnZe3K\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":90,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"This\",\"logprobs\":[],\"obfuscation\":\"Oy3dfiyqG3ma\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":91,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\" text\",\"logprobs\":[],\"obfuscation\":\"oHHlP5GqqWT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":92,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\" is\",\"logprobs\":[],\"obfuscation\":\"lNaOcnLeZaz90\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":93,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\" blue\",\"logprobs\":[],\"obfuscation\":\"qVxlXYbxUit\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":94,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"nN5KjDwKCtjQa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":95,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"K3kXnAcKOisK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":96,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"W4wn5h30B5qTb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":97,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"3jJ4hXWVWochHIN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":98,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"gmTu3CRGIXFcK7n\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":99,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"5dkRMr9uuZ9nBq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":100,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"yKoHagYfzmetrB\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":101,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @Jane Doe! How are you doing? This text is blue!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":102,\"item_id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @Jane Doe! How are you doing? This text is blue!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":103,\"output_index\":0,\"item\":{\"id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @Jane Doe! How are you doing? This text is blue!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":104,\"response\":{\"id\":\"resp_002d87defea6bd2f00691c9565aa708197a045b02f86d48bdc\",\"object\":\"response\",\"created_at\":1763480933,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_002d87defea6bd2f00691c956602d881979064e7bb4e0fb23f\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @Jane Doe! How are you doing? This text is blue!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":771,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":98,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":869},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, update mention prop_1_fddbbf8781b8c27f9e51a3f0183f370c.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, update mention prop_1_fddbbf8781b8c27f9e51a3f0183f370c.json
deleted file mode 100644
index 46440d1e7a..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, update mention prop_1_fddbbf8781b8c27f9e51a3f0183f370c.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"update the mention to Jane Doe\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e799b1a08195bbd897d6e03c338201f8fa991c916030\",\"object\":\"response\",\"created_at\":1758783385,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e799b1a08195bbd897d6e03c338201f8fa991c916030\",\"object\":\"response\",\"created_at\":1758783385,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"sIHoqlj54kItK0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"sFCAuH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"0FdJDMD0XBAIK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"lvRM4twXVMiNkf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"k3dnQTQKRFlD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"BCJDpobrjmILY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"8J92KP0HpD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"5YxLIWbUqcez3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"ygGTXeVrHlSsP1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"OoTBxZiGfaAIV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"O5jrlxVPcsn3u\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"pOSScSe5cT4CWsS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"mYsCPokzQSgMpRq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"0B7MkuTa3yJpN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"A1cuqGcZnJB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"25o4GqheyQbtM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"SWgpngeKHmBHLmX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"uhYCsOUq9nc7vI7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\">Hello\",\"logprobs\":[],\"obfuscation\":\"xtPUgZHScM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"QZLbRiv8Gi5qlSZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"qjq2hFs2ETmzmu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"0BkVuUs6DJGZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"VzXN8JK1jEC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"-inline\",\"logprobs\":[],\"obfuscation\":\"1RK8SmYDp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"-content\",\"logprobs\":[],\"obfuscation\":\"A5huDItH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"-type\",\"logprobs\":[],\"obfuscation\":\"cb0DBm2QRIV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"eGyw3MpeHVS4x\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"mention\",\"logprobs\":[],\"obfuscation\":\"qnE6bK5Th\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"NwNXNAkc6Zejot\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"C1QCFydoPhj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"-user\",\"logprobs\":[],\"obfuscation\":\"SWIboB71St7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"kL9MVfQOvoG2D\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"Jane\",\"logprobs\":[],\"obfuscation\":\"gqUpkMuRpXcA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\" Doe\",\"logprobs\":[],\"obfuscation\":\"tAGmoJ8mJ8yW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"BVo5Es5IGQX1t\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"@\",\"logprobs\":[],\"obfuscation\":\"2Z9Z8hkbxU8ChAf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"Jane\",\"logprobs\":[],\"obfuscation\":\"oZayNH2Jv30H\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\" Doe\",\"logprobs\":[],\"obfuscation\":\"h75I154UKZuZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"aoHYIof0RG5wSr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"1lth32O4zNJ5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"XrPFLhmnDnPhCJ9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"V0FsJVbJeaCDuj8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"eiyUh6aeGpOmK5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"strong\",\"logprobs\":[],\"obfuscation\":\"cLtLSTL2kI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"UWqQlZ7Vo3zP38D\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"How\",\"logprobs\":[],\"obfuscation\":\"r1YwztEPLgCMZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\" are\",\"logprobs\":[],\"obfuscation\":\"N7zAx4Jz4eUk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":51,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\" you\",\"logprobs\":[],\"obfuscation\":\"h4gPIU3ZRcKe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":52,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\" doing\",\"logprobs\":[],\"obfuscation\":\"v43CjNxHK5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":53,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"?\",\"logprobs\":[],\"obfuscation\":\"3QUqSfENp9wjD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":54,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"strong\",\"logprobs\":[],\"obfuscation\":\"nvTHdy684a\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":55,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"3ygvEKzAQpzLx5L\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":56,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"3MCShYvlGG13FT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":57,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"c0bgwNRHc1hb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":58,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\" style\",\"logprobs\":[],\"obfuscation\":\"8rVXXPvSjq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":59,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"1mYgZTdMXjEFr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":60,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"color\",\"logprobs\":[],\"obfuscation\":\"1BU0NvR9znY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":61,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\":\",\"logprobs\":[],\"obfuscation\":\"25RZsOf8hGFvXv1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":62,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\" rgb\",\"logprobs\":[],\"obfuscation\":\"G4puyRwXhwYb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":63,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"(\",\"logprobs\":[],\"obfuscation\":\"oTCSefzA16C9GyK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":64,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"11\",\"logprobs\":[],\"obfuscation\":\"ucAfevQ7un3skv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":65,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"m7blZm4d9e9S5JG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":66,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\" \",\"logprobs\":[],\"obfuscation\":\"4Rf6F1vO1ji0Nae\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":67,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"110\",\"logprobs\":[],\"obfuscation\":\"haIBi8Hehq1WH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":68,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"43l4bUbCKNHyAzA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":69,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\" \",\"logprobs\":[],\"obfuscation\":\"1oKiFdLDtmvuk00\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":70,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"153\",\"logprobs\":[],\"obfuscation\":\"2is88hki7X8UI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":71,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\");\",\"logprobs\":[],\"obfuscation\":\"h9DVbthtSNq6GY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":72,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"1ynCe0ILf22oNK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":73,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"55DUzZLrWIT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":74,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"-style\",\"logprobs\":[],\"obfuscation\":\"XgWZRdYWQn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":75,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"-type\",\"logprobs\":[],\"obfuscation\":\"EVHWg1nOMUB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":76,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"tNGWfoCfLZBVn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":77,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"text\",\"logprobs\":[],\"obfuscation\":\"kjZx58wIc4tA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":78,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"Color\",\"logprobs\":[],\"obfuscation\":\"qAipG8EZkmw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":79,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"9arFZQ9ekoQOVp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":80,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"N7PT8Iwou7f\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":81,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"-value\",\"logprobs\":[],\"obfuscation\":\"WvDksvtMDA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":82,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"tcvszmQMQkFM2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":83,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"blue\",\"logprobs\":[],\"obfuscation\":\"dBBbbZNzHuq9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":84,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"eVfdQ4qXbYCBkW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":85,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"oFSwSDTKZOe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":86,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"-edit\",\"logprobs\":[],\"obfuscation\":\"Gck3bUJBUFm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":87,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"able\",\"logprobs\":[],\"obfuscation\":\"wz9cr1dKCeLK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":88,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"UGzwjGwFap9GP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":89,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"e7o7aFaOUjdyo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":90,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"This\",\"logprobs\":[],\"obfuscation\":\"uiQDBDS2g1rR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":91,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\" text\",\"logprobs\":[],\"obfuscation\":\"zRdIGbf4IBQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":92,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\" is\",\"logprobs\":[],\"obfuscation\":\"2rmzkI1MAgARP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":93,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\" blue\",\"logprobs\":[],\"obfuscation\":\"dfcDFKfk8QK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":94,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"5G14QH7lJEyQo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":95,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"r2OPiRgHSt8Y\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":96,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"aS8tEKmmikGJr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":97,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"X4wq7c60xxcdWYp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":98,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"Tuqr7URkNdYu2rh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":99,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"XJFRL8naii5rQm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":100,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"3A547Kdl2I2Etc\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":101,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @Jane Doe! How are you doing? This text is blue!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":102,\"item_id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @Jane Doe! How are you doing? This text is blue!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":103,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @Jane Doe! How are you doing? This text is blue!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":104,\"response\":{\"id\":\"resp_68d4e799b1a08195bbd897d6e03c338201f8fa991c916030\",\"object\":\"response\",\"created_at\":1758783385,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e79a737081959d2fe6da19fd08ff01f8fa991c916030\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @Jane Doe! How are you doing? This text is blue!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":724,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":98,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":822},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, update text_1_28d3f4434e75617be2e5aaffcb5c1ca7.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, update text_1_28d3f4434e75617be2e5aaffcb5c1ca7.json
new file mode 100644
index 0000000000..c6c7d8cc09
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, update text_1_28d3f4434e75617be2e5aaffcb5c1ca7.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"translate second block including the greeting to German (use dir instead of Ihnen)\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0804497ab1289dd600691c955a5df08193a779ca299b33cf72\",\"object\":\"response\",\"created_at\":1763480922,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0804497ab1289dd600691c955a5df08193a779ca299b33cf72\",\"object\":\"response\",\"created_at\":1763480922,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"woUIuVYJnoTkou\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"pDNb9l\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"SlBcboRiwEZ5k\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"wNSCgHqc6sDFSX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"BtBReWwrVlsK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"lt5TMwiN29dE8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"dfP9QGWHcy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"0i6bPuYqE5Gnx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"nf5YCzESRxgbpF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"pJOhHW0LHYmuN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"6itTIeTzSPqHg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"B85ddEr5THkBQc4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"r66B2TiTGwcyg4F\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"9GkVtWUrnh2Tt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"VkwUBOg8uXv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"LQal5hBog226Z\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"wa7BP6Vt39a4RXt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"cyxqW0hFmyObTah\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"KntkwEk4RipsI8u\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"Hallo\",\"logprobs\":[],\"obfuscation\":\"OUbdjm4WvbO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"AJKQj76d1NdLyuq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"WFeB422gHs7oCo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"WPHpKNZALDUq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"mpA7j875kGy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"-inline\",\"logprobs\":[],\"obfuscation\":\"iGCxIgTxV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"-content\",\"logprobs\":[],\"obfuscation\":\"l5SX0Vw0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"-type\",\"logprobs\":[],\"obfuscation\":\"M4JE6xKhNJf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"Jgnf3BOYszwuW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"mention\",\"logprobs\":[],\"obfuscation\":\"FN0q4jUuM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"n29dK51clqs7yf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"nA6icnhMAUm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"-user\",\"logprobs\":[],\"obfuscation\":\"rybIceTSCFO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"C2rmDG8TdxExE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"John\",\"logprobs\":[],\"obfuscation\":\"QaZE96N6JwoK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\" Doe\",\"logprobs\":[],\"obfuscation\":\"GGZQdmwD43Mz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"Nb5ltHZnkR2ti\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"@\",\"logprobs\":[],\"obfuscation\":\"XWZKS3jxOkjOoEX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"John\",\"logprobs\":[],\"obfuscation\":\"zdrGdTOAwWpA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\" Doe\",\"logprobs\":[],\"obfuscation\":\"my7lfZWbJrCZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"4YLpIblgftEWLR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"VixIJxATkGRi\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"dUaUQAkKmExkwii\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"zy9z20uXFzoAsQb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"I5kiMOh0HQJCH1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"strong\",\"logprobs\":[],\"obfuscation\":\"Nbj0Ck6r3L\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"la9py4piSlGslNK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"Wie\",\"logprobs\":[],\"obfuscation\":\"z9qF4EIhMCuNW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":51,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\" geht\",\"logprobs\":[],\"obfuscation\":\"8aT1pvKBbDo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":52,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\" es\",\"logprobs\":[],\"obfuscation\":\"KRnefVrxvmLdX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":53,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\" dir\",\"logprobs\":[],\"obfuscation\":\"xasDnasIp4z9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":54,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"?\",\"logprobs\":[],\"obfuscation\":\"BGLuym3F6oYXK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":55,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"strong\",\"logprobs\":[],\"obfuscation\":\"dyAirvRvcE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":56,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"8DpSSiYgNvM8is7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":57,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"2IQApmc8qsbAOC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":58,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"l8DysDfEkvFM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":59,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\" style\",\"logprobs\":[],\"obfuscation\":\"vBuATZJvES\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":60,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"XRkvxzEbMpELN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":61,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"color\",\"logprobs\":[],\"obfuscation\":\"q6EAb5YVwjx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":62,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\":\",\"logprobs\":[],\"obfuscation\":\"PhWdHvVuOrzVYoi\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":63,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\" rgb\",\"logprobs\":[],\"obfuscation\":\"PzdQL4zj4drh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":64,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"(\",\"logprobs\":[],\"obfuscation\":\"CS5ilqrphkGt1n6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":65,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"11\",\"logprobs\":[],\"obfuscation\":\"HODncUREIKu6If\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":66,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"gtZKKdy0OsQZjpK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":67,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\" \",\"logprobs\":[],\"obfuscation\":\"SnU2Yu72YyZQyS8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":68,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"110\",\"logprobs\":[],\"obfuscation\":\"3HkNQNh6M73kl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":69,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"elUuCrZTryca8m3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":70,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\" \",\"logprobs\":[],\"obfuscation\":\"itfMDKnNyfmPcc7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":71,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"153\",\"logprobs\":[],\"obfuscation\":\"WP3LwWOpjx3LT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":72,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\");\",\"logprobs\":[],\"obfuscation\":\"mycflOjarNEUfz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":73,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"n3iH0nA1xJT9zL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":74,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"9Q23YzUi3sa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":75,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"-style\",\"logprobs\":[],\"obfuscation\":\"s6kXimIUZf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":76,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"-type\",\"logprobs\":[],\"obfuscation\":\"WMMIw0dofEh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":77,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"orrVkuNHW22fT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":78,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"text\",\"logprobs\":[],\"obfuscation\":\"iTwLOVaTY7T7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":79,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"Color\",\"logprobs\":[],\"obfuscation\":\"BR4AtpULf4F\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":80,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"03kpI0lYaotNz6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":81,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"65PQ7RN69p9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":82,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"-value\",\"logprobs\":[],\"obfuscation\":\"lvS7RRJ18r\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":83,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"jGWfs2zK2CcNN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":84,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"blue\",\"logprobs\":[],\"obfuscation\":\"S76V6Ve5OkDb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":85,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"nCi4ZbOq9eck3p\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":86,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"061zdSUlzZY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":87,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"-edit\",\"logprobs\":[],\"obfuscation\":\"UtMO3vknp2e\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":88,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"able\",\"logprobs\":[],\"obfuscation\":\"Vv0R3Tl7xV1x\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":89,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"i3O01xvTuupCy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":90,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"XS3Wa7XKlFL79\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":91,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"Dieser\",\"logprobs\":[],\"obfuscation\":\"dK2FtCr9ZZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":92,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\" Text\",\"logprobs\":[],\"obfuscation\":\"viSLrNX82Sz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":93,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\" ist\",\"logprobs\":[],\"obfuscation\":\"w3B6MHg7MzgE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":94,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\" blau\",\"logprobs\":[],\"obfuscation\":\"9LN7FSkJ3iB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":95,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"2InjGJoZloQRl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":96,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"yDUG4WYzhU7p\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":97,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"8AUDXgHhr5tAX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":98,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"rdEJthuGrZeT96C\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":99,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"XYp6R3CDQdJGbb6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":100,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"fZDiR0Xgl87U7R\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":101,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"77Ts77AAlXG1j0\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":102,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo, @John Doe! Wie geht es dir? Dieser Text ist blau!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":103,\"item_id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo, @John Doe! Wie geht es dir? Dieser Text ist blau!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":104,\"output_index\":0,\"item\":{\"id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo, @John Doe! Wie geht es dir? Dieser Text ist blau!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":105,\"response\":{\"id\":\"resp_0804497ab1289dd600691c955a5df08193a779ca299b33cf72\",\"object\":\"response\",\"created_at\":1763480922,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_0804497ab1289dd600691c955ac5248193b1b087c3a49bbce4\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo, @John Doe! Wie geht es dir? Dieser Text ist blau!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":780,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":99,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":879},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, update text_1_350896c5ea1c2ae3930e8300d37eb670.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, update text_1_350896c5ea1c2ae3930e8300d37eb670.json
deleted file mode 100644
index 6277ccd988..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in source block, update text_1_350896c5ea1c2ae3930e8300d37eb670.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"translate second block including the greeting to German (use dir instead of Ihnen)\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7f0d1c0819082f51fd9a90ef0cc0ea62c79409e08b9\",\"object\":\"response\",\"created_at\":1758783472,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7f0d1c0819082f51fd9a90ef0cc0ea62c79409e08b9\",\"object\":\"response\",\"created_at\":1758783472,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"ixkZfqqdCWFKf7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"9WZvqD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"R4WGb0qlhhg9o\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"lScu2AJ7HwdAau\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"RfAGDDDrSek0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"Jx8VzI8adIWN4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"D1VZIZ9cxI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"aYmCcwiuSv7qw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"mCYTgJtIeQICbA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"oYmNjDQCuICXa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"iwiDmauAQo5aw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"47aT5SnEiKQWdxV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"DQgPj8gaf76LNs2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"xMF7GMrIvqFrw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"Yk68wsF2Q4J\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"jMKxCGERK5H6e\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"8NM6aHG7wGnk4Ja\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"VeTtDhql1BJEwiS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"yACzSTvoX3nJ2xh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"Hallo\",\"logprobs\":[],\"obfuscation\":\"rzNYN9o1Ams\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"4b8Xdsr3ybmGpKv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"N6l9Bo9pL5azyi\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"TUpJ5w8Q8BrK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"bxxzYJfrvdp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"-inline\",\"logprobs\":[],\"obfuscation\":\"JXwos5gFS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"-content\",\"logprobs\":[],\"obfuscation\":\"s6RPsI4w\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"-type\",\"logprobs\":[],\"obfuscation\":\"ArJvA8qs7Jf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"X0Ffa2j9ZsE93\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"mention\",\"logprobs\":[],\"obfuscation\":\"RumkKrEHn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"HJIwtYtS7Ae6Et\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"be4o5rxGr4X\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"-user\",\"logprobs\":[],\"obfuscation\":\"5QCDBrfswGm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"gxUASruzoyzF8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"John\",\"logprobs\":[],\"obfuscation\":\"3zO2iimLQMrG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\" Doe\",\"logprobs\":[],\"obfuscation\":\"qhHpUckZT1cg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"2lSmIWpqfhUYq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"@\",\"logprobs\":[],\"obfuscation\":\"sj2moLXXa8WYKXS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"John\",\"logprobs\":[],\"obfuscation\":\"mf9aSHSmtMXG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\" Doe\",\"logprobs\":[],\"obfuscation\":\"JezOir5PuBo2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"BsvY8PG49uGLE7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"3l8uSes4M5Ct\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"kRbRL6pwJt0FnEz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"R38nWhBTqZGNVxY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"LTdCmfMA1OTWxk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"strong\",\"logprobs\":[],\"obfuscation\":\"VwtcF1p8OV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"E5sFXPhPX7R2OAs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"Wie\",\"logprobs\":[],\"obfuscation\":\"nRFeWBgPDpq3q\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":51,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\" geht\",\"logprobs\":[],\"obfuscation\":\"Jt0DSBpGlhL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":52,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\" es\",\"logprobs\":[],\"obfuscation\":\"SYErdhRNntKDW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":53,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\" dir\",\"logprobs\":[],\"obfuscation\":\"XzRO4hoD3yd7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":54,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"?\",\"logprobs\":[],\"obfuscation\":\"QIuzD581NSw9E\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":55,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"strong\",\"logprobs\":[],\"obfuscation\":\"23JAsjIg2S\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":56,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"Hs6wM0xyNrTJh0c\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":57,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"zFFLUvtrX2z3lx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":58,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"3H694tshazlK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":59,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\" style\",\"logprobs\":[],\"obfuscation\":\"25j3dV7mMV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":60,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"CwOBQVFGRhGFr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":61,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"color\",\"logprobs\":[],\"obfuscation\":\"UiAdOyhZMdW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":62,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\":\",\"logprobs\":[],\"obfuscation\":\"KhNPFgIxuE76de1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":63,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\" rgb\",\"logprobs\":[],\"obfuscation\":\"3DP15MQedUrP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":64,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"(\",\"logprobs\":[],\"obfuscation\":\"TcIA34HCuZTfudL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":65,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"11\",\"logprobs\":[],\"obfuscation\":\"dlcXsyXMMb19O8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":66,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"dmh12xMKRQd6hNC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":67,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\" \",\"logprobs\":[],\"obfuscation\":\"DWbW2hBcCj4C4v6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":68,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"110\",\"logprobs\":[],\"obfuscation\":\"Bc57OdqTKmLra\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":69,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"57qVsHLnBYKtgRv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":70,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\" \",\"logprobs\":[],\"obfuscation\":\"KntpxV8oSectUoE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":71,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"153\",\"logprobs\":[],\"obfuscation\":\"yzr0VLMcq42eA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":72,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\");\",\"logprobs\":[],\"obfuscation\":\"lEGovmvRGz0B3P\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":73,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"Di7FKJapWmc3fK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":74,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"X77IaOPFRe7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":75,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"-style\",\"logprobs\":[],\"obfuscation\":\"RQSydYztNs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":76,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"-type\",\"logprobs\":[],\"obfuscation\":\"8Fx1suKmyEw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":77,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"2CqzFJjsxIGSs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":78,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"text\",\"logprobs\":[],\"obfuscation\":\"kxjneEUFHv4T\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":79,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"Color\",\"logprobs\":[],\"obfuscation\":\"8PFzJHkLYOy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":80,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"RjVg9TwlelTVIi\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":81,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"klBopdWrsD1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":82,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"-value\",\"logprobs\":[],\"obfuscation\":\"ntYrF5xJ8z\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":83,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"VAmOp2CCoEHH3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":84,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"blue\",\"logprobs\":[],\"obfuscation\":\"fzH80n0IIko2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":85,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"D3FbwrQwrUIUo0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":86,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\" data\",\"logprobs\":[],\"obfuscation\":\"XE1LrZvGfEh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":87,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"-edit\",\"logprobs\":[],\"obfuscation\":\"1dSV4YqEqus\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":88,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"able\",\"logprobs\":[],\"obfuscation\":\"S80TcGETVuGn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":89,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"78SO9UEQObvNA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":90,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"qnHIEMHCS4Bp4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":91,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"Dieser\",\"logprobs\":[],\"obfuscation\":\"f7cZ9hLN2Z\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":92,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\" Text\",\"logprobs\":[],\"obfuscation\":\"MUAbojeG6Yv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":93,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\" ist\",\"logprobs\":[],\"obfuscation\":\"F704tD6ijKmY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":94,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\" blau\",\"logprobs\":[],\"obfuscation\":\"d28gqzpFfZy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":95,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"vllHQhkpvSuZG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":96,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"span\",\"logprobs\":[],\"obfuscation\":\"0z7397nHnNd4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":97,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"0SY4p1AsAEECI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":98,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"5W8jsDGh3PqXz1x\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":99,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"1Og89RU7xtL0P85\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":100,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"Vt473ezaYkDPCv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":101,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"FaHl4KrTtiAemD\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":102,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo, @John Doe! Wie geht es dir? Dieser Text ist blau!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":103,\"item_id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo, @John Doe! Wie geht es dir? Dieser Text ist blau!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":104,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo, @John Doe! Wie geht es dir? Dieser Text ist blau!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":105,\"response\":{\"id\":\"resp_68d4e7f0d1c0819082f51fd9a90ef0cc0ea62c79409e08b9\",\"object\":\"response\",\"created_at\":1758783472,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7f17af88190b6a07ddeada9c0e50ea62c79409e08b9\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo, @John Doe! Wie geht es dir? Dieser Text ist blau!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":733,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":99,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":832},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in target block, add mark (paragraph)_1_2fcc358ab0331d440742d0b28cdbffcd.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in target block, add mark (paragraph)_1_2fcc358ab0331d440742d0b28cdbffcd.json
new file mode 100644
index 0000000000..cb257ddaad
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in target block, add mark (paragraph)_1_2fcc358ab0331d440742d0b28cdbffcd.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make first paragraph bold\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_02edb5e75ab205ba00691c9561008c819780c6b8077f7d1ae9\",\"object\":\"response\",\"created_at\":1763480929,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_02edb5e75ab205ba00691c9561008c819780c6b8077f7d1ae9\",\"object\":\"response\",\"created_at\":1763480929,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"fUxWExYq8GKB2J\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"f4BvRa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"6cw3Ghr9c2pYJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"MLE6NJOVarTuZQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"8jmtyzHwDXBP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"MC8urlMgyV7dC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"gv6CCPX0cd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"swwMc5O7IWd6U\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"u028tWapGXHQgP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"n35UsRyw64mzf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"VKH0polYt1GVt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"2XOz2DvSdSBbuB3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"a4dNA4sV8jhi6Zv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"wLw66tvjYh9RX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"dKGLqzF2CyG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"BQyHDvxQ1uYLo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"nG0S9YbqTkc1177\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"17Ia8pJgCAoXIZ9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"><\",\"logprobs\":[],\"obfuscation\":\"4wEBeLAygW32wA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"strong\",\"logprobs\":[],\"obfuscation\":\"QTiFq061bF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\">Hello\",\"logprobs\":[],\"obfuscation\":\"DkNwRvcAhb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"5FDKT6iJzkeILFJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\" world\",\"logprobs\":[],\"obfuscation\":\"lGxE2krqin\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"AMFJ7WiQDf7NN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"strong\",\"logprobs\":[],\"obfuscation\":\"RXGenxQq0x\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"CiklqvLeYZQuw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"GoSAcfJHqTFHKC0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"0bGhIIUALzmGcE1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"Kuvdx9ITd9vNy9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"pi9ALqWDujxhsX\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":34,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":35,\"item_id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":36,\"output_index\":0,\"item\":{\"id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":37,\"response\":{\"id\":\"resp_02edb5e75ab205ba00691c9561008c819780c6b8077f7d1ae9\",\"object\":\"response\",\"created_at\":1763480929,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_02edb5e75ab205ba00691c95618098819790cfccbd8e01105d\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":769,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":31,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":800},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in target block, add mark (paragraph)_1_da57da0afcca08a77da5df430ef1db17.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in target block, add mark (paragraph)_1_da57da0afcca08a77da5df430ef1db17.json
deleted file mode 100644
index 8422543569..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in target block, add mark (paragraph)_1_da57da0afcca08a77da5df430ef1db17.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make first paragraph bold\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7e52110819384f69299e73f9bfd0dac84cf906003b0\",\"object\":\"response\",\"created_at\":1758783461,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7e52110819384f69299e73f9bfd0dac84cf906003b0\",\"object\":\"response\",\"created_at\":1758783461,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"P0u1nI8qIJyrUv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"JF4IPr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"jK2KxqpjJvRYq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"vbS8S6HmY2tgHl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"M1Pta75DotGM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"SCHwsLPXGVNrH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"XxUSzWiyAT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"f4u1Q5umY6GRF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"7cQnk28MNmMMcZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"sZeOtnu3hffcO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"FDIrTxpTXAF2f\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"9X9Jzcal4qKTllv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"zZjeBwQcCsCrQvo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"NKvezm2zkNe01\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"Xqeewfnx7mw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"c5W2FrmXspraG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"WCcC9FrzfVBXaN1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"GFEyPpzG50lRGwa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"><\",\"logprobs\":[],\"obfuscation\":\"ceAcTBZpT8GcsL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"strong\",\"logprobs\":[],\"obfuscation\":\"lZIpycxjLd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\">Hello\",\"logprobs\":[],\"obfuscation\":\"qaDrDcbB7d\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"QdGveVaFppwBv97\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\" world\",\"logprobs\":[],\"obfuscation\":\"JzXJr11cEx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"WFLs1yNrucOVq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"strong\",\"logprobs\":[],\"obfuscation\":\"WjvrCvn4Jm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"Zlrrp7KTmXoEq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"hS2S3jUHeN8u0Kw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"YMEOng25cfL49T0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"6mhKZJylAyOvAm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"7NadnKoR7QlcTB\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":34,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":35,\"item_id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":36,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":37,\"response\":{\"id\":\"resp_68d4e7e52110819384f69299e73f9bfd0dac84cf906003b0\",\"object\":\"response\",\"created_at\":1758783461,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7e5ab8c819385f0758358335c910dac84cf906003b0\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":722,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":31,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":753},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in target block, add mark (word)_1_717f43f6e3302767b191ed31d11b1dd6.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in target block, add mark (word)_1_717f43f6e3302767b191ed31d11b1dd6.json
deleted file mode 100644
index 6138853ffc..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in target block, add mark (word)_1_717f43f6e3302767b191ed31d11b1dd6.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make 'world!' (in the first block) bold\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7e407508193be4374c9d4da6c40049d6ff208ec87eb\",\"object\":\"response\",\"created_at\":1758783460,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7e407508193be4374c9d4da6c40049d6ff208ec87eb\",\"object\":\"response\",\"created_at\":1758783460,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"tFRth1I68LV0g9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"y3yoKe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"BkVypbIw1aIsQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"Gt3t4D0Bankndb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"w7LUUSok5QP1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"UwCLtfuzSUIiu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"Lu6Fa4ekR4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"B6Hlhs6trh5c3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"K4T9SqldFTdjYu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"xAu3bs8oALo6k\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"bSo9D7mCPylVJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"ZXCG0PNGAv2PVAb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"ws874lBmcXyFoMU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"rwZ7PvZg5ym0j\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"NySQlxHJjkZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"EIDLxHaBASzho\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"LHPU8SiVVYGMUym\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"K45h2iXpHvhBOtY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\">Hello\",\"logprobs\":[],\"obfuscation\":\"zo1MOrpFdu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"MdyPlbQ0DtLpC4T\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"WJW2ej98piywgr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"strong\",\"logprobs\":[],\"obfuscation\":\"yrl9jMQtcc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"ZwXR9cP9XWo5Iz4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"world\",\"logprobs\":[],\"obfuscation\":\"LG0JvPAM2e8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"f9GOsuYzzqz0l\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"strong\",\"logprobs\":[],\"obfuscation\":\"f052XwJleW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"XSQdt56LodQQl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"4Nsq4bydIRSZeoK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"ho73HwEb7RjV3pe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"gK9BYks14AfeD6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"u9hUHm8LF3kEmz\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":35,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":36,\"item_id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":37,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":38,\"response\":{\"id\":\"resp_68d4e7e407508193be4374c9d4da6c40049d6ff208ec87eb\",\"object\":\"response\",\"created_at\":1758783460,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7e46bfc81939650430a38b1facd049d6ff208ec87eb\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":729,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":32,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":761},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in target block, add mark (word)_1_d51e7544c0fcb93030a9d4c14970a487.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in target block, add mark (word)_1_d51e7544c0fcb93030a9d4c14970a487.json
new file mode 100644
index 0000000000..058e729f0d
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/styles + ic in target block, add mark (word)_1_d51e7544c0fcb93030a9d4c14970a487.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make 'world!' (in the first block) bold\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_03fdb9ed6d8dda3800691c95f4e3c481959798fa9007359dd6\",\"object\":\"response\",\"created_at\":1763481076,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_03fdb9ed6d8dda3800691c95f4e3c481959798fa9007359dd6\",\"object\":\"response\",\"created_at\":1763481076,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"H1GkRTdPSzTcWH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"V64rzP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"Z5M1VzqtyOI67\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"tJ8v0zrmJCj0rp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"dtB4g3nyoIgN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"xVvXvz46CKJmm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"fgiSHH8G27\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"BiyFyg1JPzKeg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"H71KeXbrFqmTz0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"CPtaY4p9xSKaR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"E96Roo2Hz6IE2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"vhpXV9kNUXlYZTp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"lDsVZDFbRdGBj8J\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"8Xutvx5cKFhv6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"IL2rdUs0sSx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"y7rtywhEtIl9m\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"qdNOmTDGcEAzgA7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"0PNL3I7s05B2Dzj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\">Hello\",\"logprobs\":[],\"obfuscation\":\"6PojfNLojF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"6Mx75ZGDaQt8NMQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\" <\",\"logprobs\":[],\"obfuscation\":\"Sz3AGqbE2Jkz3h\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"strong\",\"logprobs\":[],\"obfuscation\":\"6Fo6xVCA1X\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"ubjA0Yxbc28AFHS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"world\",\"logprobs\":[],\"obfuscation\":\"0IBzo0lhjdQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"OYSIlwEJr1HfW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"strong\",\"logprobs\":[],\"obfuscation\":\"PLK6zON4BH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"QZdayuKouaUFH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"UrDeVbwm547XqdT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"zR6SwqA5D8qxEle\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"Vcr8mzFGddgW9y\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"MtfxiEvjHdxc6z\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":35,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":36,\"item_id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":37,\"output_index\":0,\"item\":{\"id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":38,\"response\":{\"id\":\"resp_03fdb9ed6d8dda3800691c95f4e3c481959798fa9007359dd6\",\"object\":\"response\",\"created_at\":1763481076,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_03fdb9ed6d8dda3800691c95f554c08195ab7ef38be6106d2c\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":776,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":32,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":808},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/translate selection_1_0e4c67cc4858f5dfe2f2004e598cdfbd.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/translate selection_1_0e4c67cc4858f5dfe2f2004e598cdfbd.json
deleted file mode 100644
index 6a78e2c6be..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/translate selection_1_0e4c67cc4858f5dfe2f2004e598cdfbd.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids.\\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"translate to German\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7d5a58881908ffecad73ae2de660adfec9a450c2fd9\",\"object\":\"response\",\"created_at\":1758783445,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7d5a58881908ffecad73ae2de660adfec9a450c2fd9\",\"object\":\"response\",\"created_at\":1758783445,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"YQlgPLKPwEcNZR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"AIo1SK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"poxYVhSE4u21x\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"39IAGBq47Ehdx5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"jGQ8R5FtxTws\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"OCSqY7Vqt37u0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"5eCXDodtAR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"h8fI58ufOv578\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"Z5jbRR8sW0UnJc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"U2i3O1PXa14UI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"kFFe8IeeHQVsg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"j407RS2WPNiJVvi\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"ixasDBVNN3Od45W\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"eDVCqyAkX9okx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"bqy9Qcsj4RW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"RxhANCiu10bny\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"6TbpMqoEKT7HrP7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"xKX7yBzPixKIhxA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"dXtHjBRoH8bEjk8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"Hallo\",\"logprobs\":[],\"obfuscation\":\"Ev77FklXZRP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"81cFNXGL61enkd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"Z2RLSzwLvGveqUO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"AKUN4ORNgPowdN2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"OB2vYqSzS1YBbP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"bh6RKeB8yFSeMr\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":31,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":32,\"response\":{\"id\":\"resp_68d4e7d5a58881908ffecad73ae2de660adfec9a450c2fd9\",\"object\":\"response\",\"created_at\":1758783445,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7d67f308190bf4404661ad7c7960adfec9a450c2fd9\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":554,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":26,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":580},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/translate selection_1_77c995eba6d0cfe1b1582a58160303b2.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/translate selection_1_77c995eba6d0cfe1b1582a58160303b2.json
new file mode 100644
index 0000000000..6bb403421e
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/translate selection_1_77c995eba6d0cfe1b1582a58160303b2.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"translate to German\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_028b6c02a4eb0e5f00691c9553970c81948499f88d719c0cd5\",\"object\":\"response\",\"created_at\":1763480915,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_028b6c02a4eb0e5f00691c9553970c81948499f88d719c0cd5\",\"object\":\"response\",\"created_at\":1763480915,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"h6W894S3LOYsXB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"7y5GBS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"FRKikppP0TEco\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"p23qdQtmdGCfXA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"JtrCS3JfmOhU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"SGbb5K6XgQPdl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"tO1ABfu2e8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"ntaY3DNQq7YIN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"cPKmoXi5qAGvLc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"KV5ZvhezZLDrK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"4z6cDaAUhgxrU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"VSlAKLPU0QCqifY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"plPvKjOd7KoteMD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"rri6VKbfM8GLr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"4gpUzGMuo60\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"23Rb2VsDd5FH0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"UkyRYs75MW3z6C1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"Ho6WXmTbF7glM2q\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"qWGoVEUeL7fdxuO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"Hallo\",\"logprobs\":[],\"obfuscation\":\"Rrf68suQwJe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"3EZWjtPv3hqAnF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"4TiCPGLK1XMB7Kp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"55lIXMTLAZo1HBJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"hBDQCEi6BqScb8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"wG11RHThFqlg3S\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":29,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":30,\"item_id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":31,\"output_index\":0,\"item\":{\"id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":32,\"response\":{\"id\":\"resp_028b6c02a4eb0e5f00691c9553970c81948499f88d719c0cd5\",\"object\":\"response\",\"created_at\":1763480915,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_028b6c02a4eb0e5f00691c95540a1c819486fca17aed355c30\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":760,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":26,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":786},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/turn paragraphs into list_1_03c3d437686de6faba00429649340a81.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/turn paragraphs into list_1_03c3d437686de6faba00429649340a81.json
deleted file mode 100644
index f350cd2ce0..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/turn paragraphs into list_1_03c3d437686de6faba00429649340a81.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids.\\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Bananas
\\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:[{\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"block\\\":\\\"Apples
\\\"},{\\\"block\\\":\\\"Bananas
\\\"}]\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"turn into list (update existing blocks)\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7a11fc881939b555b40d51714e6001649794958a829\",\"object\":\"response\",\"created_at\":1758783393,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7a11fc881939b555b40d51714e6001649794958a829\",\"object\":\"response\",\"created_at\":1758783393,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"FCBTfWUBZnew02\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"hXnLgG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"jaU0MBoHMuosV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"NksEgH7FiWeblU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"CZt7QAvXwOcV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"YEq6gzWLqs6ci\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"AhK0rDGizY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"Gk28OP2LAqXpy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"aeVhvKzldOsFP9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"ZEsxXdKrNkiPF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"Wz3xgshRbxAza\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"5EvAiYo256pKSmn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"aogm6pNDk3kRAyD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"VP5f1YYoWbApF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"yvC8k1govAN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"tLCvdOtx4rElk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"zF9owP7ZfRyEox6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"ul\",\"logprobs\":[],\"obfuscation\":\"LCw3RfmLMZm01z\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"><\",\"logprobs\":[],\"obfuscation\":\"T0YaKDkGKUUUrQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"li\",\"logprobs\":[],\"obfuscation\":\"XJuOgIdwTukblg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"TYzQ9RQRlN1rDsJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"Ap\",\"logprobs\":[],\"obfuscation\":\"ETASS0Ih1whBgM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"ples\",\"logprobs\":[],\"obfuscation\":\"DZ00dxr08bD3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"2cDUxreFiR0Jcp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"li\",\"logprobs\":[],\"obfuscation\":\"5Xv8ObugC2Dwwk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"J241yY7WbnBtl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"ul\",\"logprobs\":[],\"obfuscation\":\"bM4jgxqZ3OG9bo\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\">\\\"\",\"logprobs\":[],\"obfuscation\":\"iA3yXGIqo8o9li\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"},{\\\"\",\"logprobs\":[],\"obfuscation\":\"uD0nRufHKxWS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"16sgcBvEtXYk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"MCSsKrQjjBSiW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"b6mQ9Oq4MJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"n4X0e39S6Nflt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"oVQLPvcxQFR82z\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"ip8NgiUqgBpz6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"TjlBsSTiBqsIv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"3\",\"logprobs\":[],\"obfuscation\":\"DUK5BXIGMG1aX7O\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"6pPy9g3x5dNfs1u\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"GuFMeVb3HEbct\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"NrIx8BK3lJs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"1OUD6G0cHWbbY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"AdkIWSYI54gz1ow\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"ul\",\"logprobs\":[],\"obfuscation\":\"T36nmfSSGjQm0t\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"><\",\"logprobs\":[],\"obfuscation\":\"Js4DLNDBicFPMb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"li\",\"logprobs\":[],\"obfuscation\":\"0ShacPmn08v0W5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"SgeDir863N7g1K0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"Ban\",\"logprobs\":[],\"obfuscation\":\"j23Qc90F7BEqm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":51,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"anas\",\"logprobs\":[],\"obfuscation\":\"5p503FHR7kGW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":52,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"RstCWFpVvdk4ZB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":53,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"li\",\"logprobs\":[],\"obfuscation\":\"2VFDf1ESJBP0Az\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":54,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"fY8rhae8dTemj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":55,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"ul\",\"logprobs\":[],\"obfuscation\":\"AzlSLPRvJJoKbV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":56,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"j1ACoqHV4qreAc0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":57,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"qPd2KNE4chyxOf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":58,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"JGMHYAxhsqNMwK\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":59,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"- Apples
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"- Bananas
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":60,\"item_id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"- Apples
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"- Bananas
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":61,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"- Apples
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"- Bananas
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":62,\"response\":{\"id\":\"resp_68d4e7a11fc881939b555b40d51714e6001649794958a829\",\"object\":\"response\",\"created_at\":1758783393,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7a1a0c48193b58e9eb4ec85f705001649794958a829\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"- Apples
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"- Bananas
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":474,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":56,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":530},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/turn paragraphs into list_1_34265b84999198d0abed53174f1081a1.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/turn paragraphs into list_1_34265b84999198d0abed53174f1081a1.json
new file mode 100644
index 0000000000..480a325d76
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/turn paragraphs into list_1_34265b84999198d0abed53174f1081a1.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Bananas
\\\"}]\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the entire document (INCLUDING the selected text), \\nyou can use this to find the selected text to understand the context (but you MUST NOT issue operations against this document, you MUST issue operations against the selection):\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"block\\\":\\\"Apples
\\\"},{\\\"block\\\":\\\"Bananas
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"turn into list (update existing blocks)\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0187ae05ab8f58ab00691cb327ef988195b5f7b592b7d87c72\",\"object\":\"response\",\"created_at\":1763488551,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0187ae05ab8f58ab00691cb327ef988195b5f7b592b7d87c72\",\"object\":\"response\",\"created_at\":1763488551,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"XC1VbbI2C9uT2q\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"oAuB2D\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"bpPwyBxaR57cR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"ycs7qGqEVObsTk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"Oz4bGu2RMvKP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"qVpjy0Gfv81fs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"3f7iRyJ9sI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"2l7doa2U51Rvc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"WdxoJN7fDlXy1X\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"mfGqFEOGsrezH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"QAOMAsSTzknfv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"gosweBl7fJAbOdz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"jOPmGytio6cRzQp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"DuhiErrSkP7Yj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"OzrnixKcdQz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"tRRrV73kIhvNy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"A5gv88OEidssBCe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"ul\",\"logprobs\":[],\"obfuscation\":\"0p6iXOO6kH4R28\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"><\",\"logprobs\":[],\"obfuscation\":\"2fzV3dbgb2deef\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"li\",\"logprobs\":[],\"obfuscation\":\"S1o1YYnzJwVa5t\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"3C0314q1PaulAda\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"Ap\",\"logprobs\":[],\"obfuscation\":\"Y1mHHcpMLv6UUW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"ples\",\"logprobs\":[],\"obfuscation\":\"yN2DX9ufA1uJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"aoawYIxIB6Q1mj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"li\",\"logprobs\":[],\"obfuscation\":\"SjktHThRDQFj5w\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"zQZv4upkTn0u8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"ul\",\"logprobs\":[],\"obfuscation\":\"FhQaEL2LhmIFPO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\">\\\"\",\"logprobs\":[],\"obfuscation\":\"wT8cTWPvl1OYPg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"},{\\\"\",\"logprobs\":[],\"obfuscation\":\"dn2GnUJCMB8D\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"NIj8DS7rv558\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"KG5luJtF2MAis\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"aBO1OeAXDE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"GcMncumAlT9V7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"HKFCDMyuP04gGK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"UfXw2CoOgw2Ge\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"hM4WaPtWuGjFH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"3\",\"logprobs\":[],\"obfuscation\":\"hMRr9HITCo3sSJd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"ovBkAtIOccvmSdn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"Ma1DKAbY7L5SG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"rtu1kOD5ADf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"WEOLki5P7BzGI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"hfNBD1xy40MiROq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"ul\",\"logprobs\":[],\"obfuscation\":\"OeXCSmDSfKk8WN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"><\",\"logprobs\":[],\"obfuscation\":\"Onf90Hnk7dNDxb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"li\",\"logprobs\":[],\"obfuscation\":\"CtAaebhKXRsWqJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"1Cou6RaTG7WuPGv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"Ban\",\"logprobs\":[],\"obfuscation\":\"ci4WR8fdkceWa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":51,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"anas\",\"logprobs\":[],\"obfuscation\":\"G5pleUrrwZ3W\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":52,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"HurPAvh2npBMGK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":53,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"li\",\"logprobs\":[],\"obfuscation\":\"PUPhul6NKORWjS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":54,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"Slc0voPvSRI5Q\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":55,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"ul\",\"logprobs\":[],\"obfuscation\":\"Xx1iuZ1kXxxkmN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":56,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"Yxy3mfeOGElvAgH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":57,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"RMDpblDpcmH1Ws\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":58,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"RcpoXiOo56yUHt\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":59,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"- Apples
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"- Bananas
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":60,\"item_id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"- Apples
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"- Bananas
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":61,\"output_index\":0,\"item\":{\"id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"- Apples
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"- Bananas
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":62,\"response\":{\"id\":\"resp_0187ae05ab8f58ab00691cb327ef988195b5f7b592b7d87c72\",\"object\":\"response\",\"created_at\":1763488551,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_0187ae05ab8f58ab00691cb3285df481958b6f0be826ed4406\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"- Apples
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"- Bananas
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":702,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":56,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":758},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/turn paragraphs into list_1_386c05610b9aae82a89bb47fe6fd7bf9.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/turn paragraphs into list_1_386c05610b9aae82a89bb47fe6fd7bf9.json
new file mode 100644
index 0000000000..5b50e0747c
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/turn paragraphs into list_1_386c05610b9aae82a89bb47fe6fd7bf9.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Bananas
\\\"}]\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"block\\\":\\\"Apples
\\\"},{\\\"block\\\":\\\"Bananas
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"turn into list (update existing blocks)\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0f18f78f086cac6300691c95f61acc819796361918204dec62\",\"object\":\"response\",\"created_at\":1763481078,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0f18f78f086cac6300691c95f61acc819796361918204dec62\",\"object\":\"response\",\"created_at\":1763481078,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"sbBd4gxvolbYhm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"K9E149\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"Liqi87sfpSXbA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"3rQ2PNDDTtrk9Z\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"HY6cr149lTNk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"NetpCFXGh98RQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"k6iPliz7cT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"UrtoIjwJYvCNy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"2MAeufWKRV7FPQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"V0Gfd7KvxbKiA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"A91new5wCjn3U\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"2\",\"logprobs\":[],\"obfuscation\":\"v7AUJAfiif2sDIW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"woZpdCabVZqptIN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"PL7C3C1xtOgXO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"jbX0OLdmnE6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"dkdBQph6wmyao\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"NlUbVMT4LpFc3Ts\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"ul\",\"logprobs\":[],\"obfuscation\":\"mqp0CURzFvUeSh\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"><\",\"logprobs\":[],\"obfuscation\":\"1HjsT47tNXbEYA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"li\",\"logprobs\":[],\"obfuscation\":\"orrTqUhjUaZjYQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"2W9UDWbmqWsxzWB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"Ap\",\"logprobs\":[],\"obfuscation\":\"5vDPa0FsFey3o4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"ples\",\"logprobs\":[],\"obfuscation\":\"qeA7KRJG0fpZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"RrNA3zuOFJlHPO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"li\",\"logprobs\":[],\"obfuscation\":\"jXqiFVwENMHc07\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"MoyrU1HftNn9z\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"ul\",\"logprobs\":[],\"obfuscation\":\"ey0QBV5h0mtA9Z\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\">\\\"\",\"logprobs\":[],\"obfuscation\":\"LMLW69sIJFGb20\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"},{\\\"\",\"logprobs\":[],\"obfuscation\":\"hlaF0GQPWmln\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"hRdQhcBcCXwv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"Hi6tyuOCyvqov\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"nN8LfFoUU2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"8sTLphdZVFJd5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"ocgvM1cVDANaXN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"arAmkkFiMxbTC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":39,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"TJFQnRJGEqkFL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":40,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"3\",\"logprobs\":[],\"obfuscation\":\"7kqzNMnPCNxHHUm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":41,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"b1pEPOc4LeXHHS9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":42,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"2WTV36KUDSHG7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":43,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"it3XB7zXjVq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":44,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"VQaIMqEpvxcQl\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":45,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"BzKmzmUioZlSE7I\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":46,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"ul\",\"logprobs\":[],\"obfuscation\":\"5wMxdBclTICirG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":47,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"><\",\"logprobs\":[],\"obfuscation\":\"HKmFsXJBkhO1tg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":48,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"li\",\"logprobs\":[],\"obfuscation\":\"B5Kv9Av7yCEFc8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":49,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"DmavNqbccveChdQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":50,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"Ban\",\"logprobs\":[],\"obfuscation\":\"66QpSpbBW9RsC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":51,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"anas\",\"logprobs\":[],\"obfuscation\":\"m2NYBLCRQpAV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":52,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"\",\"logprobs\":[],\"obfuscation\":\"OblgWEiw3YoYEC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":53,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"li\",\"logprobs\":[],\"obfuscation\":\"avEOr0WkkJbJt2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":54,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"IwfWxHZTl152t\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":55,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"ul\",\"logprobs\":[],\"obfuscation\":\"QNPR4pU4TWIKgY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":56,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"znu6Z7R0mwceyEL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":57,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"tVWzgpQsBT0dnH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":58,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"seW5DXkLB0KbdP\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":59,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"- Apples
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"- Bananas
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":60,\"item_id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"- Apples
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"- Bananas
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":61,\"output_index\":0,\"item\":{\"id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"- Apples
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"- Bananas
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":62,\"response\":{\"id\":\"resp_0f18f78f086cac6300691c95f61acc819796361918204dec62\",\"object\":\"response\",\"created_at\":1763481078,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_0f18f78f086cac6300691c95f770748197ba1b4466a1916106\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"- Apples
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"- Bananas
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":680,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":56,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":736},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block prop and content_1_8a8bb024ac97dfc5a47387ceb86a483f.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block prop and content_1_8a8bb024ac97dfc5a47387ceb86a483f.json
new file mode 100644
index 0000000000..27758540be
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block prop and content_1_8a8bb024ac97dfc5a47387ceb86a483f.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make the first paragraph right aligned and update the content to 'What's up, world!'\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_06127562357ce67000691c9557f2488190a8ec3ceced0fa863\",\"object\":\"response\",\"created_at\":1763480919,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_06127562357ce67000691c9557f2488190a8ec3ceced0fa863\",\"object\":\"response\",\"created_at\":1763480919,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"9PHrO9MCcxTqIj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"mwe4PN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"NKw6OnkH33ziT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"P2XP6nJBSkkYZy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"Cy0JK3GizBus\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"QCsMlVbK93TjL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"ArYdRksSlO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"yC7zXufRCaHwt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"PLgMkjQJKutPf0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"UH2o3C5ecjGgA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"Lq9Y327Werd44\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"ajUenIYw6CENcY2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"Qxu8k3XBioXyzlD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"NZACd4SaD6Jb5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"kUFVpwWWgh8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"q4O6sHw6fcKRi\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"ESp7i11vFmCgtHw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"XEXwMnpQqFJLFd7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\" style\",\"logprobs\":[],\"obfuscation\":\"3rzwhO6DGj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"dKowradyrEZpI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"text\",\"logprobs\":[],\"obfuscation\":\"lwq2B5iisKKM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"-align\",\"logprobs\":[],\"obfuscation\":\"94uyKZ9cr9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\":\",\"logprobs\":[],\"obfuscation\":\"GHcZb83fsU87wm2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\" right\",\"logprobs\":[],\"obfuscation\":\"vOVQmzLUBL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\";\",\"logprobs\":[],\"obfuscation\":\"HOpJZ2l8OduRuED\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"Q973SDgRNuQma\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"What's\",\"logprobs\":[],\"obfuscation\":\"OJG7M5u1NU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\" up\",\"logprobs\":[],\"obfuscation\":\"Z4pyK1FvTWfGb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"lxxK9Jrv774W6ja\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\" world\",\"logprobs\":[],\"obfuscation\":\"WCtu8f08JN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"CUGVySHnlrdUR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"YlDAK8aR6uSngmk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"G6Q7YpzfOlU8rVk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"UU41OG8dkwvAkc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"oELrybUn8FZLJn\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":39,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":40,\"item_id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":41,\"output_index\":0,\"item\":{\"id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":42,\"response\":{\"id\":\"resp_06127562357ce67000691c9557f2488190a8ec3ceced0fa863\",\"object\":\"response\",\"created_at\":1763480919,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_06127562357ce67000691c955852948190927b7f87a32e890d\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":782,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":36,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":818},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block prop and content_1_dd58f52c343818059aa71a9676a172d2.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block prop and content_1_dd58f52c343818059aa71a9676a172d2.json
deleted file mode 100644
index 5ec2e85fc8..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block prop and content_1_dd58f52c343818059aa71a9676a172d2.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make the first paragraph right aligned and update the content to 'What's up, world!'\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7da6d9481958fd70d3fd7553658017f6d461e01eb0b\",\"object\":\"response\",\"created_at\":1758783450,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7da6d9481958fd70d3fd7553658017f6d461e01eb0b\",\"object\":\"response\",\"created_at\":1758783450,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"O72kbULtdzs9OU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"Sgkgyn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"0Bxjqzo2Blp9m\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"ET0CfDpVsTTpc6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"04itR1deuzLp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"fspcR4kopVFhs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"QKk1BAtSJ0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"JfK6ejBEhMoG7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"cGu146fQmbhxcL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"LHTtE4qJRqePb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"pTEblhR5G01UW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"9A1t4o7mDnAVEHD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"S6FYAJd8hxva9uG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"G7gjGgkwQn6Qy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"LohBLSbwb3P\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"Vdp06nIhgmSD3\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"VEY0cPMfyr9She1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"EjZflitkAW5tSPd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\" style\",\"logprobs\":[],\"obfuscation\":\"c0e7jEix9G\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"rOzFeL5qmaBJO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"text\",\"logprobs\":[],\"obfuscation\":\"wtc5kDI2ZPF8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"-align\",\"logprobs\":[],\"obfuscation\":\"J8DEA31mGG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\":\",\"logprobs\":[],\"obfuscation\":\"7QFzV3kAVgxsa4r\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\" right\",\"logprobs\":[],\"obfuscation\":\"XiWxxYatcn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\";\",\"logprobs\":[],\"obfuscation\":\"aCzbIMeRqR7JYkO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"LkGeuQ9hn7Xyr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"What's\",\"logprobs\":[],\"obfuscation\":\"MVMDO034Ud\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\" up\",\"logprobs\":[],\"obfuscation\":\"SRvvP0gpLcnkL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"SH6rFAbEU4xBolt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\" world\",\"logprobs\":[],\"obfuscation\":\"7ooQZDUSuR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"CiIryUMchEOP1\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"g2mTsFhiUXlg52y\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"Gbhh4i91DUyqKNf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"I69XPtfRfuFRXv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":38,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"tuIPpXuZC3g6Wn\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":39,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":40,\"item_id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":41,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":42,\"response\":{\"id\":\"resp_68d4e7da6d9481958fd70d3fd7553658017f6d461e01eb0b\",\"object\":\"response\",\"created_at\":1758783450,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7db1dd0819588d783aaa1784060017f6d461e01eb0b\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":735,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":36,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":771},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block prop_1_4a0be63bfbef46eea3c480cd5c20d78b.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block prop_1_4a0be63bfbef46eea3c480cd5c20d78b.json
new file mode 100644
index 0000000000..3a0192e7ff
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block prop_1_4a0be63bfbef46eea3c480cd5c20d78b.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make the first paragraph right aligned\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0896be044bac0bf000691c9555e228819091e77e300aa6d273\",\"object\":\"response\",\"created_at\":1763480917,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0896be044bac0bf000691c9555e228819091e77e300aa6d273\",\"object\":\"response\",\"created_at\":1763480917,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"c5OMLB6mFCM6rC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"ILx0ic\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"TYc6cPKGlqoTJ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"c3zI2W2MPxbllv\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"VG7mWvZqNxps\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"lRnhbUqCK0BCp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"Onq2kpnEqQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"GEJBnPv9nhszO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"TfM9eB166gIGob\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"iqccVmiVpIx2y\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"03F5796k7N5kx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"tyiCfB2rUFBStHk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"pR5KCBShX5WHfyQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"7i4QGMWwq0mvY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"ok7Lzk1ffoK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"ZICBu7NE9xsu7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"zwoRAKKCIS7PjdE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"Xxf4pD8vwvcnVg8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\" style\",\"logprobs\":[],\"obfuscation\":\"sR8DV2XXbO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"rfB6Pl2JqdpdS\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"text\",\"logprobs\":[],\"obfuscation\":\"YvR0KmkjrWM5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"-align\",\"logprobs\":[],\"obfuscation\":\"UYUckkDg3z\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\":\",\"logprobs\":[],\"obfuscation\":\"tYwuMeKfZOd7SGG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\" right\",\"logprobs\":[],\"obfuscation\":\"d1T5PFyZEe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\";\",\"logprobs\":[],\"obfuscation\":\"eCJbkPxpm6oylSa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"KC8z0Qq4noJBa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"Hello\",\"logprobs\":[],\"obfuscation\":\"sAgYIwvQyqt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"dMEmXUFYw9gs7wi\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\" world\",\"logprobs\":[],\"obfuscation\":\"8fThkGOzDy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"sUWfbVyOVa838\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"cUstZDVLficXraC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"hnilMWgMyGFIi0X\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"8qtukwhnVhUFhA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"HNavHkfQnEH0m2\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":38,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":39,\"item_id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":40,\"output_index\":0,\"item\":{\"id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":41,\"response\":{\"id\":\"resp_0896be044bac0bf000691c9555e228819091e77e300aa6d273\",\"object\":\"response\",\"created_at\":1763480917,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_0896be044bac0bf000691c955640508190925a7daed11c6636\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":771,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":35,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":806},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block prop_1_a4f7c3617705406313b619c566afef36.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block prop_1_a4f7c3617705406313b619c566afef36.json
deleted file mode 100644
index c8c01f7bf0..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block prop_1_a4f7c3617705406313b619c566afef36.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make the first paragraph right aligned\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7d7ed688197903bc1cb148646e60c09bf3925c646c0\",\"object\":\"response\",\"created_at\":1758783448,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7d7ed688197903bc1cb148646e60c09bf3925c646c0\",\"object\":\"response\",\"created_at\":1758783448,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"dA8Ge2064GIE7P\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"02sMAR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"PX8g0IUa5fDza\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"C7bKytEl2G09sf\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"oYFTu4IF6M6b\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"tIK96rXcVV4TT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"QaAKjhSGAW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"eFQCNcbkb8ts0\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"HIW3Yp7dspJCvg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"yX7xSmFS3vuOC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"ivLfuT4awhepq\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"3wVhrIXMRSZtk9H\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"N9p95CP5roqOaRN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"4WwfBOMPDWyoA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"PXXAVWWYV3J\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"OhtxZM4dsKdFB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"GqUCY3zGwMF9QUy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"ck7apSTkTqCX1yu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\" style\",\"logprobs\":[],\"obfuscation\":\"whRlV2HoId\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"=\\\\\\\"\",\"logprobs\":[],\"obfuscation\":\"l6yjK6QtArPrB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"text\",\"logprobs\":[],\"obfuscation\":\"acayF5ZELPFz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"-align\",\"logprobs\":[],\"obfuscation\":\"BgtQIbxQlE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\":\",\"logprobs\":[],\"obfuscation\":\"5aRLZX2q9EMmqMu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\" right\",\"logprobs\":[],\"obfuscation\":\"TbqRUJNtaB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\";\",\"logprobs\":[],\"obfuscation\":\"B3qojaHJdsFBuic\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\\\\\">\",\"logprobs\":[],\"obfuscation\":\"yzIxBpnJdpIyp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"Hello\",\"logprobs\":[],\"obfuscation\":\"5hlwSCnoczP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"u4jONrCrMvH3JTs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\" world\",\"logprobs\":[],\"obfuscation\":\"3OzQIxRSeV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"sQtvQdKhlxwwI\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":34,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"p\",\"logprobs\":[],\"obfuscation\":\"JzJIKVKkvwi5o9C\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":35,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"fSr7qXtu3wM3C7h\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":36,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"ct7eAvNme8ETLK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":37,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"DxxXjlzl7ZUYeX\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":38,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":39,\"item_id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":40,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":41,\"response\":{\"id\":\"resp_68d4e7d7ed688197903bc1cb148646e60c09bf3925c646c0\",\"object\":\"response\",\"created_at\":1758783448,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7d85a088197b32cbd23aa5cb50e0c09bf3925c646c0\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":724,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":35,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":759},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block type and content_1_2e78a51589c195d5f4a1668482db03c4.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block type and content_1_2e78a51589c195d5f4a1668482db03c4.json
new file mode 100644
index 0000000000..95a7c7791e
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block type and content_1_2e78a51589c195d5f4a1668482db03c4.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make the first paragraph a heading and update the content to 'What's up, world!'\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_049f73f3629b575100691c9556e2748195b1837977bcee56d7\",\"object\":\"response\",\"created_at\":1763480918,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_049f73f3629b575100691c9556e2748195b1837977bcee56d7\",\"object\":\"response\",\"created_at\":1763480918,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"iSjZmZX6xg7EZ7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"wKluyr\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"h92NLaEziBkfw\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"z9Bc0yQtYTRT7t\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"20ib0YVVjjTD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"BYPGGUsr8wGd4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"V0hAA9VcM6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"MExbT2vNOvWY4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"yYBcB1qW1LOBJn\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"9kvQRLLrt62GL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"fpediV7gMwQsy\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"vEMiNltUGX7EqXa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"63f4ZmXNnW72q1v\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"fAfRHbrkSL9D4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"holA9DwjGYs\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"j6ovobZrUdogz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"Dubo3ZmrfUQ7C55\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"h\",\"logprobs\":[],\"obfuscation\":\"rRGCyEOnLHbvDai\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"jdWe0r3OslGJWXY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"W6lWAFyURmQ9fwi\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"What's\",\"logprobs\":[],\"obfuscation\":\"RTZQKu9lM7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\" up\",\"logprobs\":[],\"obfuscation\":\"J4mHd8EmGzSZV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"kdbh90z6gjm47iC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\" world\",\"logprobs\":[],\"obfuscation\":\"zpY5oAJX6v\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"PqGvqEwrTs2GH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"h\",\"logprobs\":[],\"obfuscation\":\"TaN6uzRxR1oulTT\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"SGbWxAvX8KmPJqz\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"uWcJXUdW7gO0LZc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"6lP7vDhggp9iwU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"iH2fHrDizgSQbz\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":34,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":35,\"item_id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":36,\"output_index\":0,\"item\":{\"id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":37,\"response\":{\"id\":\"resp_049f73f3629b575100691c9556e2748195b1837977bcee56d7\",\"object\":\"response\",\"created_at\":1763480918,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_049f73f3629b575100691c95573b0c8195a132efec0214b101\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":782,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":31,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":813},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block type and content_1_9b630368d36a8a4420b20bd1e82e455d.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block type and content_1_9b630368d36a8a4420b20bd1e82e455d.json
deleted file mode 100644
index f5315a9b75..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block type and content_1_9b630368d36a8a4420b20bd1e82e455d.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make the first paragraph a heading and update the content to 'What's up, world!'\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7d94cd88193994024827f80e0e30193d8dfaaaa64eb\",\"object\":\"response\",\"created_at\":1758783449,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7d94cd88193994024827f80e0e30193d8dfaaaa64eb\",\"object\":\"response\",\"created_at\":1758783449,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"JaPHwKWdZiLGsB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"7qtQyp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"no9WCoWRQSMCB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"LRGDJyc4BHba1r\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"Mwp7JiwUkI0j\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"YdNygHqJPHoIG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"IdWjLAIaGH\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"Pm7CjjsBgCMsD\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"xdW7t3lgXe4uVp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"PxX5aeYaKtnlc\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"JXrKpzZEPL08E\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"RuxiCI0Y9mEyeDX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"hxytsvmCpPesKet\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"3ceC3oo22XeYY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"bxSISuobjZP\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"hXHMxyB056Ddu\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"T27vXbQC6fLKKDx\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"h\",\"logprobs\":[],\"obfuscation\":\"HBzjfbvPvDDRGsL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"Rxgzr74zqGonAlM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"WNahizdnmjLb7rj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"What's\",\"logprobs\":[],\"obfuscation\":\"Z6lvdcEHFp\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\" up\",\"logprobs\":[],\"obfuscation\":\"FlBZxXygErVxd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"5xQyTYx94GLFeiV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\" world\",\"logprobs\":[],\"obfuscation\":\"QBJyuKzhkU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"S6IvXkcqPbC2a\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"h\",\"logprobs\":[],\"obfuscation\":\"yr9BfIfTMD9iHmY\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"QUVSwrWlsScC04E\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"8UDfGgGChiMQ6I5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":32,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"7g64n49vrKkChU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":33,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"ej2w1lU1hqsLkl\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":34,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":35,\"item_id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":36,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":37,\"response\":{\"id\":\"resp_68d4e7d94cd88193994024827f80e0e30193d8dfaaaa64eb\",\"object\":\"response\",\"created_at\":1758783449,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e7d9b0f8819391e38546040fb3820193d8dfaaaa64eb\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":735,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":31,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":766},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block type_1_5da70d5932f66c0ba6f5b15bbb05f68e.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block type_1_5da70d5932f66c0ba6f5b15bbb05f68e.json
deleted file mode 100644
index 574c51e753..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block type_1_5da70d5932f66c0ba6f5b15bbb05f68e.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make the first paragraph a heading\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e815a4b48195a51d7f2b7f49bf6c030f7edaa340d14a\",\"object\":\"response\",\"created_at\":1758783509,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e815a4b48195a51d7f2b7f49bf6c030f7edaa340d14a\",\"object\":\"response\",\"created_at\":1758783509,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"VmDGwf4HSuzVva\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"y8FRvC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"3ogNdk6X3KbO8\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"gKeGPcPUQ87XK6\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"zu7sf1lV84ZV\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"WvL9F8VV5pvgZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"n9diDqxIBg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"y3cPQoEBomlNj\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"IqgKVO9QXxXZLQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"97skeqZP6wquR\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"YEY5Bsh8r4HE5\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"vGq1xxkra6MWSQa\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"RZQOlpXmQGojNI4\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"Q5Wm4GT5hshun\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"H4C1xoLA3nk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"mEaJZJNbTNgDZ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"NG1IQE3GGseOJUE\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"h\",\"logprobs\":[],\"obfuscation\":\"vcBhGdvI2LG4pX7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"ulJcH3ESu3docNG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\">Hello\",\"logprobs\":[],\"obfuscation\":\"nHbeoSJwrb\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"UJssklW2U77FX2v\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\" world\",\"logprobs\":[],\"obfuscation\":\"rwSgLSYpYd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"xv2ku5DaeT8yW\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"h\",\"logprobs\":[],\"obfuscation\":\"ETkeGIbeEQVhhI9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"CD3XXoCwFYMmftm\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"W2yJSwhq6FRwxRX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"cjKvqvAJXKfx3C\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"WIBLGx16kMRuO5\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":32,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":33,\"item_id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":34,\"output_index\":0,\"item\":{\"id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":35,\"response\":{\"id\":\"resp_68d4e815a4b48195a51d7f2b7f49bf6c030f7edaa340d14a\",\"object\":\"response\",\"created_at\":1758783509,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_68d4e81613148195bfc8c32f917d82d2030f7edaa340d14a\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":724,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":29,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":753},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block type_1_77c40f25fadd092d83b41c87d2b21055.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block type_1_77c40f25fadd092d83b41c87d2b21055.json
new file mode 100644
index 0000000000..42568314f2
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming + generateObject)/update block type_1_77c40f25fadd092d83b41c87d2b21055.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make the first paragraph a heading\"}]}],\"text\":{\"format\":{\"type\":\"json_schema\",\"strict\":false,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]}}},\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_07089caf7313766500691c9554ab7481939a51b7ade0d0a76c\",\"object\":\"response\",\"created_at\":1763480916,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_07089caf7313766500691c9554ab7481939a51b7ade0d0a76c\",\"object\":\"response\",\"created_at\":1763480916,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"}}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"sequence_number\":3,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":4,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"n8pyneVYuq6bkO\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"operations\",\"logprobs\":[],\"obfuscation\":\"HEyEZg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":6,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":[\",\"logprobs\":[],\"obfuscation\":\"x0LbbY60zM6zF\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":7,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"{\\\"\",\"logprobs\":[],\"obfuscation\":\"bhGgl8ZLltuIn2\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":8,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"type\",\"logprobs\":[],\"obfuscation\":\"gyuZWNJycNo9\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":9,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"3SpCFohuUpuqC\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":10,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"update\",\"logprobs\":[],\"obfuscation\":\"fteFTrRhlX\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":11,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"fEtlU2eLqgC4f\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":12,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"id\",\"logprobs\":[],\"obfuscation\":\"KDnMyAGomkepKA\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":13,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"aXEuxQ4Z05nSe\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":14,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"ref\",\"logprobs\":[],\"obfuscation\":\"dOWB42snyeyPL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":15,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"j0fcKQCEDjEiaeG\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":16,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"$\",\"logprobs\":[],\"obfuscation\":\"PW9cVNhHXcBORMN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":17,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\",\\\"\",\"logprobs\":[],\"obfuscation\":\"Bfc7WBDG9ZjWB\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":18,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"block\",\"logprobs\":[],\"obfuscation\":\"PDtTW9li2wL\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":19,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\":\\\"\",\"logprobs\":[],\"obfuscation\":\"LkMgQDmabQ3vg\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":20,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"<\",\"logprobs\":[],\"obfuscation\":\"VdYvDJgF95G3jN7\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":21,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"h\",\"logprobs\":[],\"obfuscation\":\"T1hx2lfVO05mGzd\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":22,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"kNePOMq6YgeCrUt\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":23,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\">Hello\",\"logprobs\":[],\"obfuscation\":\"OQxfhqpMrN\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":24,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\",\",\"logprobs\":[],\"obfuscation\":\"TwK0GMIYe30VgjM\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":25,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\" world\",\"logprobs\":[],\"obfuscation\":\"p2YGjPAxFk\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":26,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"!\",\"logprobs\":[],\"obfuscation\":\"9dk801ufaTXuQ\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":27,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"h\",\"logprobs\":[],\"obfuscation\":\"h9UHIVjnsEwEb7m\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":28,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"1\",\"logprobs\":[],\"obfuscation\":\"aE8bUjWkQnGhGXK\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":29,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\">\",\"logprobs\":[],\"obfuscation\":\"qF5mUsIgXf5NpBU\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":30,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"\\\"}\",\"logprobs\":[],\"obfuscation\":\"6ACeigkW1bSt0b\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":31,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"delta\":\"]}\",\"logprobs\":[],\"obfuscation\":\"zmKq0T9EsFJ3pa\"}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"sequence_number\":32,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"logprobs\":[]}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"sequence_number\":33,\"item_id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"output_index\":0,\"content_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":34,\"output_index\":0,\"item\":{\"id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}],\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":35,\"response\":{\"id\":\"resp_07089caf7313766500691c9554ab7481939a51b7ade0d0a76c\",\"object\":\"response\",\"created_at\":1763480916,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"msg_07089caf7313766500691c95550f8881938cafb9af221a291b\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":771,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":29,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":800},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/clear block formatting_1_09ce4ed21f35db11e7e8abc53d8e897c.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/clear block formatting_1_09ce4ed21f35db11e7e8abc53d8e897c.json
new file mode 100644
index 0000000000..2bab1a3314
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/clear block formatting_1_09ce4ed21f35db11e7e8abc53d8e897c.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"clear the formatting (colors and alignment)\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_08f100fb371f72f900691c959c4f448196b75b756f01d87b4d\",\"object\":\"response\",\"created_at\":1763480988,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_08f100fb371f72f900691c959c4f448196b75b756f01d87b4d\",\"object\":\"response\",\"created_at\":1763480988,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_28VlVzIrzNMkIrikgPLhvEY9\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"9s7Nrpr4tTC1BM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"9pILLM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"gFUio2c1YpyOa\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"tOWKKmrgjmrEjr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"tNuLf9tVHKyh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"Sx6j7KMuLKOnV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"1QGkwfkGaK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"OWTJmbtwU9RwK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"VTc9FeRbWf0wQp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"IMyJoNanRVpFB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"yieQHMY9QAjuW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"oj3uXVcOqlRSMSX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"wWWB24uUWj00NRV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"HN5cjME1qKt4j\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"SORLzMFfRcz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"1itEytMMXZcMk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"17srdF8w5YmgD8L\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"OtO16f7ssp0W4yR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"vMH4RsIJKchsIlE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"Colored\",\"obfuscation\":\"YIMsak2W4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\" text\",\"obfuscation\":\"Tq9uZpFoZHC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"OPhahwoXv4IWVo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"KZGPo0We0AHtH3L\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\">\\\"\",\"obfuscation\":\"w4suXobpaZSR4O\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"},{\\\"\",\"obfuscation\":\"mpRPG8GqtngT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"P4lfd8tXqt3y\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"3zk8ZAoXeNy0R\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"C9c58cOlRp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"wu8AD8w38xhxo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"P4ELTbeKiUmeaC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"DYhztRemHxakg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"WgiNkgErmvWZ5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"TOaZHtfrmH0F2y2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"CiO0wjr1tGuhdWb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"J6fiH73WnPrRL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"3os3L8Ar1nQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"4Mg2pw8RjkRLX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"YkGzfgUGvVTWl8J\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"BFPFX2hN8N7yg3B\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"RorVkkmFyRZHWiK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"Aligned\",\"obfuscation\":\"CuIzdhC7q\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\" text\",\"obfuscation\":\"GHiQuxfv9F7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"cxLztFxl0DIEa5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"5BkJJX6iFzDLACI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"UXPOLFDZExaSyyZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"0oq79vKai8uOqM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"aSZcdgZTqN7Q4z\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":50,\"item_id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":51,\"output_index\":0,\"item\":{\"id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]}\",\"call_id\":\"call_28VlVzIrzNMkIrikgPLhvEY9\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":52,\"response\":{\"id\":\"resp_08f100fb371f72f900691c959c4f448196b75b756f01d87b4d\",\"object\":\"response\",\"created_at\":1763480988,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_08f100fb371f72f900691c959d55ac8196b2837be585e2b3cb\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]}\",\"call_id\":\"call_28VlVzIrzNMkIrikgPLhvEY9\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":623,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":48,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":671},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/clear block formatting_1_ec9d93709e473574521d55108aa27f8f.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/clear block formatting_1_ec9d93709e473574521d55108aa27f8f.json
deleted file mode 100644
index 7bd27b670a..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/clear block formatting_1_ec9d93709e473574521d55108aa27f8f.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"clear the formatting (colors and alignment)\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7c97e508194915bb3eff6990b9b079ee81e68f75c1e\",\"object\":\"response\",\"created_at\":1758783433,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7c97e508194915bb3eff6990b9b079ee81e68f75c1e\",\"object\":\"response\",\"created_at\":1758783433,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_7uYUcjheTbm5Mzc14xd3ToSY\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"DOYXNazHwvpzVN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"FVSfJh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"RR2TLrdsHZbx4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"QbMl7G3yy61F20\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"Lz0Qj8TwrXDl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"MsU9bMNGzUMMT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"HY1omQstWa\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"1fB8t9J5hfOW4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"TIagU2czrszEP4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"WXZmpbnLF63bi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"mqDYtk2JVAgrU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"OtopZzIZRas3fBY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"WCzEICgMmxEF0o7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"WbNP4nob2zIYG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"7qUEG3aBKzh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"z9ETyashbS0sz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"lU596hUHW3aWsyV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"bqvngTE7NYRBIsV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"sBMHSpplCOKnvRY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"Colored\",\"obfuscation\":\"e6p8d3d25\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\" text\",\"obfuscation\":\"D515wasGoFB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"ARACVmnRgWC1Iz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"p5QyyHgAphg4FwA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\">\\\"\",\"obfuscation\":\"Tabz8rgYyjUu3K\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"},{\\\"\",\"obfuscation\":\"3iT2XbB9HjCv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"P7iGsRuin2tL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"nD1rgvZMjs2oa\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"DaQLON8POm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"0vjdtTVK3JFu7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"wQIOaC4iyHt1oJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"I0jXNE6sGV2nn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"M65D2vENSHwnS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"7lfaW0xyABg9qxc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"xebQ5BPSezDzhUr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"rzBpoETrXRKj5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"zV4GjilHb4M\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"10gaxcsPqRJNS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"i10TOmXPL7hRMGf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"XcGio6W1G8Huk7a\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"F1Ylrwl6cyhO95o\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"Aligned\",\"obfuscation\":\"pbMyqrVlT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\" text\",\"obfuscation\":\"qJqn3NQ4ZdG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"3dImYgBvjpKykk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"tzOciqh4Fc9vbfb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"OEbTTCx7tHt7JUy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"26M1Sb0kMwzxz7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"Fe1niifp4GJQU8\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":50,\"item_id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":51,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]}\",\"call_id\":\"call_7uYUcjheTbm5Mzc14xd3ToSY\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":52,\"response\":{\"id\":\"resp_68d4e7c97e508194915bb3eff6990b9b079ee81e68f75c1e\",\"object\":\"response\",\"created_at\":1758783433,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e7ca0a14819489bdd6dae452bf5d079ee81e68f75c1e\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Colored text
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Aligned text
\\\"}]}\",\"call_id\":\"call_7uYUcjheTbm5Mzc14xd3ToSY\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":576,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":48,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":624},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/drop mark and link and change text within mark_1_1072f99168883f64e55663c24b1b0a0d.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/drop mark and link and change text within mark_1_1072f99168883f64e55663c24b1b0a0d.json
new file mode 100644
index 0000000000..a4c9b8ca24
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/drop mark and link and change text within mark_1_1072f99168883f64e55663c24b1b0a0d.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"change the last paragraph to 'Hi, world! Bold the text. Link.' without any markup like bold or link\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_012591fadb07795e00691c95954e948195aac2efac2b4b7140\",\"object\":\"response\",\"created_at\":1763480981,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_012591fadb07795e00691c95954e948195aac2efac2b4b7140\",\"object\":\"response\",\"created_at\":1763480981,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_SO5hcTHWVdgtcpsta12rsWPX\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"kGD5APywpHZirL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"YZAafT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"hIzgTRcUvsnrK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"Yn0YofRHVR6dZq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"Yocqm537Bc1K\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"fEA8txNePVHtF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"gQhWnprWE3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"Qg93xgx2Ts9gy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"5UMWwNOh2WS8lN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"0oJsexDiCd7Xh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"jhLtMWDeWekxS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"3\",\"obfuscation\":\"Hf5zOOEDpXdQwV2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"l5lEbn02ILBTe47\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"ilbvTuqbIcEcL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"2adNTP8JiiS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"NwHZYg7v1xDCF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"HCZrYYIGZjzscne\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"p3KY5RHn5aSIxZD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"4C9GdbEoVNqXKe5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"Hi\",\"obfuscation\":\"B3IrMsZjtklXIl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"huTuiatJ8eoy1cq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\" world\",\"obfuscation\":\"zzm8FYe5nt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"4iqPOVsO3WPrkm2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\" Bold\",\"obfuscation\":\"t3Fs1MJaYFJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\" the\",\"obfuscation\":\"vycDDKDoI3fy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\" text\",\"obfuscation\":\"uDh1S8Df5ty\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\".\",\"obfuscation\":\"e6OfBVKQzt6p7kZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\" Link\",\"obfuscation\":\"MD00ycUl6lS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\".\",\"obfuscation\":\"uvyzFrOAA0wvx\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"EZ7zFrmPw3xfbvS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"O4JQdfRoKJgYQLY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"S5ozncFow9rKEO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"IZnHFhURwtz3E5\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":36,\"item_id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hi, world! Bold the text. Link.
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":37,\"output_index\":0,\"item\":{\"id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hi, world! Bold the text. Link.
\\\"}]}\",\"call_id\":\"call_SO5hcTHWVdgtcpsta12rsWPX\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":38,\"response\":{\"id\":\"resp_012591fadb07795e00691c95954e948195aac2efac2b4b7140\",\"object\":\"response\",\"created_at\":1763480981,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_012591fadb07795e00691c959619608195b22f946dd614512d\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hi, world! Bold the text. Link.
\\\"}]}\",\"call_id\":\"call_SO5hcTHWVdgtcpsta12rsWPX\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":725,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":34,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":759},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/drop mark and link and change text within mark_1_6b7b58db82605ee0f2fe5146738274dd.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/drop mark and link and change text within mark_1_6b7b58db82605ee0f2fe5146738274dd.json
deleted file mode 100644
index 8779859b4b..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/drop mark and link and change text within mark_1_6b7b58db82605ee0f2fe5146738274dd.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"change the last paragraph to 'Hi, world! Bold the text. Link.' without any markup like bold or link\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7c416e081959e065d60afcdf69f0192aa29218205d7\",\"object\":\"response\",\"created_at\":1758783428,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7c416e081959e065d60afcdf69f0192aa29218205d7\",\"object\":\"response\",\"created_at\":1758783428,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_IhgKnZvAjlwVeWSLnl4heN5H\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"fQSLaVKeEqffQS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"RhYsKt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"fuy2BDKcNpAnF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"DhpNVmAqoMon8I\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"3ONC5naGbuAI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"NtelIhyiBKlSu\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"aUnxISkBV7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"635ao6ZcS9tMJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"xSbdkpBbMowI3H\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"ANZ14XufPD2Ch\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"O3vjBrju82HXd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"3\",\"obfuscation\":\"P2RqBa8mbboo0NX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"UxuxtTD7peZvDmp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"Dd6HVf2bn5ges\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"3N34eMnNC2T\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"1LYWrWvWlarq2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"T0vXsgdghlBwYTv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"BbELTbhK4vAfOyp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"WMyMEZKgiw4Zt8H\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"Hi\",\"obfuscation\":\"GgC9UzSc7nbS5D\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"Wm2TZHDf8dUEAlv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\" world\",\"obfuscation\":\"9luylSK8uo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"pRiIphKZUBtvXdr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\" Bold\",\"obfuscation\":\"olDN9XStYA5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\" the\",\"obfuscation\":\"s2BjYF30YnDC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\" text\",\"obfuscation\":\"yzy1t1mh1qt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\".\",\"obfuscation\":\"jv09MrYnNFuafKN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\" Link\",\"obfuscation\":\"PGDXn3B4ceR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\".\",\"obfuscation\":\"pU2k7RnXq2ZZT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"RdGC6VTTfuzjdOl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"f8inSi8BTk4RCda\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"Nv6r1iLRbevXrN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"ONpadcgC1RVPd7\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":36,\"item_id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hi, world! Bold the text. Link.
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":37,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hi, world! Bold the text. Link.
\\\"}]}\",\"call_id\":\"call_IhgKnZvAjlwVeWSLnl4heN5H\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":38,\"response\":{\"id\":\"resp_68d4e7c416e081959e065d60afcdf69f0192aa29218205d7\",\"object\":\"response\",\"created_at\":1758783428,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e7c4b22881958d65144506382a0b0192aa29218205d7\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hi, world! Bold the text. Link.
\\\"}]}\",\"call_id\":\"call_IhgKnZvAjlwVeWSLnl4heN5H\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":678,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":34,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":712},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/drop mark and link_1_4fa98468d00af0302fb35faba6aa2823.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/drop mark and link_1_4fa98468d00af0302fb35faba6aa2823.json
deleted file mode 100644
index 1736e61ce2..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/drop mark and link_1_4fa98468d00af0302fb35faba6aa2823.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"remove the formatting (turn into plain text without styles or urls) from the last paragraph\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7c209788190b1c468619a2ba8b40b82d96a38c09de8\",\"object\":\"response\",\"created_at\":1758783426,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7c209788190b1c468619a2ba8b40b82d96a38c09de8\",\"object\":\"response\",\"created_at\":1758783426,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_zCzplkezxhGPMXxnJ8jy9ar4\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"wjYM8DNZ8SVOiS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"8pqizI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"6jt2AG6ssByiH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"koxSep2ucHZQ02\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"UgNbPPAzaXx5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"m8hkREmELvQDU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"pJAOmIM0cm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"2Y0gAlqGIr715\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"2wMWoYqHTCsue7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"7S5EGLC9T2Msi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"iT9XbhVl7EJsw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"3\",\"obfuscation\":\"EhvzoumZwu9O2GL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"AR6oKKi7lG7XuwX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"S8ItXIa9cZ0h7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"8n2L59MxHXx\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"hDSqtEMm5LGGi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"m3NrnFKgEPUvpWs\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"KKar4dpc4Ya9Mni\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\">Hello\",\"obfuscation\":\"ARoLTIMjDZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"t3xE45gTyJCjgUn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\" world\",\"obfuscation\":\"6fMpgCMaKj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"HHGO1rGonKb23aJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\" Bold\",\"obfuscation\":\"rmR5gQiN9wT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\" text\",\"obfuscation\":\"VtjphqJ5HtG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\".\",\"obfuscation\":\"vXUFdBiuMgu55uf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\" Link\",\"obfuscation\":\"XMTVgQogqFu\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\".\",\"obfuscation\":\"R7nO2H12Woggi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"hFPyyXKEaQBnAZl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"3gAhf8KyNJDGLBD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"bQjBKaKDxU1DPM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"iNaFMRfsG3vfOW\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":34,\"item_id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":35,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]}\",\"call_id\":\"call_zCzplkezxhGPMXxnJ8jy9ar4\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":36,\"response\":{\"id\":\"resp_68d4e7c209788190b1c468619a2ba8b40b82d96a38c09de8\",\"object\":\"response\",\"created_at\":1758783426,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e7c371b8819080aa156eb943c2540b82d96a38c09de8\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]}\",\"call_id\":\"call_zCzplkezxhGPMXxnJ8jy9ar4\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":672,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":32,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":704},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/drop mark and link_1_d0d892fae6bedce4f397e9e70a26c548.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/drop mark and link_1_d0d892fae6bedce4f397e9e70a26c548.json
new file mode 100644
index 0000000000..e706af5ffa
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/drop mark and link_1_d0d892fae6bedce4f397e9e70a26c548.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"remove the formatting (turn into plain text without styles or urls) from the last paragraph\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0d797e89733f697f00691c95940d84819399bf7e32e0631c78\",\"object\":\"response\",\"created_at\":1763480980,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0d797e89733f697f00691c95940d84819399bf7e32e0631c78\",\"object\":\"response\",\"created_at\":1763480980,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_Ky6GTErt4b1h1wGc0c4CV7Nn\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"mGaDnadDZeYR90\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"0RA0ML\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"NFMNVzyTsVyxP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"HEjRCrltsbdFeh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"uXwBEvtsfbiv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"vH0hshTmNG5vv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"9WxT36fb0w\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"BCaCDnS7DkXw9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"rxMefOn6JvuFt3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"lxa9bADIsD927\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"jKJvBr39F4D4i\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"3\",\"obfuscation\":\"UjGLKACfyXY7kt7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"txh28d6GBlFLDGU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"CrYXUnJvVQ8xK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"3rhJiOHUcvO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"zbOZTjzmhnjsP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"1Ya0DWi7thuhY5Y\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"4p63SNkQc9ca9Hm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\">Hello\",\"obfuscation\":\"pFdJynoBaL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"jV5IgZHmcmK9GJI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\" world\",\"obfuscation\":\"DhfJbXu3rw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"jWNzephu2SpJYeB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\" Bold\",\"obfuscation\":\"N0031rRDNEz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\" text\",\"obfuscation\":\"ZBUG2plLkCG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\".\",\"obfuscation\":\"b9TkxVzomL23aCM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\" Link\",\"obfuscation\":\"kJiEh7LWi2x\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\".\",\"obfuscation\":\"yAEbBL356z3Tv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"WgCx21XCX1bNTbl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"AznSuNzCFauLXC1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"mQZ5XIRswWBuI7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"o08nTc4zHc2Tiv\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":34,\"item_id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":35,\"output_index\":0,\"item\":{\"id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]}\",\"call_id\":\"call_Ky6GTErt4b1h1wGc0c4CV7Nn\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":36,\"response\":{\"id\":\"resp_0d797e89733f697f00691c95940d84819399bf7e32e0631c78\",\"object\":\"response\",\"created_at\":1763480980,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_0d797e89733f697f00691c959484408193825a69d39ec9faab\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]}\",\"call_id\":\"call_Ky6GTErt4b1h1wGc0c4CV7Nn\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":719,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":32,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":751},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/modify nested content_1_dd6cb439703f9c3f9bad5e2cc1a911c2.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/modify nested content_1_dd6cb439703f9c3f9bad5e2cc1a911c2.json
new file mode 100644
index 0000000000..62ca74507f
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/modify nested content_1_dd6cb439703f9c3f9bad5e2cc1a911c2.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make apples uppercase\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0317957f26fe330700691c959888b4819696ff12fee2a3874a\",\"object\":\"response\",\"created_at\":1763480984,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0317957f26fe330700691c959888b4819696ff12fee2a3874a\",\"object\":\"response\",\"created_at\":1763480984,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_QJRYYmRq251Xbt4AE2PCDDYp\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"KhjSbotJ93z5xf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"mwisLT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"wQ50YDkx82MSv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"9BrS02VnBdvBgR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"fE3RpAEvZo7j\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"0jD5QdqgZpdIZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"hyA27e9T5P\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"0bBbFxO9TNu39\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"Ee2NXEhzii6zoQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"jVP94CMgQDAhO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"guxVyQAmNo7fQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"PjAY87huTunVdad\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"eU8K5lv4fI82M0V\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"WTEDa9delVSPQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"z5y6HDhvgk8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"lFI17dCy6zb9o\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"kcHgWE3F1edqLZA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"2gjDp9Sizl1QUJY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"JHkLPps6ioypc52\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"APP\",\"obfuscation\":\"IjuSds9qiTQ9l\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"LES\",\"obfuscation\":\"iDNLRIylcMl9R\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"2Ye930N3vRE1uX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"9L4RvVrA8NLEqMY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"S0iDpFfxIQmp1Ds\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"6RswfDsCrMp2Fb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"ajQqLqL9QPjflG\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":29,\"item_id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"APPLES
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":30,\"output_index\":0,\"item\":{\"id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"APPLES
\\\"}]}\",\"call_id\":\"call_QJRYYmRq251Xbt4AE2PCDDYp\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":31,\"response\":{\"id\":\"resp_0317957f26fe330700691c959888b4819696ff12fee2a3874a\",\"object\":\"response\",\"created_at\":1763480984,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_0317957f26fe330700691c959981d08196a92f3c04c235cdb2\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"APPLES
\\\"}]}\",\"call_id\":\"call_QJRYYmRq251Xbt4AE2PCDDYp\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":584,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":27,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":611},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/modify nested content_1_e761f6071dd9550f02555f17668007d5.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/modify nested content_1_e761f6071dd9550f02555f17668007d5.json
deleted file mode 100644
index 894e0e6687..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/modify nested content_1_e761f6071dd9550f02555f17668007d5.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make apples uppercase\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7c6faec8194afb8e84a52706f6809453c9aa044804a\",\"object\":\"response\",\"created_at\":1758783431,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7c6faec8194afb8e84a52706f6809453c9aa044804a\",\"object\":\"response\",\"created_at\":1758783431,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_Yo8W1F9UTV4pBEAjkN6dVaN4\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"LzpT60ChydIkJm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"gSQmdP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"hikgGFA6Lcanb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"hIzEnhkvmYJwaH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"2bTQODMebGQy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"VSyDI51Jkuouh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"mF6PdY6mK2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"9hv3DdNUJjEdY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"6O5hkyZeynhs80\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"weVAF5D4marXd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"Deo5v1q4lClck\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"JmLjZwEu0XWAgz6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"fpZ2BL6RprOobkN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"UT2a9UYKIk2qL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"ciV9RW04g6C\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"eD2eUMAs3h4dC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"nVftop0ZHI2yFxK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"1nCtR0GpLLpBZTT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"jfXJElfTNLgMexs\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"APP\",\"obfuscation\":\"YTjXytjVxfD5E\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"LES\",\"obfuscation\":\"D7z8pX74VeApQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"QsjOW1PBwluc9F\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"veoQ8rYcQUSx7n3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"omz6nj6B1g77Hnn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"pS1IZTCgMHC3BD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"Xv9sYmBRDDkNSJ\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":29,\"item_id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"APPLES
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":30,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"APPLES
\\\"}]}\",\"call_id\":\"call_Yo8W1F9UTV4pBEAjkN6dVaN4\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":31,\"response\":{\"id\":\"resp_68d4e7c6faec8194afb8e84a52706f6809453c9aa044804a\",\"object\":\"response\",\"created_at\":1758783431,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e7c7896881948a656edae7e1b15209453c9aa044804a\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"APPLES
\\\"}]}\",\"call_id\":\"call_Yo8W1F9UTV4pBEAjkN6dVaN4\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":537,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":27,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":564},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/modify parent content_1_3a1e3c71094e24988b7f754e1d329f94.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/modify parent content_1_3a1e3c71094e24988b7f754e1d329f94.json
new file mode 100644
index 0000000000..c10f95a9c1
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/modify parent content_1_3a1e3c71094e24988b7f754e1d329f94.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make the first paragraph uppercase\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0ea4f5b055d5b69000691c959ab56c81968e4be2db2a199ec3\",\"object\":\"response\",\"created_at\":1763480986,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0ea4f5b055d5b69000691c959ab56c81968e4be2db2a199ec3\",\"object\":\"response\",\"created_at\":1763480986,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_rV74DL77GLjEvDzffJIYpznL\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"sxz7kCiEwy3OcL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"whQjlO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"0ZxYxrvIW1eos\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"5Cr8EjlzYr9htr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"k1F2qAGgA4Xb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"KDGxcl3RL8y6q\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"mNhSqiuDl1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"hEAFwMlBO8mSi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"OwLhzVLpEN8dIm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"zssL58trHtZui\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"eWQursptdK4VS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"JwyxsWY3RCxAezx\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"4J2jiCAfTmoNosi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"sjuE8qyYdhviU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"CTQIafXKJzl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"v6TeuoLHPyZuw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"ZMFS21xVqahVks9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"UyKHHXzwWioSDXt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\">I\",\"obfuscation\":\"qKXSALeDqCoU45\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\" NEED\",\"obfuscation\":\"caCljHz83m0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\" TO\",\"obfuscation\":\"iaROe7mI02P8H\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\" BUY\",\"obfuscation\":\"eUWinBzDaZpH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\":\",\"obfuscation\":\"kfMPQB307XHH8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"XPkDt6QTj4c0ITH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"w9FWe2KORGQDhAg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"hfXUmkecENlBjf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"JF2ltSp9eYH7Kf\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":30,\"item_id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I NEED TO BUY:
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":31,\"output_index\":0,\"item\":{\"id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I NEED TO BUY:
\\\"}]}\",\"call_id\":\"call_rV74DL77GLjEvDzffJIYpznL\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":32,\"response\":{\"id\":\"resp_0ea4f5b055d5b69000691c959ab56c81968e4be2db2a199ec3\",\"object\":\"response\",\"created_at\":1763480986,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_0ea4f5b055d5b69000691c959b02c88196a17ecd28bbb0e837\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I NEED TO BUY:
\\\"}]}\",\"call_id\":\"call_rV74DL77GLjEvDzffJIYpznL\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":586,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":28,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":614},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/modify parent content_1_57bc2951494344f4cd0062fefce14e5f.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/modify parent content_1_57bc2951494344f4cd0062fefce14e5f.json
deleted file mode 100644
index b9961a59e7..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/modify parent content_1_57bc2951494344f4cd0062fefce14e5f.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make the first paragraph uppercase\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7c85de48197a314d6f4e02d1a31003fbc2ce4859621\",\"object\":\"response\",\"created_at\":1758783432,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7c85de48197a314d6f4e02d1a31003fbc2ce4859621\",\"object\":\"response\",\"created_at\":1758783432,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_2AD1IkbV4zg93r9k4mOSEMOB\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"BV8G0CKI9FnpY8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"CE4rm1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"yI1EUxenxYJks\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"752oXa3mxe9YIZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"qjYqNfQxazRz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"zr0tWLLKNAJj8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"LoAW6PjiRO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"O20cRWW4jePXz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"Vzk79WbbGLK0Ij\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"hiQcEiWAhH0MK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"7ZKM5qGb3QsbQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"6ioc5HJt9ABzXy7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"LqveK4x4gSjXQO9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"7EnlAVUNZ6wIy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"EHvwtpjAzCp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"c3kWcnsvZk2AH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"hQwIEW6muQtEJSz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"ESgltTrdB4JaRjR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\">I\",\"obfuscation\":\"6KHmoVVaP3urru\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\" NEED\",\"obfuscation\":\"SPbZVTJry5u\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\" TO\",\"obfuscation\":\"AXwOQ5TENLuIw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\" BUY\",\"obfuscation\":\"6m1f8tPPwkF3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\":\",\"obfuscation\":\"ju0PqyN2UebTO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"PbSaEafcJIGiQGl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"ijnM3vnoK0wNyWd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"nN6fp0CqMn8In2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"LXlSxvoasj8D2P\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":30,\"item_id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I NEED TO BUY:
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":31,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I NEED TO BUY:
\\\"}]}\",\"call_id\":\"call_2AD1IkbV4zg93r9k4mOSEMOB\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":32,\"response\":{\"id\":\"resp_68d4e7c85de48197a314d6f4e02d1a31003fbc2ce4859621\",\"object\":\"response\",\"created_at\":1758783432,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e7c8e2d48197a90b912f29809c22003fbc2ce4859621\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"I NEED TO BUY:
\\\"}]}\",\"call_id\":\"call_2AD1IkbV4zg93r9k4mOSEMOB\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":539,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":28,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":567},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/plain source block, add mention_1_19d556214c5ef684a2c65e3a08f14ba1.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/plain source block, add mention_1_19d556214c5ef684a2c65e3a08f14ba1.json
new file mode 100644
index 0000000000..3b5d2e737d
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/plain source block, add mention_1_19d556214c5ef684a2c65e3a08f14ba1.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"Change the first paragraph to Hello, Jane Doe! (use a mention)\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0efcf5d75b2bbf8e00691c95902be88196bd3bbaf9e7601bda\",\"object\":\"response\",\"created_at\":1763480976,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0efcf5d75b2bbf8e00691c95902be88196bd3bbaf9e7601bda\",\"object\":\"response\",\"created_at\":1763480976,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_Qx5G5oj1EtU7zvEUuPCP4fnT\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"rv9N2Bjg8e4fuL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"AzC9JB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"ccaU74lOnfnaY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"tdhSdtOZZeojEh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"q296089aQRHF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"Ci0wFLhdCHsJd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"XcVqIHQtby\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"C64BpliW1RsxI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"6Yt6jijIo2xV1N\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"46PwAQHOoWAow\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"8v0wRFxYamtYP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"jePHnxVRdx933Jc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"aOueHXYrhQMAFUT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"XDqve70qBTQ8q\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"HY0pTIrLtXZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"6q4uTkJYBsu2o\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"rGdOdqCrBBJU0FY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"1wFd3iR3ExjXlUo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\">Hello\",\"obfuscation\":\"srqfVzVkUi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"AZp5vbmqUUYLPSJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"7ZU9jHlZMw87T8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"LdnTb7XqRg4s\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"yA0HCsNsvbv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"-inline\",\"obfuscation\":\"ddXhNvtnk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"-content\",\"obfuscation\":\"Nlehnu22\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"-type\",\"obfuscation\":\"jQMlUlzQkNp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"lwY44cgfrVo6K\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"mention\",\"obfuscation\":\"w1ivORFUF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"NMFm4iNjf5BOpM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"k2I1VhMEISc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"-user\",\"obfuscation\":\"vbwkTVlfs1P\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"Whbkw92zVbZwx\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"Jane\",\"obfuscation\":\"ReDWIaTVBsZU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\" Doe\",\"obfuscation\":\"F61C7Gvc0wcb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"UqfunW9t2KZJc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"@\",\"obfuscation\":\"QOULW8mQzJhtQZY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"Jane\",\"obfuscation\":\"Br9RWhaRVOBt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\" Doe\",\"obfuscation\":\"xKNuTmaoF5hk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"fsEDQ6ZiGJMRZR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"FDMklUZDp10O\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"cjUlpwAgMMdWQLy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"zXpGOFNJLj9v2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"dtd5PBHdhfHKdW4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"aM2YcyRBYSXbcEd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"PfmXMkWIexdRIZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"0PeKkesh1RLlhP\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":49,\"item_id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, @Jane Doe!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":50,\"output_index\":0,\"item\":{\"id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, @Jane Doe!
\\\"}]}\",\"call_id\":\"call_Qx5G5oj1EtU7zvEUuPCP4fnT\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":51,\"response\":{\"id\":\"resp_0efcf5d75b2bbf8e00691c95902be88196bd3bbaf9e7601bda\",\"object\":\"response\",\"created_at\":1763480976,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_0efcf5d75b2bbf8e00691c9590b6e88196b354c46dd9f08ae9\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, @Jane Doe!
\\\"}]}\",\"call_id\":\"call_Qx5G5oj1EtU7zvEUuPCP4fnT\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":717,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":47,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":764},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/plain source block, add mention_1_88263a5a62758f9c809abbab15d1c4c7.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/plain source block, add mention_1_88263a5a62758f9c809abbab15d1c4c7.json
deleted file mode 100644
index 846fa19198..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/plain source block, add mention_1_88263a5a62758f9c809abbab15d1c4c7.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"Change the first paragraph to Hello, Jane Doe! (use a mention)\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7c04c5c819680d658e91411061d0c034431db0f47e4\",\"object\":\"response\",\"created_at\":1758783424,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7c04c5c819680d658e91411061d0c034431db0f47e4\",\"object\":\"response\",\"created_at\":1758783424,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_qPN1zoeuhw9ZcTWtMsxkfPlm\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"n0uKm761ELuwAu\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"Nb3Cmn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"TfqyHLL5nmcux\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"IF3nJHQe3F0Ngw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"y510XEVW0KlU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"LlR0PGGEtZ2iq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"NHfrj9mUkj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"WZgMdgjAKHK9u\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"ZHlbCsDFLO80jn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"yY1fbVFVpaxR5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"QK8WYIPleZhtW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"zAkR3buewZPBPIY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"aCkXlvbrtphv9jP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"9SSzsjVCVr0cd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"E6pPjAOV1ij\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"XnUcuke4RhEKW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"YCm5cQo9mpAyEsL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"es3rb4Z5dBpm2hk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\">Hello\",\"obfuscation\":\"J3WsViohRm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"sy4BWX9UQygJWRC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"uga6WoPtFDLhR6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"emyVot4CZfcD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"HPAhRMM7agc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"-inline\",\"obfuscation\":\"HgHHD6TuB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"-content\",\"obfuscation\":\"CoVsOmnS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"-type\",\"obfuscation\":\"RI0nVgFvgwm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"SL8FOqtiamGIr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"mention\",\"obfuscation\":\"6fJd88VMT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"UZOJXqSh3skAKA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"oXMawxDAUdw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"-user\",\"obfuscation\":\"C4tOQ4y2vwq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"znalHhWpu35k5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"Jane\",\"obfuscation\":\"gyRAiHOmi2ps\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\" Doe\",\"obfuscation\":\"m4PxrQ0ytN0s\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"1IjQtM4medADJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"@\",\"obfuscation\":\"3sV4FeSfsqEZC8r\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"Jane\",\"obfuscation\":\"mVyY8y1ulldT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\" Doe\",\"obfuscation\":\"bxrCOgqxvmxi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"wRFYXfQYmZjp7Z\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"YyiUMg2eGnMP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"flYZ7DQGveh9xUH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"P2a8iJ6pSo1kp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"i48MwN78GqJliOM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"KrpICgg4WPExQ7W\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"rowbCNBx74C3gz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"suPo7Ndj70bAFA\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":49,\"item_id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, @Jane Doe!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":50,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, @Jane Doe!
\\\"}]}\",\"call_id\":\"call_qPN1zoeuhw9ZcTWtMsxkfPlm\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":51,\"response\":{\"id\":\"resp_68d4e7c04c5c819680d658e91411061d0c034431db0f47e4\",\"object\":\"response\",\"created_at\":1758783424,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e7c0c64c81968efd832ee8c1b0790c034431db0f47e4\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, @Jane Doe!
\\\"}]}\",\"call_id\":\"call_qPN1zoeuhw9ZcTWtMsxkfPlm\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":670,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":47,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":717},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/standard update_1_a68854dc4dee1520292cf8b8816d3bf1.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/standard update_1_a68854dc4dee1520292cf8b8816d3bf1.json
deleted file mode 100644
index 1e12a16314..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/standard update_1_a68854dc4dee1520292cf8b8816d3bf1.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"translate the first paragraph to german\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7b354c881979ef8ba1427829913045290fddb9c0443\",\"object\":\"response\",\"created_at\":1758783411,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7b354c881979ef8ba1427829913045290fddb9c0443\",\"object\":\"response\",\"created_at\":1758783411,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_wRLPVRNMYhaMq4eZreukSoe0\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"iEkemn1316OPGu\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"P4ZQ6n\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"VHJNZYtgLdmbu\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"87yefTLR0fdw91\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"nSyuKPsn6hpV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"I77AdV05NijRu\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"dSWTOWFOoP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"mIQhiX001ajTc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"XOzkTNeUrhsRzi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"PdwbFmTGV4z47\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"h5qI0qCpcqaPH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"zprLFlUrmgranBl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"rXwA8OaD831IMFo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"VoEUEbuD8L3yC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"WgDyb14RIsq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"D0PE5RXY5Ncm5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"2GoRVYwgB6bgZjc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"ZhNWr11ucaUSHih\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"QKvaUZ4cJzoN14J\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"Hallo\",\"obfuscation\":\"iHicBCshSyy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"Ck0WhUbFvBsxuDl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\" Welt\",\"obfuscation\":\"crdbrhQnckO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"c54AItgi1LsHe\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"f3bb0i7su1onUSz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"oBXbM3SsGR2vbRH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"4ARd2aVZjXahXB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"4fk2EFvjmtestl\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":30,\"item_id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, Welt!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":31,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, Welt!
\\\"}]}\",\"call_id\":\"call_wRLPVRNMYhaMq4eZreukSoe0\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":32,\"response\":{\"id\":\"resp_68d4e7b354c881979ef8ba1427829913045290fddb9c0443\",\"object\":\"response\",\"created_at\":1758783411,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e7b3ea188197b8617275fa2e4d87045290fddb9c0443\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, Welt!
\\\"}]}\",\"call_id\":\"call_wRLPVRNMYhaMq4eZreukSoe0\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":661,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":28,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":689},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/standard update_1_e0e15748dddab0b96d9367062c1ee445.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/standard update_1_e0e15748dddab0b96d9367062c1ee445.json
new file mode 100644
index 0000000000..0fee093fa4
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/standard update_1_e0e15748dddab0b96d9367062c1ee445.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"translate the first paragraph to german\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_033be982dff1c3ef00691c957b2e588193a746b51eaa03c673\",\"object\":\"response\",\"created_at\":1763480955,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_033be982dff1c3ef00691c957b2e588193a746b51eaa03c673\",\"object\":\"response\",\"created_at\":1763480955,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_xk9Eij2ey9JwiAk10ejdgV4B\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"MZ3hhR0Z9Fvx4O\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"NyhafQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"NNP5qwJX27CzT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"uu8k2vQXwpsUWk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"fU8NS9YnCNeR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"pnqFNDBpBfqtn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"gPC5sp89Gg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"wKoqfHQ3Wxx4N\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"1XX9xB6WpsBwMJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"kK28A0DhlUkEi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"rv60rDVtxlERE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"fpMslyIQu4qcgxO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"SmNSy9ag1DKPr5R\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"cMNDVOWqS71bj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"VN8TLlFesIb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"1K3VhOkDSwP5H\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"GmCwOkfdPDkwCH7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"vKlDdaw1UZD9W5O\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"YhJAROTXC8MAGZf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"Hallo\",\"obfuscation\":\"QFnWM4tdDWF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"f0LwHGFxJmrCIOJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\" Welt\",\"obfuscation\":\"aXJG6LERrjc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"RaBGLJc6aaiKv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"ZEqUnS83gHtS2d4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"82Ul9D6kLnh4hjU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"zrltF431iUGcGY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"z73BfbR4z7XkuF\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":30,\"item_id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, Welt!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":31,\"output_index\":0,\"item\":{\"id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, Welt!
\\\"}]}\",\"call_id\":\"call_xk9Eij2ey9JwiAk10ejdgV4B\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":32,\"response\":{\"id\":\"resp_033be982dff1c3ef00691c957b2e588193a746b51eaa03c673\",\"object\":\"response\",\"created_at\":1763480955,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_033be982dff1c3ef00691c957bbfe08193970a7caa0ce062cf\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hallo, Welt!
\\\"}]}\",\"call_id\":\"call_xk9Eij2ey9JwiAk10ejdgV4B\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":708,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":28,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":736},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mark_1_44bcd73901e9f2eef1a454db1dd3a05d.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mark_1_44bcd73901e9f2eef1a454db1dd3a05d.json
deleted file mode 100644
index 962c9f22a3..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mark_1_44bcd73901e9f2eef1a454db1dd3a05d.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"remove the bold style from the second block\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7bb11ec8197a6901dfcfc41013107331ba6cbe1f886\",\"object\":\"response\",\"created_at\":1758783419,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7bb11ec8197a6901dfcfc41013107331ba6cbe1f886\",\"object\":\"response\",\"created_at\":1758783419,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_mYohfXrIeAqjilUmF2pp5Llr\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"5pisvt0VwF0mvr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"7uJZF0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"AqxEWFHqdtf6a\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"10IalYfxQadqEF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"J1xUtbzxc7QE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"EGCIBcgE2jk8D\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"4nVyDtb3LL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"1JqY0gK8G0SK6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"Y7dlV76LOzTVWR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"SQuBlE00fEBH5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"fhhV9hcTJmGmC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"S1SRNFXABb8N8v3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"g5gGqcoFPBu6M5D\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"Dyrbr9eYedwdr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"56vBrPMQ2yN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"ySbxQYRVxwVUw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"aKLuwQWiPDFdX1G\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"JAVx487aqGyy66B\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\">Hello\",\"obfuscation\":\"kzZRMz1h1L\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"IiVHHNmpF69ZnaN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"aBoLs7X8O43ua1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"igCCqi317Zdj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"HnikedEJhm8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"-inline\",\"obfuscation\":\"whNP7H6c3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"-content\",\"obfuscation\":\"DcgfrqeO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"-type\",\"obfuscation\":\"MTruE5UbPQe\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"L45K4Xdq8fJsx\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"mention\",\"obfuscation\":\"m1Up5L8pp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"h64O4UypkC0yJ5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"jb7F1IeirEU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"-user\",\"obfuscation\":\"7qs2uSgMNuH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"sZq77doFEWoE9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"John\",\"obfuscation\":\"jz7hf7WfCV7n\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\" Doe\",\"obfuscation\":\"TPWlJn0actS9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"QEkwk3CRKzBIr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"@\",\"obfuscation\":\"NN26CPyzcqea3Pl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"John\",\"obfuscation\":\"9MPNyU8KTv6W\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\" Doe\",\"obfuscation\":\"HZKcMk1qj7fF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"fLkylWU76IpY7Q\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"Vcg8qhdaYYRT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"Ez0evKk3CJ9AwMb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"03WcKJLuXUQersJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\" How\",\"obfuscation\":\"3UMfCmBBLcZ8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\" are\",\"obfuscation\":\"2EG3bPvr2tbM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\" you\",\"obfuscation\":\"BZ25WfGLHcvB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\" doing\",\"obfuscation\":\"aF4FTnlMWO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"?\",\"obfuscation\":\"PD0SZJ1ymLi3lp2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":50,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"3UX9GLjVGFYUF5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":51,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"ybXD1Dkw2gyD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":52,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\" style\",\"obfuscation\":\"yK0axdx2YO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":53,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"aFfzEe9M25aJZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":54,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"color\",\"obfuscation\":\"1c7L7OBmIKb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":55,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\":\",\"obfuscation\":\"q3TQGQAdG8Gae9W\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":56,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\" rgb\",\"obfuscation\":\"EjdRq07bdv1O\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":57,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"(\",\"obfuscation\":\"PUgPlUCGcbJhmO7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":58,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"11\",\"obfuscation\":\"EzN541gaq3n10u\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":59,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"lTqmJG1HrN6aVjH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":60,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\" \",\"obfuscation\":\"4YtqmlxESSVimkf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":61,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"110\",\"obfuscation\":\"Rc4mEtEXjcYDU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":62,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"5MtzPBjBeXPTwrz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":63,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\" \",\"obfuscation\":\"9OH2psi9ceX9sO2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":64,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"153\",\"obfuscation\":\"CRCR3EtwgzJEK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":65,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\");\",\"obfuscation\":\"1aC58vX9dC2pNW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":66,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"jMpvlJ1Yxx7FWW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":67,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"oZR969F6v8X\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":68,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"-style\",\"obfuscation\":\"URgqgkge3s\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":69,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"-type\",\"obfuscation\":\"UefdaXH2oTi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":70,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"imZkbzOC7hi9h\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":71,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"text\",\"obfuscation\":\"UpLBBX0hILwL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":72,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"Color\",\"obfuscation\":\"n7aBX7I8YMd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":73,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"QtvjwRlVmD7d4o\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":74,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"Qhj4FopXiZh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":75,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"-value\",\"obfuscation\":\"8kNFx3roNo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":76,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"sWnsKtbK9147m\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":77,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"blue\",\"obfuscation\":\"1wBzW1EBauJz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":78,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"IQM7Tr3IzYEY9r\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":79,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"83k4u4SJXWd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":80,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"-edit\",\"obfuscation\":\"Zfetv7JJjir\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":81,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"able\",\"obfuscation\":\"Xe1GI4V0RoPM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":82,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"idfhMV4x1lgrL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":83,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"Ze1XVr1pvhluZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":84,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"This\",\"obfuscation\":\"eetdNgHQ7qQ3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":85,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\" text\",\"obfuscation\":\"ZzjTXtIAulR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":86,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\" is\",\"obfuscation\":\"26DSfoOBrmMwo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":87,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\" blue\",\"obfuscation\":\"rAMmrFLLA8s\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":88,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"NSpu9tcVAFYuG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":89,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"nfqZq51AOMBq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":90,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"dDneuSztaujOK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":91,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"BCxTdipv2jLieIN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":92,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"bXAms6GInakBuK6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":93,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"ZKhmE9qaD4GQJN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":94,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"s2aOHjevmEaRs6\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":95,\"item_id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":96,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"}]}\",\"call_id\":\"call_mYohfXrIeAqjilUmF2pp5Llr\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":97,\"response\":{\"id\":\"resp_68d4e7bb11ec8197a6901dfcfc41013107331ba6cbe1f886\",\"object\":\"response\",\"created_at\":1758783419,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e7bb7bd481979aeec2fc5cc203e707331ba6cbe1f886\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"}]}\",\"call_id\":\"call_mYohfXrIeAqjilUmF2pp5Llr\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":663,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":93,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":756},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mark_1_c69996aacaf807f2f988d23570f1829e.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mark_1_c69996aacaf807f2f988d23570f1829e.json
new file mode 100644
index 0000000000..b0231c8f4d
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mark_1_c69996aacaf807f2f988d23570f1829e.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"remove the bold style from the second block\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0efde7ee442a47d400691c958a62e08194b8e40be6b72afc0c\",\"object\":\"response\",\"created_at\":1763480970,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0efde7ee442a47d400691c958a62e08194b8e40be6b72afc0c\",\"object\":\"response\",\"created_at\":1763480970,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_7DhnbtqIHo68kUPspELuBzHo\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"535Mf6twqnwr22\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"qRKz3l\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"HqGWLQDnv39Ny\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"TM5YTsg2P9RhYy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"Ff7yWwfa0Bi6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"eWpHndwPUEzre\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"SYPC1L7jOG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"sOOH1hTQ6FvLM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"T48oya0uOIJ7o5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"7GDtm1SGaoknt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"HoJX3xu3gx7Vc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"OlJ3JovVFiBTNsR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"oFMCSxqxBGyVNZt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"9oxmlmkXeJbBD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"0i7vjOkLKYj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"jHt6U9dM5cL1p\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"ZYlMGsdk3QSHUjd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"iU3tsOonv9Ol4CB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\">Hello\",\"obfuscation\":\"cmYlf38KN8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"FS5UlWuzfx15bos\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"r2g05qQgtMsetC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"xoJdnyw3MiJ0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"s40DZBDQC1A\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"-inline\",\"obfuscation\":\"Wifvvf7g9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"-content\",\"obfuscation\":\"RhdnCWJO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"-type\",\"obfuscation\":\"DwbXOtLlLz2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"hpGLE18r7lGdp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"mention\",\"obfuscation\":\"WDbJ78QFS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"JkZHKqJuZFPwQz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"gc0xtbohR2q\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"-user\",\"obfuscation\":\"osKFSFM7bB2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"dktzU2auxlZ1S\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"John\",\"obfuscation\":\"3GESw4t7OwXB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\" Doe\",\"obfuscation\":\"BLaxC2kB7GHA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"GBmvo9zoYoD9H\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"@\",\"obfuscation\":\"l87jPUStfPLWwiw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"John\",\"obfuscation\":\"gMxw7USQTPSI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\" Doe\",\"obfuscation\":\"GGUQy2jJ3EkN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"MIsR8IVj1IzCPG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"JwXjXHqewFzz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"hj4FPmeQhHZYtWz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"bpdQBy7uKtMB8yy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\" How\",\"obfuscation\":\"r2KPpv3mu3Bs\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\" are\",\"obfuscation\":\"WKAbiuypTQhP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\" you\",\"obfuscation\":\"fDruxF9ySVFw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\" doing\",\"obfuscation\":\"TbTaAJMbku\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"?\",\"obfuscation\":\"Lh6zfFxdBj19Do6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":50,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"GS6PwYzOTE3X9U\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":51,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"4mvwdjFLxaYN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":52,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\" style\",\"obfuscation\":\"WlmFvxeJYT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":53,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"JAOhSx6dARbEt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":54,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"color\",\"obfuscation\":\"GQqxsrYN1TN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":55,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\":\",\"obfuscation\":\"eTrgJr3jSmbp5xK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":56,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\" rgb\",\"obfuscation\":\"XwJU0ZfUU5AP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":57,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"(\",\"obfuscation\":\"OWfQUPMAiyNA5Ce\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":58,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"11\",\"obfuscation\":\"Dv6mY9uNTdfhCO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":59,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"7x66Zl7VMmpLsek\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":60,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\" \",\"obfuscation\":\"t5SAHBmbjfFKj60\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":61,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"110\",\"obfuscation\":\"H7gZ9GNi840K3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":62,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"aFNzCepBMJBvvrA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":63,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\" \",\"obfuscation\":\"bwgNoMKXfZH2Oun\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":64,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"153\",\"obfuscation\":\"Hq4RIDPjXalLW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":65,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\");\",\"obfuscation\":\"UGGoK3rNQZFtp3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":66,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"z4tDaD0YbEI13c\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":67,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"M4doK8JFS3j\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":68,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"-style\",\"obfuscation\":\"l9JybV2scr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":69,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"-type\",\"obfuscation\":\"oLCBAQqtwQs\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":70,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"ixxLCRWbRRq2q\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":71,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"text\",\"obfuscation\":\"7XnS3Wu1Ghm8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":72,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"Color\",\"obfuscation\":\"qH6h1PpEQfV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":73,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"l8fUJ7zqSqmCxt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":74,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"XPyEhGTgovD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":75,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"-value\",\"obfuscation\":\"gOeNHRa1wf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":76,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"xbyHTR1kEcYf9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":77,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"blue\",\"obfuscation\":\"x9HQkkCxkHTU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":78,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"xUPhSgTeGTgBrW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":79,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"HltlbICl5H7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":80,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"-edit\",\"obfuscation\":\"MxgjM7jNVsd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":81,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"able\",\"obfuscation\":\"4GnUPmqiQNI0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":82,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"ag015DpjIwfyc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":83,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"2iY3ML6k6rlG4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":84,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"This\",\"obfuscation\":\"QJ7PGQaLe6K4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":85,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\" text\",\"obfuscation\":\"9G3xwqwnPq8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":86,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\" is\",\"obfuscation\":\"1c3mWrxVoxiIG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":87,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\" blue\",\"obfuscation\":\"yRiloRjYMpX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":88,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"ZMLe4OqZRnNLO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":89,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"iyl2QzErpTdE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":90,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"9kigaydgAnlT5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":91,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"JdFnzr8dA9dTqfw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":92,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"MbdylT7Fn8k1yl8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":93,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"gfwcosu8c451HW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":94,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"j8wsJVvNBOm2lu\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":95,\"item_id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":96,\"output_index\":0,\"item\":{\"id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"}]}\",\"call_id\":\"call_7DhnbtqIHo68kUPspELuBzHo\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":97,\"response\":{\"id\":\"resp_0efde7ee442a47d400691c958a62e08194b8e40be6b72afc0c\",\"object\":\"response\",\"created_at\":1763480970,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_0efde7ee442a47d400691c958acbbc81949b08e42bdad59590\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"}]}\",\"call_id\":\"call_7DhnbtqIHo68kUPspELuBzHo\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":710,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":93,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":803},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mention_1_86a5a7047cd626ede49fa5336b0cfedf.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mention_1_86a5a7047cd626ede49fa5336b0cfedf.json
new file mode 100644
index 0000000000..eeec70eb25
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mention_1_86a5a7047cd626ede49fa5336b0cfedf.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"change to say 'Hello! How are you doing? This text is blue!' (remove mention but keep bold text)\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0288de7fa13513f300691c958c61848195ab3865a9a610f08b\",\"object\":\"response\",\"created_at\":1763480972,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0288de7fa13513f300691c958c61848195ab3865a9a610f08b\",\"object\":\"response\",\"created_at\":1763480972,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_Uw5CMvg0FDyjN4TwGPC5K72I\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"3bIRAqFgiO6Q5y\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"onpYF5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"XNsVl17fpeJj6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"yre1zbwYvd3Cp8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"rmZQZtQMyPWv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"K13OmzIj4Byc1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"NZvIwOvMfY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"fUZfl5yH9pBcg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"KpDyL7n9fNmn66\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"W8VVFHsSYXbAB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"t3PSqUd7xOmmC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"5LVpkVyUhSAVaTh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"nsS5q54XS3dLw83\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"30xSFrCxlVxGi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"Lem1RCctJtW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"8m11FI8JSWMvB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"GRk9H9JJRZK51IS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"uH3JCtwjXV3udnQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\">Hello\",\"obfuscation\":\"FxOIJUWnY7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"LzQ4liXcwUPQMOu\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"SGtKHjKcS1SDUh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"strong\",\"obfuscation\":\"KYDFGdxD7k\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"P7XLjAOIYVFacRm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"How\",\"obfuscation\":\"WQDgoaWaU1XbR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\" are\",\"obfuscation\":\"6Yj9MFMjGUnV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\" you\",\"obfuscation\":\"nm6RudJPjhlD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\" doing\",\"obfuscation\":\"k1gzXMYVTV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"?\",\"obfuscation\":\"26Sb2qewPSFcY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"strong\",\"obfuscation\":\"7U53TA3h8O\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"jnw0JBBMXVgPsvj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"BpfBT7kyJPkEBz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"2ps1EsOnNOTO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\" style\",\"obfuscation\":\"7CixcG4J69\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"oRJclwwVdwYB7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"color\",\"obfuscation\":\"nrA9wr3INaR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\":\",\"obfuscation\":\"xxq6HjNSVbMjhe3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\" rgb\",\"obfuscation\":\"sejcaJeuyhCY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"(\",\"obfuscation\":\"EOgRVxZhB7WHfie\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"11\",\"obfuscation\":\"x6Fzh1YpIbU0hz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"sQiK98DiiHAZEu6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\" \",\"obfuscation\":\"w6YseAshFDob472\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"110\",\"obfuscation\":\"U6e2lR8AUaw4r\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"9RvSQyLxonnEIbW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\" \",\"obfuscation\":\"fGEqG60qG4GBSQj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"153\",\"obfuscation\":\"HCKbJjgX5eCUK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\");\",\"obfuscation\":\"2hVx2fAiKirSEP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"NYBLdaXFuXFfDM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":50,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"YmQ0CDOcIYJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":51,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"-style\",\"obfuscation\":\"aNMmSnNe40\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":52,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"-type\",\"obfuscation\":\"WJFzGF080oY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":53,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"GTd11vrNdy1jw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":54,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"text\",\"obfuscation\":\"apDzD1WB0I8K\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":55,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"Color\",\"obfuscation\":\"eTENKxSZYHz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":56,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"2NoRww7eqP5PWw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":57,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"xCWi7PdHG27\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":58,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"-value\",\"obfuscation\":\"nNqiaVT37P\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":59,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"3b8HIxmBWybGG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":60,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"blue\",\"obfuscation\":\"nrCcvlmipetd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":61,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"7tJ7TgqQPs479P\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":62,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"Ro2BcT8bfU2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":63,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"-edit\",\"obfuscation\":\"bvSBLdxNLi1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":64,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"able\",\"obfuscation\":\"0wAoNzGjqcc6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":65,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"iOEh3V2CKr51A\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":66,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"jSEvYRkLTPCzy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":67,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"This\",\"obfuscation\":\"K9cxo1b2Hryx\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":68,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\" text\",\"obfuscation\":\"zBXS5he1iAl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":69,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\" is\",\"obfuscation\":\"hwDUa0znHegoC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":70,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\" blue\",\"obfuscation\":\"5c0IxTfue6Y\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":71,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"FGe1YA5X58Gh1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":72,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"Qr2ijJAU5vTz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":73,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"51xpaxFbEQs3Y\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":74,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"K1uvkTLhogEgrad\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":75,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"jDgSIWsiCthbcxK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":76,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"NrvLR466uWTiRW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":77,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"4EUvKQzbZrlxMY\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":78,\"item_id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello! How are you doing? This text is blue!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":79,\"output_index\":0,\"item\":{\"id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello! How are you doing? This text is blue!
\\\"}]}\",\"call_id\":\"call_Uw5CMvg0FDyjN4TwGPC5K72I\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":80,\"response\":{\"id\":\"resp_0288de7fa13513f300691c958c61848195ab3865a9a610f08b\",\"object\":\"response\",\"created_at\":1763480972,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_0288de7fa13513f300691c958c9d6c8195a5686cd23c2838e2\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello! How are you doing? This text is blue!
\\\"}]}\",\"call_id\":\"call_Uw5CMvg0FDyjN4TwGPC5K72I\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":726,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":76,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":802},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mention_1_89aa084ced0d3526355fa9ec0a7a0f38.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mention_1_89aa084ced0d3526355fa9ec0a7a0f38.json
deleted file mode 100644
index c0dbb1fb30..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mention_1_89aa084ced0d3526355fa9ec0a7a0f38.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"change to say 'Hello! How are you doing? This text is blue!' (remove mention but keep bold text)\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7bc70088193b0c7b94085ac96ac038b51f9cc5aa4c2\",\"object\":\"response\",\"created_at\":1758783420,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7bc70088193b0c7b94085ac96ac038b51f9cc5aa4c2\",\"object\":\"response\",\"created_at\":1758783420,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_UjIZ7oJt4qu2StEaIfFMmtEa\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"T8Ftwdvjx8vSDx\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"8O6PFr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"23AoyOE00IIl9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"r5VWrVWXexy79v\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"jLBYn9g4pvMh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"tFiGh6ZGLKddo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"FRRVEvptPO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"FDencZqXQzguz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"ZX14hVjvcyAeBG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"dZ1f0fIAbUxGM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"iSw6R9fTOV1C2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"yrEC4As9esZQqbN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"LdI4oXXII4c18Ol\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"hr1hqsrVGeqyq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"Z4KpWwnFAcE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"WaC2qTaXezBdp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"mKSvw4bwnp5go0e\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"4Rbs3aRvL6yQ16y\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\">Hello\",\"obfuscation\":\"TezRkphpQc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"dfcEfSULXtrXb48\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"rPlc5j4YS4Semz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"strong\",\"obfuscation\":\"N5A6qIzRcm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"Tos14cDXNrkYbSZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"How\",\"obfuscation\":\"TKlKfCr9qGwx8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\" are\",\"obfuscation\":\"tDpzZOWPHBwO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\" you\",\"obfuscation\":\"B0oZHHbm61Uq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\" doing\",\"obfuscation\":\"cu1LQoKMF2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"?\",\"obfuscation\":\"O58Jo0QctA18m\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"strong\",\"obfuscation\":\"UJaq4BvNfM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"cZ0vpjuzz3JsmDQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"mPEdtRsiGOyr1H\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"2USYOOWuxgNF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\" style\",\"obfuscation\":\"IxclJ2cbbT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"LWzRRBezPGaGv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"color\",\"obfuscation\":\"dUNLOsLJT2O\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\":\",\"obfuscation\":\"uEfQznk328HBj7x\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\" rgb\",\"obfuscation\":\"KJb9uawGKwkM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"(\",\"obfuscation\":\"a9Bl0IeQ0cG6bhu\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"11\",\"obfuscation\":\"ESDgWJZnNkDlHU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"4Y33UL0nlSdWSb4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\" \",\"obfuscation\":\"S16FXFMNRbPzPOj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"110\",\"obfuscation\":\"N0BmT6kaW4glz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"jHElqFVpLYP9f1c\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\" \",\"obfuscation\":\"KhvNV7zBDe1peFc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"153\",\"obfuscation\":\"KPKIkelSZ2GnR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\");\",\"obfuscation\":\"miwveyMwb51ocP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"dTuauCpvC1sJKs\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":50,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"C1rn9gxup9t\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":51,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"-style\",\"obfuscation\":\"RT1KH01SlX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":52,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"-type\",\"obfuscation\":\"E4duOpOvm7x\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":53,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"GLz7qwUSpcUH5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":54,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"text\",\"obfuscation\":\"rPjyoUtYDcU2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":55,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"Color\",\"obfuscation\":\"vpFdyaTHktb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":56,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"YV5XKsfV0p1f8e\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":57,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"kWln6rYlxcP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":58,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"-value\",\"obfuscation\":\"GC9BpW9swK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":59,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"sIXrvZDf9rv1C\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":60,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"blue\",\"obfuscation\":\"U2aDf5pAFz8p\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":61,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"rNOQmiCftZmgI7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":62,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"HOkJijIQPoy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":63,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"-edit\",\"obfuscation\":\"w8pQ2WQVr1o\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":64,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"able\",\"obfuscation\":\"OVsYfLT5aOLz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":65,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"6Ggjc3KitiDjQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":66,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"pY2dgEQt8RDM5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":67,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"This\",\"obfuscation\":\"zP6TTYWJEEZE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":68,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\" text\",\"obfuscation\":\"lzoRPh80BbO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":69,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\" is\",\"obfuscation\":\"Mvvp9ldBv0l8F\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":70,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\" blue\",\"obfuscation\":\"cHrOPwtgVkN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":71,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"POp80d9HSbARR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":72,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"9IRnsIEuGZfz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":73,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"8djznA2f03wxg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":74,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"Ev4u864nLECAJ8c\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":75,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"qC7r9XPKwmChQrO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":76,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"yW2RmyheyHHTtp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":77,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"Srkq7h6BcVeydZ\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":78,\"item_id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello! How are you doing? This text is blue!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":79,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello! How are you doing? This text is blue!
\\\"}]}\",\"call_id\":\"call_UjIZ7oJt4qu2StEaIfFMmtEa\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":80,\"response\":{\"id\":\"resp_68d4e7bc70088193b0c7b94085ac96ac038b51f9cc5aa4c2\",\"object\":\"response\",\"created_at\":1758783420,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e7bcf7ec8193bbf88c092b38ad5a038b51f9cc5aa4c2\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello! How are you doing? This text is blue!
\\\"}]}\",\"call_id\":\"call_UjIZ7oJt4qu2StEaIfFMmtEa\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":679,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":76,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":755},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, replace content_1_3f251996dcb01d2a4adcb6b548554cc5.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, replace content_1_3f251996dcb01d2a4adcb6b548554cc5.json
deleted file mode 100644
index 70bfdae1e6..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, replace content_1_3f251996dcb01d2a4adcb6b548554cc5.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"update the content of the second block to 'Hello, updated content'\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7b8fff881959c42ad6fd9dbd4d10fee4c92d68a8f6f\",\"object\":\"response\",\"created_at\":1758783417,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7b8fff881959c42ad6fd9dbd4d10fee4c92d68a8f6f\",\"object\":\"response\",\"created_at\":1758783417,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_GJHZ2DCV6RG5SGzFsywmTXJU\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"CoyWwHR3CHzJSS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"5jkEb5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"RVPgYiHkLXK5u\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"YzjmSQ0Aj2rwmq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"eGX2dUHpFh38\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"eiTd7gHGohA0X\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"Id6FPzJsQ1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"SQ3Dudh8rLWP1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"wkIWpEuLCYHlkB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"vkjWDQ45qToGH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"xv5C3UVE2WWW2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"heX2bmabDSx4LZ6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"4y1IpoxIVdsgltz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"TPuehBf0fbhUI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"ovHHEVNtO9A\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"PiTXENmZZiB5C\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"BMtHU71Ky0csRDO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"19PGjuJa9OjXWr5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\">Hello\",\"obfuscation\":\"SDVHKxq3gM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"Fqwp9Jicpjhkuoj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\" updated\",\"obfuscation\":\"RPYvVb7d\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\" content\",\"obfuscation\":\"Aug02wjf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"PsUuTL52efxEdi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"tF3J0aMVZrb2Mle\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"hnxyEpeUIIDBKwA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"96IahztYHh8APp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"1aDXc45khIymO1\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":30,\"item_id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, updated content
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":31,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, updated content
\\\"}]}\",\"call_id\":\"call_GJHZ2DCV6RG5SGzFsywmTXJU\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":32,\"response\":{\"id\":\"resp_68d4e7b8fff881959c42ad6fd9dbd4d10fee4c92d68a8f6f\",\"object\":\"response\",\"created_at\":1758783417,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e7b9928c8195ab2c14cb80ff87710fee4c92d68a8f6f\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, updated content
\\\"}]}\",\"call_id\":\"call_GJHZ2DCV6RG5SGzFsywmTXJU\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":669,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":28,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":697},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, replace content_1_c29ec07799c4f9099789d65b819038e8.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, replace content_1_c29ec07799c4f9099789d65b819038e8.json
new file mode 100644
index 0000000000..8eae623bc1
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, replace content_1_c29ec07799c4f9099789d65b819038e8.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"update the content of the second block to 'Hello, updated content'\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0db4cf5b401e791800691c95fdbf048194862383b4c72d0ad9\",\"object\":\"response\",\"created_at\":1763481085,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0db4cf5b401e791800691c95fdbf048194862383b4c72d0ad9\",\"object\":\"response\",\"created_at\":1763481085,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_QEAOHZQeNjcqor6dxv8xi9Hd\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"1OXsJg6LVytm2d\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"zo0SCe\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"x3duxiYSmsiPV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"xhoAwvCKJs0prZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"P2wlSVj0gWjo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"eq1hPqRlKZD9A\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"bLtfAAyK18\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"hOs28dssusnN2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"Ijs8szk6wiR5i3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"LoBDsVwHF4aex\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"VN7uV4JPWX5n5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"wyKl63cv095URGN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"pnYmLBitSJxiUAo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"oEPovjgnREXV1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"W13VL0L95pP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"vEjaj52NxnPeQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"xZzT4uBYjwDrWcO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"qwGM03qxkdPq2OV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\">Hello\",\"obfuscation\":\"2IOuEeckxD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"Pp53tmgp6642VGT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\" updated\",\"obfuscation\":\"n4MgqKMq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\" content\",\"obfuscation\":\"95f1CHdi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"eHFnDhDRbBkXBT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"i98bCxScwdEksZ7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"QA1SvjTFkuEEuD7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"vfxYpK5jVhTxHo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"JFThHHBGxPjOKL\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":30,\"item_id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, updated content
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":31,\"output_index\":0,\"item\":{\"id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, updated content
\\\"}]}\",\"call_id\":\"call_QEAOHZQeNjcqor6dxv8xi9Hd\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":32,\"response\":{\"id\":\"resp_0db4cf5b401e791800691c95fdbf048194862383b4c72d0ad9\",\"object\":\"response\",\"created_at\":1763481085,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_0db4cf5b401e791800691c95fe51a08194a0fc321022b1cb88\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, updated content
\\\"}]}\",\"call_id\":\"call_QEAOHZQeNjcqor6dxv8xi9Hd\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":716,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":28,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":744},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update mention prop_1_0355ff1065aab025d93ccddb0d5a1005.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update mention prop_1_0355ff1065aab025d93ccddb0d5a1005.json
new file mode 100644
index 0000000000..1ccc26b0b4
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update mention prop_1_0355ff1065aab025d93ccddb0d5a1005.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"update the mention to Jane Doe\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0e9ca3b35e0ca8a100691c9591c41c819591906ed863731aa8\",\"object\":\"response\",\"created_at\":1763480977,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0e9ca3b35e0ca8a100691c9591c41c819591906ed863731aa8\",\"object\":\"response\",\"created_at\":1763480977,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_XtRjo7qOlvaDJ8XQnSLPgoiy\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"8gMBz6Zl2syKGl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"5UH78O\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"IPPSjATgXPn2p\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"YDIaTaQsYLOOw9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"DkmipyqrJ1fB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"UwvhMYNgL3fIr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"g8IT6xTmLE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"8DNV7RKxCw9qa\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"RsJ5gnLyfYJuXg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"JRNirkjV24IrW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"KVx7dT0fUoxuf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"JF0jHqDVIYiOInK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"A4H5AGXday69Sm9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"j8CyqbJZB16VM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"n8V3kbAmDbj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"po1DxntczHs0w\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"Bfw0BLUqcFKGqKf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"spdrWaNLqYoEwGp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\">Hello\",\"obfuscation\":\"mvxxv7oHDQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"HIi94zvnAxbz0Vb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"evdLLG4zKrKmwe\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"EyW16MC6POpl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"GddgUujY642\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"-inline\",\"obfuscation\":\"J6E6iZjtY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"-content\",\"obfuscation\":\"eYWovlPB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"-type\",\"obfuscation\":\"LCyd2mOkg8y\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"vY1GztkV99J9L\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"mention\",\"obfuscation\":\"6F7PolvBp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"NcA15SIRlFDdfy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"7SRR8HCkvQ0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"-user\",\"obfuscation\":\"FPwrCp8sBbj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"VYcPr1iEzeCLc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"Jane\",\"obfuscation\":\"fY4HBFLpcLRN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\" Doe\",\"obfuscation\":\"jslhwvFpVq29\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"KMOx2UUFQm4DD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"@\",\"obfuscation\":\"KctFQbby1pFcP94\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"Jane\",\"obfuscation\":\"dG3ByB8zbu2m\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\" Doe\",\"obfuscation\":\"WdwzUzn7XU1Q\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"46C9V6RoIrhjhv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"7zBazvBOEDl2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"82rRBiTTJpycbWC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"Dud1D22O9ujn5kG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"WfmWCqMkE1kl7D\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"strong\",\"obfuscation\":\"3KAJlh4SoI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"RX2CE04qXfrhZAq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"How\",\"obfuscation\":\"UNT8EQRNyAaIf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\" are\",\"obfuscation\":\"29CCslPmLrvs\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":50,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\" you\",\"obfuscation\":\"A3Z2xjZqw63Q\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":51,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\" doing\",\"obfuscation\":\"AWQSdqbCFU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":52,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"?\",\"obfuscation\":\"1ucfpK88aUpft\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":53,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"strong\",\"obfuscation\":\"hY8cIL5M0R\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":54,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"OYtNLoq33o22rUH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":55,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"3VjJ6bH8gKRB4u\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":56,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"1iVSvDYMYQfY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":57,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\" style\",\"obfuscation\":\"miv2nY4T1p\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":58,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"3KdTL1gjYjEtm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":59,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"color\",\"obfuscation\":\"S2vtngo0XdA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":60,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\":\",\"obfuscation\":\"NfAWs3yi4ZwUEMP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":61,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\" rgb\",\"obfuscation\":\"dkksIQ9CF4zU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":62,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"(\",\"obfuscation\":\"TOjUnfMOxbjj4wb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":63,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"11\",\"obfuscation\":\"zmdvG0rYJFI1ed\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":64,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"yZb2PjQTnfVvztm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":65,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\" \",\"obfuscation\":\"t7cfBau1ni9JlDG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":66,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"110\",\"obfuscation\":\"yIewz02KJRh2K\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":67,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"aAaLL8oygC4hC6f\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":68,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\" \",\"obfuscation\":\"gq3vAERA39c7tFg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":69,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"153\",\"obfuscation\":\"rLcOciFCCluFm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":70,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\");\",\"obfuscation\":\"O0JZ3dffZcGtLD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":71,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"uorr5lZC9NUZyW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":72,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"71xAmS6dy5a\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":73,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"-style\",\"obfuscation\":\"fOPV7TfPdO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":74,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"-type\",\"obfuscation\":\"DZMCSfAEotw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":75,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"09nOmCq9ERKwX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":76,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"text\",\"obfuscation\":\"YXihiwGQguip\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":77,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"Color\",\"obfuscation\":\"vjzlDNAXRhA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":78,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"PQT2V2W8XPI9Ga\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":79,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"KgRCKUunCxG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":80,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"-value\",\"obfuscation\":\"4ufI8oLp0c\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":81,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"urSXya5UgtD7j\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":82,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"blue\",\"obfuscation\":\"cjNLsrH06bN2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":83,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"yJwvGcAHFpzssq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":84,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"f2TcfZKSOSq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":85,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"-edit\",\"obfuscation\":\"58ETalWo7ED\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":86,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"able\",\"obfuscation\":\"BMvRR7hAU9r8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":87,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"rIHCMYOiMpnel\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":88,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"0zvJ98x6KXGZa\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":89,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"This\",\"obfuscation\":\"bv175mcDNMZw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":90,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\" text\",\"obfuscation\":\"TKm0x94h1EL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":91,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\" is\",\"obfuscation\":\"KbnSSG2psMTct\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":92,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\" blue\",\"obfuscation\":\"WJQ4acdX0Ga\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":93,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"mQMW4PgytE0La\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":94,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"HMqNazTc6wmJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":95,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"2EPU2Gz5dvRZF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":96,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"h48nn15NDzAWHTt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":97,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"whsGVNmhaPS1dG4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":98,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"Sn9tAvLZrBHiQ8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":99,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"tuulGQbSnIKAXq\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":100,\"item_id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @Jane Doe! How are you doing? This text is blue!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":101,\"output_index\":0,\"item\":{\"id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @Jane Doe! How are you doing? This text is blue!
\\\"}]}\",\"call_id\":\"call_XtRjo7qOlvaDJ8XQnSLPgoiy\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":102,\"response\":{\"id\":\"resp_0e9ca3b35e0ca8a100691c9591c41c819591906ed863731aa8\",\"object\":\"response\",\"created_at\":1763480977,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_0e9ca3b35e0ca8a100691c95929f9c81959cb819ee4a6487ba\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @Jane Doe! How are you doing? This text is blue!
\\\"}]}\",\"call_id\":\"call_XtRjo7qOlvaDJ8XQnSLPgoiy\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":708,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":98,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":806},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update mention prop_1_61b231ae85994a3eec1c2eaabb2b3e80.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update mention prop_1_61b231ae85994a3eec1c2eaabb2b3e80.json
deleted file mode 100644
index a92155538f..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update mention prop_1_61b231ae85994a3eec1c2eaabb2b3e80.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"update the mention to Jane Doe\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e83e47a08195aa2fbfda4fc5578d0655ac0046c8a932\",\"object\":\"response\",\"created_at\":1758783550,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e83e47a08195aa2fbfda4fc5578d0655ac0046c8a932\",\"object\":\"response\",\"created_at\":1758783550,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_Ia8IXwQMf67xXDIxagidOrBA\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"PR3XlJC7wAHeNp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"R9Qw7p\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"ptspQidYksMUT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"vHSY1AUsK6cPE0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"phWx6UEwN0Ig\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"pMw8nZBlZIsHx\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"ha6mPSjdwe\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"gnyAVdgmsBlK4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"kZPryB3faN7oqk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"BHAxzqivUAXNA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"w7Z9NnZnZQ32J\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"9EHfkhBnyo1zbHt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"G86hmqxGBT68eSJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"dkwhtW5VXhBHu\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"4UosUIljkOh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"BVa7kasWnHoZY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"V1ui14QnPGS9cuU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"SiWgHAnggZupPAD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\">Hello\",\"obfuscation\":\"RF9ZYdCxfc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"9j0Fx5t7WpcsrQa\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"n2VFUmSmuHg8O4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"hbwcqduC79Hn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"R7FCI5I6fAq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"-inline\",\"obfuscation\":\"IBOkByuW5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"-content\",\"obfuscation\":\"I6TIMIKD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"-type\",\"obfuscation\":\"G9SABNoDz9T\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"tCOBSBZqoOJYm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"mention\",\"obfuscation\":\"0AeGyZSLp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"CftdoDkwd5Nelr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"9vUTXFangga\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"-user\",\"obfuscation\":\"FpK96TLR5KO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"Urt5LnThKfQet\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"Jane\",\"obfuscation\":\"1i6hkn0S1klL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\" Doe\",\"obfuscation\":\"5IjBGxJUFBzu\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"v4OPFyqQ5t01j\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"@\",\"obfuscation\":\"wjTKJwu9ArDUY1k\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"Jane\",\"obfuscation\":\"EKLwPvzmuP5p\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\" Doe\",\"obfuscation\":\"QCFRxQPG0Xv5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"cpFjx3FAKcmY1p\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"FAVSp5on56AK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"qrxOVPtWQ0HvrfF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"wkFe4XmTHlP7RDM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"hVfLH1g4Wsz3OG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"strong\",\"obfuscation\":\"bKVTskeMs4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"esYtO44fb67vFPf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"How\",\"obfuscation\":\"OoKLuMOzrXQIA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\" are\",\"obfuscation\":\"cPmBpYbVTCNS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":50,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\" you\",\"obfuscation\":\"pq2DEnnboTaQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":51,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\" doing\",\"obfuscation\":\"bhuuk1bEok\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":52,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"?\",\"obfuscation\":\"TOfJQwUF8cbKa\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":53,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"strong\",\"obfuscation\":\"5BudAw6Cxx\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":54,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"6tNqNuMb1cSw9vj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":55,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"DM2t77LjAAJHeM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":56,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"4TivKBPQf7bs\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":57,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\" style\",\"obfuscation\":\"uQXwD8nKAu\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":58,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"Csidq6BxrebI3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":59,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"color\",\"obfuscation\":\"iXrYXR2k7hj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":60,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\":\",\"obfuscation\":\"NJ4uTeE0EJmRv1W\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":61,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\" rgb\",\"obfuscation\":\"maMm0weCyFa0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":62,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"(\",\"obfuscation\":\"6AqRr0qKJJgejtn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":63,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"11\",\"obfuscation\":\"vsrDX7mPl5SdOX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":64,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"ABdGlbc5YF7uU2E\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":65,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\" \",\"obfuscation\":\"8BK4Z73zyKSokAL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":66,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"110\",\"obfuscation\":\"TEgxuVSpZ1RYL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":67,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"k5CIZzFgZDOrlS3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":68,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\" \",\"obfuscation\":\"fb78IfHUA1CSBTX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":69,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"153\",\"obfuscation\":\"jEDwUcn3MYRTf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":70,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\");\",\"obfuscation\":\"KxwycamsSMQNGg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":71,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"uTU5w3Tz0uljAf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":72,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"ZPHoC0g3XQP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":73,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"-style\",\"obfuscation\":\"udelzac5pd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":74,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"-type\",\"obfuscation\":\"r6rkTh79T1Q\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":75,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"zD2Zss4HtX2uN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":76,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"text\",\"obfuscation\":\"XiOXTEFuCV5h\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":77,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"Color\",\"obfuscation\":\"G4p4b85Dtga\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":78,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"TbWkBVULPhoYFH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":79,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"Hsl95UfuX7K\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":80,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"-value\",\"obfuscation\":\"SAybd5PpBL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":81,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"ekMpXKHY6ZQn7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":82,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"blue\",\"obfuscation\":\"cpnWyd7bwDws\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":83,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"dmz0K504K3Z7NE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":84,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"l5z0cnF5qVW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":85,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"-edit\",\"obfuscation\":\"zhtme8DvI0y\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":86,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"able\",\"obfuscation\":\"Jx81jgr6Bs2n\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":87,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"By7MKaO47jKru\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":88,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"fGoQp6RBZ3990\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":89,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"This\",\"obfuscation\":\"TmhQi2xqdWlC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":90,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\" text\",\"obfuscation\":\"x02QJlNxmY3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":91,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\" is\",\"obfuscation\":\"7XxN9J5x0BYT5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":92,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\" blue\",\"obfuscation\":\"VTob0tal9PA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":93,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"Be0W0QkJewbIG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":94,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"mwfVty9TDqEJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":95,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"HLxPcS0btp9FT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":96,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"KpK9wgNMTFQgaWj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":97,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"EPAM3rqQd2kqEYT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":98,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"MweRigrxmzTMud\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":99,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"ljsoeTaXxefetk\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":100,\"item_id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @Jane Doe! How are you doing? This text is blue!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":101,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @Jane Doe! How are you doing? This text is blue!
\\\"}]}\",\"call_id\":\"call_Ia8IXwQMf67xXDIxagidOrBA\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":102,\"response\":{\"id\":\"resp_68d4e83e47a08195aa2fbfda4fc5578d0655ac0046c8a932\",\"object\":\"response\",\"created_at\":1758783550,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e83ed42881958a3aa39f857852680655ac0046c8a932\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @Jane Doe! How are you doing? This text is blue!
\\\"}]}\",\"call_id\":\"call_Ia8IXwQMf67xXDIxagidOrBA\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":661,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":98,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":759},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update text_1_3fd6871badc2f924056864cd76a571c0.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update text_1_3fd6871badc2f924056864cd76a571c0.json
deleted file mode 100644
index e7b89bf8e7..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update text_1_3fd6871badc2f924056864cd76a571c0.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"translate second block including the greeting to German (use dir instead of Ihnen)\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e83c404c8194bd7ae10fe03e5556006f1d77e4f4c849\",\"object\":\"response\",\"created_at\":1758783548,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e83c404c8194bd7ae10fe03e5556006f1d77e4f4c849\",\"object\":\"response\",\"created_at\":1758783548,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_J041R2dZtCEyUbg9B7ER63RC\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"NYcjouII9jiAIz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"GLJVaA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"6PQemgI0CmALf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"j68TyRgDNScn6w\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"osKfGHREwFvF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"k3Pn2Hbj60Q8t\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"JvyTqsthxz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"4cOzTQcWEmURT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"jtaA47rLp9owo6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"XSeLQgfYb0fkh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"0nb6W1KE3AHtQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"sWD05ZCEAqzHeB0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"1UlWip5hK3MjcVI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"2LGsJRBQIiSJw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"X3McAaePoXl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"hVoULkXRu3TJz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"Qa2bMKkHtmpHelW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"qf1k530Y8FLn5fK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"oJCbXif3WySFWSp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"Hallo\",\"obfuscation\":\"HUanVRXeL7q\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"czhirbRZrxT9hDf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"s4rXaRk18Fwgej\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"oAUhqNVsLuwC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"YQZJjambFZR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"-inline\",\"obfuscation\":\"Izfap7ndU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"-content\",\"obfuscation\":\"kc6cNL7v\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"-type\",\"obfuscation\":\"G4Cn7uSqhhM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"6RPXQvxf5F3zi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"mention\",\"obfuscation\":\"9El0Wxrxm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"z03CoZT34wLwyw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"lgeE5CrLsOg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"-user\",\"obfuscation\":\"QXs4Si3PoB9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"XNM7xYxiRR9n9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"John\",\"obfuscation\":\"hadC6TjtSDhf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\" Doe\",\"obfuscation\":\"fRn9tvDc1lOv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"AsucGV5NNlry6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"@\",\"obfuscation\":\"Y0O5IX1JDCFMtnG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"John\",\"obfuscation\":\"hYnXuNf9MKDM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\" Doe\",\"obfuscation\":\"HweEOrCtRZNP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"kQSlrrvStU4VQc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"tExO2oE2Z1Hu\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"DSMIxzaNqaWP9dl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"CSoV3B1D3xsqLKZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"kAE3vxGguf8Xy1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"strong\",\"obfuscation\":\"5QHGJX6H7g\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"sfi7SSnpkQhcfEd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"Wie\",\"obfuscation\":\"3Yzbo08m3j0w0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":50,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\" geht\",\"obfuscation\":\"WjUUPF1NNC5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":51,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\" es\",\"obfuscation\":\"3rmRKgutZ2D63\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":52,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\" dir\",\"obfuscation\":\"qEURWeWjZRM1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":53,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"?\",\"obfuscation\":\"HDdUqaQPvfeFV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":54,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"strong\",\"obfuscation\":\"oHvOpC1yBd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":55,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"zqivT7wx42IEyaF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":56,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"9MSLvH7ms4PpBf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":57,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"aeQMFost10tO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":58,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\" style\",\"obfuscation\":\"HTrHRQjkVf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":59,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"kHqrPrfJrGUhQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":60,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"color\",\"obfuscation\":\"5dk5CvhrlrF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":61,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\":\",\"obfuscation\":\"avWE11spvUfJX7C\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":62,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\" rgb\",\"obfuscation\":\"SGteH1wAKw9C\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":63,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"(\",\"obfuscation\":\"GZh3uNCNivE0cOB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":64,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"11\",\"obfuscation\":\"yw29IIBTMPL6m0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":65,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"iORZCAfzU8s1iqs\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":66,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\" \",\"obfuscation\":\"Yk7cIIfqyci4BWZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":67,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"110\",\"obfuscation\":\"Hos3RlK1siDji\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":68,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"JjWzEjKmHKxZCFE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":69,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\" \",\"obfuscation\":\"OH4av7gdmhM9DA3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":70,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"153\",\"obfuscation\":\"A0Z0wV9A0qCrp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":71,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\");\",\"obfuscation\":\"CfBaOGVP2NTYUO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":72,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"CA83rPjj87CWRJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":73,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"sM2hnlpFIPk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":74,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"-style\",\"obfuscation\":\"Xw0y9PrsB2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":75,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"-type\",\"obfuscation\":\"zooorpN1k7d\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":76,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"V7IW79Rr6v8oh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":77,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"text\",\"obfuscation\":\"qAAHoDldtHqI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":78,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"Color\",\"obfuscation\":\"E4B12HG7Wcb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":79,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"TULBh4WmUKYUnS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":80,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"Z1Kr6F5Cowh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":81,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"-value\",\"obfuscation\":\"fNA2wNA2f3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":82,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"KpEs4opMCot0H\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":83,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"blue\",\"obfuscation\":\"w9vRkdt8gEtt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":84,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"U3zqXfl9BQ2d8m\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":85,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"fox7huxRspi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":86,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"-edit\",\"obfuscation\":\"MfmNGb4cIX1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":87,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"able\",\"obfuscation\":\"NilwfBZTFojJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":88,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"40JDmzDlw03TD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":89,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"6yKHnFhd2tPLD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":90,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"Dieser\",\"obfuscation\":\"VnrFWD892f\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":91,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\" Text\",\"obfuscation\":\"ugx5OK1j4zw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":92,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\" ist\",\"obfuscation\":\"l0jkK558lOtG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":93,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\" blau\",\"obfuscation\":\"cp1aFslh6xr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":94,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"fgyUBTqB2lDsX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":95,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"mqiNgJFJoshP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":96,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"R6TGRWPBOpJxr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":97,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"NJ3lTvOvgrortL2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":98,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"u5QcB1eoVM3Y42e\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":99,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"0Ar1GqsQgiEo7Q\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":100,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"H4o1H3PXhBV7I5\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":101,\"item_id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo, @John Doe! Wie geht es dir? Dieser Text ist blau!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":102,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo, @John Doe! Wie geht es dir? Dieser Text ist blau!
\\\"}]}\",\"call_id\":\"call_J041R2dZtCEyUbg9B7ER63RC\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":103,\"response\":{\"id\":\"resp_68d4e83c404c8194bd7ae10fe03e5556006f1d77e4f4c849\",\"object\":\"response\",\"created_at\":1758783548,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e83cc12c8194b3f254e06c98ae28006f1d77e4f4c849\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo, @John Doe! Wie geht es dir? Dieser Text ist blau!
\\\"}]}\",\"call_id\":\"call_J041R2dZtCEyUbg9B7ER63RC\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":670,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":99,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":769},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update text_1_d2b04758b99475efcd78a137aa91cfe4.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update text_1_d2b04758b99475efcd78a137aa91cfe4.json
new file mode 100644
index 0000000000..343948b8db
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update text_1_d2b04758b99475efcd78a137aa91cfe4.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"translate second block including the greeting to German (use dir instead of Ihnen)\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_01b72fef24beec4700691c95872ab481969a3ba46514573c69\",\"object\":\"response\",\"created_at\":1763480967,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_01b72fef24beec4700691c95872ab481969a3ba46514573c69\",\"object\":\"response\",\"created_at\":1763480967,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_Zvzw1OMgannjKUsWQdQ7lYfV\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"1dTMRD7cMivuDU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"TRa486\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"ZYcaHzyFbIYky\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"stEmcLBtOyccfC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"tNKHjuv9e2yb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"5ZMjLhiECxEfY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"d9SUEaQEsb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"bsCar3jsZvXI3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"rdDCfs6zTjPlwy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"RvcKJF47xBHHl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"5MZTnQWQNFH5A\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"Sh4Up8kPxqjytAN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"Fyid4oOzqkYHF77\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"O8SfegRDmIw47\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"cmSsFenovDo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"Ru4UKWbsXV90u\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"5eqeD0QlnXkND3D\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"9PpDiMXnWVWcDi0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"2shcD333mJab6hW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"Hallo\",\"obfuscation\":\"nK0cv1N2azd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"Km0zwJuKfYHZQyN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"d8sezUCOwoAtPy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"SWlMlvrKScly\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"wtDT053uCjO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"-inline\",\"obfuscation\":\"8x9F2BC6x\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"-content\",\"obfuscation\":\"RHtN56Bz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"-type\",\"obfuscation\":\"rgZn8ggxsCa\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"61wUTQxunSqdk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"mention\",\"obfuscation\":\"TizwvnN9d\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"SOc82n6RpN3eIp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"tMP2aluwLZT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"-user\",\"obfuscation\":\"kB5GmDVrL92\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"tWMuSd1FGfel8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"John\",\"obfuscation\":\"oIDNSP48yCaq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\" Doe\",\"obfuscation\":\"kFNTpK14t37a\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"bBCLjnXrSInxL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"@\",\"obfuscation\":\"1wZGeb3vYnqeSid\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"John\",\"obfuscation\":\"DWIL4QQojeDo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\" Doe\",\"obfuscation\":\"Lvc0rKynx9J9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"ZiqetHNULs33wf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"XKaUN8IkwNAO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"Fqx72dhCDuDdgRX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"Ys7OwTtrhFmSl9z\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"vSDGbAgQekdRYG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"strong\",\"obfuscation\":\"pZ3TJfLtAs\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"kYDLvA9jo7PQgV9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"Wie\",\"obfuscation\":\"RARIpfeYwqv62\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":50,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\" geht\",\"obfuscation\":\"RMuo6osyKGv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":51,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\" es\",\"obfuscation\":\"vXSdzscUtp9xX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":52,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\" dir\",\"obfuscation\":\"p8QN4WdbGHyk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":53,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"?\",\"obfuscation\":\"AWcV8Mo67GqDE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":54,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"strong\",\"obfuscation\":\"l6pxaoUjZP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":55,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"vQ1o4civZO3wCLb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":56,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"tMdda2L73AjHrs\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":57,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"eaCVYeynjwlg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":58,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\" style\",\"obfuscation\":\"yz3nhcpt8k\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":59,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"7fBIRpA9Ex2r7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":60,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"color\",\"obfuscation\":\"KIgHRtEE2fC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":61,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\":\",\"obfuscation\":\"N8ARa93176Gn5S4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":62,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\" rgb\",\"obfuscation\":\"e92vewty6q4a\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":63,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"(\",\"obfuscation\":\"xaIlewmATNYXVY3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":64,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"11\",\"obfuscation\":\"LfKdrpPXB3DlmP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":65,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"QmpSoWQ5qa0GuM8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":66,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\" \",\"obfuscation\":\"TWZRxmcZwqowstr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":67,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"110\",\"obfuscation\":\"arNvtuImHDNj3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":68,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"MCJYxNBngvTXjjg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":69,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\" \",\"obfuscation\":\"cHZCtuobchfAr2T\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":70,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"153\",\"obfuscation\":\"5Xuey8ikfgvJn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":71,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\");\",\"obfuscation\":\"FtukdhHpbBOKFf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":72,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"bvryg2f7rrmbzh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":73,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"phQQ9fIzb5N\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":74,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"-style\",\"obfuscation\":\"8005XZ4E3k\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":75,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"-type\",\"obfuscation\":\"HVaBelKRBGR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":76,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"eVBPapgLBOxBa\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":77,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"text\",\"obfuscation\":\"ItwRFHO12a15\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":78,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"Color\",\"obfuscation\":\"5FSrH3not54\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":79,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"Yh2MBB7GwuSXqU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":80,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"rBlutah2LGN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":81,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"-value\",\"obfuscation\":\"47zdAJXs5G\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":82,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"bnQOn9rdhn7C4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":83,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"blue\",\"obfuscation\":\"Q1FNork2EEiq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":84,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"\\\\\\\"\",\"obfuscation\":\"QIlbIbNMaIjVPJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":85,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\" data\",\"obfuscation\":\"FTL2DZANshD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":86,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"-edit\",\"obfuscation\":\"lOurDtuTW3h\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":87,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"able\",\"obfuscation\":\"Lqq3OP2mNg3a\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":88,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"Ea0NTGPrkLuwk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":89,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"Xd41xwfqeDNrJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":90,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"Dieser\",\"obfuscation\":\"cqdaVjFBsS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":91,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\" Text\",\"obfuscation\":\"20MoTA0dIbq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":92,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\" ist\",\"obfuscation\":\"dLIzwdM80NUV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":93,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\" blau\",\"obfuscation\":\"iH6ldWlAtIX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":94,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"4bTLs1J6mWV7J\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":95,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"span\",\"obfuscation\":\"MWhwzMVJQm3R\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":96,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"3seFtFoM14djQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":97,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"6XiK1f8k2QYJHrv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":98,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"l7aF4477rdriGQ6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":99,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"rOwM1QBLPla9ME\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":100,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"o4yzvIluIq3VKs\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":101,\"item_id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo, @John Doe! Wie geht es dir? Dieser Text ist blau!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":102,\"output_index\":0,\"item\":{\"id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo, @John Doe! Wie geht es dir? Dieser Text ist blau!
\\\"}]}\",\"call_id\":\"call_Zvzw1OMgannjKUsWQdQ7lYfV\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":103,\"response\":{\"id\":\"resp_01b72fef24beec4700691c95872ab481969a3ba46514573c69\",\"object\":\"response\",\"created_at\":1763480967,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_01b72fef24beec4700691c9587e9d88196b760ba46fd3a6207\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo, @John Doe! Wie geht es dir? Dieser Text ist blau!
\\\"}]}\",\"call_id\":\"call_Zvzw1OMgannjKUsWQdQ7lYfV\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":717,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":99,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":816},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (paragraph)_1_071517f9f358c0806dd80b49096a405d.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (paragraph)_1_071517f9f358c0806dd80b49096a405d.json
new file mode 100644
index 0000000000..23f4bd3f4b
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (paragraph)_1_071517f9f358c0806dd80b49096a405d.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make first paragraph bold\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0ff93d0ce6c7527500691c958e9ac0819481f63acc50028607\",\"object\":\"response\",\"created_at\":1763480974,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0ff93d0ce6c7527500691c958e9ac0819481f63acc50028607\",\"object\":\"response\",\"created_at\":1763480974,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_3gtpV1i4Em5KBwg1HonKNwlN\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"XKkoH9FlzeRKJF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"oLaN9z\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"YzMhtQ54HQksc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"ObsOi3lp5SmrKg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"am4xsWu3J4Oc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"2VNt8ZkeqNG9P\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"0WZzTON6l5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"py5p8CJuVDXXg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"QJ6NUrYR17lBTz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"8m8Y7MkCzx0ON\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"UO0fqDWf9oTBN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"cLv4vEycUHDiE11\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"CZwKqYie1mH4wCT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"TJgYYgZslk1Z1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"T95DLMVTGtp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"m7DEfjxN3EPby\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"z28X0JT0t2FK8XK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"39KH17GchcpFLIU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"><\",\"obfuscation\":\"krLNy1G1qzfzzY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"strong\",\"obfuscation\":\"wf5SCI0JaT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\">Hello\",\"obfuscation\":\"xy0L5Rfh3o\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"AAavCSteDmkUzyn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\" world\",\"obfuscation\":\"18v8WJIUOY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"HznMff93EIn2q\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"strong\",\"obfuscation\":\"E1ZBoU5XnQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"81Mnb4Vuy3PCY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"jumFaizAv0PaNtx\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"rWJfv8WCovb31Fo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"QaJcll3JVRkXST\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"i8LsZfqK9aE3hQ\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":33,\"item_id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":34,\"output_index\":0,\"item\":{\"id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"call_id\":\"call_3gtpV1i4Em5KBwg1HonKNwlN\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":35,\"response\":{\"id\":\"resp_0ff93d0ce6c7527500691c958e9ac0819481f63acc50028607\",\"object\":\"response\",\"created_at\":1763480974,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_0ff93d0ce6c7527500691c958f0520819492a0b2205d092444\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"call_id\":\"call_3gtpV1i4Em5KBwg1HonKNwlN\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":706,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":31,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":737},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (paragraph)_1_728e83ee8b26541816af7dcf417e127b.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (paragraph)_1_728e83ee8b26541816af7dcf417e127b.json
deleted file mode 100644
index a4821b3ec9..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (paragraph)_1_728e83ee8b26541816af7dcf417e127b.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make first paragraph bold\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7bf28f88190a83a70a62fafa2f8023dde18f892187f\",\"object\":\"response\",\"created_at\":1758783423,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7bf28f88190a83a70a62fafa2f8023dde18f892187f\",\"object\":\"response\",\"created_at\":1758783423,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_EfZduslXIZF30VfKMO24C5vb\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"seO7gIzUM4Hidk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"659X9Q\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"fUJbS3Hdvm2KJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"RXDzyyFuAm3tOG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"6TqoHGMFssMH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"vy5c1U2fpTEoy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"eDqljw3aGO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"3HqiVRBSmh4tR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"1UK4LyUbnNVdIm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"7n9jHuLkHXo2g\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"xVAJM9zPRevCj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"veNA1rj1Q5zcdJ7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"ssjQn0C8h0KY70Y\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"OcFMi0w5dz2iR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"vd1GhdFN2zb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"gx3IPzvyyF2Ru\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"WkxyfjQgbhzgOQy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"R850pmWdDDYHgtf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"><\",\"obfuscation\":\"jb3US2ZNwZNdr2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"strong\",\"obfuscation\":\"LMGQE0ECm9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\">Hello\",\"obfuscation\":\"5wDakNLM5B\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"wD7kaTDmhSHpOnV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\" world\",\"obfuscation\":\"AoR5eorisk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"K0Sv7D70iPohV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"strong\",\"obfuscation\":\"DVKqt5aDLY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"RNNFaQvOgVPgs\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"22YYSgBYpKgZd82\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"8KrV7uk2g94Gcf0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"qARWn4JrIGzQAU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"Q7YRGaZKUIp9Ad\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":33,\"item_id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":34,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"call_id\":\"call_EfZduslXIZF30VfKMO24C5vb\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":35,\"response\":{\"id\":\"resp_68d4e7bf28f88190a83a70a62fafa2f8023dde18f892187f\",\"object\":\"response\",\"created_at\":1758783423,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e7bfbbc0819083f6d364b3c73dbf023dde18f892187f\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"call_id\":\"call_EfZduslXIZF30VfKMO24C5vb\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":659,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":31,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":690},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (word)_1_4bdc947c29ac3c96b95afac6843a6894.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (word)_1_4bdc947c29ac3c96b95afac6843a6894.json
new file mode 100644
index 0000000000..6e9fb49baa
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (word)_1_4bdc947c29ac3c96b95afac6843a6894.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make 'world!' (in the first block) bold\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0c16d40072c8436100691c95ff1da881968a81c592fdce8912\",\"object\":\"response\",\"created_at\":1763481087,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0c16d40072c8436100691c95ff1da881968a81c592fdce8912\",\"object\":\"response\",\"created_at\":1763481087,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_ttfeF38u3TjQIvWiuWHN4aMx\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"bau352Cf4clkm0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"DwQZcU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"hMwh3KCm2zMhP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"vYWGQfzOXB9YUN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"QbZKBb3aIlmn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"twLcdvsl7OyJo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"qaWqOu1aRz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"nVKpRx58SHG6w\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"rzBtDHxSaV8ohY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"uZ2vmJCXW0n6A\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"AVr61ZdxqOhwj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"lrw647Jz0DbfaCn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"61Mr3pzd7Gnsxkc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"I7c2H6lMm3MAm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"07VAkAYEyWc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"IeDGL7wpohKMr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"dqw4p2hpkkfVSHe\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"7GfqYSDONSDm0tV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\">Hello\",\"obfuscation\":\"weTkt3yjib\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"TInmnE2LSAkLDCd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"iny95WYhIvW9wX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"strong\",\"obfuscation\":\"bdyNayqqL9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"IlDtgJ1FADzUFWS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"world\",\"obfuscation\":\"Vd65jz66Gfx\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"i6qpxDx59C4wV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"strong\",\"obfuscation\":\"C6GdnxYI3X\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"MkXUDYZGm55Xn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"wShcnFIbCNNdIYi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"vuapV86RSHoBAv2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"COem1fNkikrTq5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"BgMWIkTQmh7LHp\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":34,\"item_id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":35,\"output_index\":0,\"item\":{\"id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"call_id\":\"call_ttfeF38u3TjQIvWiuWHN4aMx\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":36,\"response\":{\"id\":\"resp_0c16d40072c8436100691c95ff1da881968a81c592fdce8912\",\"object\":\"response\",\"created_at\":1763481087,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_0c16d40072c8436100691c95ffb034819685dfd15658a6799a\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"call_id\":\"call_ttfeF38u3TjQIvWiuWHN4aMx\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":713,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":32,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":745},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (word)_1_abd0a85b8c45cfa0b4449a382dc81602.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (word)_1_abd0a85b8c45cfa0b4449a382dc81602.json
deleted file mode 100644
index e1644e322a..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (word)_1_abd0a85b8c45cfa0b4449a382dc81602.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make 'world!' (in the first block) bold\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7be14408196a5d9b8555484c0ef0971b4db82314497\",\"object\":\"response\",\"created_at\":1758783422,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7be14408196a5d9b8555484c0ef0971b4db82314497\",\"object\":\"response\",\"created_at\":1758783422,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_ouCh8TBr1jcadjsDcW2Twmr8\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"XZuL4JRo6S5uqV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"d2XHzi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"cO6vgCrs7qhsU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"2SNLsNnIPaA2nY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"XrJfBQGtwlFZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"DX50X3bCPgJJL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"498yCem4RR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"IQXvIcPttnx39\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"FQBqh5gF7cRdwI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"QYogOTMlsI2kb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"YB90eZq7EkdGr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"ghndjKd70lgeFPZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"hH6D67gisvWLoSK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"8UrLhtI6FnYdO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"uFCXEZmZjIM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"LPWpyOZuopHa9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"LsQQFzo9cjFmEIf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"2ONzVB9kLiUqhYn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\">Hello\",\"obfuscation\":\"2C0LSbgqYY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"Riv5gtn5u84B5Tm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\" <\",\"obfuscation\":\"WEstWhqDd35hqC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"strong\",\"obfuscation\":\"vMWPzoblZr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"diw61BJrIiYBfR0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"world\",\"obfuscation\":\"TbayLV2dtuZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"GICa2Zh3WVMsm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"strong\",\"obfuscation\":\"3m8nF1Oi4R\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"8d0O3k9IS0XA8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"oFxWzfZT15eyI4s\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"94EKr9SWJYcg0ge\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"DZU5M08NH274qc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"GEl1cgvxBgQatR\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":34,\"item_id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":35,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"call_id\":\"call_ouCh8TBr1jcadjsDcW2Twmr8\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":36,\"response\":{\"id\":\"resp_68d4e7be14408196a5d9b8555484c0ef0971b4db82314497\",\"object\":\"response\",\"created_at\":1758783422,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e7be8e80819697365148a36961890971b4db82314497\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"call_id\":\"call_ouCh8TBr1jcadjsDcW2Twmr8\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":666,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":32,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":698},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/translate selection_1_8cbf4ed64edf84f173a2d92a49d4b1d6.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/translate selection_1_8cbf4ed64edf84f173a2d92a49d4b1d6.json
new file mode 100644
index 0000000000..6c50b6e3f0
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/translate selection_1_8cbf4ed64edf84f173a2d92a49d4b1d6.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"translate to German\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_06702ff1a134872800691c957c72c08197b5bb1da4bab337b4\",\"object\":\"response\",\"created_at\":1763480956,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_06702ff1a134872800691c957c72c08197b5bb1da4bab337b4\",\"object\":\"response\",\"created_at\":1763480956,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_qDi7uszG2hmj0zzPOV7tRK4s\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"OKaxKdex2bBEY1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"fPgiJF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"9VO7zb2huWQNF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"sXdXAKTK5DIEJk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"3gYPGhTIzS19\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"FieTpnWjSx7Fg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"4JNWXVUXoM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"8VARWnFDugDzA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"JzkJ0XEyoYzPSm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"gIpJHg1rGazcN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"m6MloOOFdSW1X\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"PERDecpqCj2wzJm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"jiGPtzsgIBAdN17\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"q56GxUXBmf6yg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"WSDXwPrSjli\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"XQw25jLTNV5w8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"mVi0PVftM0DxwYt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"Ekwv2pJjgqmhm3c\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"PQXhUBMtAj5F062\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"Hallo\",\"obfuscation\":\"K6H9dsCwpcK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"ZtKCmec39iY2Qe\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"mCTlMiYpEZGHMxG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"nDSmS3QUuRF9RQW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"LY3XQi1kFXQQtc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"eyu5mqQld0JbNj\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":28,\"item_id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":29,\"output_index\":0,\"item\":{\"id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\",\"call_id\":\"call_qDi7uszG2hmj0zzPOV7tRK4s\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":30,\"response\":{\"id\":\"resp_06702ff1a134872800691c957c72c08197b5bb1da4bab337b4\",\"object\":\"response\",\"created_at\":1763480956,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_06702ff1a134872800691c9584a6408197a89fa6844557e84f\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\",\"call_id\":\"call_qDi7uszG2hmj0zzPOV7tRK4s\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":697,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":26,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":723},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/translate selection_1_94c4e51be42ba73c81d7edc503e92b40.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/translate selection_1_94c4e51be42ba73c81d7edc503e92b40.json
new file mode 100644
index 0000000000..bf6c37b75d
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/translate selection_1_94c4e51be42ba73c81d7edc503e92b40.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the entire document (INCLUDING the selected text), \\nyou can use this to find the selected text to understand the context (but you MUST NOT issue operations against this document, you MUST issue operations against the selection):\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"translate to German\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_08b0137ec661015500691cb32c087881968156fbcebaa31e24\",\"object\":\"response\",\"created_at\":1763488556,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_08b0137ec661015500691cb32c087881968156fbcebaa31e24\",\"object\":\"response\",\"created_at\":1763488556,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_CcLm7VvevG1sPR5Qes4MS7ch\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"ut0VFeYhXQoEFy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"Zf5KJm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"WsAI0T0UJJoiO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"VWQ1TeEJcaEYxv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"yvQcUhbRmsAU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"189Kaoq0Fu1pt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"Nkynx7Szf2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"5aAvmlWmYfstX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"n49T83bJHSEaNr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"OHoAsuoPg4xff\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"YIkgTVrnUrnOi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"BseqLd2A4C1xdA9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"ubVPoA33PgFq0n6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"lMpFvP5hZjGzB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"ruVVNbEZpQy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"kOmrU3uynyLCQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"8ruwfzYDxhZzS0w\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"ihZQYdsVTaPJxCD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"GT8VoN03CeGHYCp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"Hallo\",\"obfuscation\":\"IJdVGGmjV17\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"Zw5Z5KRCS5hMu2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"390MGp3E5OxXLtC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"NqQ2Ok5oNMfNvrB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"0kctkRSnxfEgCA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"N9CLJrmGEObjmi\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":28,\"item_id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":29,\"output_index\":0,\"item\":{\"id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\",\"call_id\":\"call_CcLm7VvevG1sPR5Qes4MS7ch\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":30,\"response\":{\"id\":\"resp_08b0137ec661015500691cb32c087881968156fbcebaa31e24\",\"object\":\"response\",\"created_at\":1763488556,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_08b0137ec661015500691cb32c8b448196858190830b301005\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\",\"call_id\":\"call_CcLm7VvevG1sPR5Qes4MS7ch\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":719,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":26,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":745},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/translate selection_1_c0b30a449a94314760b815a202ee6f64.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/translate selection_1_c0b30a449a94314760b815a202ee6f64.json
deleted file mode 100644
index b07faa9a41..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/translate selection_1_c0b30a449a94314760b815a202ee6f64.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids.\\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello
\\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:[{\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"translate to German\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e83988cc81909aae42b9bfff2eed01dae7c77b380e4e\",\"object\":\"response\",\"created_at\":1758783545,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e83988cc81909aae42b9bfff2eed01dae7c77b380e4e\",\"object\":\"response\",\"created_at\":1758783545,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_ixv81kTNttOUWMEzAmZpvdVS\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"DfewBwrf7SUUky\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"RttDts\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"zqMHxOan4J4Ge\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"z64NpcqAV6UkAe\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"0YKj0cwoUjFe\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"5Ju3EdOagA6ZA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"21Ezc1DSsZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"Qjlbkag1Fmg55\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"4igSlRefk9NBOE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"eMev6ehjLGwQ3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"Woky0QS7JYtFV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"yXgifm8nbnsDCwm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"cS0PDYpvOKAxI06\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"l7r7Zmmp45gzV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"t94pkNt5wq9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"VKoN4kC090qY1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"TE39Xt9yFke1nYo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"v6yLOksGuweQUKy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"jZblIffPbwyzSCL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"Hallo\",\"obfuscation\":\"UIMQH9Pjqce\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"dSeOZgtjhNOB0n\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"pUbmp3NEPzOVlX2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"I0Ht1p6M3VknMww\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"ftPfKn5cyloejG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"t8t1OWjCytXzyp\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":28,\"item_id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":29,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\",\"call_id\":\"call_ixv81kTNttOUWMEzAmZpvdVS\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":30,\"response\":{\"id\":\"resp_68d4e83988cc81909aae42b9bfff2eed01dae7c77b380e4e\",\"object\":\"response\",\"created_at\":1758783545,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e83a0d5481908ef9ab6b89a33e8c01dae7c77b380e4e\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hallo
\\\"}]}\",\"call_id\":\"call_ixv81kTNttOUWMEzAmZpvdVS\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":491,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":26,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":517},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/turn paragraphs into list_1_63ec354cac388bce6c2b6d324473b48f.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/turn paragraphs into list_1_63ec354cac388bce6c2b6d324473b48f.json
new file mode 100644
index 0000000000..290e3928b6
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/turn paragraphs into list_1_63ec354cac388bce6c2b6d324473b48f.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Bananas
\\\"}]\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the entire document (INCLUDING the selected text), \\nyou can use this to find the selected text to understand the context (but you MUST NOT issue operations against this document, you MUST issue operations against the selection):\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"block\\\":\\\"Apples
\\\"},{\\\"block\\\":\\\"Bananas
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"turn into list (update existing blocks)\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0fdda807b1d0651900691cb32dc91c819386470a39a83f77c2\",\"object\":\"response\",\"created_at\":1763488557,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0fdda807b1d0651900691cb32dc91c819386470a39a83f77c2\",\"object\":\"response\",\"created_at\":1763488557,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_juoIxzQeWNbRD6ULcO5q8vT2\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"RR3VfCVEDy52rn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"DyuQXA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"ClY11lT2tixsr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"i2uTPDeyRxtiyQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"JBl1uJgRnfqw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"Nxma3jxCnRg4a\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"F6YPYyjBYw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"CU3UTIyHfWe7w\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"EgNJ8SwPv6l81f\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"JGFI0xoFYRhOl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"Eu2izqJYxRQAn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"r3Fk28qsdvHh8AL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"DLtu4iZVKmchqe6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"NJfDc9scGrURA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"e4tpnHfbGN8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"dGaAYojKcHhz1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"EMD7mXa5U0iNVti\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"ul\",\"obfuscation\":\"J4OlODzlezqvfI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"><\",\"obfuscation\":\"ldegnISwpfoSWD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"li\",\"obfuscation\":\"3dOa6lmo9icU5W\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"U20AxryyU9ssiTM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"Ap\",\"obfuscation\":\"EBT1ovUVYj4XlM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"ples\",\"obfuscation\":\"CyMkoTaBrGjb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"CDNxPbOLZ5Ijk3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"li\",\"obfuscation\":\"Trln8bUSBZthrx\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"373921Fn39K4p\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"ul\",\"obfuscation\":\"oLZhYqfl98PGhc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\">\\\"\",\"obfuscation\":\"cQ3fP9o3Thzi6J\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"},{\\\"\",\"obfuscation\":\"AObSLfAtUoaT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"CWz9EjVr4A2Z\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"67jpDZ8gRYsEf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"my5nmLb8Xz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"CINggSgOQZnm1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"8yN4IxxaVFv3Dh\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"77oQqH2R9Kkce\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"7UyyhUUUKYiNk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"3\",\"obfuscation\":\"7HY8vvysnbCI1wW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"LZ2vgKPFsJ9hjWa\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"1MKXDOZalDHzg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"F77j2hGhlt5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"x3RMep8NkQ69o\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"zlITFwAQvMV4Pyc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"ul\",\"obfuscation\":\"531wy8sXmuuiLW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"><\",\"obfuscation\":\"qEdmU8JIKoHz9L\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"li\",\"obfuscation\":\"zi6qiyTMXqgTLl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"xnhWpcsFbCHtuSc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"Ban\",\"obfuscation\":\"mzld63SXyaMzf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":50,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"anas\",\"obfuscation\":\"nWBRlfpV3Ocr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":51,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"Yasx76SBhRirkr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":52,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"li\",\"obfuscation\":\"00iueg9m7ns1Vk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":53,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"uznV78HGjjRhS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":54,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"ul\",\"obfuscation\":\"Hw4brMmys2ppR9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":55,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"BX03omuNRW4hQxb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":56,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"Oov9QCwKXt6y6K\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":57,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"HMV5pxo8QvBNde\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":58,\"item_id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"- Apples
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"- Bananas
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":59,\"output_index\":0,\"item\":{\"id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"- Apples
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"- Bananas
\\\"}]}\",\"call_id\":\"call_juoIxzQeWNbRD6ULcO5q8vT2\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":60,\"response\":{\"id\":\"resp_0fdda807b1d0651900691cb32dc91c819386470a39a83f77c2\",\"object\":\"response\",\"created_at\":1763488557,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_0fdda807b1d0651900691cb32e53bc81938c3c49763e854c6c\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"- Apples
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"- Bananas
\\\"}]}\",\"call_id\":\"call_juoIxzQeWNbRD6ULcO5q8vT2\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":639,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":56,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":695},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/turn paragraphs into list_1_7edac84634785220731836bc2ca20358.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/turn paragraphs into list_1_7edac84634785220731836bc2ca20358.json
new file mode 100644
index 0000000000..7d835cf4de
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/turn paragraphs into list_1_7edac84634785220731836bc2ca20358.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Bananas
\\\"}]\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"This is the latest state of the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"block\\\":\\\"Apples
\\\"},{\\\"block\\\":\\\"Bananas
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"turn into list (update existing blocks)\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_01936d635b5773d800691c95973bd081949bcc8b18431ec0f8\",\"object\":\"response\",\"created_at\":1763480983,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_01936d635b5773d800691c95973bd081949bcc8b18431ec0f8\",\"object\":\"response\",\"created_at\":1763480983,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_AIJDjvFjpeGHRWmLf7pTQAp5\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"yLcSXrSlPQCcxY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"V7burm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"QBbeVB5RoFI8l\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"S1XX9snjQxeYRS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"PBceKlHjEZ2W\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"aJjq6SApg21Rq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"xWhjdf3Kdg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"1ov9ckp4hWxDd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"kV1liQRYcPzpkM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"U8QFOq6F8yTCn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"nzDPh1lmn1JDR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"1eMmcQrXv5jqa8E\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"dgIe8tlkueu5YgH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"BcTZ0GqPUdUos\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"XDL4P6EpZg5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"UBdqKrqf7L63f\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"Uq21Rfe7bzPu8OE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"ul\",\"obfuscation\":\"NI45gffsI7TWMX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"><\",\"obfuscation\":\"z0HkwJdTJsiZN3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"li\",\"obfuscation\":\"Phosyts2kIoail\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"SxYDgvyGDeKTQXm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"Ap\",\"obfuscation\":\"qD1xupGeaQ1txZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"ples\",\"obfuscation\":\"OJOY7VfbUmew\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"Wyox63qwBKldUV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"li\",\"obfuscation\":\"AMYDcJZWESAeA6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"Zxuq6lYZDIiTs\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"ul\",\"obfuscation\":\"tSoDO2qTa8ZGSO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\">\\\"\",\"obfuscation\":\"ky2CNC5ApumPI2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"},{\\\"\",\"obfuscation\":\"E2g2llhBgWAl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"Uiwinm7IsRc1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"qkF4SeHy22HfN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"hmZHOHmC2F\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"f4sfXFqf38cVM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"A7W89SxfcEzYDT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"vaDgW6dr0N0EL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"jzIjaRCIleQxw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"3\",\"obfuscation\":\"uSy9H4M7sfBN31C\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"1LnIg5T6Uhl21gs\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"Lm3Y5ltFndYl3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"bYpC8aIHIp9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"FjbL5Kdw53IiG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"JDBNuHSasJZ8wwT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"ul\",\"obfuscation\":\"Ui3HTJYY5IIKoF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"><\",\"obfuscation\":\"ADdMhHsbE2SzKv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"li\",\"obfuscation\":\"2SHJQ3hY4UCYdi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"w9mbEyyOvjvw3v7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"Ban\",\"obfuscation\":\"K5Eh352UXWhZ4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":50,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"anas\",\"obfuscation\":\"rZR031hSSd1H\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":51,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"9YcZUm7RiciI4V\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":52,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"li\",\"obfuscation\":\"a8LZKhxVcZPMep\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":53,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"PBpWzpqYs1z03\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":54,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"ul\",\"obfuscation\":\"nwpmXLoW98e95a\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":55,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"D7yQWeCIVOXCYLx\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":56,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"eqY27uGPnLGIu6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":57,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"eMSQAUt9bokgBH\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":58,\"item_id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"- Apples
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"- Bananas
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":59,\"output_index\":0,\"item\":{\"id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"- Apples
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"- Bananas
\\\"}]}\",\"call_id\":\"call_AIJDjvFjpeGHRWmLf7pTQAp5\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":60,\"response\":{\"id\":\"resp_01936d635b5773d800691c95973bd081949bcc8b18431ec0f8\",\"object\":\"response\",\"created_at\":1763480983,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_01936d635b5773d800691c95979a1c8194a59015424d165fa8\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"- Apples
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"- Bananas
\\\"}]}\",\"call_id\":\"call_AIJDjvFjpeGHRWmLf7pTQAp5\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":617,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":56,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":673},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/turn paragraphs into list_1_cfbaa99fe0298f4754b6bdd81c0a9601.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/turn paragraphs into list_1_cfbaa99fe0298f4754b6bdd81c0a9601.json
deleted file mode 100644
index 282b857cb7..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/turn paragraphs into list_1_cfbaa99fe0298f4754b6bdd81c0a9601.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids.\\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Apples
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Bananas
\\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:[{\\\"block\\\":\\\"I need to buy:
\\\"},{\\\"block\\\":\\\"Apples
\\\"},{\\\"block\\\":\\\"Bananas
\\\"}]\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"turn into list (update existing blocks)\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7c5a1a48195b1512156a1c0e65e063ec43d5c6ae6d6\",\"object\":\"response\",\"created_at\":1758783429,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7c5a1a48195b1512156a1c0e65e063ec43d5c6ae6d6\",\"object\":\"response\",\"created_at\":1758783429,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_fN7kesYspPXzZW2PzNpGQuF8\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"M54aUz6AniEQnm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"PwwkhL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"IhG6y6pUacocE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"a1awzwqpOkRE7Y\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"GyAKvKXyACTz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"GeEluQsYisBhe\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"riKariqMxN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"dDb2JNtTDtvQ6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"ToMLlr0yQ1aOWv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"HA0x1wOEHaiFd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"DkAeEPXpNP2mr\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"2\",\"obfuscation\":\"MUKzmLcpSRTMTEM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"hkuowDbtAHjB66a\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"wP1fVxxgpWjGz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"a6VYNrDD3jt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"TZoFwWgIgcuOG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"zG2bvRIIPufN6ZL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"ul\",\"obfuscation\":\"hwZxJzu3ZKzpFC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"><\",\"obfuscation\":\"kdgBLAuVokSK7Q\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"li\",\"obfuscation\":\"bvLjYsuulSCclp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"4GlM0naa2to9Tsw\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"Ap\",\"obfuscation\":\"hADASku508uJfN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"ples\",\"obfuscation\":\"b5smjHlImiMy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"M44th1N3DiQYf8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"li\",\"obfuscation\":\"aW3elOIAEGMyzS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"8YJL7u0WFOq6j\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"ul\",\"obfuscation\":\"rZFnZarOilaTx9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\">\\\"\",\"obfuscation\":\"K479BPs645prPj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"},{\\\"\",\"obfuscation\":\"ELrd8kZT5NF8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"aBEy7yy94khd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"tm4D2egTz9Oho\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"cVQoPY4u0N\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"kqd6Y3RYqJtIC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"GCP6c8QxS54HsJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"JNev9l3usvFQf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":38,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"zNnbLRxMqa7gg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":39,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"3\",\"obfuscation\":\"qo6zaeyNVZto7hQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":40,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"W4VhIhkZuxYkSRD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":41,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"KQ5tmq6zaFsXc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":42,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"sNJxyUrkFVP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":43,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"T5zEVNY2FA353\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":44,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"8SjF1vYRCFBD8vN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":45,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"ul\",\"obfuscation\":\"ioclVRVrtHS6mU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":46,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"><\",\"obfuscation\":\"LBBxQXubG8VFkC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":47,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"li\",\"obfuscation\":\"z87iFoacx0dzp8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":48,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"5lYKHeT4PaWRYYy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":49,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"Ban\",\"obfuscation\":\"L0loh1FjinHGi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":50,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"anas\",\"obfuscation\":\"MO27lTGnqmHd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":51,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"\",\"obfuscation\":\"DC6aVDhRtcGATi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":52,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"li\",\"obfuscation\":\"rtkviRSmAPJLmB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":53,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"To9bI5Juyqc79\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":54,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"ul\",\"obfuscation\":\"sKUsCs8uXv8dOu\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":55,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"EAc964BO3JgPtLR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":56,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"55xBC3rVIABrdq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":57,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"BtGSrfnD8AdGcL\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":58,\"item_id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"- Apples
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"- Bananas
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":59,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"- Apples
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"- Bananas
\\\"}]}\",\"call_id\":\"call_fN7kesYspPXzZW2PzNpGQuF8\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":60,\"response\":{\"id\":\"resp_68d4e7c5a1a48195b1512156a1c0e65e063ec43d5c6ae6d6\",\"object\":\"response\",\"created_at\":1758783429,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e7c626d48195be15ff5d4643b216063ec43d5c6ae6d6\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"- Apples
\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"- Bananas
\\\"}]}\",\"call_id\":\"call_fN7kesYspPXzZW2PzNpGQuF8\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":411,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":56,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":467},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block prop and content_1_9290d6b9a47efc6589359e2820ef6702.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block prop and content_1_9290d6b9a47efc6589359e2820ef6702.json
new file mode 100644
index 0000000000..731bae46af
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block prop and content_1_9290d6b9a47efc6589359e2820ef6702.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make the first paragraph right aligned and update the content to 'What's up, world!'\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0f206f484560c13700691c9585778c8190a2a9aac50695e997\",\"object\":\"response\",\"created_at\":1763480965,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0f206f484560c13700691c9585778c8190a2a9aac50695e997\",\"object\":\"response\",\"created_at\":1763480965,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_u9MizTuSfo6dF8h7aSoHVoxJ\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"bQSNlG8rRXZaYW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"CfoOIX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"CLYRtaYZ2gqXX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"QxsJGkgNa4cHNu\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"h6dWiOiDLLxF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"4X2yZCO1X108Y\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"AqqT5FvM4z\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"et0gbbXxAx963\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"Hkuam3UFBgVPUq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"ifBw4RXrjodQv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"BOyNBqRZ61oDu\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"RHGt3y12eToYuk2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"eQQ6YjNVoNW8odg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"dHJCnCclLKvOM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"FlaUka4yzrd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"8zu1ofzSKX6WI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"4T6vLrJE5W8UpHd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"mI4GwnMpn4ZTejE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\" style\",\"obfuscation\":\"WIeikoUlS1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"ug8t4gcCKhY8W\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"text\",\"obfuscation\":\"SkcyYKl44bNX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"-align\",\"obfuscation\":\"JzwWG1GZgm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\":\",\"obfuscation\":\"CafD6k7PITImJ2W\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\" right\",\"obfuscation\":\"UMt4Me8QMQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\";\",\"obfuscation\":\"VxIXg5hdINejvzn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"OD7f9GCDtyYWX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"What's\",\"obfuscation\":\"jPIQ2pkWRH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\" up\",\"obfuscation\":\"MI7Gwip72Wanc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"GjWgrRrSsmehJgQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\" world\",\"obfuscation\":\"fS3aDVrKXN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"jZPeinreZltyu\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"B0eyAYmAzW8OIAc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"mCu6eTtYbAx9m3A\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"fzStk7Q7t0soVt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"cAetHFoFUfgdX1\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":38,\"item_id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":39,\"output_index\":0,\"item\":{\"id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\",\"call_id\":\"call_u9MizTuSfo6dF8h7aSoHVoxJ\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":40,\"response\":{\"id\":\"resp_0f206f484560c13700691c9585778c8190a2a9aac50695e997\",\"object\":\"response\",\"created_at\":1763480965,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_0f206f484560c13700691c9585dc8c81908afcc2ae59b7fbaf\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\",\"call_id\":\"call_u9MizTuSfo6dF8h7aSoHVoxJ\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":719,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":36,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":755},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block prop and content_1_a560a1761f87da8f3bdb7b42357ba4ec.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block prop and content_1_a560a1761f87da8f3bdb7b42357ba4ec.json
deleted file mode 100644
index 50db40897d..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block prop and content_1_a560a1761f87da8f3bdb7b42357ba4ec.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make the first paragraph right aligned and update the content to 'What's up, world!'\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7b7c73c819588fd4ae6dfcd52f40f9c63618c205ddb\",\"object\":\"response\",\"created_at\":1758783415,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7b7c73c819588fd4ae6dfcd52f40f9c63618c205ddb\",\"object\":\"response\",\"created_at\":1758783415,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_PaQl4Twi9e3hyLSTSFss3DPi\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"RN5vuDxOjrrljC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"4WU8ra\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"0WBj0lRkUpi2D\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"RO8O5gEkpVTdvI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"IgUgXeMwtxPI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"LM2Nz3e0JPI0O\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"hHARf7sR8E\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"g9d6DvQP6NVRI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"12nvpHHESg1Ahd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"7USNRssANDsGl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"Myqrx01WjS5d5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"3gOv1NNIhcwzjcI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"pKp8QgeBgcqGsi5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"M9BXcCRbbhu4M\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"ExDNzvqjNoQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"ejHrBWIUmlFhb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"Kge8lYsjysiQrFB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"f5MCDv8rA3UQyX5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\" style\",\"obfuscation\":\"74rLyRuBWI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"J8MWM4WSyv23u\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"text\",\"obfuscation\":\"yqKsKzXK2FnH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"-align\",\"obfuscation\":\"LsFNJDTRkP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\":\",\"obfuscation\":\"cVwqXo24JWoOHnz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\" right\",\"obfuscation\":\"C55MP7VCds\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\";\",\"obfuscation\":\"9YDhBOD35QZc9dq\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"Voiexa65u8fTk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"What's\",\"obfuscation\":\"rFAz2j4kjI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\" up\",\"obfuscation\":\"C6WrKUJZVvdGU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"UHkYV6VaOHdnDoS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\" world\",\"obfuscation\":\"Zca2eJwOM1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"Q7jSBgYgYArw8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"Qra0wH54DoYJPn4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"5rs7wp9ZLWv5rRN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"2PnlFlSSIkaCmX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":37,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"bDKacg5HJCgKl1\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":38,\"item_id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":39,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\",\"call_id\":\"call_PaQl4Twi9e3hyLSTSFss3DPi\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":40,\"response\":{\"id\":\"resp_68d4e7b7c73c819588fd4ae6dfcd52f40f9c63618c205ddb\",\"object\":\"response\",\"created_at\":1758783415,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e7b850ac81959b21063e7beba8ec0f9c63618c205ddb\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\",\"call_id\":\"call_PaQl4Twi9e3hyLSTSFss3DPi\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":672,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":36,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":708},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block prop_1_220afe040247e0efb76c73bf82ed4d4e.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block prop_1_220afe040247e0efb76c73bf82ed4d4e.json
new file mode 100644
index 0000000000..ceeba9b654
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block prop_1_220afe040247e0efb76c73bf82ed4d4e.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make the first paragraph right aligned\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_05a3f8973018558e00691c958291f88193a7f9c5f891b3e0e6\",\"object\":\"response\",\"created_at\":1763480962,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_05a3f8973018558e00691c958291f88193a7f9c5f891b3e0e6\",\"object\":\"response\",\"created_at\":1763480962,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_2AWHpAH2cbSJbPWxA76Z3LgL\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"yVNradoHRxot5M\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"iVpzEc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"yFt8H2Ed3Uuq6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"5Vr9Kfl4yiiyrJ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"iRw8SwKANacZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"ap95yzuYz0GMZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"9WtY7Pzm6i\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"XCQb4kRMh9PJy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"T0j8YdxP5BjTVN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"GqPGhpvPu1mOy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"2vceKndLssLma\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"sn764JGikMjUxo9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"gLRzJNEOXo6f3Wo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"d07fChrh6nQD7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"pJrsoDLE5ZB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"mqL43EmX3OtZS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"vcOnPVpp2rIK1U7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"kva93NUQAzoEb7J\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\" style\",\"obfuscation\":\"Qkrtk9qFt7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"nSLKJm0a0VJyA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"text\",\"obfuscation\":\"1QzfeGfhl1Mf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"-align\",\"obfuscation\":\"Db8z0igqQv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\":\",\"obfuscation\":\"EmKs47YKVnYxn1N\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\" right\",\"obfuscation\":\"8ueK861o7q\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\";\",\"obfuscation\":\"ZnmVFVvn5WD4eN3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"Q0idm0KaOzTT6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"Hello\",\"obfuscation\":\"pc1Jtci089B\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"BEl5P73VTc2EYF5\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\" world\",\"obfuscation\":\"1J9ZaM8bTG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"iSe8GC4UOeai3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"Hjj12HSdtV84qfv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"OizNXAtMB1BDtaf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"SGblbQtmaSTGii\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":36,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"sZdTJhpJB388IA\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":37,\"item_id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":38,\"output_index\":0,\"item\":{\"id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"call_id\":\"call_2AWHpAH2cbSJbPWxA76Z3LgL\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":39,\"response\":{\"id\":\"resp_05a3f8973018558e00691c958291f88193a7f9c5f891b3e0e6\",\"object\":\"response\",\"created_at\":1763480962,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_05a3f8973018558e00691c9583056c8193a4446aae92313014\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"call_id\":\"call_2AWHpAH2cbSJbPWxA76Z3LgL\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":708,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":35,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":743},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block prop_1_d959d9e97f6cf99760b26b7d17c11244.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block prop_1_d959d9e97f6cf99760b26b7d17c11244.json
deleted file mode 100644
index 5c95bd03be..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block prop_1_d959d9e97f6cf99760b26b7d17c11244.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make the first paragraph right aligned\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7b55a608196a3df9486e1df043d050680dac27be4a2\",\"object\":\"response\",\"created_at\":1758783413,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7b55a608196a3df9486e1df043d050680dac27be4a2\",\"object\":\"response\",\"created_at\":1758783413,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_iKRfSmf4FmQxLFA2XKgbZker\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"zpu4Q5d1JKlBbF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"kq08Z7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"ESfiso7v9BTn7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"j8wsiTeQXJydZK\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"EcQMk5iN4pX0\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"6xH8rV36PTNlM\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"RjteRUL1Wn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"TWb78oSxABMUD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"KXjrnkya523WjO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"jflf9r74FfuP4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"tDbdYPMdy8bDH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"SnjqDnqg1naMNpE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"K5JApbPvEYcpooc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"ap5pf4cTI7yHy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"D2MK198njbd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"EA5Qd280Je1CC\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"KkdTIpuIMwquG9t\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"iYBSX3IdoEdiSQS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\" style\",\"obfuscation\":\"Uhj6HLoL3M\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"=\\\\\\\"\",\"obfuscation\":\"4Z4FN6RvVzmJm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"text\",\"obfuscation\":\"TsadHxp5pbDV\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"-align\",\"obfuscation\":\"W4NqDZAjJ6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\":right\",\"obfuscation\":\"30MhqKAcp4\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\";\",\"obfuscation\":\"oaP3wiDQgihq2U1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"\\\\\\\">\",\"obfuscation\":\"9qJXuyK70IWsb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"Hello\",\"obfuscation\":\"j3ZfM10D8cz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"XgCKj52TQHAAc2p\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\" world\",\"obfuscation\":\"wyVNsAIk3Z\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"IEXMc9IWNHUZy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"p\",\"obfuscation\":\"PCQzyXeqYUoEHoo\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":33,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"JB0oHNpbwZbiWL2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":34,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"jxnS3oMJVkpfaN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":35,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"bMS4xa7uikU8NU\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":36,\"item_id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":37,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"call_id\":\"call_iKRfSmf4FmQxLFA2XKgbZker\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":38,\"response\":{\"id\":\"resp_68d4e7b55a608196a3df9486e1df043d050680dac27be4a2\",\"object\":\"response\",\"created_at\":1758783413,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e7b5f4ac81968323d1d3734992ce050680dac27be4a2\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"call_id\":\"call_iKRfSmf4FmQxLFA2XKgbZker\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":661,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":34,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":695},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block type and content_1_649d6a7338cc6b674c4b4c38184c1037.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block type and content_1_649d6a7338cc6b674c4b4c38184c1037.json
deleted file mode 100644
index 22974b65c7..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block type and content_1_649d6a7338cc6b674c4b4c38184c1037.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make the first paragraph a heading and update the content to 'What's up, world!'\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e7b69b7081958bf610df186ae9100ba9bac8c2b70ed0\",\"object\":\"response\",\"created_at\":1758783414,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e7b69b7081958bf610df186ae9100ba9bac8c2b70ed0\",\"object\":\"response\",\"created_at\":1758783414,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_ly1MCexQajVdMVCiKsblZnlW\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"9V6oLRi2GHZafd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"qqBOXD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"8ZBESW9TVIbsd\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"LFCNjvMOTzCo71\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"F2fz5Lp7KaVG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"xQSl7m0Vowlzb\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"AOyi2y1Y3Q\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"xY2BAPSf2McxE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"qlPzuzAXODEH2Z\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"Xh1sfG9mPc4sk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"tt35ENDso5zKi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"lt8YPz0Tk0evYUU\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"pxafmfNPsY9csai\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"QQqEB8lQKo83t\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"ZtbK17P1zz6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"4xhohonYrtkWD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"OE6ZyocPGUL8uP3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"h\",\"obfuscation\":\"8AtoPo1mY4EAsG8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"9NLqUtrgC7iCBHi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"R5BQ9Tev3stfOMI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"What's\",\"obfuscation\":\"1OlLmByPO2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\" up\",\"obfuscation\":\"YKzpsLGU8KY8C\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"gg5HObchZYxfsBS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\" world\",\"obfuscation\":\"sMrgbel1Un\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"yekRmzSHFmeL2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"h\",\"obfuscation\":\"l91427KhbHfpVLl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"byAIvaEzfpimliY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"P87AngxKxdaDOkW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"SVrV6bPxpSoOyW\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"XDML6E9t7eLTe2\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":33,\"item_id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":34,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\",\"call_id\":\"call_ly1MCexQajVdMVCiKsblZnlW\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":35,\"response\":{\"id\":\"resp_68d4e7b69b7081958bf610df186ae9100ba9bac8c2b70ed0\",\"object\":\"response\",\"created_at\":1758783414,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e7b71d648195912653accc6c27810ba9bac8c2b70ed0\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\",\"call_id\":\"call_ly1MCexQajVdMVCiKsblZnlW\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":672,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":31,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":703},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block type and content_1_8494a477cce9b50c531800a11a8fd6ef.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block type and content_1_8494a477cce9b50c531800a11a8fd6ef.json
new file mode 100644
index 0000000000..9e9cfb0809
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block type and content_1_8494a477cce9b50c531800a11a8fd6ef.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make the first paragraph a heading and update the content to 'What's up, world!'\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0d5bc2bab2f9152a00691c9583f52c819495f3c761f4d58ca0\",\"object\":\"response\",\"created_at\":1763480963,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0d5bc2bab2f9152a00691c9583f52c819495f3c761f4d58ca0\",\"object\":\"response\",\"created_at\":1763480963,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_4X8MYO2J9QQydDhSicpp5oEG\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"2hMBJmuGTMzwfl\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"mwrUM9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"ANCZAg2nxW8p8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"C8wKRjp831qlVS\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"cezOrH6luNPe\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"3uHgGLQTDhjCX\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"mQbyDti4hc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"cqxv6v8PEtSTB\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"nyPmZg30HFxiXE\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"fvJNYA7DWZTnP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"lBSLV9Sm16MOF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"8vamXjxWg72VJGz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"uSYYYEUHz3tefar\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"O9wOsGJXLWQRy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"tEYkEz6mm5E\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"o2h9upoXkfhde\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"RwH78rmaZ2McMmH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"h\",\"obfuscation\":\"AHeDsAa3dDxhi32\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"PGJjWe5yT2HVm8V\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"AdORqy4c9md4Wdf\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"What's\",\"obfuscation\":\"JmIghYEYvp\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\" up\",\"obfuscation\":\"0Li7hUvuopsec\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"3z7YH7oOY6785zn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\" world\",\"obfuscation\":\"L74ndOINbR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"WcMAqV0Bo0o0l\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"h\",\"obfuscation\":\"rUp7FXpSGaLOFnn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"SeBr3jgZe7ByWrj\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"xRuU81E1yrIttLv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":31,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"8FMKVIj2c5UBIg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":32,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"kKsApxsw9WZh5v\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":33,\"item_id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":34,\"output_index\":0,\"item\":{\"id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\",\"call_id\":\"call_4X8MYO2J9QQydDhSicpp5oEG\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":35,\"response\":{\"id\":\"resp_0d5bc2bab2f9152a00691c9583f52c819495f3c761f4d58ca0\",\"object\":\"response\",\"created_at\":1763480963,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_0d5bc2bab2f9152a00691c9584b73081949c525133e0e8d6c5\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"What's up, world!
\\\"}]}\",\"call_id\":\"call_4X8MYO2J9QQydDhSicpp5oEG\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":719,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":31,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":750},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block type_1_9cbb96117eed2b41fee6c0802fe00bb2.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block type_1_9cbb96117eed2b41fee6c0802fe00bb2.json
deleted file mode 100644
index aa40986e1e..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block type_1_9cbb96117eed2b41fee6c0802fe00bb2.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "request": {
- "method": "POST",
- "url": "https://api.openai.com/v1/responses",
- "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \\n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make the first paragraph a heading\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
- "headers": [],
- "cookies": []
- },
- "response": {
- "status": 200,
- "statusText": "",
- "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_68d4e83ae20c81968e8637ac7f75d67f049c8eca8d1a3122\",\"object\":\"response\",\"created_at\":1758783546,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_68d4e83ae20c81968e8637ac7f75d67f049c8eca8d1a3122\",\"object\":\"response\",\"created_at\":1758783546,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_k3GPX4EWoAP9qLOqkRYuefqS\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"kn2NWv1ciLlzQv\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"kHt3u7\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"m3ycoalLL6bcG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"6ZRuYZciSD0A13\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"tB45w1SBIqTZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"i5y53TsXp5KGm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"HLJsdnlWLg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"JMFj8fJDtz2Bc\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"Dg2Oj99EPR62cL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"msRJwOOF7sDgm\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"ixgN1rkqnTPy3\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"99qVvIj92lugzV6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"byU3atRGPDUeLga\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"6vGwxYaz3AgFt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"folySlFbUVt\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"nytaYBgebUtSn\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"OquUmfPF5RrgCXI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"h\",\"obfuscation\":\"HfpSGcGU0ztBLD8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"5nNuU1w8xJGF3iO\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\">Hello\",\"obfuscation\":\"8cAzPDPPB8\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"a3rq0JKVCmNXxww\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\" world\",\"obfuscation\":\"QK37mu7WcT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"4yYvKld8Hzap2\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"h\",\"obfuscation\":\"WdisRIW6O4hS3XZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"bv1rsdMQguShkCQ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"YTsFzqStvParv9l\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"4kJ6HEkkNxRSN6\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"5A9ZxW0DjSRtJs\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":31,\"item_id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":32,\"output_index\":0,\"item\":{\"id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"call_id\":\"call_k3GPX4EWoAP9qLOqkRYuefqS\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":33,\"response\":{\"id\":\"resp_68d4e83ae20c81968e8637ac7f75d67f049c8eca8d1a3122\",\"object\":\"response\",\"created_at\":1758783546,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_68d4e83b57b48196b30f481d10d5bc41049c8eca8d1a3122\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"call_id\":\"call_k3GPX4EWoAP9qLOqkRYuefqS\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":661,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":29,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":690},\"user\":null,\"metadata\":{}}}\n\n",
- "headers": []
- }
-}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block type_1_c25f2e6f9ffe088112413cc2ca87e75a.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block type_1_c25f2e6f9ffe088112413cc2ca87e75a.json
new file mode 100644
index 0000000000..ec06a20f18
--- /dev/null
+++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block type_1_c25f2e6f9ffe088112413cc2ca87e75a.json
@@ -0,0 +1,15 @@
+{
+ "request": {
+ "method": "POST",
+ "url": "https://api.openai.com/v1/responses",
+ "body": "{\"model\":\"gpt-4o-2024-08-06\",\"input\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\nMake sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\nList items are 1 block with 1 list item each, so block content `- item1
` is valid, but `- item1
- item2
` is invalid. We'll merge them automatically.\\nFor code blocks, you can use the `data-language` attribute on a block (wrapped with ) to specify the language.\\n\\nIf the user requests updates to the document, use the \\\"applyDocumentOperations\\\" tool to update the document.\\n---\\nIF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`\\n---\\n \"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"There is no active selection. This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document). \\nThe cursor is BETWEEN two blocks as indicated by cursor: true.\\nPrefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}]},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"Hello, @John Doe! How are you doing? This text is blue!
\\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"Hello, world! Bold text. Link.
\\\"}]\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"make the first paragraph a heading\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"tool_choice\":\"required\",\"stream\":true}",
+ "headers": [],
+ "cookies": []
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "body": "event: response.created\ndata: {\"type\":\"response.created\",\"sequence_number\":0,\"response\":{\"id\":\"resp_0caa663a74e493fe00691c95817afc8196aabe22e4f3cf7ab3\",\"object\":\"response\",\"created_at\":1763480961,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"sequence_number\":1,\"response\":{\"id\":\"resp_0caa663a74e493fe00691c95817afc8196aabe22e4f3cf7ab3\",\"object\":\"response\",\"created_at\":1763480961,\"status\":\"in_progress\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"sequence_number\":2,\"output_index\":0,\"item\":{\"id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_cpwjhrQ9owP2wIniigfJCuKJ\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":3,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"pYxy8PfqCrLW1x\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":4,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"operations\",\"obfuscation\":\"yhSnDg\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":5,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"\\\":[\",\"obfuscation\":\"0YuC5isnfbUnI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":6,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"{\\\"\",\"obfuscation\":\"FKv9GiJ9hNs2CA\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":7,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"type\",\"obfuscation\":\"oYbMn2yYaWTT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":8,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"LcM33uFA1VxsT\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":9,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"update\",\"obfuscation\":\"bmbqCJLOwL\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":10,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"CTP2TDkx3K2g9\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":11,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"id\",\"obfuscation\":\"3HcOyk9rpMGmxi\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":12,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"88UNypP4cvmGD\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":13,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"ref\",\"obfuscation\":\"EYWlC2t6dXdtz\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":14,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"qoYuMpp6CrgHj49\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":15,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"$\",\"obfuscation\":\"sSy04N9CKmVJjxR\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":16,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"\\\",\\\"\",\"obfuscation\":\"K7iqRSiKqWYJ1\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":17,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"block\",\"obfuscation\":\"d8jgZ1nczUN\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":18,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"\\\":\\\"\",\"obfuscation\":\"w0MqH2fHAPewy\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":19,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"<\",\"obfuscation\":\"D7FUNQlM2mg4tSk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":20,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"h\",\"obfuscation\":\"AVCdLJeTY6lyTLP\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":21,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"i0Uw13dd31C9KaH\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":22,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\">Hello\",\"obfuscation\":\"69zMpARO6n\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":23,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\",\",\"obfuscation\":\"TVWFbewxinyRJOZ\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":24,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\" world\",\"obfuscation\":\"Odi1O2OOTG\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":25,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"!\",\"obfuscation\":\"RgfrAwhfNHbnF\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":26,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"h\",\"obfuscation\":\"U7UuZ3WLO9IQ6yY\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":27,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"1\",\"obfuscation\":\"UqcmhHExruXlTTI\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":28,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\">\",\"obfuscation\":\"9xC9mCSMPBV8uie\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":29,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"\\\"}\",\"obfuscation\":\"pJYOvWnzS8ymVk\"}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"sequence_number\":30,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"delta\":\"]}\",\"obfuscation\":\"bwcUeWK5sQtpN6\"}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"sequence_number\":31,\"item_id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"output_index\":0,\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"sequence_number\":32,\"output_index\":0,\"item\":{\"id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"call_id\":\"call_cpwjhrQ9owP2wIniigfJCuKJ\",\"name\":\"applyDocumentOperations\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"sequence_number\":33,\"response\":{\"id\":\"resp_0caa663a74e493fe00691c95817afc8196aabe22e4f3cf7ab3\",\"object\":\"response\",\"created_at\":1763480961,\"status\":\"completed\",\"background\":false,\"error\":null,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":null,\"max_tool_calls\":null,\"model\":\"gpt-4o-2024-08-06\",\"output\":[{\"id\":\"fc_0caa663a74e493fe00691c9581f8208196b4a4aea5542bdd1b\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"Hello, world!
\\\"}]}\",\"call_id\":\"call_cpwjhrQ9owP2wIniigfJCuKJ\",\"name\":\"applyDocumentOperations\"}],\"parallel_tool_calls\":true,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":null,\"reasoning\":{\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tools\":[{\"type\":\"function\",\"description\":null,\"name\":\"applyDocumentOperations\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single, VALID HTML element)\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"]},\"strict\":false}],\"top_logprobs\":0,\"top_p\":1.0,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":708,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":29,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":737},\"user\":null,\"metadata\":{}}}\n\n",
+ "headers": []
+ }
+}
\ No newline at end of file
diff --git a/packages/xl-ai/src/api/formats/html-blocks/defaultHTMLPromptBuilder.ts b/packages/xl-ai/src/api/formats/html-blocks/defaultHTMLPromptBuilder.ts
deleted file mode 100644
index 3dea46b2a6..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/defaultHTMLPromptBuilder.ts
+++ /dev/null
@@ -1,200 +0,0 @@
-import { UIMessage } from "ai";
-import type { PromptBuilder } from "../PromptBuilder.js";
-import { HTMLPromptData } from "./htmlPromptData.js";
-
-function promptManipulateSelectionHTMLBlocks(
- messages: UIMessage[],
- opts: Exclude,
-): void {
- if (messages.length > 0) {
- messages.push(
- {
- role: "assistant",
- id: "document-state-" + messages.length,
- parts: [
- {
- type: "text",
- text: `This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):`,
- },
- {
- type: "text",
- text: JSON.stringify(opts.htmlSelectedBlocks),
- },
- {
- type: "text",
- text: "This is the latest state of the document (INCLUDING the selected text), find the selected text in there to understand the context:",
- },
- {
- type: "text",
- text: JSON.stringify(opts.htmlDocument),
- },
- ],
- },
- {
- role: "user",
- id: "user-prompt-" + messages.length,
- parts: [
- {
- type: "text",
- text: "The user asks you to do the following:",
- },
- {
- type: "text",
- text: opts.userPrompt,
- },
- ],
- },
- );
- }
-
- messages.push(
- {
- role: "system",
- id: "document-state-intro",
- parts: [
- {
- type: "text",
- text: `You're manipulating a selected part of a text document using HTML blocks.
- Make sure to follow the json schema provided and always include the trailing $ in ids.
- List items are 1 block with 1 list item each, so block content \`- item1
\` is valid, but \`- item1
- item2
\` is invalid. We'll merge them automatically.
- This is the selection as an array of html blocks:`,
- },
- ],
- },
- {
- role: "system",
- id: "document-state-selection",
- parts: [
- {
- type: "text",
- text: JSON.stringify(opts.htmlSelectedBlocks),
- },
- ],
- },
- {
- role: "system",
- id: "document-state-context",
- parts: [
- {
- type: "text",
- text: "This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:",
- },
- {
- type: "text",
- text: JSON.stringify(opts.htmlDocument),
- },
- ],
- },
- {
- role: "user",
- id: "user-prompt",
- parts: [
- {
- type: "text",
- text: opts.userPrompt,
- },
- ],
- },
- );
-}
-
-function promptManipulateDocumentUseHTMLBlocks(
- messages: UIMessage[],
- opts: Exclude,
-): void {
- if (messages.length > 0) {
- messages.push(
- {
- role: "assistant",
- id: "document-state-" + messages.length,
- parts: [
- {
- type: "text",
- text: `This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document):`,
- },
- {
- type: "text",
- text: JSON.stringify(opts.htmlBlocks),
- },
- ],
- },
- {
- role: "user",
- id: "user-prompt-" + messages.length,
- parts: [
- {
- type: "text",
- text: opts.userPrompt,
- },
- ],
- },
- );
- return;
- }
- messages.push(
- {
- role: "system",
- id: "document-state-intro",
- parts: [
- {
- type: "text",
- text: `You're manipulating a text document using HTML blocks.
- Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $).
- List items are 1 block with 1 list item each, so block content \`- item1
\` is valid, but \`- item1
- item2
\` is invalid. We'll merge them automatically.
- For code blocks, you can use the \`data-language\` attribute on a block (wrapped with ) to specify the language.
- This is the initial document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):`,
- },
- ],
- },
- {
- role: "system",
- id: "document-state-data",
- parts: [
- {
- type: "text",
- text: JSON.stringify(opts.htmlBlocks),
- },
- ],
- },
- {
- role: "system",
- id: "extended-instructions",
- parts: [
- {
- type: "text",
- text:
- `First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.
- EXAMPLE: if user says "below" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor.
- EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user),
- then you need \`referenceId\` to point to the block before the cursor with position \`after\` (or block below and \`before\`).
-
- ` +
- (opts.isEmptyDocument
- ? `Because the document is empty, first update the empty block before adding new blocks.`
- : "Prefer updating existing blocks over removing and adding (but this also depends on the user's question)."),
- },
- ],
- },
- {
- role: "user",
- id: "user-prompt",
- parts: [
- {
- type: "text",
- text: opts.userPrompt,
- },
- ],
- },
- );
-}
-
-export const defaultHTMLPromptBuilder: PromptBuilder = async (
- messages,
- inputData,
-) => {
- if (inputData.selection) {
- promptManipulateSelectionHTMLBlocks(messages, inputData);
- } else {
- promptManipulateDocumentUseHTMLBlocks(messages, inputData);
- }
-};
diff --git a/packages/xl-ai/src/api/formats/html-blocks/htmlBlocks.test.ts b/packages/xl-ai/src/api/formats/html-blocks/htmlBlocks.test.ts
index ca33a21146..680ece1602 100644
--- a/packages/xl-ai/src/api/formats/html-blocks/htmlBlocks.test.ts
+++ b/packages/xl-ai/src/api/formats/html-blocks/htmlBlocks.test.ts
@@ -1,195 +1,191 @@
-// import { getCurrentTest } from "@vitest/runner";
-// import { getSortedEntries, snapshot, toHashString } from "msw-snapshot";
-// import { setupServer } from "msw/node";
-// import path from "path";
-// import { afterAll, afterEach, beforeAll, describe, it } from "vitest";
-// import { testAIModels } from "../../../testUtil/testAIModels.js";
-
-// import { BlockNoteEditor } from "@blocknote/core";
-// import { StreamToolExecutor } from "../../../streamTool/StreamToolExecutor.js";
-// import { ClientSideTransport } from "../../../streamTool/vercelAiSdk/clientside/ClientSideTransport.js";
-// import { generateSharedTestCases } from "../tests/sharedTestCases.js";
-// import { htmlBlockLLMFormat } from "./htmlBlocks.js";
-
-// const BASE_FILE_PATH = path.resolve(
-// __dirname,
-// "__snapshots__",
-// path.basename(__filename),
-// );
-
-// const fetchCountMap: Record = {};
-
-// async function createRequestHash(req: Request) {
-// const url = new URL(req.url);
-// return [
-// // url.host,
-// // url.pathname,
-// toHashString([
-// req.method,
-// url.origin,
-// url.pathname,
-// getSortedEntries(url.searchParams),
-// getSortedEntries(req.headers),
-// // getSortedEntries(req.cookies),
-// new TextDecoder("utf-8").decode(await req.arrayBuffer()),
-// ]),
-// ].join("/");
-// }
-
-// // Main test suite with snapshot middleware
-// describe("Models", () => {
-// // Define server with snapshot middleware for the main tests
-// const server = setupServer(
-// snapshot({
-// updateSnapshots: "missing",
-// // onSnapshotUpdated: "all",
-// // ignoreSnapshots: true,
-// async createSnapshotPath(info) {
-// // use a unique path for each model
-// const t = getCurrentTest()!;
-// const mswPath = path.join(
-// t.suite!.name, // same directory as the test snapshot
-// "__msw_snapshots__",
-// t.suite!.suite!.name, // model / streaming params
-// t.name,
-// );
-// // in case there are multiple requests in a test, we need to use a separate snapshot for each request
-// fetchCountMap[mswPath] = (fetchCountMap[mswPath] || 0) + 1;
-// const hash = await createRequestHash(info.request);
-// return mswPath + `_${fetchCountMap[mswPath]}_${hash}.json`;
-// },
-// basePath: BASE_FILE_PATH,
-// // onFetchFromSnapshot(info, snapshot) {
-// // console.log("onFetchFromSnapshot", info, snapshot);
-// // },
-// // onFetchFromServer(info, snapshot) {
-// // console.log("onFetchFromServer", info, snapshot);
-// // },
-// }),
-// );
-
-// beforeAll(() => {
-// server.listen();
-// });
-
-// afterAll(() => {
-// server.close();
-// });
-
-// afterEach(() => {
-// delete (window as Window & { __TEST_OPTIONS?: any }).__TEST_OPTIONS;
-// });
-
-// const testMatrix = [
-// {
-// model: testAIModels.openai,
-// stream: true,
-// generateObject: true,
-// },
-// {
-// model: testAIModels.openai,
-// stream: true,
-// },
-// // {
-// // model: testAIModels.openai,
-// // stream: false,
-// // },
-// // TODO: https://github.com/vercel/ai/issues/8533
-// {
-// model: testAIModels.groq,
-// stream: true,
-// },
-// // {
-// // model: testAIModels.groq,
-// // stream: false,
-// // },
-// // anthropic streaming needs further investigation for some test cases
-// // {
-// // model: testAIModels.anthropic,
-// // stream: true,
-// // },
-// {
-// model: testAIModels.anthropic,
-// stream: true,
-// },
-// // currently doesn't support streaming
-// // https://github.com/vercel/ai/issues/5350
-// // {
-// // model: testAIModels.albert,
-// // stream: true,
-// // },
-// // This works for most prompts, but not all (would probably need a llama upgrade?)
-// // {
-// // model: testAIModels.albert,
-// // stream: false,
-// // },
-// ];
-
-// for (const params of testMatrix) {
-// describe(`${params.model.provider}/${params.model.modelId} (${
-// (params.stream ? "streaming" : "non-streaming") +
-// (params.generateObject ? " + generateObject" : "")
-// })`, () => {
-// generateSharedTestCases({
-// streamToolsProvider: htmlBlockLLMFormat.getStreamToolsProvider({
-// withDelays: false,
-// }),
-// transport: new ClientSideTransport({
-// model: params.model,
-// stream: params.stream,
-// objectGeneration: params.generateObject,
-// _additionalOptions: {
-// maxRetries: 0,
-// },
-// }),
-// });
-// });
-// }
-// });
-
-// describe("streamToolsProvider", () => {
-// it("should return the correct stream tools", () => {
-// // test skipped, this is only to validate type inference
-// return;
-
-// // eslint-disable-next-line no-unreachable
-// const editor = BlockNoteEditor.create();
-// const streamTools = htmlBlockLLMFormat
-// .getStreamToolsProvider({
-// defaultStreamTools: {
-// add: true,
-// },
-// })
-// .getStreamTools(editor, true);
-
-// const executor = new StreamToolExecutor(streamTools);
-
-// executor.executeOne({
-// type: "add",
-// blocks: ["test
"],
-// referenceId: "1",
-// position: "after",
-// });
-
-// executor.executeOne({
-// // @ts-expect-error
-// type: "update",
-// blocks: ["test
"],
-// referenceId: "1",
-// position: "after",
-// });
-
-// executor.executeOne({
-// type: "add",
-// // @ts-expect-error
-// blocks: [{ type: "paragraph", content: "test" }],
-// referenceId: "1",
-// position: "after",
-// });
-// });
-// });
-import { expect, it } from "vitest";
-
-it("should work", () => {
- expect(true).toBe(true);
+import { getCurrentTest } from "@vitest/runner";
+import { getSortedEntries, snapshot, toHashString } from "msw-snapshot";
+import { setupServer } from "msw/node";
+import path from "path";
+import { afterAll, afterEach, beforeAll, describe, it } from "vitest";
+import { testAIModels } from "../../../testUtil/testAIModels.js";
+
+import { BlockNoteEditor } from "@blocknote/core";
+import { StreamToolExecutor } from "../../../streamTool/StreamToolExecutor.js";
+import { ClientSideTransport } from "../../../streamTool/vercelAiSdk/clientside/ClientSideTransport.js";
+import { generateSharedTestCases } from "../tests/sharedTestCases.js";
+import { htmlBlockLLMFormat } from "./htmlBlocks.js";
+
+const BASE_FILE_PATH = path.resolve(
+ __dirname,
+ "__snapshots__",
+ path.basename(__filename),
+);
+
+const fetchCountMap: Record = {};
+
+async function createRequestHash(req: Request) {
+ const url = new URL(req.url);
+ return [
+ // url.host,
+ // url.pathname,
+ toHashString([
+ req.method,
+ url.origin,
+ url.pathname,
+ getSortedEntries(url.searchParams),
+ getSortedEntries(req.headers),
+ // getSortedEntries(req.cookies),
+ new TextDecoder("utf-8").decode(await req.arrayBuffer()),
+ ]),
+ ].join("/");
+}
+
+// Main test suite with snapshot middleware
+describe("Models", () => {
+ // Define server with snapshot middleware for the main tests
+ const server = setupServer(
+ snapshot({
+ updateSnapshots: "missing",
+ // onSnapshotUpdated: "all",
+ // ignoreSnapshots: true,
+ async createSnapshotPath(info) {
+ // use a unique path for each model
+ const t = getCurrentTest()!;
+ const mswPath = path.join(
+ t.suite!.name, // same directory as the test snapshot
+ "__msw_snapshots__",
+ t.suite!.suite!.name, // model / streaming params
+ t.name,
+ );
+ // in case there are multiple requests in a test, we need to use a separate snapshot for each request
+ fetchCountMap[mswPath] = (fetchCountMap[mswPath] || 0) + 1;
+ const hash = await createRequestHash(info.request);
+ return mswPath + `_${fetchCountMap[mswPath]}_${hash}.json`;
+ },
+ basePath: BASE_FILE_PATH,
+ // onFetchFromSnapshot(info, snapshot) {
+ // console.log("onFetchFromSnapshot", info, snapshot);
+ // },
+ // onFetchFromServer(info, snapshot) {
+ // console.log("onFetchFromServer", info, snapshot);
+ // },
+ }),
+ );
+
+ beforeAll(() => {
+ server.listen();
+ });
+
+ afterAll(() => {
+ server.close();
+ });
+
+ afterEach(() => {
+ delete (window as Window & { __TEST_OPTIONS?: any }).__TEST_OPTIONS;
+ });
+
+ const testMatrix = [
+ {
+ model: testAIModels.openai,
+ stream: true,
+ generateObject: true,
+ },
+ {
+ model: testAIModels.openai,
+ stream: true,
+ },
+ // {
+ // model: testAIModels.openai,
+ // stream: false,
+ // },
+ // TODO: https://github.com/vercel/ai/issues/8533
+ {
+ model: testAIModels.groq,
+ stream: true,
+ },
+ // {
+ // model: testAIModels.groq,
+ // stream: false,
+ // },
+ // anthropic streaming needs further investigation for some test cases
+ // {
+ // model: testAIModels.anthropic,
+ // stream: true,
+ // },
+ {
+ model: testAIModels.anthropic,
+ stream: true,
+ },
+ // currently doesn't support streaming
+ // https://github.com/vercel/ai/issues/5350
+ // {
+ // model: testAIModels.albert,
+ // stream: true,
+ // },
+ // This works for most prompts, but not all (would probably need a llama upgrade?)
+ // {
+ // model: testAIModels.albert,
+ // stream: false,
+ // },
+ ];
+
+ for (const params of testMatrix) {
+ describe(`${params.model.provider}/${params.model.modelId} (${
+ (params.stream ? "streaming" : "non-streaming") +
+ (params.generateObject ? " + generateObject" : "")
+ })`, () => {
+ generateSharedTestCases({
+ streamToolsProvider: htmlBlockLLMFormat.getStreamToolsProvider({
+ withDelays: false,
+ }),
+ transport: new ClientSideTransport({
+ systemPrompt: htmlBlockLLMFormat.systemPrompt,
+ model: params.model,
+ stream: params.stream,
+ objectGeneration: params.generateObject,
+ _additionalOptions: {
+ maxRetries: 0,
+ },
+ }),
+ });
+ });
+ }
+});
+
+describe("streamToolsProvider", () => {
+ it("should return the correct stream tools", () => {
+ // test skipped, this is only to validate type inference
+ return;
+
+ // eslint-disable-next-line no-unreachable
+ const editor = BlockNoteEditor.create();
+ const streamTools = htmlBlockLLMFormat
+ .getStreamToolsProvider({
+ defaultStreamTools: {
+ add: true,
+ },
+ })
+ .getStreamTools(editor, true);
+
+ const executor = new StreamToolExecutor(streamTools);
+
+ executor.executeOne({
+ type: "add",
+ blocks: ["test
"],
+ referenceId: "1",
+ position: "after",
+ });
+
+ executor.executeOne({
+ // @ts-expect-error
+ type: "update",
+ blocks: ["test
"],
+ referenceId: "1",
+ position: "after",
+ });
+
+ executor.executeOne({
+ type: "add",
+ // @ts-expect-error
+ blocks: [{ type: "paragraph", content: "test" }],
+ referenceId: "1",
+ position: "after",
+ });
+ });
});
diff --git a/packages/xl-ai/src/api/formats/html-blocks/htmlBlocks.ts b/packages/xl-ai/src/api/formats/html-blocks/htmlBlocks.ts
index 1f0be5f984..cd6af6eaae 100644
--- a/packages/xl-ai/src/api/formats/html-blocks/htmlBlocks.ts
+++ b/packages/xl-ai/src/api/formats/html-blocks/htmlBlocks.ts
@@ -1,17 +1,11 @@
import { BlockNoteEditor } from "@blocknote/core";
import { StreamTool } from "../../../streamTool/streamTool.js";
-
+import { makeDocumentStateBuilder } from "../DocumentStateBuilder.js";
import {
StreamToolsConfig,
StreamToolsProvider,
StreamToolsResult,
-} from "../index.js";
-import { defaultHTMLPromptBuilder } from "./defaultHTMLPromptBuilder.js";
-import {
- defaultHTMLPromptInputDataBuilder,
- getDataForPromptNoSelection,
- getDataForPromptWithSelection,
-} from "./htmlPromptData.js";
+} from "../formats.js";
import { tools } from "./tools/index.js";
function getStreamTools<
@@ -71,6 +65,19 @@ function getStreamTools<
return streamTools as StreamToolsResult;
}
+const systemPrompt = `You're manipulating a text document using HTML blocks.
+Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $).
+List items are 1 block with 1 list item each, so block content \`- item1
\` is valid, but \`- item1
- item2
\` is invalid. We'll merge them automatically.
+For code blocks, you can use the \`data-language\` attribute on a block (wrapped with ) to specify the language.
+
+If the user requests updates to the document, use the "applyDocumentOperations" tool to update the document.
+---
+IF there is no selection active in the latest state, first, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.
+ EXAMPLE: if user says "below" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor.
+ EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need \`referenceId\` to point to the block before the cursor with position \`after\` (or block below and \`before\`
+---
+ `;
+
export const htmlBlockLLMFormat = {
/**
* Function to get the stream tools that can apply HTML block updates to the editor
@@ -90,25 +97,15 @@ export const htmlBlockLLMFormat = {
);
},
}),
-
+ systemPrompt,
tools,
/**
- * The default PromptBuilder that determines how a userPrompt is converted to an array of
- * LLM Messages (CoreMessage[])
- */
- defaultPromptBuilder: defaultHTMLPromptBuilder,
-
- /**
- * The default PromptInputDataBuilder that can take an editor and user request and convert it to the input required for the PromptBuilder
- */
- defaultPromptInputDataBuilder: defaultHTMLPromptInputDataBuilder,
-
- /**
- * Helper functions which can be used when implementing a custom PromptBuilder
+ * The default DocumentStateBuilder that can take an editor and convert it to a document state that can be passed to the backend
*/
- promptHelpers: {
- getDataForPromptNoSelection,
- getDataForPromptWithSelection,
- },
+ defaultDocumentStateBuilder: makeDocumentStateBuilder(
+ async (editor, block) => {
+ return editor.blocksToHTMLLossy([block]);
+ },
+ ),
};
diff --git a/packages/xl-ai/src/api/formats/html-blocks/htmlPromptData.ts b/packages/xl-ai/src/api/formats/html-blocks/htmlPromptData.ts
deleted file mode 100644
index 1e99d5b94f..0000000000
--- a/packages/xl-ai/src/api/formats/html-blocks/htmlPromptData.ts
+++ /dev/null
@@ -1,92 +0,0 @@
-import { Block, BlockNoteEditor } from "@blocknote/core";
-import { AIRequest } from "../../../index.js";
-import { addCursorPosition } from "../../promptHelpers/addCursorPosition.js";
-import { convertBlocks } from "../../promptHelpers/convertBlocks.js";
-import { flattenBlocks } from "../../promptHelpers/flattenBlocks.js";
-import { suffixIDs } from "../../promptHelpers/suffixIds.js";
-import { trimEmptyBlocks } from "../../promptHelpers/trimEmptyBlocks.js";
-
-export type HTMLPromptData = (
- | Awaited>
- | Awaited>
-) & {
- userPrompt: string;
-};
-
-export async function defaultHTMLPromptInputDataBuilder(
- aiRequest: AIRequest,
-): Promise {
- if (aiRequest.selectedBlocks) {
- return {
- ...(await getDataForPromptWithSelection(aiRequest.editor, {
- selectedBlocks: aiRequest.selectedBlocks,
- })),
- userPrompt: aiRequest.userPrompt,
- };
- } else {
- return {
- ...(await getDataForPromptNoSelection(aiRequest.editor, {
- excludeBlockIds: aiRequest.emptyCursorBlockToDelete
- ? [aiRequest.emptyCursorBlockToDelete]
- : undefined,
- })),
- userPrompt: aiRequest.userPrompt,
- };
- }
-}
-
-export async function getDataForPromptNoSelection(
- editor: BlockNoteEditor,
- opts: {
- excludeBlockIds?: string[];
- },
-) {
- const isEmptyDocument = trimEmptyBlocks(editor.document).length === 0;
- const cursorBlockId = editor.getTextCursorPosition().block.id;
- const input = trimEmptyBlocks(editor.document, {
- cursorBlockId,
- });
- const blockArray = await convertBlocks(
- flattenBlocks(input),
- async (block) => {
- return editor.blocksToHTMLLossy([block]);
- },
- );
- const withCursor = addCursorPosition(editor, blockArray);
- const filtered = withCursor.filter(
- (b) => "cursor" in b || !(opts.excludeBlockIds || []).includes(b.id),
- );
- const suffixed = suffixIDs(filtered);
- return {
- selection: false as const,
- htmlBlocks: suffixed,
- isEmptyDocument,
- };
-}
-
-export async function getDataForPromptWithSelection(
- editor: BlockNoteEditor,
- opts: {
- selectedBlocks: Block[];
- },
-) {
- const isEmptyDocument = trimEmptyBlocks(editor.document).length === 0;
- const blockArray = await convertBlocks(
- flattenBlocks(opts.selectedBlocks),
- async (block) => {
- return editor.blocksToHTMLLossy([block]);
- },
- );
- const suffixed = suffixIDs(blockArray);
-
- return {
- isEmptyDocument,
- selection: true as const,
- htmlSelectedBlocks: suffixed,
- htmlDocument: (
- await convertBlocks(flattenBlocks(editor.document), async (block) => {
- return editor.blocksToHTMLLossy([block]);
- })
- ).map(({ block }) => ({ block })), // strip ids so LLM can't accidentally issue updates to ids not in selection
- };
-}
diff --git a/packages/xl-ai/src/api/formats/index.ts b/packages/xl-ai/src/api/formats/index.ts
index 8c28b19d4d..076eab3a22 100644
--- a/packages/xl-ai/src/api/formats/index.ts
+++ b/packages/xl-ai/src/api/formats/index.ts
@@ -1,72 +1,2 @@
-import { BlockNoteEditor } from "@blocknote/core";
-import { StreamTool } from "../../streamTool/streamTool.js";
-import { AddBlocksToolCall } from "./base-tools/createAddBlocksTool.js";
-import { UpdateBlockToolCall } from "./base-tools/createUpdateBlockTool.js";
-import { DeleteBlockToolCall } from "./base-tools/delete.js";
-import { htmlBlockLLMFormat } from "./html-blocks/htmlBlocks.js";
-import { HTMLPromptData } from "./html-blocks/htmlPromptData.js";
-import { jsonBlockLLMFormat } from "./json/json.js";
-import { markdownBlockLLMFormat } from "./markdown-blocks/markdownBlocks.js";
-import { PromptBuilder } from "./PromptBuilder.js";
-
-// Define the tool types
-export type AddTool = StreamTool>;
-export type UpdateTool = StreamTool>;
-export type DeleteTool = StreamTool;
-
-// Create a conditional type that maps boolean flags to tool types
-export type StreamToolsConfig = {
- add?: boolean;
- update?: boolean;
- delete?: boolean;
-};
-
-export type StreamToolsResult = [
- ...(T extends { update: true } ? [UpdateTool] : []),
- ...(T extends { add: true } ? [AddTool] : []),
- ...(T extends { delete: true } ? [DeleteTool] : []),
-];
-
-export type StreamToolsProvider<
- TT,
- T extends StreamToolsConfig = { add: true; update: true; delete: true },
-> = {
- getStreamTools: (
- editor: BlockNoteEditor,
- selectionInfo?:
- | {
- from: number;
- to: number;
- }
- | boolean,
- onBlockUpdate?: (blockId: string) => void,
- ) => StreamToolsResult;
-};
-
-export type AIDocumentFormat = {
- /**
- * Function to get the stream tools that can apply HTML block updates to the editor
- */
- getStreamToolsProvider: (
- withDelays: boolean,
- defaultStreamTools?: T,
- ) => StreamToolsProvider;
- /**
- * The default PromptBuilder that determines how a userPrompt is converted to an array of
- * LLM Messages (CoreMessage[])
- */
- defaultPromptBuilder: PromptBuilder;
- /**
- * Helper functions which can be used when implementing a custom PromptBuilder.
- * The signature depends on the specific format
- */
- promptHelpers: any;
-};
-
-export const aiDocumentFormats = {
- _experimental_json: jsonBlockLLMFormat,
- _experimental_markdown: markdownBlockLLMFormat,
- html: htmlBlockLLMFormat,
-};
-
-export * from "./PromptBuilder.js";
+export * from "./DocumentStateBuilder.js";
+export * from "./formats.js";
diff --git a/packages/xl-ai/src/api/formats/json/defaultJSONPromptBuilder.ts b/packages/xl-ai/src/api/formats/json/defaultJSONPromptBuilder.ts
deleted file mode 100644
index e5b049cdec..0000000000
--- a/packages/xl-ai/src/api/formats/json/defaultJSONPromptBuilder.ts
+++ /dev/null
@@ -1,173 +0,0 @@
-import { UIMessage } from "ai";
-import type { PromptBuilder } from "../PromptBuilder.js";
-import { JSONPromptData } from "./jsonPromptData.js";
-
-function promptManipulateSelectionJSONBlocks(
- messages: UIMessage[],
- opts: Exclude,
-): void {
- if (messages.length > 0) {
- messages.push(
- {
- role: "assistant",
- id: "document-state-" + messages.length,
- parts: [
- {
- type: "text",
- text: `This is the latest state of the selection (ignore previous selections, you MUST issue operations against this latest version of the selection):`,
- },
- {
- type: "text",
- text: JSON.stringify(opts.jsonSelectedBlocks),
- },
- {
- type: "text",
- text: "This is the latest state of the document (INCLUDING the selected text), find the selected text in there to understand the context:",
- },
- {
- type: "text",
- text: JSON.stringify(opts.jsonDocument),
- },
- ],
- },
- {
- role: "user",
- id: "user-prompt-" + messages.length,
- parts: [
- {
- type: "text",
- text: "The user asks you to do the following:",
- },
- {
- type: "text",
- text: opts.userPrompt,
- },
- ],
- },
- );
- }
-
- messages.push(
- {
- role: "system",
- id: "document-state-intro",
- parts: [
- {
- type: "text",
- text: `You're manipulating a selected part of a text document using JSON blocks.
- Make sure to follow the json schema provided and always include the trailing $ in ids.
- This is the selection as an array of JSON blocks:`,
- },
- {
- type: "text",
- text: JSON.stringify(opts.jsonSelectedBlocks),
- },
- {
- type: "text",
- text: "This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:",
- },
- {
- type: "text",
- text: JSON.stringify(opts.jsonDocument),
- },
- ],
- },
- {
- role: "user",
- id: "user-prompt",
- parts: [
- {
- type: "text",
- text: opts.userPrompt,
- },
- ],
- },
- );
-}
-
-function promptManipulateDocumentUseJSONBlocks(
- messages: UIMessage[],
- opts: Exclude,
-): void {
- if (messages.length > 0) {
- messages.push(
- {
- role: "assistant",
- id: "document-state-" + messages.length,
- parts: [
- {
- type: "text",
- text: `This is the latest state of the document (ignore previous documents, you MUST issue operations against this latest version of the document):`,
- },
- {
- type: "text",
- text: JSON.stringify(opts.jsonBlocks),
- },
- ],
- },
- {
- role: "user",
- id: "user-prompt-" + messages.length,
- parts: [
- {
- type: "text",
- text: opts.userPrompt,
- },
- ],
- },
- );
- return;
- }
- messages.push(
- {
- role: "system",
- id: "document-state",
- parts: [
- {
- type: "text",
- text: `You're manipulating a text document using JSON blocks.
- Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $).
- This is the initial document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):`,
- },
- {
- type: "text",
- text: JSON.stringify(opts.jsonBlocks),
- },
- {
- type: "text",
- text:
- `First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.
- EXAMPLE: if user says "below" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor.
- EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user),
- then you need \`referenceId\` to point to the block before the cursor with position \`after\` (or block below and \`before\`).
-
- ` +
- (opts.isEmptyDocument
- ? `Because the document is empty, first update the empty block before adding new blocks.`
- : "Prefer updating existing blocks over removing and adding (but this also depends on the user's question)."),
- },
- ],
- },
- {
- role: "user",
- id: "user-prompt",
- parts: [
- {
- type: "text",
- text: opts.userPrompt,
- },
- ],
- },
- );
-}
-
-export const defaultJSONPromptBuilder: PromptBuilder