@blocknote/xl-ai 0.31.1 → 0.31.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blocknote-xl-ai.cjs +8 -8
- package/dist/blocknote-xl-ai.cjs.map +1 -1
- package/dist/blocknote-xl-ai.js +296 -257
- package/dist/blocknote-xl-ai.js.map +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +9 -8
- package/src/api/LLMRequest.ts +16 -2
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/Add heading (h1) and code block_1_4ed20a68d545bbcac0a6974406d9b1b1.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/add a list (end)_1_a8c0f5688c447808ea40e16816bc9d88.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/add a new paragraph (empty doc)_1_4200cbf42b5dd56e2fb7c1dc4c0e5c95.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/add a new paragraph (end)_1_3cecc2859589d59d7b2a73b271a02ebb.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/add a new paragraph (start)_1_0b6e5ba7c365aa004ab09915db4747d2.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/Add heading (h1) and code block_1_f09fb671c15594eba4367376e1de7404.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in target block, add mark (paragraph)_1_039df897cf40b1464a3e77597698630f.json → Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a list (end)_1_9ca128e303da5f76048c82f2c1928b5f.json } +2 -2
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/standard update_1_69863686209bcd70d5d432c6c5646ec6.json → Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a new paragraph (empty doc)_1_fedaaecc10d6ddf733d85168d2167795.json } +2 -2
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/update block type_1_cec06b764f3e6538c0a0baeb04d60587.json → Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a new paragraph (end)_1_fe965ef7a99beb3acc090a9f597b4279.json } +2 -2
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/modify parent content_1_0b00b5e42872d9f249427436ed23ca40.json → Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a new paragraph (start)_1_232100784a2397a470c08d82001cb7fb.json } +2 -2
- package/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_da4995473884c05440ca118c6ae41453.json +15 -0
- package/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_ca41f979b0669b1a9285363b55a53b23.json → Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a list (end)_1_bcc7319416c9b14368ea5ad861f9b722.json } +2 -2
- package/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_f3cba828671b95cae0b485ad554942cd.json → Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (empty doc)_1_8fd66df698028c81b94d9c3da3f48565.json } +2 -2
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type_1_18c554c2e45b6f5a1f491396916dcb46.json → Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (end)_1_1df9f2bee04498ef092f332ebce02289.json } +2 -2
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify parent content_1_c8cc1e445e2ea3a61af98fae49719bb2.json → Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (start)_1_ddea32bf65559924075cf5a378ff52a9.json } +2 -2
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/Add heading (h1) and code block_1_411b9303baf0445a2b3d22af986dcbd7.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (paragraph)_1_15ae85e2a52e28738a9cd2f4585a5e87.json → Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a list (end)_1_b62f9dcc3af6272c847eb867f28464e4.json } +2 -2
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/standard update_1_62ccc02aa192415d17e9a1f5c53dffb1.json → Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (empty doc)_1_e3538aed67ed181c709f2c76ebd3b88c.json } +2 -2
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type_1_e5c648bb981ba9ce20b93054446c721d.json → Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (end)_1_4da2dc377fad46f51e531f5cb2594b48.json } +2 -2
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify parent content_1_b8c66592925ae0e551a329b7b2f3b3e2.json → Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (start)_1_9a1739085965869c82a4ab025a9b426c.json } +2 -2
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/Add heading (h1) and code block_1_91d754a12d792f37fe1483d19a7b4e64.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a list (end)_1_1b9c5367195624176c28a1ca3684ebac.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (empty doc)_1_bda56d4903fe73aa33304a959057957d.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (end)_1_731edbb5fc3b6e4a927978b9e203f336.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (start)_1_56f9b395b16c8dc222ce13deb68cd412.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/add and update paragraph_1_a16755b57abd9123bc8d138ece2fc206.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/add paragraph and update selection_1_9d3466520f605a356f2c31458954e816.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add and update paragraph_1_051b564433dad882d26853a2d2e41841.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add paragraph and update selection_1_0ca431ee9c56812e10198e60552a536f.json +1 -1
- package/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_8ef78aa1880fd8536fa49acb127f51c0.json +15 -0
- package/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_04f9e76ff73eff953288564e5385dbd4.json +1 -1
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add and update paragraph_1_e9e8ca04b228ebbec6f48d24c147fbcf.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add paragraph and update selection_1_f5cd402d603bead3d759ebb5485f39c3.json +1 -1
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add and update paragraph_1_2551adfcc4ecd63e37094152b44c1144.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add paragraph and update selection_1_fc5837fa3ab53d1a511a8092a926d87d.json +1 -1
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/delete first block_1_a4ec61146ba0a517742770cb5843201f.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/delete first block_1_ee24300ba2c8986f54c02b0d2aec9691.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/delete first block_1_21ad45e4791e6ce60e52c20228c507ff.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/delete first block_1_002ed2fb069e97008c626fe8c2d43637.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/delete first block_1_af53bf5e53a86669deaae43b9ab27c67.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/drop mark and link and change text within mark_1_a97a8a61e45a5cfa1f37771aefbf06ba.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/drop mark and link_1_80d39d8c2f69d28a6aec0dee64eb7b4f.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/modify nested content_1_64d59c27de629179d00d268836aebcba.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/modify parent content_1_7cb863416d6d953446640251160e084e.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/plain source block, add mention_1_c6025cf7f6efc3b57f721752b1f49801.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/standard update_1_b3b73d97f68d26aba18541b8c809ec4d.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/styles + ic in source block, remove mark_1_f6a509381d62c4242864af576bb7ba61.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/styles + ic in source block, remove mention_1_61539d923364c797cda8519b7d6dbb77.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/styles + ic in source block, replace content_1_a73907775c98b6c395eac24591e7f1d4.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/styles + ic in source block, update mention prop_1_1821b0f5da6b0bdb28f9444c6eaca222.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/styles + ic in source block, update text_1_82f2d8a07824544fad31d34c8a554af1.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/styles + ic in target block, add mark (paragraph)_1_c8bc122a4cb48783ca677fc4aa6cd947.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/styles + ic in target block, add mark (word)_1_686bfcd92e4eb65462c1811ad4a3976d.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/translate selection_1_2968b738a7996331d8faf2692d652c3c.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/turn paragraphs into list_1_dd8e963f842a261deec745e8d4608bfd.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/update block type and content_1_06943ba0bda62a61f058ba07379ab4b7.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/update block type_1_9e53c774c99f178f06b3c7b3608d1605.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/Add heading (h1) and code block_1_c9a31b6237ae08647b85c7348edd052f.json → Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/drop mark and link and change text within mark_1_2b911dce06e556a512fa22d1a0042b5a.json } +2 -2
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/drop mark and link_1_f7d042c6ddd42b02098b813fe6e2da2b.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/modify nested content_1_0cbaaf87b0c6b588f7d7e21f72ed7a7c.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/modify parent content_1_d190a41cfce34eb5362468031cb608fe.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/plain source block, add mention_1_963338caea5317fbaa588fed459f0895.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/standard update_1_da09ee8bda5dc347edc748b59bc3bb16.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, remove mark_1_90482aba878618976330fda1af8f6766.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, remove mention_1_5c149679babf73b41810f291fcb4d558.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, replace content_1_0c9d3ace7da95353a998edbaff79177d.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, update mention prop_1_57893638a0ceb0edac342346fa706076.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, update text_1_ef01870ca5f4083b4ea345e00d3c52ff.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/{drop mark and link and change text within mark_1_6b9ad94993b0b3dc39ee8fab8057b967.json → styles + ic in target block, add mark (paragraph)_1_ee8107efdf5fd19552a7fff0b08f6657.json } +2 -2
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in target block, add mark (word)_1_ca95d8d83853d5deb4765c6768a2563f.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/translate selection_1_674d4ec4b8af2ac528ec90892731f67a.json +1 -1
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/turn paragraphs into list_1_1ec910c96203d1d86b7dcce97e352e91.json +1 -1
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Delete/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/delete first block_1_d857ced55373d86233599394800f1a63.json → Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/update block type and content_1_e09825f3b2477a73e86972716897a19e.json } +2 -2
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/update block type_1_cf54cfb6c7dfc32b6429ca1a2302a2b6.json +15 -0
- package/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_5790f7702887daff99c884204e6ae3df.json → Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link and change text within mark_1_efeeda50dc4be1869d555c44cc00a5f5.json } +2 -2
- package/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_e3ff518cb46e814abe773f4184678323.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify nested content_1_c335661f5c1022666f7905497d4a3189.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify parent content_1_73db91187a949699f0fd921ebe60d841.json +15 -0
- package/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_57f7d170977b8d3400a3a1d7182790b0.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/standard update_1_67b27460b36b3013a36967448a8522c4.json +15 -0
- package/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_abd6ba31606c51fb682ca64b85af7008.json +15 -0
- package/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_bcb2fc9b7ec7eb1ae370d9387dc7e505.json +15 -0
- package/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_9e6d5cd399d444173556b9dc0afc3334.json +15 -0
- package/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_e1d72f9616d34022fba9ea219eb13748.json +15 -0
- package/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_bd11c0a3efe0e2b04a0133c6ca73a5cd.json +15 -0
- package/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_60a05ae4a6b034fe6eaafb2b7bfb9638.json → styles + ic in target block, add mark (paragraph)_1_c865fea79947e8f5885f8c7ebc7dd91a.json } +2 -2
- package/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_e155e7bf26070976e31928b82bb13fbc.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/translate selection_1_54ec8515dd6ab214d8b92c5cf4f09529.json +1 -1
- package/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_ec7bd4074c354be223256a9d0ab17e64.json +1 -1
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Delete/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/delete first block_1_f88ee2c9e0a85200bb5550e4502fc0e5.json → Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type and content_1_a935b00dc3276d6713bffbfb1fdf211e.json } +2 -2
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type_1_21d1130a166f73bca224130b84ed37c4.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/Add heading (h1) and code block_1_084f72a77d80ec6bb6cd2081b3b1d301.json → Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link and change text within mark_1_8798a9655a7eb7a651bb81f5f811fc60.json } +2 -2
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link_1_001ea299cc5ab0754d17884094fa9d86.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify nested content_1_3b7f9df9f7701d51e2ccf274e5280a7d.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify parent content_1_3b9c9ee90eacd058e510ca1c82cbd554.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/plain source block, add mention_1_2e588074658964fdee8f372a25645e39.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/standard update_1_8aa8c7ee6f4c17a92493df542b131069.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mark_1_7c37aad8ce27e926dc486960a90f35eb.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mention_1_a9fa6b0be7fae1d70499aa6ecfea6704.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, replace content_1_4d4299b8044479fe9e15a4a168707806.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update mention prop_1_c6fa894a14f6be81fb568283e4724af9.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update text_1_aa627d12493a30d6fa1bbf6d282b6ecd.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/{drop mark and link and change text within mark_1_feb4bd702156a044fe3c72729f12d83c.json → styles + ic in target block, add mark (paragraph)_1_711e7638278935cce832085d8cce0abc.json } +2 -2
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (word)_1_739768c550cdc9eb5af10dbacc7c6d22.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/translate selection_1_83bf8aa261516bf197d1391294bbcb06.json +1 -1
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/turn paragraphs into list_1_5aa207db4b8600962363d2352bf0b1c4.json +1 -1
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/delete first block_1_c2ce81529453c6009b31fc3e2d3f8aea.json → Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type and content_1_12e64702225f7eb521a176feffbdde9a.json } +2 -2
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type_1_b81e29ddb0de05a668236685bd2df42c.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link and change text within mark_1_f48c2d1d72f4c3514c346629fb7f4d0d.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link_1_c357b571feb374378ba1b288c39b6c31.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify nested content_1_782caee9bbb515bfdae481d31ea48e48.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify parent content_1_92e8df7af02866607d407a52926d4f52.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/plain source block, add mention_1_69dfced69472e5cf7789a98b3ccbbdd8.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/standard update_1_f5d03fb0433b5e5b912f40dbffd9f462.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mark_1_d0386ebc8dc8350f33c44c2251cd1d3c.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mention_1_83b1ed76da3ba0a764fdc6fb4d25e47a.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, replace content_1_dd48a67d4d41880db75515d0a95a53dc.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update mention prop_1_e21784bb9948aac3dd70492535dff192.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update text_1_72b362e3a2e48e9e1d5dad68fc3da63c.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (paragraph)_1_968bf60fd7c9520b848955d47ea8a568.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (word)_1_45c3fcc7757ac314a77786102326e125.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/translate selection_1_8cfca4c1847085a8a31be1818346738e.json +1 -1
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/turn paragraphs into list_1_2f31610c836b996af773c3856634d5c3.json +1 -1
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type and content_1_94cf62e3727b3443984720bc54218659.json +15 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type_1_19432d3e11d58717813be52d54eb6edd.json +15 -0
- package/src/api/formats/html-blocks/defaultHTMLPromptBuilder.ts +17 -9
- package/src/api/formats/html-blocks/htmlBlocks.test.ts +9 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/{Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update text_1_e2f62ab4415528c63105a90c35e202f3.json → Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/Add heading (h1) and code block_1_3d8ae0296c775c0b9ea72c02a9929609.json } +2 -2
- package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a list (end)_1_cda22434dc2a747bf9f4cf42c7433d7e.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (empty doc)_1_190f517e36bed99687ee97dd6287c5d6.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/{Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/standard update_1_6330ddde52ebd48c1e8914a970ad7849.json → Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (end)_1_3e1e7308ef834a61123bbcdfbafe5108.json } +2 -2
- package/src/api/formats/json/__snapshots__/json.test.ts/{Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify parent content_1_603268f548d2c26969d79e4e170bd524.json → Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (start)_1_5af092a8a41a33f685f9d36211e53b80.json } +2 -2
- package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/Add heading (h1) and code block_1_76ddcfa16307d0741e08137cf73d4317.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a list (end)_1_c78c556afea621b9a3ee729371022875.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (empty doc)_1_28d4b2725f46dbb295bb737be389eeb7.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (end)_1_cb5c635c82176f32e0620ffd3c20a093.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (start)_1_3d203db27e164762b1c5482b1216d34f.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add and update paragraph_1_a870e435d33f8d5071c9a241a8a89c95.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add paragraph and update selection_1_caeb25fbcd6743ad509ab18526f09180.json +1 -1
- package/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add and update paragraph_1_cd23d7eafdead348b7acefbc65003153.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add paragraph and update selection_1_d7907adc86da5742363bfc4422e490e6.json +1 -1
- package/src/api/formats/json/__snapshots__/json.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/delete first block_1_8ff8c21bfc4aa862e94756e5beaa0c5f.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/delete first block_1_91b8221e1ca84307a2395a9fc3a0c4af.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/clear block formatting_1_e90942febee09bc72bae9370e4104064.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link and change text within mark_1_77ee176a1443f693e0a89a478e9641cd.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link_1_1adac318670c5b2dc4fec785c22c07b4.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/{update block prop_1_697c8f64d854e5a824cb735c81d9b7ea.json → modify nested content_1_c1f83e076f8895845724ecfba25bddc2.json } +2 -2
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/{clear block formatting_1_25bc98ef490234deedb61e16a00d439e.json → modify parent content_1_e3a234f486327e6782306e69e8783633.json } +2 -2
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/plain source block, add mention_1_457a8f63be3cc328c3f4c3d8f280cc5c.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/standard update_1_86a6267e492a256627bf78aefa6f2131.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mark_1_3e2c06cc0be31ae019cdf0c28a4ac42a.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mention_1_d196eb4d95dc2c6e361d8c3c991f625e.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, replace content_1_e4379c500c8143a73ef7911f2ca4fe1c.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update mention prop_1_aabb252da137e7eeb73a3773d67f3f8c.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update text_1_22748a0cd170c148c841b283e72f8f21.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/{drop mark and link and change text within mark_1_c94d4dbaf7e20ccafc3a87f8933afd6a.json → styles + ic in target block, add mark (paragraph)_1_9b5edf84bfa5483e09526be0b09bc73b.json } +2 -2
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (word)_1_f865e36cf7249da6433d0f72df43ed33.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/translate selection_1_e06a86826098274cfb35046f8f5f67a5.json +1 -1
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/turn paragraphs into list_1_c704dd8060467f285e008fcfa10bd3b9.json +1 -1
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/{styles + ic in source block, update mention prop_1_c2fb024d9d7218c5051012323c39fa0d.json → update block prop and content_1_a937282e29f23969499e8d2ce154ecbe.json } +2 -2
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block prop_1_8653d565277c79b8ad2f7165ddf2d60c.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/{Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/delete first block_1_5515f1ecee9bd348f415319f4a843add.json → Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type and content_1_420c159d54add9a1985e1d29c6a228a3.json } +2 -2
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type_1_e5dcf794f715496ba0701d6ce44fb9ca.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/clear block formatting_1_78c6976c6927c9f1b69427888e7810cd.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link and change text within mark_1_bb1e995f7e85f02de6e6412ee1fc5f2c.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link_1_c8b90f2304c14fc75cd86b4e2d6906a9.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify nested content_1_f6e336712fdd6ee13e06202dbabb0621.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify parent content_1_74d2ac901a6f707f0958fdb043f3c33c.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/plain source block, add mention_1_b888a066ab849201023d81656d5dbb72.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/standard update_1_9e560beb9bf2e9eb0d96404097119824.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mark_1_f387629028542302fa86064ede9c1814.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mention_1_2044ac5035fda10e6f969bd907f309cb.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, replace content_1_247e5fd028f9fdae63931a3cb518aaed.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update mention prop_1_ff68458b238a680467bad16a5e774b69.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update text_1_f8ed6e50f77545f74b12361e800522bc.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (paragraph)_1_449332fc3dda45bc3b9545c06bb8b6b0.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (word)_1_858e458ddb37c8d42e4183c1905b0cd2.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/translate selection_1_3f8ef537734ef9b7d2142c49bde8cbdd.json +1 -1
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/turn paragraphs into list_1_f8fd91cad88cfec6db2a906b564d39d3.json +1 -1
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block prop and content_1_a10bc5fbbe41e3d206b274984bc5e6ef.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block prop_1_74d0d009b547ada85d1a9e318b69d020.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type and content_1_b29fb27f0be7d00c4644bc096755907e.json +15 -0
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type_1_1923dbb71dd1f14ab6bae4b92d3212fa.json +15 -0
- package/src/api/formats/json/defaultJSONPromptBuilder.ts +48 -6
- package/src/api/promptHelpers/trimEmptyBlocks.ts +4 -0
- package/src/testUtil/cases/addOperationTestCases.ts +14 -1
- package/src/testUtil/cases/editors/emptyEditor.ts +21 -0
- package/src/testUtil/cases/index.ts +4 -1
- package/src/testUtil/testAIModels.ts +6 -0
- package/types/src/testUtil/cases/editors/emptyEditor.d.ts +544 -0
- package/types/src/testUtil/testAIModels.d.ts +1 -0
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/Add heading (h1) and code block_1_112bacb4ae22459e8e8b87c510a5a1ab.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add a list (end)_1_fd2cdf7edb597b5eee87ae1b4c9d8a9e.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add a new paragraph (end)_1_f9f8cec49b3218519501c03ff5c4a3ba.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add a new paragraph (start)_1_d152c585ba7d2fa6e68b1d4b063f266c.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (streaming)/add a new paragraph (start)_1_ae61114b97c12fbf57d14d6c64ffd647.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/Add heading and code block_1_c9a31b6237ae08647b85c7348edd052f.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a list (end)_1_db45f2ba8778e15e8a5f7a320508be46.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a new paragraph (end)_1_f3eaf50ddad718f55acaa05dcc1a2809.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a new paragraph (start)_1_33db3205ea17e8f6ea3a5e2728b6f10e.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/Add heading and code block_1_5790f7702887daff99c884204e6ae3df.json +0 -15
- package/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_321607ef45a4235ca02c411097005de2.json +0 -15
- package/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_709e808af3f5fb39418413416804a03e.json +0 -15
- package/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_034fd3f9b57eba789a6449d5ff3714c4.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/Add heading and code block_1_084f72a77d80ec6bb6cd2081b3b1d301.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a list (end)_1_5c081c7846ad89b59477ceda44c2a349.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (end)_1_97770b1d0462a25cfacd049807a59110.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (start)_1_ecf9943025fd7f7183aac8d86c4e0b6c.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/Add heading (h1) and code block_1_b19471ad74a7a4bf4b288369edf35407.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/Add heading and code block_1_b19471ad74a7a4bf4b288369edf35407.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a list (end)_1_8105f57bbca898c1626edd5cd33308ed.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (end)_1_2f4aa2dfa4f6046506c9e133c5d60e76.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (start)_1_7352df4919df344c441fb32b5cdae62b.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add and update paragraph_1_861b7da5f0734c4350466fb42da57dfe.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add paragraph and update selection_1_4821f5b399d9ebc5b564c530740345ea.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add and update paragraph_1_0d6f9f822d5ba2310e9cb3b5330d1ef0.json +0 -15
- package/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_96cb428c4df1b42645632abe5969170c.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add and update paragraph_1_80b906ff9d95e8b88b30c4efd246dc4b.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add and update paragraph_1_e0a277e6c9c61c532876788f8c914f42.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/delete first block_1_ba835c26344e8e2082ee1f404bacb992.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/delete first block_1_90f8de8d41648f556395ecf223aa0e6e.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/drop mark and link and change text within mark_1_953804d0569e88c225ebe8711ac1d209.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/drop mark and link_1_9cfdcdc629e0d2c8ba65e699037e007c.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/modify nested content_1_595e0413e677a7d0e1cf7024e2cdbf11.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/modify parent content_1_8a40e8e484dd5e6352b3019e81255567.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/plain source block, add mention_1_03e2c4dfae2ceb146b12fc9a266da98e.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/standard update_1_f65e23072a2f6be046fc618e0dbf3949.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, remove mark_1_3e4d4d1ba3f4c2e80cb1d38f35425665.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, remove mention_1_7c0c0ebbf2e5eb36903b25d3e63f2a96.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, replace content_1_f8c8827fbecd6977bdb2e5152b493530.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, update mention prop_1_f4e5d300be72cb5a6c2ef33c32ce7325.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, update text_1_388a274079ba06bcec0049a35278fc01.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in target block, add mark (paragraph)_1_c7be52683c9d405365815f334ed1f4db.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in target block, add mark (word)_1_9bc0da43041ca4b3a188fbdfd9562bae.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/translate selection_1_6f0c6d98d9a99081b01869826a538c74.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/turn paragraphs into list_1_122467a8b6979ad2a47b0417976218a9.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/update block type and content_1_ace9cde890d5c4b2a131f8867e7b5596.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/update block type_1_d356646093fb778e9c8bce47f7133ef8.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/drop mark and link_1_bde418f70f7c93522d3cff713cb6e8b2.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/modify nested content_1_6d6efada9f514cd6b5d479b784960905.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/plain source block, add mention_1_a0f2a68ef2f46c1a3c014966a1d41463.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, remove mark_1_26a2249225e49ac962f2ffc4d186f048.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, remove mention_1_8a9dfa091990b0ea68d8b5e600e5ded4.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, replace content_1_b5da218448fab4a6144aee7b49fe7cfd.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, update mention prop_1_93cd31cde8f8a9d7bcc6ec163bd82e32.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, update text_1_98388769d4b6c534a448363e38006369.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in target block, add mark (word)_1_ecfba97d707a7df556c8be55a94491bd.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/update block type and content_1_56b6b0d7b3b4585a4ca5598979ccc319.json +0 -15
- package/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_df81f4ea9e9cda25c1ef6b1d0de62e6e.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify nested content_1_c473102de44b6890149109c418f224a7.json +0 -15
- package/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_e6db90ec1ad4b48b7e225a5ef7b7ea08.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/standard update_1_afb308d981984d812bf89191d498ddac.json +0 -15
- package/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_7d6962e90a2fb300f8efab2620d77389.json +0 -15
- package/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_a13d0c4ae92fddfbcbef8c619c092951.json +0 -15
- package/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_8d4842fb70ad278064faa2c3c6efa73e.json +0 -15
- package/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_70a3e6c68033303f4dce207ea802bba9.json +0 -15
- package/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_3f639531f292bf1edb20bbb65c6ad0e0.json +0 -15
- package/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_d0dca6e4fab1bc2c56ba2099e199fb05.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link_1_1e8bbd364a267db768002ed243692a79.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify nested content_1_b48a9c33b3a0d37850bd38f4c95b310f.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/plain source block, add mention_1_196e976a8d5748fd3b667cc39b96cc4d.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mark_1_ab9642000a9e81712bf7bf3292769536.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mention_1_aedf9aba96ec8de63204dc0bd079cce0.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, replace content_1_4032f8de849b4d06146cea086f5faee0.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update mention prop_1_37c8ad3a742c0e37960ee3c688ecff05.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update text_1_34b0f8d08eec54b64843fe3f13048db5.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (word)_1_49c10b96b8a5342b3afe37277f0b2ec0.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type and content_1_fa30ce9145d3237fa4a0b86a61965fb3.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link and change text within mark_1_148394a5f5658c93445adc9e68410296.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link_1_b61d90f1021054f8bcf1258cf9d11fe4.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify nested content_1_6dcc3499f6996bd4b16327d079c23b21.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify parent content_1_efbe6b2b8f77c628de12b4ae99dc6939.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/plain source block, add mention_1_c3ec555a7988880acc8c448befdc501d.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/standard update_1_7f328ec2574aff0eba83678fedea486a.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mark_1_2246a490805512b4459ec130c3f7b028.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mention_1_089c1b96e5eef0e337d6ae0646f3670d.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, replace content_1_1b70479170637ef990c696b81982a9ff.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update mention prop_1_8fc18a40e2b4ccc90a9be4a3a826572b.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update text_1_7187509500683cd511ef79bc79adf45e.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (paragraph)_1_263f9c25f7a85f762b255a3778136737.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (word)_1_030b36dcdf89ff60ac373c9797f5caa8.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type and content_1_6bc68512d0085273aa59c32b20ff22b9.json +0 -15
- package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type_1_171c87db8855dba2d6bbcd06ae45fbb5.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/Add heading (h1) and code block_1_4b13d164d4335cc9e201d217c288f3a0.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a list (end)_1_2e1b3d58032f40317616d76bf4fea81c.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (end)_1_4267ae57d44c64aa8b70a89aab67f159.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (start)_1_9d50ec65e996e7a56294ea29bc698367.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/Add heading (h1) and code block_1_8c55f5cd009ab351956e1b40605abc34.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a list (end)_1_eabec381f0f6973116f9e49dc86810d4.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (end)_1_018cc4d3757dfb60819403609f61a74d.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (start)_1_aeee8d53d8e28d27a45229e9f04bfd02.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add and update paragraph_1_46911433377fbe117de27b4ebef430f5.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add and update paragraph_1_049c64f71763963c05852957cdcd40bd.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/delete first block_1_7c35b931bd8677fa1920b9e5f8128f4a.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link_1_164602425b43f343ccbfb3c2f1509b58.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify nested content_1_60470c62411dbe76f9d1ebb97160e62c.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/plain source block, add mention_1_dc3adc84764ea9dd8f20a906a4633334.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mark_1_aa396a89a86700c7c1531127331c95b9.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mention_1_e1de4a145c9a98804f8d1fd1ae811da4.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, replace content_1_ce587e62f1783dd0652ffea5d558fda6.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (paragraph)_1_fb966bb5f366d489cd267e48a7455c72.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (word)_1_10409eb8f8e256c2c07ee05c2558a2a9.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block prop and content_1_be4a66aa5ee43a3fd916166e56052ad0.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type and content_1_6b93af6e60c455fec9f8bde5b44e587d.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type_1_fd7ea265becc91c2e55258021a82a016.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/clear block formatting_1_e9409ed44af8d5b1f3ec7d3b7125386a.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link and change text within mark_1_35579261c0f297cf664524f0c5e08ff1.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link_1_d7303b2c5a80c7a016ba6caa2ae7be04.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify nested content_1_55d150e200dccb9c1ac1b325aa8d5a43.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify parent content_1_34fba8f0eb2af6cd8d1af416390d9dc4.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/plain source block, add mention_1_ae41cefb5832864a8a9b2e67c04c65b4.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/standard update_1_a7a20bf9510adbbafe889498aa22f0ce.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mark_1_db2880a42dbde80ff9950f502ef1ab8f.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mention_1_48523af48bae8448f99a3d4108bb8a55.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, replace content_1_024c55cd1b3177f362a2d606090ca19a.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update mention prop_1_549dd0fe54084e4a98588be963db9361.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update text_1_dbf2fb610e354e0daa60de0cbdd77aba.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (paragraph)_1_8369c3cd3da93d0e734ed7092c0acf40.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (word)_1_7033d19147879fada8c8142ee2be4803.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block prop and content_1_708c779a29da274a24e34cea53755e3b.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block prop_1_67d9ce65ebaaf76b1dde8492176299fc.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type and content_1_f9b7241b0cb9e9e098e13a58b47bfa62.json +0 -15
- package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type_1_dbb1b2b807becf642bb03a71e34b8e21.json +0 -15
package/dist/blocknote-xl-ai.js
CHANGED
|
@@ -2,33 +2,33 @@ var et = Object.defineProperty;
|
|
|
2
2
|
var tt = (e, t, o) => t in e ? et(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
3
3
|
var j = (e, t, o) => tt(e, typeof t != "symbol" ? t + "" : t, o);
|
|
4
4
|
import { getPmSchema as ot, UnreachableCaseError as Pe, getNodeById as rt, updateBlockTr as nt, insertBlocks as st, trackPosition as se, removeAndInsertBlocks as it, getBlock as Oe, defaultProps as Me, isStyledTextInlineContent as at, isLinkInlineContent as ct, BlockNoteExtension as lt, filterSuggestionItems as ut, mergeCSSClasses as dt } from "@blocknote/core";
|
|
5
|
-
import { applySuggestions as Be, suggestChanges as
|
|
6
|
-
import { jsonSchema as
|
|
7
|
-
import { TextSelection as
|
|
8
|
-
import { fixTablesKey as
|
|
5
|
+
import { applySuggestions as Be, suggestChanges as pt, revertSuggestions as ie } from "@blocknote/prosemirror-suggest-changes";
|
|
6
|
+
import { jsonSchema as xe, streamObject as mt, generateObject as ft, APICallError as ht, RetryError as yt } from "ai";
|
|
7
|
+
import { TextSelection as gt, Plugin as Le, PluginKey as _e } from "prosemirror-state";
|
|
8
|
+
import { fixTablesKey as kt } from "prosemirror-tables";
|
|
9
9
|
import bt from "lodash.isequal";
|
|
10
10
|
import { Slice as Y, Fragment as ae } from "prosemirror-model";
|
|
11
|
-
import { Transform as N, Mapping as
|
|
11
|
+
import { Transform as N, Mapping as Ee, ReplaceStep as L, ReplaceAroundStep as St } from "prosemirror-transform";
|
|
12
12
|
import { ChangeSet as ce, simplifyChanges as wt } from "prosemirror-changeset";
|
|
13
13
|
import { DecorationSet as le, Decoration as ue } from "prosemirror-view";
|
|
14
14
|
import { defaultSelectionBuilder as Tt } from "y-prosemirror";
|
|
15
15
|
import { jsxs as vt, jsx as y } from "react/jsx-runtime";
|
|
16
16
|
import { useBlockNoteContext as Ct, useComponentsContext as G, useSuggestionMenuKeyboardHandler as Pt, useBlockNoteEditor as K, useUIElementPositioning as Ot } from "@blocknote/react";
|
|
17
|
-
import B, { useState as
|
|
17
|
+
import B, { useState as Ie, useCallback as D, useMemo as E, useEffect as Ne } from "react";
|
|
18
18
|
import { useStore as Ae } from "zustand";
|
|
19
|
-
import { offset as Mt, size as Bt, autoUpdate as
|
|
19
|
+
import { offset as Mt, size as Bt, autoUpdate as xt } from "@floating-ui/react";
|
|
20
20
|
const de = (e) => {
|
|
21
21
|
let t;
|
|
22
|
-
const o = /* @__PURE__ */ new Set(), r = (u,
|
|
22
|
+
const o = /* @__PURE__ */ new Set(), r = (u, m) => {
|
|
23
23
|
const l = typeof u == "function" ? u(t) : u;
|
|
24
24
|
if (!Object.is(l, t)) {
|
|
25
|
-
const
|
|
26
|
-
t =
|
|
25
|
+
const f = t;
|
|
26
|
+
t = m ?? (typeof l != "object" || l === null) ? l : Object.assign({}, t, l), o.forEach((p) => p(t, f));
|
|
27
27
|
}
|
|
28
28
|
}, n = () => t, s = { setState: r, getState: n, getInitialState: () => c, subscribe: (u) => (o.add(u), () => o.delete(u)) }, c = t = e(r, n, s);
|
|
29
29
|
return s;
|
|
30
|
-
},
|
|
31
|
-
function
|
|
30
|
+
}, pe = (e) => e ? de(e) : de;
|
|
31
|
+
function Lt(e) {
|
|
32
32
|
const { properties: t, required: o, $defs: r, ...n } = e.parameters;
|
|
33
33
|
return {
|
|
34
34
|
schema: {
|
|
@@ -49,7 +49,7 @@ function xt(e) {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
function je(e) {
|
|
52
|
-
const t = e.map((r) =>
|
|
52
|
+
const t = e.map((r) => Lt(r)), o = {};
|
|
53
53
|
for (const r of t)
|
|
54
54
|
for (const n in r.$defs) {
|
|
55
55
|
if (o[n] && !bt(o[n], r.$defs[n]))
|
|
@@ -84,7 +84,7 @@ function _t(e) {
|
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function I(e) {
|
|
88
88
|
if (e.locked)
|
|
89
89
|
throw new Error(
|
|
90
90
|
"Stream (source) is already locked and cannot be iterated."
|
|
@@ -102,10 +102,10 @@ function E(e) {
|
|
|
102
102
|
};
|
|
103
103
|
}, t;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
return
|
|
105
|
+
function De(e) {
|
|
106
|
+
return I(_t(e));
|
|
107
107
|
}
|
|
108
|
-
async function*
|
|
108
|
+
async function* Et(e) {
|
|
109
109
|
var n;
|
|
110
110
|
let t = 0, o = !0, r;
|
|
111
111
|
for await (const i of e)
|
|
@@ -128,7 +128,7 @@ async function* It(e) {
|
|
|
128
128
|
isPossiblyPartial: !1
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
|
-
async function*
|
|
131
|
+
async function* $e(e, t) {
|
|
132
132
|
let o = !1;
|
|
133
133
|
for await (const r of e) {
|
|
134
134
|
const n = r.operation;
|
|
@@ -165,12 +165,12 @@ async function* Re(e, t) {
|
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
-
async function*
|
|
168
|
+
async function* It(e, t) {
|
|
169
169
|
const o = Re(
|
|
170
170
|
e,
|
|
171
171
|
t
|
|
172
172
|
);
|
|
173
|
-
yield*
|
|
173
|
+
yield* $e(
|
|
174
174
|
o,
|
|
175
175
|
(n) => {
|
|
176
176
|
if (!n.isPossiblyPartial)
|
|
@@ -183,7 +183,7 @@ async function* Nt(e, t) {
|
|
|
183
183
|
e,
|
|
184
184
|
t
|
|
185
185
|
);
|
|
186
|
-
yield*
|
|
186
|
+
yield* $e(
|
|
187
187
|
o,
|
|
188
188
|
(n) => {
|
|
189
189
|
throw new Error("invalid operation: " + n.operation.error);
|
|
@@ -199,7 +199,7 @@ async function At(e, t) {
|
|
|
199
199
|
const i = {
|
|
200
200
|
// non-overridable options for streamObject
|
|
201
201
|
output: "object",
|
|
202
|
-
schema:
|
|
202
|
+
schema: xe(je(e)),
|
|
203
203
|
// configurable options for streamObject
|
|
204
204
|
// - optional, with defaults
|
|
205
205
|
// mistral somehow needs "auto", while groq/llama needs "tool"
|
|
@@ -210,7 +210,7 @@ async function At(e, t) {
|
|
|
210
210
|
...r,
|
|
211
211
|
// extra options for streamObject
|
|
212
212
|
...o ?? {}
|
|
213
|
-
}, a = await
|
|
213
|
+
}, a = await ft(i), s = jt(a.object);
|
|
214
214
|
if (!s.ok)
|
|
215
215
|
throw new Error(s.error);
|
|
216
216
|
let c;
|
|
@@ -218,7 +218,7 @@ async function At(e, t) {
|
|
|
218
218
|
streamObjectResult: void 0,
|
|
219
219
|
generateObjectResult: a,
|
|
220
220
|
get operationsSource() {
|
|
221
|
-
return c || (c =
|
|
221
|
+
return c || (c = De(
|
|
222
222
|
Nt(s.value, e)
|
|
223
223
|
)), c;
|
|
224
224
|
},
|
|
@@ -247,7 +247,7 @@ function jt(e) {
|
|
|
247
247
|
value: o()
|
|
248
248
|
};
|
|
249
249
|
}
|
|
250
|
-
async function
|
|
250
|
+
async function Dt(e, t, o = () => {
|
|
251
251
|
}) {
|
|
252
252
|
const { _streamObjectOptions: r, ...n } = t;
|
|
253
253
|
if (r && ("output" in r || "schema" in r))
|
|
@@ -255,7 +255,7 @@ async function $t(e, t, o = () => {
|
|
|
255
255
|
const a = {
|
|
256
256
|
// non-overridable options for streamObject
|
|
257
257
|
output: "object",
|
|
258
|
-
schema:
|
|
258
|
+
schema: xe(je(e)),
|
|
259
259
|
// configurable options for streamObject
|
|
260
260
|
// - optional, with defaults
|
|
261
261
|
// mistral somehow needs "auto", while groq/llama needs "tool"
|
|
@@ -266,29 +266,29 @@ async function $t(e, t, o = () => {
|
|
|
266
266
|
...n,
|
|
267
267
|
// extra options for streamObject
|
|
268
268
|
...t._streamObjectOptions ?? {}
|
|
269
|
-
}, s =
|
|
269
|
+
}, s = mt(a);
|
|
270
270
|
let c;
|
|
271
|
-
const [u,
|
|
272
|
-
let
|
|
271
|
+
const [u, m] = s.fullStream.tee(), l = (async () => {
|
|
272
|
+
let f = {
|
|
273
273
|
operations: []
|
|
274
274
|
};
|
|
275
|
-
const
|
|
276
|
-
Ht(
|
|
275
|
+
const p = I(
|
|
276
|
+
Ht(m)
|
|
277
277
|
);
|
|
278
|
-
for await (const h of
|
|
279
|
-
h && typeof h == "object" && "operations" in h && (
|
|
280
|
-
return
|
|
278
|
+
for await (const h of p)
|
|
279
|
+
h && typeof h == "object" && "operations" in h && (f = h);
|
|
280
|
+
return f;
|
|
281
281
|
})();
|
|
282
282
|
return {
|
|
283
283
|
streamObjectResult: s,
|
|
284
284
|
generateObjectResult: void 0,
|
|
285
285
|
get operationsSource() {
|
|
286
|
-
return c || (c =
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
286
|
+
return c || (c = De(
|
|
287
|
+
It(
|
|
288
|
+
Et(
|
|
289
|
+
$t(
|
|
290
290
|
Rt(
|
|
291
|
-
|
|
291
|
+
I(u)
|
|
292
292
|
),
|
|
293
293
|
o
|
|
294
294
|
)
|
|
@@ -302,13 +302,13 @@ async function $t(e, t, o = () => {
|
|
|
302
302
|
}
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
|
-
async function*
|
|
305
|
+
async function* $t(e, t) {
|
|
306
306
|
let o = !0;
|
|
307
307
|
for await (const r of e)
|
|
308
308
|
o && (t(), o = !1), yield r;
|
|
309
309
|
}
|
|
310
310
|
function Rt(e) {
|
|
311
|
-
return
|
|
311
|
+
return I(
|
|
312
312
|
e.pipeThrough(
|
|
313
313
|
new TransformStream({
|
|
314
314
|
transform(t, o) {
|
|
@@ -333,7 +333,7 @@ function Rt(e) {
|
|
|
333
333
|
);
|
|
334
334
|
}
|
|
335
335
|
function Ht(e) {
|
|
336
|
-
return
|
|
336
|
+
return I(
|
|
337
337
|
e.pipeThrough(
|
|
338
338
|
new TransformStream({
|
|
339
339
|
transform(t, o) {
|
|
@@ -394,7 +394,7 @@ class qt {
|
|
|
394
394
|
console.log(JSON.stringify(t, null, 2));
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function z(e, t) {
|
|
398
398
|
const o = e.getTextCursorPosition(), r = [];
|
|
399
399
|
for (const n of t) {
|
|
400
400
|
const i = n.id === o.block.id;
|
|
@@ -422,13 +422,13 @@ function T(e) {
|
|
|
422
422
|
...T(t.children)
|
|
423
423
|
]);
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function x(e) {
|
|
426
426
|
return e.map((t) => typeof t == "object" && t && "id" in t ? {
|
|
427
427
|
...t,
|
|
428
428
|
id: `${t.id}$`
|
|
429
429
|
} : t);
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function Ut(e, t, o = !0, r = !0) {
|
|
432
432
|
let n = 0, i = e.length;
|
|
433
433
|
if (o)
|
|
434
434
|
for (; n < i && t(e[n]); )
|
|
@@ -439,7 +439,7 @@ function zt(e, t, o = !0, r = !0) {
|
|
|
439
439
|
return e.slice(n, i);
|
|
440
440
|
}
|
|
441
441
|
function F(e, t) {
|
|
442
|
-
return
|
|
442
|
+
return e.length === 1 ? e : Ut(
|
|
443
443
|
e,
|
|
444
444
|
(r) => X(r),
|
|
445
445
|
(t == null ? void 0 : t.trimStart) ?? !1,
|
|
@@ -450,11 +450,11 @@ async function He(e, t) {
|
|
|
450
450
|
const o = F(e.document), r = await C(
|
|
451
451
|
T(o),
|
|
452
452
|
async (s) => e.blocksToHTMLLossy([s])
|
|
453
|
-
), i =
|
|
453
|
+
), i = z(e, r).filter(
|
|
454
454
|
(s) => "cursor" in s || !(t.excludeBlockIds || []).includes(s.id)
|
|
455
455
|
);
|
|
456
456
|
return {
|
|
457
|
-
htmlBlocks:
|
|
457
|
+
htmlBlocks: x(i)
|
|
458
458
|
};
|
|
459
459
|
}
|
|
460
460
|
async function qe(e, t) {
|
|
@@ -463,12 +463,12 @@ async function qe(e, t) {
|
|
|
463
463
|
async (n) => e.blocksToHTMLLossy([n])
|
|
464
464
|
);
|
|
465
465
|
return {
|
|
466
|
-
htmlSelectedBlocks:
|
|
466
|
+
htmlSelectedBlocks: x(o),
|
|
467
467
|
htmlDocument: (await C(T(e.document), async (n) => e.blocksToHTMLLossy([n]))).map(({ block: n }) => ({ block: n }))
|
|
468
468
|
// strip ids so LLM can't accidentally issue updates to ids not in selection
|
|
469
469
|
};
|
|
470
470
|
}
|
|
471
|
-
function
|
|
471
|
+
function zt(e) {
|
|
472
472
|
return [
|
|
473
473
|
{
|
|
474
474
|
role: "system",
|
|
@@ -506,6 +506,10 @@ function Ft(e) {
|
|
|
506
506
|
role: "system",
|
|
507
507
|
content: JSON.stringify(e.htmlBlocks)
|
|
508
508
|
},
|
|
509
|
+
{
|
|
510
|
+
role: "system",
|
|
511
|
+
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 ' + (e.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).")
|
|
512
|
+
},
|
|
509
513
|
{
|
|
510
514
|
role: "system",
|
|
511
515
|
content: "The user asks you to do the following:"
|
|
@@ -513,10 +517,6 @@ function Ft(e) {
|
|
|
513
517
|
{
|
|
514
518
|
role: "user",
|
|
515
519
|
content: e.userPrompt
|
|
516
|
-
},
|
|
517
|
-
{
|
|
518
|
-
role: "system",
|
|
519
|
-
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), 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).'
|
|
520
520
|
}
|
|
521
521
|
];
|
|
522
522
|
}
|
|
@@ -555,9 +555,10 @@ const Jt = async (e, t) => {
|
|
|
555
555
|
role: "user",
|
|
556
556
|
content: t.userPrompt
|
|
557
557
|
}
|
|
558
|
-
] :
|
|
558
|
+
] : zt({
|
|
559
559
|
...o,
|
|
560
|
-
userPrompt: t.userPrompt
|
|
560
|
+
userPrompt: t.userPrompt,
|
|
561
|
+
isEmptyDocument: e.isEmpty
|
|
561
562
|
});
|
|
562
563
|
} else {
|
|
563
564
|
const o = await He(e, t);
|
|
@@ -585,7 +586,8 @@ const Jt = async (e, t) => {
|
|
|
585
586
|
}
|
|
586
587
|
] : Ft({
|
|
587
588
|
...o,
|
|
588
|
-
userPrompt: t.userPrompt
|
|
589
|
+
userPrompt: t.userPrompt,
|
|
590
|
+
isEmptyDocument: e.isEmpty
|
|
589
591
|
});
|
|
590
592
|
}
|
|
591
593
|
};
|
|
@@ -593,13 +595,13 @@ function Vt(e) {
|
|
|
593
595
|
let t, o = !1;
|
|
594
596
|
return e.descendants((r, n) => o ? !1 : (r.isText && (o = !0, t = n), !0)), t;
|
|
595
597
|
}
|
|
596
|
-
function
|
|
598
|
+
function $(e) {
|
|
597
599
|
var i;
|
|
598
600
|
const t = ot(e), { modification: o } = t.marks, r = [], n = new N(e.before);
|
|
599
601
|
for (let a = 0; a < e.steps.length; a++) {
|
|
600
|
-
const s = e.steps[a], c = new
|
|
602
|
+
const s = e.steps[a], c = new Ee(e.mapping.maps.slice(0, a)).invert();
|
|
601
603
|
if (s.structure) {
|
|
602
|
-
if (s instanceof
|
|
604
|
+
if (s instanceof L) {
|
|
603
605
|
if (s.to !== s.from + 1 || s.slice.openStart !== 0 || s.slice.openEnd !== 1 || s.slice.content.size !== 2)
|
|
604
606
|
throw new Error(
|
|
605
607
|
"Structure change is not in expected format (ReplaceStep)"
|
|
@@ -611,29 +613,29 @@ function D(e) {
|
|
|
611
613
|
);
|
|
612
614
|
} else
|
|
613
615
|
throw new Error("Step is not a ReplaceStep or ReplaceAroundStep");
|
|
614
|
-
const b = c.map(s.from),
|
|
615
|
-
let w =
|
|
616
|
-
|
|
616
|
+
const b = c.map(s.from), g = s.slice.content.firstChild, k = n.doc.resolve(n.mapping.map(b)).nodeAfter;
|
|
617
|
+
let w = g.marks || [];
|
|
618
|
+
g.type !== k.type && (w = o.create({
|
|
617
619
|
type: "nodeType",
|
|
618
|
-
previousValue:
|
|
619
|
-
newValue:
|
|
620
|
+
previousValue: k.type.name,
|
|
621
|
+
newValue: g.type.name
|
|
620
622
|
}).addToSet(w));
|
|
621
623
|
const A = /* @__PURE__ */ new Set([
|
|
622
|
-
...Object.keys(
|
|
623
|
-
...Object.keys(
|
|
624
|
+
...Object.keys(g.attrs),
|
|
625
|
+
...Object.keys(k.attrs)
|
|
624
626
|
]);
|
|
625
627
|
for (const P of A)
|
|
626
|
-
|
|
628
|
+
g.attrs[P] !== k.attrs[P] && (w = o.create({
|
|
627
629
|
type: "attr",
|
|
628
630
|
attrName: P,
|
|
629
|
-
previousValue:
|
|
630
|
-
newValue:
|
|
631
|
+
previousValue: k.attrs[P],
|
|
632
|
+
newValue: g.attrs[P]
|
|
631
633
|
}).addToSet(w));
|
|
632
634
|
const M = n.steps.length;
|
|
633
635
|
n.setNodeMarkup(
|
|
634
636
|
n.mapping.map(b),
|
|
635
|
-
|
|
636
|
-
|
|
637
|
+
g.type,
|
|
638
|
+
g.attrs,
|
|
637
639
|
w
|
|
638
640
|
), r.push({
|
|
639
641
|
prosemirrorSteps: n.steps.slice(M),
|
|
@@ -642,9 +644,9 @@ function D(e) {
|
|
|
642
644
|
});
|
|
643
645
|
continue;
|
|
644
646
|
}
|
|
645
|
-
if (!(s instanceof
|
|
647
|
+
if (!(s instanceof L))
|
|
646
648
|
throw new Error("Step is not a ReplaceStep");
|
|
647
|
-
const u = c.map(s.from),
|
|
649
|
+
const u = c.map(s.from), m = c.map(s.to);
|
|
648
650
|
if (s.slice.openStart > 0 || s.slice.openEnd > 0)
|
|
649
651
|
throw new Error(
|
|
650
652
|
"Slice has openStart or openEnd > 0, but structure=false"
|
|
@@ -653,30 +655,30 @@ function D(e) {
|
|
|
653
655
|
prosemirrorSteps: [],
|
|
654
656
|
selection: {
|
|
655
657
|
anchor: n.mapping.map(u),
|
|
656
|
-
head: n.mapping.map(
|
|
658
|
+
head: n.mapping.map(m)
|
|
657
659
|
},
|
|
658
660
|
type: "select"
|
|
659
661
|
});
|
|
660
|
-
const l = s.slice.content.textBetween(0, s.slice.size),
|
|
661
|
-
let
|
|
662
|
-
if (
|
|
663
|
-
|
|
662
|
+
const l = s.slice.content.textBetween(0, s.slice.size), f = l === n.doc.textBetween(n.mapping.map(u), n.mapping.map(m));
|
|
663
|
+
let p;
|
|
664
|
+
if (f)
|
|
665
|
+
p = s.slice.content.size;
|
|
664
666
|
else if (l.length === 0)
|
|
665
|
-
|
|
667
|
+
p = s.slice.content.size;
|
|
666
668
|
else {
|
|
667
669
|
const b = Vt(s.slice.content);
|
|
668
670
|
if (b === void 0)
|
|
669
671
|
throw new Error("unexpected: no first character found");
|
|
670
|
-
|
|
672
|
+
p = b + 1;
|
|
671
673
|
}
|
|
672
|
-
let h = n.mapping.map(
|
|
673
|
-
const d = n.mapping.map(
|
|
674
|
+
let h = n.mapping.map(m);
|
|
675
|
+
const d = n.mapping.map(m);
|
|
674
676
|
let S = !0;
|
|
675
|
-
for (let b =
|
|
676
|
-
const
|
|
677
|
-
if (
|
|
677
|
+
for (let b = p; b <= s.slice.content.size; b++) {
|
|
678
|
+
const g = S && u !== m, k = n.steps.length;
|
|
679
|
+
if (g) {
|
|
678
680
|
const M = n.doc.resolve(n.mapping.map(u));
|
|
679
|
-
(i = M.nodeAfter) != null && i.isBlock && n.addNodeMark(M.pos, t.mark("deletion", {})), n.addMark(M.pos, h, t.mark("deletion", {})), h = n.mapping.map(
|
|
681
|
+
(i = M.nodeAfter) != null && i.isBlock && n.addNodeMark(M.pos, t.mark("deletion", {})), n.addMark(M.pos, h, t.mark("deletion", {})), h = n.mapping.map(m);
|
|
680
682
|
}
|
|
681
683
|
const w = new Y(s.slice.content.cut(0, b), 0, 0);
|
|
682
684
|
n.replace(d, h, w).addMark(
|
|
@@ -687,18 +689,18 @@ function D(e) {
|
|
|
687
689
|
d,
|
|
688
690
|
d + w.content.size,
|
|
689
691
|
(M, P) => P < d || P > d + w.content.size ? !0 : (M.isBlock && n.addNodeMark(P, t.mark("insertion", {})), !1)
|
|
690
|
-
), h = n.mapping.slice(
|
|
691
|
-
const A =
|
|
692
|
+
), h = n.mapping.slice(k).map(h);
|
|
693
|
+
const A = gt.near(
|
|
692
694
|
n.doc.resolve(d + w.content.size),
|
|
693
695
|
-1
|
|
694
696
|
);
|
|
695
697
|
r.push({
|
|
696
|
-
prosemirrorSteps: n.steps.slice(
|
|
698
|
+
prosemirrorSteps: n.steps.slice(k),
|
|
697
699
|
selection: {
|
|
698
700
|
anchor: A.from,
|
|
699
701
|
head: A.from
|
|
700
702
|
},
|
|
701
|
-
type:
|
|
703
|
+
type: g ? "replace" : "insert"
|
|
702
704
|
// 3. Insert the replacement character by character
|
|
703
705
|
}), S = !1;
|
|
704
706
|
}
|
|
@@ -731,7 +733,7 @@ function ee(e, t) {
|
|
|
731
733
|
function Zt(e, t, o) {
|
|
732
734
|
const r = new N(t);
|
|
733
735
|
for (const a of e) {
|
|
734
|
-
const s = new
|
|
736
|
+
const s = new L(
|
|
735
737
|
r.mapping.map(a.fromA),
|
|
736
738
|
r.mapping.map(a.toA),
|
|
737
739
|
o.slice(a.fromB, a.toB)
|
|
@@ -744,26 +746,26 @@ function Zt(e, t, o) {
|
|
|
744
746
|
const a = o.resolve(i).nodeAfter, s = r.doc.resolve(i).nodeAfter;
|
|
745
747
|
if (!a || !s)
|
|
746
748
|
throw new Error("diffNode not found");
|
|
747
|
-
const c = !a.isLeaf && a.content.eq(s.content), u = c ? 1 : Math.min(a.nodeSize, s.nodeSize),
|
|
748
|
-
let
|
|
749
|
+
const c = !a.isLeaf && a.content.eq(s.content), u = c ? 1 : Math.min(a.nodeSize, s.nodeSize), m = i + u, l = n.map(i), f = n.map(m);
|
|
750
|
+
let p = e.length;
|
|
749
751
|
for (let d = 0; d < e.length; d++)
|
|
750
|
-
if (e[d].fromA >=
|
|
751
|
-
|
|
752
|
+
if (e[d].fromA >= f) {
|
|
753
|
+
p = d;
|
|
752
754
|
break;
|
|
753
755
|
}
|
|
754
|
-
e.splice(
|
|
756
|
+
e.splice(p, 0, {
|
|
755
757
|
fromA: l,
|
|
756
|
-
toA:
|
|
758
|
+
toA: f,
|
|
757
759
|
fromB: i,
|
|
758
|
-
toB:
|
|
760
|
+
toB: m,
|
|
759
761
|
deleted: [],
|
|
760
762
|
inserted: [],
|
|
761
763
|
type: c ? "node-type-or-attr-update" : "mark-update"
|
|
762
764
|
}), r.step(
|
|
763
|
-
new
|
|
765
|
+
new L(
|
|
764
766
|
i,
|
|
765
|
-
|
|
766
|
-
o.slice(i,
|
|
767
|
+
m,
|
|
768
|
+
o.slice(i, m),
|
|
767
769
|
c
|
|
768
770
|
)
|
|
769
771
|
);
|
|
@@ -774,7 +776,7 @@ function Zt(e, t, o) {
|
|
|
774
776
|
}
|
|
775
777
|
return e;
|
|
776
778
|
}
|
|
777
|
-
const
|
|
779
|
+
const me = (e, t) => {
|
|
778
780
|
const o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
779
781
|
e.descendants((a) => {
|
|
780
782
|
a.type.name === "tableCell" && o.add(JSON.stringify(a.toJSON()));
|
|
@@ -815,63 +817,63 @@ function J(e, t, o = !1, r, n) {
|
|
|
815
817
|
let s = a.doc, c = ce.create(
|
|
816
818
|
t,
|
|
817
819
|
void 0,
|
|
818
|
-
|
|
820
|
+
me(t, s)
|
|
819
821
|
);
|
|
820
822
|
if (c = c.addSteps(s, a.mapping.maps, 0), o && c.changes.length > 0) {
|
|
821
|
-
const l = c.changes[c.changes.length - 1],
|
|
822
|
-
if (
|
|
823
|
+
const l = c.changes[c.changes.length - 1], f = l.toA - l.fromA, p = l.toB - l.fromB;
|
|
824
|
+
if (f > p) {
|
|
823
825
|
const h = t.slice(
|
|
824
|
-
l.fromA +
|
|
826
|
+
l.fromA + p,
|
|
825
827
|
l.toA
|
|
826
828
|
);
|
|
827
829
|
a.step(
|
|
828
|
-
new
|
|
830
|
+
new L(l.toB, l.toB, h)
|
|
829
831
|
), s = a.doc, c = ce.create(
|
|
830
832
|
c.startDoc,
|
|
831
833
|
void 0,
|
|
832
|
-
|
|
834
|
+
me(c.startDoc, s)
|
|
833
835
|
), c = c.addSteps(s, a.mapping.maps, 0);
|
|
834
836
|
}
|
|
835
837
|
}
|
|
836
|
-
const u = [],
|
|
838
|
+
const u = [], m = wt(
|
|
837
839
|
c.changes,
|
|
838
840
|
s
|
|
839
841
|
);
|
|
840
|
-
for (let l = 0; l <
|
|
841
|
-
const
|
|
842
|
-
if (
|
|
842
|
+
for (let l = 0; l < m.length; l++) {
|
|
843
|
+
const f = m[l], p = s.slice(f.fromB, f.toB);
|
|
844
|
+
if (p.openEnd === 1 && p.openStart === 0 && (f.type = "node-type-or-attr-update", p.size > 2)) {
|
|
843
845
|
const h = {
|
|
844
|
-
fromA:
|
|
845
|
-
toA:
|
|
846
|
-
fromB:
|
|
847
|
-
toB:
|
|
846
|
+
fromA: f.fromA,
|
|
847
|
+
toA: f.fromA + 1,
|
|
848
|
+
fromB: f.fromB,
|
|
849
|
+
toB: f.fromB + 1,
|
|
848
850
|
deleted: [],
|
|
849
851
|
inserted: [],
|
|
850
852
|
type: "node-type-or-attr-update"
|
|
851
853
|
}, d = {
|
|
852
|
-
fromA:
|
|
853
|
-
toA:
|
|
854
|
-
fromB:
|
|
855
|
-
toB:
|
|
854
|
+
fromA: f.fromA + 1,
|
|
855
|
+
toA: f.toA,
|
|
856
|
+
fromB: f.fromB + 1,
|
|
857
|
+
toB: f.toB,
|
|
856
858
|
deleted: [],
|
|
857
859
|
inserted: []
|
|
858
860
|
};
|
|
859
|
-
|
|
861
|
+
m.splice(l, 1, h, d), l++;
|
|
860
862
|
}
|
|
861
863
|
}
|
|
862
|
-
Zt(
|
|
863
|
-
for (let l = 0; l <
|
|
864
|
-
const
|
|
865
|
-
if (
|
|
864
|
+
Zt(m, t, s);
|
|
865
|
+
for (let l = 0; l < m.length; l++) {
|
|
866
|
+
const f = m[l], p = s.slice(f.fromB, f.toB);
|
|
867
|
+
if (p.openEnd > 0 && p.size > 1)
|
|
866
868
|
throw new Error(
|
|
867
869
|
"unexpected, openEnd > 0 and size > 1, this should have been split into two steps"
|
|
868
870
|
);
|
|
869
|
-
l ===
|
|
870
|
-
new
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
871
|
+
l === m.length - 1 && o && f.type === "mark-update" || u.push(
|
|
872
|
+
new L(
|
|
873
|
+
f.fromA,
|
|
874
|
+
f.toA,
|
|
875
|
+
p,
|
|
876
|
+
f.type === "node-type-or-attr-update"
|
|
875
877
|
)
|
|
876
878
|
);
|
|
877
879
|
}
|
|
@@ -979,36 +981,36 @@ function te(e) {
|
|
|
979
981
|
yield c;
|
|
980
982
|
continue;
|
|
981
983
|
}
|
|
982
|
-
const u = c.operation,
|
|
984
|
+
const u = c.operation, m = await e.toJSONToolCall(t, {
|
|
983
985
|
...c,
|
|
984
986
|
operation: u
|
|
985
987
|
});
|
|
986
|
-
if (
|
|
987
|
-
|
|
988
|
+
if (m && !(c.isPossiblyPartial && X(
|
|
989
|
+
m.blocks[m.blocks.length - 1]
|
|
988
990
|
))) {
|
|
989
|
-
for (let l = 0; l <
|
|
990
|
-
const
|
|
991
|
+
for (let l = 0; l < m.blocks.length; l++) {
|
|
992
|
+
const f = m.blocks[l], p = t.prosemirrorState.tr;
|
|
991
993
|
let h = [];
|
|
992
994
|
if (l < i.length) {
|
|
993
995
|
const d = await e.rebaseTool(i[l], t), b = J(
|
|
994
996
|
{
|
|
995
997
|
id: i[l],
|
|
996
|
-
block:
|
|
998
|
+
block: f
|
|
997
999
|
},
|
|
998
1000
|
d.doc,
|
|
999
1001
|
!1
|
|
1000
|
-
).map((
|
|
1001
|
-
for (const
|
|
1002
|
-
|
|
1003
|
-
h =
|
|
1002
|
+
).map((g) => g.map(d.invertMap));
|
|
1003
|
+
for (const g of b)
|
|
1004
|
+
p.step(g.map(p.mapping));
|
|
1005
|
+
h = $(p), h = h.filter((g) => g.type !== "select");
|
|
1004
1006
|
} else {
|
|
1005
1007
|
const d = u.position === "after" ? a[u.referenceId] : void 0, S = st(
|
|
1006
|
-
|
|
1007
|
-
[
|
|
1008
|
+
p,
|
|
1009
|
+
[f],
|
|
1008
1010
|
l > 0 ? i[l - 1] : d || u.referenceId,
|
|
1009
1011
|
l > 0 ? "after" : u.position
|
|
1010
1012
|
);
|
|
1011
|
-
i.push(...S.map((b) => b.id)), h =
|
|
1013
|
+
i.push(...S.map((b) => b.id)), h = $(p);
|
|
1012
1014
|
}
|
|
1013
1015
|
h.find((d) => d.type === "replace");
|
|
1014
1016
|
for (const d of h)
|
|
@@ -1096,34 +1098,34 @@ function oe(e) {
|
|
|
1096
1098
|
yield u;
|
|
1097
1099
|
continue;
|
|
1098
1100
|
}
|
|
1099
|
-
const
|
|
1101
|
+
const m = u.operation;
|
|
1100
1102
|
if (u.isPossiblyPartial) {
|
|
1101
|
-
const
|
|
1102
|
-
if (
|
|
1103
|
+
const k = JSON.stringify(m.block).length;
|
|
1104
|
+
if (k < a)
|
|
1103
1105
|
continue;
|
|
1104
|
-
a =
|
|
1106
|
+
a = k + 50;
|
|
1105
1107
|
} else
|
|
1106
1108
|
a = 50;
|
|
1107
|
-
const l = await e.rebaseTool(
|
|
1109
|
+
const l = await e.rebaseTool(m.id, t), f = s ? l.invertMap.invert().map(s.from()) : void 0, p = s ? l.invertMap.invert().map(s.to()) : void 0, h = await e.toJSONToolCall(t, u);
|
|
1108
1110
|
if (!h)
|
|
1109
1111
|
continue;
|
|
1110
1112
|
const d = J(
|
|
1111
1113
|
h,
|
|
1112
1114
|
l.doc,
|
|
1113
1115
|
u.isPossiblyPartial,
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
+
f,
|
|
1117
|
+
p
|
|
1116
1118
|
);
|
|
1117
1119
|
if (d.length === 1 && u.isPossiblyPartial)
|
|
1118
1120
|
continue;
|
|
1119
|
-
const S = d.map((
|
|
1120
|
-
for (const
|
|
1121
|
-
b.step(
|
|
1122
|
-
const
|
|
1123
|
-
for (const
|
|
1124
|
-
o.withDelays && await Q(
|
|
1125
|
-
ee(w,
|
|
1126
|
-
}), (c = o.onBlockUpdate) == null || c.call(o,
|
|
1121
|
+
const S = d.map((k) => k.map(l.invertMap)), b = new N(t.prosemirrorState.doc);
|
|
1122
|
+
for (const k of S)
|
|
1123
|
+
b.step(k.map(b.mapping));
|
|
1124
|
+
const g = $(b);
|
|
1125
|
+
for (const k of g)
|
|
1126
|
+
o.withDelays && await Q(k), t.transact((w) => {
|
|
1127
|
+
ee(w, k);
|
|
1128
|
+
}), (c = o.onBlockUpdate) == null || c.call(o, m.id);
|
|
1127
1129
|
}
|
|
1128
1130
|
}
|
|
1129
1131
|
};
|
|
@@ -1184,7 +1186,7 @@ const re = (e, t) => ({
|
|
|
1184
1186
|
}
|
|
1185
1187
|
const i = n.operation, a = e.prosemirrorState.tr;
|
|
1186
1188
|
it(a, [i.id], []);
|
|
1187
|
-
const s =
|
|
1189
|
+
const s = $(a);
|
|
1188
1190
|
for (const c of s)
|
|
1189
1191
|
t.withDelays && await Q(c), e.transact((u) => {
|
|
1190
1192
|
ee(u, c);
|
|
@@ -1192,7 +1194,7 @@ const re = (e, t) => ({
|
|
|
1192
1194
|
}
|
|
1193
1195
|
}
|
|
1194
1196
|
});
|
|
1195
|
-
function
|
|
1197
|
+
function fe(e) {
|
|
1196
1198
|
const t = e.lastIndexOf("<"), o = e.lastIndexOf(">");
|
|
1197
1199
|
let r = e;
|
|
1198
1200
|
if (t > o && (r = e.substring(0, t), !r.trim()))
|
|
@@ -1301,7 +1303,7 @@ const V = {
|
|
|
1301
1303
|
var n;
|
|
1302
1304
|
const o = (n = window.__TEST_OPTIONS) == null ? void 0 : n.mockID, r = (await Promise.all(
|
|
1303
1305
|
t.operation.blocks.map(async (i) => {
|
|
1304
|
-
const a = t.isPossiblyPartial ?
|
|
1306
|
+
const a = t.isPossiblyPartial ? fe(i) : i;
|
|
1305
1307
|
return a ? (await e.tryParseHTMLToBlocks(a)).map(
|
|
1306
1308
|
(s) => (delete s.id, s)
|
|
1307
1309
|
) : [];
|
|
@@ -1330,7 +1332,7 @@ const V = {
|
|
|
1330
1332
|
validateBlock: ye,
|
|
1331
1333
|
rebaseTool: he,
|
|
1332
1334
|
toJSONToolCall: async (e, t) => {
|
|
1333
|
-
const o = t.isPossiblyPartial ?
|
|
1335
|
+
const o = t.isPossiblyPartial ? fe(t.operation.block) : t.operation.block;
|
|
1334
1336
|
if (!o)
|
|
1335
1337
|
return;
|
|
1336
1338
|
const r = (await e.tryParseHTMLToBlocks(o))[0];
|
|
@@ -1362,7 +1364,7 @@ function Yt(e, t, o, r, n) {
|
|
|
1362
1364
|
...i.delete ? [V.delete(e, { idsSuffixed: !0, withDelays: t, onBlockUpdate: n })] : []
|
|
1363
1365
|
];
|
|
1364
1366
|
}
|
|
1365
|
-
const
|
|
1367
|
+
const Ue = {
|
|
1366
1368
|
/**
|
|
1367
1369
|
* Function to get the stream tools that can apply HTML block updates to the editor
|
|
1368
1370
|
*/
|
|
@@ -1390,17 +1392,20 @@ async function Gt(e, t) {
|
|
|
1390
1392
|
withDelays: s,
|
|
1391
1393
|
dataFormat: c,
|
|
1392
1394
|
previousResponse: u,
|
|
1393
|
-
...
|
|
1395
|
+
...m
|
|
1394
1396
|
} = {
|
|
1395
1397
|
maxRetries: 2,
|
|
1396
1398
|
deleteEmptyCursorBlock: !0,
|
|
1397
1399
|
stream: !0,
|
|
1398
1400
|
withDelays: !0,
|
|
1399
|
-
dataFormat:
|
|
1401
|
+
dataFormat: Ue,
|
|
1400
1402
|
...t
|
|
1401
|
-
}, l = t.promptBuilder ?? c.defaultPromptBuilder,
|
|
1403
|
+
}, l = t.promptBuilder ?? c.defaultPromptBuilder, f = c.getStreamTools, p = r ? void 0 : e.getTextCursorPosition().block, h = p && n && X(p) && e.document.length > 1 ? p.id : void 0, d = r ? e.getSelectionCutBlocks() : void 0;
|
|
1402
1404
|
let S;
|
|
1403
|
-
u && (S = u.messages
|
|
1405
|
+
u && (S = u.messages.map((w) => w.role === "user" && typeof w.content == "string" ? {
|
|
1406
|
+
role: "system",
|
|
1407
|
+
content: `USER_MESSAGE: ${w.content}`
|
|
1408
|
+
} : w), S.push({
|
|
1404
1409
|
role: "assistant",
|
|
1405
1410
|
content: `These are the operations returned by a previous LLM call:
|
|
1406
1411
|
` + JSON.stringify(
|
|
@@ -1412,40 +1417,40 @@ async function Gt(e, t) {
|
|
|
1412
1417
|
userPrompt: o,
|
|
1413
1418
|
excludeBlockIds: h ? [h] : void 0,
|
|
1414
1419
|
previousMessages: S
|
|
1415
|
-
}),
|
|
1420
|
+
}), g = f(
|
|
1416
1421
|
e,
|
|
1417
1422
|
s,
|
|
1418
1423
|
t.defaultStreamTools,
|
|
1419
1424
|
d ? { from: d._meta.startPos, to: d._meta.endPos } : void 0,
|
|
1420
1425
|
t.onBlockUpdate
|
|
1421
1426
|
);
|
|
1422
|
-
let
|
|
1423
|
-
return i ?
|
|
1424
|
-
|
|
1427
|
+
let k;
|
|
1428
|
+
return i ? k = await Dt(
|
|
1429
|
+
g,
|
|
1425
1430
|
{
|
|
1426
1431
|
messages: b,
|
|
1427
|
-
...
|
|
1432
|
+
...m
|
|
1428
1433
|
},
|
|
1429
1434
|
() => {
|
|
1430
1435
|
h && e.removeBlocks([h]), a == null || a();
|
|
1431
1436
|
}
|
|
1432
|
-
) : (
|
|
1437
|
+
) : (k = await At(g, {
|
|
1433
1438
|
messages: b,
|
|
1434
|
-
...
|
|
1435
|
-
}), h && e.removeBlocks([h]), a == null || a()), new qt(b,
|
|
1439
|
+
...m
|
|
1440
|
+
}), h && e.removeBlocks([h]), a == null || a()), new qt(b, k, g);
|
|
1436
1441
|
}
|
|
1437
|
-
async function
|
|
1442
|
+
async function ze(e, t) {
|
|
1438
1443
|
const o = F(e.document), r = await C(
|
|
1439
1444
|
T(o),
|
|
1440
1445
|
async (s) => ({
|
|
1441
1446
|
...s,
|
|
1442
1447
|
children: void 0
|
|
1443
1448
|
})
|
|
1444
|
-
), i =
|
|
1449
|
+
), i = z(e, r).filter(
|
|
1445
1450
|
(s) => "cursor" in s || !(t.excludeBlockIds || []).includes(s.id)
|
|
1446
1451
|
);
|
|
1447
1452
|
return {
|
|
1448
|
-
jsonBlocks:
|
|
1453
|
+
jsonBlocks: x(i)
|
|
1449
1454
|
};
|
|
1450
1455
|
}
|
|
1451
1456
|
async function Fe(e, t) {
|
|
@@ -1454,7 +1459,7 @@ async function Fe(e, t) {
|
|
|
1454
1459
|
async (n) => n
|
|
1455
1460
|
);
|
|
1456
1461
|
return {
|
|
1457
|
-
jsonSelectedBlocks:
|
|
1462
|
+
jsonSelectedBlocks: x(o),
|
|
1458
1463
|
jsonDocument: (await C(T(e.document), async (n) => ({
|
|
1459
1464
|
...n,
|
|
1460
1465
|
id: void 0,
|
|
@@ -1506,17 +1511,49 @@ function Xt(e) {
|
|
|
1506
1511
|
role: "system",
|
|
1507
1512
|
content: JSON.stringify(e.jsonBlocks)
|
|
1508
1513
|
},
|
|
1514
|
+
...e.isEmptyDocument ? [
|
|
1515
|
+
{
|
|
1516
|
+
role: "system",
|
|
1517
|
+
content: "Because the actual document is empty, this is an example document to understand the schema:"
|
|
1518
|
+
},
|
|
1519
|
+
{
|
|
1520
|
+
role: "system",
|
|
1521
|
+
content: JSON.stringify({
|
|
1522
|
+
id: "ref3",
|
|
1523
|
+
type: "paragraph",
|
|
1524
|
+
content: [
|
|
1525
|
+
{
|
|
1526
|
+
type: "text",
|
|
1527
|
+
text: "Hello, world! ",
|
|
1528
|
+
styles: {}
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
type: "text",
|
|
1532
|
+
text: "Bold text. ",
|
|
1533
|
+
styles: {
|
|
1534
|
+
bold: !0
|
|
1535
|
+
}
|
|
1536
|
+
},
|
|
1537
|
+
{
|
|
1538
|
+
type: "link",
|
|
1539
|
+
href: "https://www.w3.org",
|
|
1540
|
+
content: "Link."
|
|
1541
|
+
}
|
|
1542
|
+
]
|
|
1543
|
+
})
|
|
1544
|
+
}
|
|
1545
|
+
] : [],
|
|
1509
1546
|
{
|
|
1510
1547
|
role: "system",
|
|
1511
1548
|
content: "The user asks you to do the following:"
|
|
1512
1549
|
},
|
|
1513
1550
|
{
|
|
1514
|
-
role: "
|
|
1515
|
-
content: e.
|
|
1551
|
+
role: "system",
|
|
1552
|
+
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), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\n \n ' + (e.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).")
|
|
1516
1553
|
},
|
|
1517
1554
|
{
|
|
1518
|
-
role: "
|
|
1519
|
-
content:
|
|
1555
|
+
role: "user",
|
|
1556
|
+
content: e.userPrompt
|
|
1520
1557
|
}
|
|
1521
1558
|
];
|
|
1522
1559
|
}
|
|
@@ -1527,13 +1564,15 @@ const Qt = async (e, t) => {
|
|
|
1527
1564
|
});
|
|
1528
1565
|
return Kt({
|
|
1529
1566
|
...o,
|
|
1530
|
-
userPrompt: t.userPrompt
|
|
1567
|
+
userPrompt: t.userPrompt,
|
|
1568
|
+
isEmptyDocument: e.isEmpty
|
|
1531
1569
|
});
|
|
1532
1570
|
} else {
|
|
1533
|
-
const o = await
|
|
1571
|
+
const o = await ze(e, t);
|
|
1534
1572
|
return Xt({
|
|
1535
1573
|
...o,
|
|
1536
|
-
userPrompt: t.userPrompt
|
|
1574
|
+
userPrompt: t.userPrompt,
|
|
1575
|
+
isEmptyDocument: e.isEmpty
|
|
1537
1576
|
});
|
|
1538
1577
|
}
|
|
1539
1578
|
};
|
|
@@ -1715,7 +1754,7 @@ function so(e) {
|
|
|
1715
1754
|
}
|
|
1716
1755
|
};
|
|
1717
1756
|
}
|
|
1718
|
-
function
|
|
1757
|
+
function ge(e) {
|
|
1719
1758
|
return e = so(e).removeFileBlocks().removeDefaultProps().get(), {
|
|
1720
1759
|
$defs: {
|
|
1721
1760
|
styles: to(e.styleSchema),
|
|
@@ -1730,7 +1769,7 @@ function ke(e) {
|
|
|
1730
1769
|
function Ve(e, t) {
|
|
1731
1770
|
return !t.schema.inlineContentSchema[e.type] || at(e) && !("text" in e) ? !1 : ct(e) ? !("content" in e) || !("href" in e) ? !1 : Ve(e.content, t) : !0;
|
|
1732
1771
|
}
|
|
1733
|
-
function
|
|
1772
|
+
function ke(e, t, o) {
|
|
1734
1773
|
const r = e.type || o, n = t.schema.blockSchema[r];
|
|
1735
1774
|
if (!n)
|
|
1736
1775
|
return {
|
|
@@ -1777,9 +1816,9 @@ const Z = {
|
|
|
1777
1816
|
block: {
|
|
1778
1817
|
$ref: "#/$defs/block"
|
|
1779
1818
|
},
|
|
1780
|
-
...
|
|
1819
|
+
...ge(e.schema)
|
|
1781
1820
|
}),
|
|
1782
|
-
validateBlock:
|
|
1821
|
+
validateBlock: ke,
|
|
1783
1822
|
rebaseTool: async (e, t) => H(t, R(t)),
|
|
1784
1823
|
toJSONToolCall: async (e, t) => t.operation
|
|
1785
1824
|
}),
|
|
@@ -1789,9 +1828,9 @@ const Z = {
|
|
|
1789
1828
|
block: {
|
|
1790
1829
|
$ref: "#/$defs/block"
|
|
1791
1830
|
},
|
|
1792
|
-
...
|
|
1831
|
+
...ge(e.schema)
|
|
1793
1832
|
}),
|
|
1794
|
-
validateBlock:
|
|
1833
|
+
validateBlock: ke,
|
|
1795
1834
|
rebaseTool: async (e, t) => H(t, R(t)),
|
|
1796
1835
|
toJSONToolCall: async (e, t) => {
|
|
1797
1836
|
const o = Object.fromEntries(
|
|
@@ -1844,7 +1883,7 @@ const ao = {
|
|
|
1844
1883
|
* Helper functions which can be used when implementing a custom PromptBuilder
|
|
1845
1884
|
*/
|
|
1846
1885
|
promptHelpers: {
|
|
1847
|
-
getDataForPromptNoSelection:
|
|
1886
|
+
getDataForPromptNoSelection: ze,
|
|
1848
1887
|
getDataForPromptWithSelection: Fe
|
|
1849
1888
|
}
|
|
1850
1889
|
};
|
|
@@ -1852,11 +1891,11 @@ async function Ze(e, t) {
|
|
|
1852
1891
|
const o = F(e.document), r = await C(
|
|
1853
1892
|
T(o),
|
|
1854
1893
|
async (s) => e.blocksToMarkdownLossy([s])
|
|
1855
|
-
), i =
|
|
1894
|
+
), i = z(e, r).filter(
|
|
1856
1895
|
(s) => "cursor" in s || !(t.excludeBlockIds || []).includes(s.id)
|
|
1857
1896
|
);
|
|
1858
1897
|
return {
|
|
1859
|
-
markdownBlocks:
|
|
1898
|
+
markdownBlocks: x(i)
|
|
1860
1899
|
};
|
|
1861
1900
|
}
|
|
1862
1901
|
async function We(e, t) {
|
|
@@ -1865,7 +1904,7 @@ async function We(e, t) {
|
|
|
1865
1904
|
async (n) => e.blocksToMarkdownLossy([n])
|
|
1866
1905
|
);
|
|
1867
1906
|
return {
|
|
1868
|
-
markdownSelectedBlocks:
|
|
1907
|
+
markdownSelectedBlocks: x(o),
|
|
1869
1908
|
markdownDocument: (await C(T(e.document), async (n) => e.blocksToMarkdownLossy([n]))).map(({ block: n }) => ({ block: n }))
|
|
1870
1909
|
// strip ids so LLM can't accidentally issue updates to ids not in selection
|
|
1871
1910
|
};
|
|
@@ -1950,7 +1989,7 @@ async function be(e, t) {
|
|
|
1950
1989
|
block: n[0]
|
|
1951
1990
|
},
|
|
1952
1991
|
o.doc
|
|
1953
|
-
), a = new
|
|
1992
|
+
), a = new Ee();
|
|
1954
1993
|
for (const s of i) {
|
|
1955
1994
|
const c = s.map(a);
|
|
1956
1995
|
if (!c)
|
|
@@ -2016,7 +2055,7 @@ const W = {
|
|
|
2016
2055
|
}),
|
|
2017
2056
|
delete: re
|
|
2018
2057
|
};
|
|
2019
|
-
function
|
|
2058
|
+
function po(e, t, o, r) {
|
|
2020
2059
|
const n = {
|
|
2021
2060
|
add: !0,
|
|
2022
2061
|
update: !0,
|
|
@@ -2035,11 +2074,11 @@ function fo(e, t, o, r) {
|
|
|
2035
2074
|
...n.delete ? [W.delete(e, { idsSuffixed: !0, withDelays: t })] : []
|
|
2036
2075
|
];
|
|
2037
2076
|
}
|
|
2038
|
-
const
|
|
2077
|
+
const mo = {
|
|
2039
2078
|
/**
|
|
2040
2079
|
* Function to get the stream tools that can apply BlockNote Markdown block updates to the editor
|
|
2041
2080
|
*/
|
|
2042
|
-
getStreamTools:
|
|
2081
|
+
getStreamTools: po,
|
|
2043
2082
|
/**
|
|
2044
2083
|
* The default PromptBuilder that determines how a userPrompt is converted to an array of
|
|
2045
2084
|
* LLM Messages (CoreMessage[])
|
|
@@ -2053,18 +2092,18 @@ const po = {
|
|
|
2053
2092
|
getDataForPromptWithSelection: We
|
|
2054
2093
|
}
|
|
2055
2094
|
}, ir = {
|
|
2056
|
-
addCursorPosition:
|
|
2095
|
+
addCursorPosition: z,
|
|
2057
2096
|
flattenBlocks: T,
|
|
2058
|
-
suffixIDs:
|
|
2097
|
+
suffixIDs: x,
|
|
2059
2098
|
trimEmptyBlocks: F,
|
|
2060
2099
|
convertBlocks: C
|
|
2061
|
-
},
|
|
2100
|
+
}, fo = {
|
|
2062
2101
|
_experimental_json: ao,
|
|
2063
|
-
_experimental_markdown:
|
|
2064
|
-
html:
|
|
2102
|
+
_experimental_markdown: mo,
|
|
2103
|
+
html: Ue
|
|
2065
2104
|
}, we = new _e("blocknote-agent-cursor");
|
|
2066
2105
|
function ho(e) {
|
|
2067
|
-
return new
|
|
2106
|
+
return new Le({
|
|
2068
2107
|
key: we,
|
|
2069
2108
|
view: (t) => ({}),
|
|
2070
2109
|
state: {
|
|
@@ -2109,7 +2148,7 @@ const yo = (e) => {
|
|
|
2109
2148
|
o.setAttribute("contentedEditable", "false"), o.classList.add("bn-collaboration-cursor__caret"), o.setAttribute("style", `background-color: ${e.color}`);
|
|
2110
2149
|
const r = document.createElement("span");
|
|
2111
2150
|
return r.classList.add("bn-collaboration-cursor__label"), r.setAttribute("style", `background-color: ${e.color}`), r.insertBefore(document.createTextNode(e.name), null), o.insertBefore(r, null), t.insertBefore(document.createTextNode(""), null), t.insertBefore(o, null), t.insertBefore(document.createTextNode(""), null), t;
|
|
2112
|
-
},
|
|
2151
|
+
}, go = new _e("blocknote-ai-plugin");
|
|
2113
2152
|
class Ye extends lt {
|
|
2114
2153
|
/**
|
|
2115
2154
|
* @internal use `createAIExtension` instead
|
|
@@ -2118,7 +2157,7 @@ class Ye extends lt {
|
|
|
2118
2157
|
super();
|
|
2119
2158
|
j(this, "previousRequestOptions");
|
|
2120
2159
|
// internal store including setters
|
|
2121
|
-
j(this, "_store",
|
|
2160
|
+
j(this, "_store", pe()((o) => ({
|
|
2122
2161
|
aiMenuState: "closed"
|
|
2123
2162
|
})));
|
|
2124
2163
|
/**
|
|
@@ -2126,20 +2165,20 @@ class Ye extends lt {
|
|
|
2126
2165
|
* These options are used by default across all LLM calls when calling {@link doLLMRequest}
|
|
2127
2166
|
*/
|
|
2128
2167
|
j(this, "options");
|
|
2129
|
-
this.editor = o, this.options =
|
|
2130
|
-
dataFormat:
|
|
2168
|
+
this.editor = o, this.options = pe()((n) => ({
|
|
2169
|
+
dataFormat: fo.html,
|
|
2131
2170
|
stream: !0,
|
|
2132
2171
|
...r
|
|
2133
2172
|
})), this.addProsemirrorPlugin(
|
|
2134
|
-
new
|
|
2135
|
-
key:
|
|
2173
|
+
new Le({
|
|
2174
|
+
key: go,
|
|
2136
2175
|
filterTransaction: (n) => {
|
|
2137
2176
|
var a;
|
|
2138
2177
|
const i = this.store.getState().aiMenuState;
|
|
2139
|
-
return !(i !== "closed" && i.status === "ai-writing" && (a = n.getMeta(
|
|
2178
|
+
return !(i !== "closed" && i.status === "ai-writing" && (a = n.getMeta(kt)) != null && a.fixTables);
|
|
2140
2179
|
}
|
|
2141
2180
|
})
|
|
2142
|
-
), this.addProsemirrorPlugin(
|
|
2181
|
+
), this.addProsemirrorPlugin(pt()), this.addProsemirrorPlugin(
|
|
2143
2182
|
ho(
|
|
2144
2183
|
r.agentCursor || { name: "AI", color: "#8bc6ff" }
|
|
2145
2184
|
)
|
|
@@ -2303,7 +2342,7 @@ function ar(e) {
|
|
|
2303
2342
|
function O(e) {
|
|
2304
2343
|
return e.extension(Ye);
|
|
2305
2344
|
}
|
|
2306
|
-
const
|
|
2345
|
+
const ko = (e, t) => async (o, r) => {
|
|
2307
2346
|
const n = new Request(o, r), i = new Request(
|
|
2308
2347
|
`${e}?provider=${encodeURIComponent(
|
|
2309
2348
|
t
|
|
@@ -2342,7 +2381,7 @@ function cr(e) {
|
|
|
2342
2381
|
*/
|
|
2343
2382
|
getProviderSettings: (t) => ({
|
|
2344
2383
|
apiKey: e.apiKey,
|
|
2345
|
-
fetch:
|
|
2384
|
+
fetch: ko(e.baseURL, t)
|
|
2346
2385
|
})
|
|
2347
2386
|
};
|
|
2348
2387
|
}
|
|
@@ -2393,7 +2432,7 @@ function ve(e, t) {
|
|
|
2393
2432
|
}
|
|
2394
2433
|
return o;
|
|
2395
2434
|
}
|
|
2396
|
-
function
|
|
2435
|
+
function U(e) {
|
|
2397
2436
|
for (var t = 1; t < arguments.length; t++) {
|
|
2398
2437
|
var o = arguments[t] != null ? arguments[t] : {};
|
|
2399
2438
|
t % 2 ? ve(Object(o), !0).forEach(function(r) {
|
|
@@ -2422,13 +2461,13 @@ function Co(e, t) {
|
|
|
2422
2461
|
return (t === "string" ? String : Number)(e);
|
|
2423
2462
|
}
|
|
2424
2463
|
function Ke(e) {
|
|
2425
|
-
return e && e.map((t, o) => /* @__PURE__ */ B.createElement(t.tag,
|
|
2464
|
+
return e && e.map((t, o) => /* @__PURE__ */ B.createElement(t.tag, U({
|
|
2426
2465
|
key: o
|
|
2427
2466
|
}, t.attr), Ke(t.child)));
|
|
2428
2467
|
}
|
|
2429
2468
|
function v(e) {
|
|
2430
2469
|
return (t) => /* @__PURE__ */ B.createElement(Po, q({
|
|
2431
|
-
attr:
|
|
2470
|
+
attr: U({}, e.attr)
|
|
2432
2471
|
}, t), Ke(e.child));
|
|
2433
2472
|
}
|
|
2434
2473
|
function Po(e) {
|
|
@@ -2444,7 +2483,7 @@ function Po(e) {
|
|
|
2444
2483
|
strokeWidth: "0"
|
|
2445
2484
|
}, o.attr, r, a, {
|
|
2446
2485
|
className: c,
|
|
2447
|
-
style:
|
|
2486
|
+
style: U(U({
|
|
2448
2487
|
color: e.color || o.color
|
|
2449
2488
|
}, o.style), e.style),
|
|
2450
2489
|
height: s,
|
|
@@ -2469,19 +2508,19 @@ function Mo(e) {
|
|
|
2469
2508
|
function Bo(e) {
|
|
2470
2509
|
return v({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M15 18H16.5C17.8807 18 19 16.8807 19 15.5C19 14.1193 17.8807 13 16.5 13H3V11H16.5C18.9853 11 21 13.0147 21 15.5C21 17.9853 18.9853 20 16.5 20H15V22L11 19L15 16V18ZM3 4H21V6H3V4ZM9 18V20H3V18H9Z" }, child: [] }] })(e);
|
|
2471
2510
|
}
|
|
2472
|
-
function
|
|
2511
|
+
function xo(e) {
|
|
2473
2512
|
return v({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M13 6V21H11V6H5V4H19V6H13Z" }, child: [] }] })(e);
|
|
2474
2513
|
}
|
|
2475
|
-
function
|
|
2514
|
+
function Lo(e) {
|
|
2476
2515
|
return v({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M6.23509 6.45329C4.85101 7.89148 4 9.84636 4 12C4 16.4183 7.58172 20 12 20C13.0808 20 14.1116 19.7857 15.0521 19.3972C15.1671 18.6467 14.9148 17.9266 14.8116 17.6746C14.582 17.115 13.8241 16.1582 12.5589 14.8308C12.2212 14.4758 12.2429 14.2035 12.3636 13.3943L12.3775 13.3029C12.4595 12.7486 12.5971 12.4209 14.4622 12.1248C15.4097 11.9746 15.6589 12.3533 16.0043 12.8777C16.0425 12.9358 16.0807 12.9928 16.1198 13.0499C16.4479 13.5297 16.691 13.6394 17.0582 13.8064C17.2227 13.881 17.428 13.9751 17.7031 14.1314C18.3551 14.504 18.3551 14.9247 18.3551 15.8472V15.9518C18.3551 16.3434 18.3168 16.6872 18.2566 16.9859C19.3478 15.6185 20 13.8854 20 12C20 8.70089 18.003 5.8682 15.1519 4.64482C14.5987 5.01813 13.8398 5.54726 13.575 5.91C13.4396 6.09538 13.2482 7.04166 12.6257 7.11976C12.4626 7.14023 12.2438 7.12589 12.012 7.11097C11.3905 7.07058 10.5402 7.01606 10.268 7.75495C10.0952 8.2232 10.0648 9.49445 10.6239 10.1543C10.7134 10.2597 10.7307 10.4547 10.6699 10.6735C10.59 10.9608 10.4286 11.1356 10.3783 11.1717C10.2819 11.1163 10.0896 10.8931 9.95938 10.7412C9.64554 10.3765 9.25405 9.92233 8.74797 9.78176C8.56395 9.73083 8.36166 9.68867 8.16548 9.64736C7.6164 9.53227 6.99443 9.40134 6.84992 9.09302C6.74442 8.8672 6.74488 8.55621 6.74529 8.22764C6.74529 7.8112 6.74529 7.34029 6.54129 6.88256C6.46246 6.70541 6.35689 6.56446 6.23509 6.45329ZM12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22Z" }, child: [] }] })(e);
|
|
2477
2516
|
}
|
|
2478
2517
|
function _o(e) {
|
|
2479
2518
|
return v({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z" }, child: [] }] })(e);
|
|
2480
2519
|
}
|
|
2481
|
-
function
|
|
2520
|
+
function Eo(e) {
|
|
2482
2521
|
return v({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z" }, child: [] }] })(e);
|
|
2483
2522
|
}
|
|
2484
|
-
function
|
|
2523
|
+
function Io(e) {
|
|
2485
2524
|
return v({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M12 4C9.4095 4 7.10606 5.23053 5.64274 7.14274L8 9.5H2V3.5L4.21863 5.71863C6.05061 3.452 8.85558 2 12 2 17.5228 2 22 6.47715 22 12H20C20 7.58172 16.4183 4 12 4ZM4 12C4 16.4183 7.58172 20 12 20 14.5905 20 16.894 18.7695 18.3573 16.8573L16 14.5 22 14.5V20.5L19.7814 18.2814C17.9494 20.548 15.1444 22 12 22 6.47715 22 2 17.5228 2 12H4Z" }, child: [] }] })(e);
|
|
2486
2525
|
}
|
|
2487
2526
|
function ne(e) {
|
|
@@ -2497,26 +2536,26 @@ function Qe() {
|
|
|
2497
2536
|
return _(e.editor);
|
|
2498
2537
|
}
|
|
2499
2538
|
const No = (e) => {
|
|
2500
|
-
const t = G(), { onManualPromptSubmit: o, promptText: r, onPromptTextChange: n } = e, [i, a] =
|
|
2539
|
+
const t = G(), { onManualPromptSubmit: o, promptText: r, onPromptTextChange: n } = e, [i, a] = Ie(""), s = r || i, c = D(
|
|
2501
2540
|
async (d) => {
|
|
2502
2541
|
d.key === "Enter" && o(s);
|
|
2503
2542
|
},
|
|
2504
2543
|
[s, o]
|
|
2505
|
-
), u =
|
|
2544
|
+
), u = D(
|
|
2506
2545
|
(d) => {
|
|
2507
2546
|
const S = d.currentTarget.value;
|
|
2508
2547
|
n && n(S), r === void 0 && a(S);
|
|
2509
2548
|
},
|
|
2510
2549
|
[n, a, r]
|
|
2511
|
-
),
|
|
2550
|
+
), m = E(() => ut(e.items, s), [s, e.items]), { selectedIndex: l, setSelectedIndex: f, handler: p } = Pt(m, (d) => d.onItemClick()), h = D(
|
|
2512
2551
|
(d) => {
|
|
2513
|
-
d.key === "Enter" ?
|
|
2552
|
+
d.key === "Enter" ? m.length > 0 ? p(d) : c(d) : p(d);
|
|
2514
2553
|
},
|
|
2515
|
-
[c,
|
|
2554
|
+
[c, p, m.length]
|
|
2516
2555
|
);
|
|
2517
2556
|
return Ne(() => {
|
|
2518
|
-
|
|
2519
|
-
}, [s,
|
|
2557
|
+
f(0);
|
|
2558
|
+
}, [s, f]), /* @__PURE__ */ vt("div", { className: "bn-combobox", children: [
|
|
2520
2559
|
/* @__PURE__ */ y(t.Generic.Form.Root, { children: /* @__PURE__ */ y(
|
|
2521
2560
|
t.Generic.Form.TextInput,
|
|
2522
2561
|
{
|
|
@@ -2540,7 +2579,7 @@ const No = (e) => {
|
|
|
2540
2579
|
{
|
|
2541
2580
|
className: "bn-combobox-items",
|
|
2542
2581
|
id: "ai-suggestion-menu",
|
|
2543
|
-
children:
|
|
2582
|
+
children: m.map((d, S) => /* @__PURE__ */ y(
|
|
2544
2583
|
t.SuggestionMenu.Item,
|
|
2545
2584
|
{
|
|
2546
2585
|
className: dt(
|
|
@@ -2634,7 +2673,7 @@ function jo(e) {
|
|
|
2634
2673
|
key: "improve_writing",
|
|
2635
2674
|
title: t.ai_default_commands.improve_writing.title,
|
|
2636
2675
|
aliases: t.ai_default_commands.improve_writing.aliases,
|
|
2637
|
-
icon: /* @__PURE__ */ y(
|
|
2676
|
+
icon: /* @__PURE__ */ y(xo, { size: 18 }),
|
|
2638
2677
|
onItemClick: async () => {
|
|
2639
2678
|
await o.callLLM({
|
|
2640
2679
|
useSelection: !0,
|
|
@@ -2653,7 +2692,7 @@ function jo(e) {
|
|
|
2653
2692
|
key: "fix_spelling",
|
|
2654
2693
|
title: t.ai_default_commands.fix_spelling.title,
|
|
2655
2694
|
aliases: t.ai_default_commands.fix_spelling.aliases,
|
|
2656
|
-
icon: /* @__PURE__ */ y(
|
|
2695
|
+
icon: /* @__PURE__ */ y(Eo, { size: 18 }),
|
|
2657
2696
|
onItemClick: async () => {
|
|
2658
2697
|
await o.callLLM({
|
|
2659
2698
|
useSelection: !0,
|
|
@@ -2672,7 +2711,7 @@ function jo(e) {
|
|
|
2672
2711
|
key: "translate",
|
|
2673
2712
|
title: t.ai_default_commands.translate.title,
|
|
2674
2713
|
aliases: t.ai_default_commands.translate.aliases,
|
|
2675
|
-
icon: /* @__PURE__ */ y(
|
|
2714
|
+
icon: /* @__PURE__ */ y(Lo, { size: 18 }),
|
|
2676
2715
|
onItemClick: (r) => {
|
|
2677
2716
|
r(t.ai_default_commands.translate.prompt_placeholder);
|
|
2678
2717
|
},
|
|
@@ -2699,7 +2738,7 @@ function jo(e) {
|
|
|
2699
2738
|
}
|
|
2700
2739
|
];
|
|
2701
2740
|
}
|
|
2702
|
-
function
|
|
2741
|
+
function Do(e) {
|
|
2703
2742
|
const t = _(e), o = O(e);
|
|
2704
2743
|
return [
|
|
2705
2744
|
{
|
|
@@ -2724,14 +2763,14 @@ function $o(e) {
|
|
|
2724
2763
|
}
|
|
2725
2764
|
];
|
|
2726
2765
|
}
|
|
2727
|
-
function
|
|
2766
|
+
function $o(e) {
|
|
2728
2767
|
const t = _(e), o = O(e);
|
|
2729
2768
|
return [
|
|
2730
2769
|
{
|
|
2731
2770
|
key: "retry",
|
|
2732
2771
|
title: t.ai_menu.actions.retry.title,
|
|
2733
2772
|
aliases: t.ai_menu.actions.retry.aliases,
|
|
2734
|
-
icon: /* @__PURE__ */ y(
|
|
2773
|
+
icon: /* @__PURE__ */ y(Io, { size: 18 }),
|
|
2735
2774
|
onItemClick: async () => {
|
|
2736
2775
|
await o.retry();
|
|
2737
2776
|
},
|
|
@@ -2750,24 +2789,24 @@ function Do(e) {
|
|
|
2750
2789
|
];
|
|
2751
2790
|
}
|
|
2752
2791
|
function Ro(e, t) {
|
|
2753
|
-
return t === "user-input" ? e.getSelection() ? jo(e) : Ao(e) : t === "user-reviewing" ?
|
|
2792
|
+
return t === "user-input" ? e.getSelection() ? jo(e) : Ao(e) : t === "user-reviewing" ? Do(e) : t === "error" ? $o(e) : [];
|
|
2754
2793
|
}
|
|
2755
2794
|
const Ho = (e) => {
|
|
2756
|
-
const t = K(), [o, r] =
|
|
2795
|
+
const t = K(), [o, r] = Ie(""), n = Qe(), i = G(), a = O(t), s = Ae(
|
|
2757
2796
|
a.store,
|
|
2758
|
-
(
|
|
2759
|
-
), { items: c } = e, u =
|
|
2760
|
-
let
|
|
2761
|
-
return c ?
|
|
2797
|
+
(p) => p.aiMenuState !== "closed" ? p.aiMenuState.status : "closed"
|
|
2798
|
+
), { items: c } = e, u = E(() => {
|
|
2799
|
+
let p = [];
|
|
2800
|
+
return c ? p = c(t, s) : p = Ro(t, s), p.map((h) => ({
|
|
2762
2801
|
...h,
|
|
2763
2802
|
onItemClick: () => {
|
|
2764
2803
|
h.onItemClick(r);
|
|
2765
2804
|
}
|
|
2766
2805
|
}));
|
|
2767
|
-
}, [c, s, t]),
|
|
2768
|
-
async (
|
|
2806
|
+
}, [c, s, t]), m = D(
|
|
2807
|
+
async (p) => {
|
|
2769
2808
|
await a.callLLM({
|
|
2770
|
-
userPrompt:
|
|
2809
|
+
userPrompt: p,
|
|
2771
2810
|
useSelection: t.getSelection() !== void 0
|
|
2772
2811
|
});
|
|
2773
2812
|
},
|
|
@@ -2776,7 +2815,7 @@ const Ho = (e) => {
|
|
|
2776
2815
|
Ne(() => {
|
|
2777
2816
|
(s === "user-reviewing" || s === "error") && r("");
|
|
2778
2817
|
}, [s]);
|
|
2779
|
-
const l =
|
|
2818
|
+
const l = E(() => s === "thinking" ? n.ai_menu.status.thinking : s === "ai-writing" ? n.ai_menu.status.editing : s === "error" ? n.ai_menu.status.error : n.ai_menu.input_placeholder, [s, n]), f = E(() => {
|
|
2780
2819
|
if (s === "thinking" || s === "ai-writing")
|
|
2781
2820
|
return /* @__PURE__ */ y(
|
|
2782
2821
|
i.SuggestionMenu.Loader,
|
|
@@ -2800,18 +2839,18 @@ const Ho = (e) => {
|
|
|
2800
2839
|
return /* @__PURE__ */ y(
|
|
2801
2840
|
No,
|
|
2802
2841
|
{
|
|
2803
|
-
onManualPromptSubmit: e.onManualPromptSubmit ||
|
|
2842
|
+
onManualPromptSubmit: e.onManualPromptSubmit || m,
|
|
2804
2843
|
items: u,
|
|
2805
2844
|
promptText: o,
|
|
2806
2845
|
onPromptTextChange: r,
|
|
2807
2846
|
placeholder: l,
|
|
2808
2847
|
disabled: s === "thinking" || s === "ai-writing",
|
|
2809
2848
|
icon: /* @__PURE__ */ y("div", { className: "bn-combobox-icon", children: /* @__PURE__ */ y(ne, {}) }),
|
|
2810
|
-
rightSection:
|
|
2849
|
+
rightSection: f
|
|
2811
2850
|
}
|
|
2812
2851
|
);
|
|
2813
2852
|
}, qo = (e) => {
|
|
2814
|
-
const t = e.blockID ? document.querySelector(`[data-id="${e.blockID}"]`) : void 0, o =
|
|
2853
|
+
const t = e.blockID ? document.querySelector(`[data-id="${e.blockID}"]`) : void 0, o = E(() => t ? {
|
|
2815
2854
|
getBoundingClientRect: () => t.getBoundingClientRect(),
|
|
2816
2855
|
contextElement: t
|
|
2817
2856
|
} : null, [t]), { isMounted: r, ref: n, style: i, getFloatingProps: a, isPositioned: s } = Ot(!!t, o, 3e3, {
|
|
@@ -2833,7 +2872,7 @@ const Ho = (e) => {
|
|
|
2833
2872
|
})
|
|
2834
2873
|
],
|
|
2835
2874
|
onOpenChange: e.onOpenChange,
|
|
2836
|
-
whileElementsMounted: (c, u,
|
|
2875
|
+
whileElementsMounted: (c, u, m) => xt(c, u, m, {
|
|
2837
2876
|
animationFrame: !0
|
|
2838
2877
|
})
|
|
2839
2878
|
});
|
|
@@ -2880,7 +2919,7 @@ const Ho = (e) => {
|
|
|
2880
2919
|
onClick: n
|
|
2881
2920
|
}
|
|
2882
2921
|
) : null;
|
|
2883
|
-
},
|
|
2922
|
+
}, Uo = {
|
|
2884
2923
|
AI: ne
|
|
2885
2924
|
};
|
|
2886
2925
|
function dr(e) {
|
|
@@ -2894,7 +2933,7 @@ function dr(e) {
|
|
|
2894
2933
|
r.block.content.length === 0 && r.prevBlock ? t.openAIMenuAtBlock(r.prevBlock.id) : t.openAIMenuAtBlock(r.block.id);
|
|
2895
2934
|
},
|
|
2896
2935
|
..._(e).slash_menu.ai,
|
|
2897
|
-
icon: /* @__PURE__ */ y(
|
|
2936
|
+
icon: /* @__PURE__ */ y(Uo.AI, {})
|
|
2898
2937
|
}
|
|
2899
2938
|
];
|
|
2900
2939
|
}
|
|
@@ -2912,7 +2951,7 @@ export {
|
|
|
2912
2951
|
O as getAIExtension,
|
|
2913
2952
|
dr as getAISlashMenuItems,
|
|
2914
2953
|
Ro as getDefaultAIMenuItems,
|
|
2915
|
-
|
|
2954
|
+
fo as llmFormats,
|
|
2916
2955
|
ir as promptHelpers
|
|
2917
2956
|
};
|
|
2918
2957
|
//# sourceMappingURL=blocknote-xl-ai.js.map
|