@blokkli/editor 2.0.0-alpha.58 → 2.0.0-alpha.59
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/global/types/blockOptions.d.ts +36 -9
- package/dist/global/types/colorOptions.d.ts +4 -0
- package/dist/module.d.mts +3 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +349 -166
- package/dist/modules/agent/index.d.mts +2 -1
- package/dist/modules/agent/index.mjs +14 -7
- package/dist/modules/agent/runtime/app/components/Attachment/PreviewCode/index.vue +11 -0
- package/dist/modules/agent/runtime/app/components/Attachment/PreviewCsv/index.vue +56 -0
- package/dist/modules/agent/runtime/app/{features/agent/Panel/Attachment/PreviewCode → components/Attachment/PreviewHtml}/index.vue +1 -1
- package/dist/modules/agent/runtime/app/components/Attachment/PreviewMarkdown/index.vue +10 -0
- package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Attachment/index.d.vue.ts +1 -0
- package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Attachment/index.vue +22 -10
- package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Attachment/index.vue.d.ts +1 -0
- package/dist/modules/agent/runtime/app/components/Conversation/InlineFeedback/index.d.vue.ts +7 -0
- package/dist/modules/agent/runtime/app/components/Conversation/InlineFeedback/index.vue +40 -0
- package/dist/modules/agent/runtime/app/components/Conversation/InlineFeedback/index.vue.d.ts +7 -0
- package/dist/modules/agent/runtime/app/components/Conversation/Item/Assistant/index.vue +24 -0
- package/dist/modules/agent/runtime/app/components/Conversation/Item/Bubble/Tool/index.d.vue.ts +20 -0
- package/dist/modules/agent/runtime/app/components/Conversation/Item/Bubble/Tool/index.vue +52 -0
- package/dist/modules/agent/runtime/app/components/Conversation/Item/Bubble/Tool/index.vue.d.ts +20 -0
- package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/Item/Error/index.d.vue.ts +2 -1
- package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/Item/Error/index.vue +4 -14
- package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/Item/Error/index.vue.d.ts +2 -1
- package/dist/modules/agent/runtime/app/components/Conversation/Item/ErrorBubble/index.d.vue.ts +11 -0
- package/dist/modules/agent/runtime/app/components/Conversation/Item/ErrorBubble/index.vue +29 -0
- package/dist/modules/agent/runtime/app/components/Conversation/Item/ErrorBubble/index.vue.d.ts +11 -0
- package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/Item/ServerTool/index.d.vue.ts +2 -1
- package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/Item/ServerTool/index.vue +10 -23
- package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/Item/ServerTool/index.vue.d.ts +2 -1
- package/dist/modules/agent/runtime/app/components/Conversation/Item/Tool/index.vue +36 -0
- package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/Item/Unknown/index.vue +2 -5
- package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/Item/User/index.d.vue.ts +2 -0
- package/dist/modules/agent/runtime/app/components/Conversation/Item/User/index.vue +144 -0
- package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/Item/User/index.vue.d.ts +2 -0
- package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/Thinking/index.vue +3 -3
- package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/index.d.vue.ts +2 -0
- package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/index.vue +27 -11
- package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/index.vue.d.ts +2 -0
- package/dist/modules/agent/runtime/app/{tools/delegate_text_rewrite/Details → components/FieldDiffDetails}/index.d.vue.ts +15 -0
- package/dist/modules/agent/runtime/app/{tools/delegate_text_rewrite/Details → components/FieldDiffDetails}/index.vue.d.ts +15 -0
- package/dist/modules/agent/runtime/app/components/Markdown/index.d.vue.ts +6 -0
- package/dist/modules/agent/runtime/app/components/Markdown/index.vue +14 -0
- package/dist/modules/agent/runtime/app/components/Markdown/index.vue.d.ts +6 -0
- package/dist/modules/agent/runtime/app/composables/index.d.ts +5 -1
- package/dist/modules/agent/runtime/app/composables/index.js +2 -0
- package/dist/modules/agent/runtime/app/composables/useAgent.d.ts +2 -1
- package/dist/modules/agent/runtime/app/composables/useAgent.js +5 -2
- package/dist/modules/agent/runtime/app/composables/useAgentFeedbackOptions.d.ts +11 -0
- package/dist/modules/agent/runtime/app/composables/useAgentFeedbackOptions.js +24 -0
- package/dist/modules/agent/runtime/app/composables/useAgentPaginatedQuery.d.ts +29 -0
- package/dist/modules/agent/runtime/app/composables/useAgentPaginatedQuery.js +30 -0
- package/dist/modules/agent/runtime/app/features/agent/Container.d.vue.ts +0 -2
- package/dist/modules/agent/runtime/app/features/agent/Container.vue +39 -101
- package/dist/modules/agent/runtime/app/features/agent/Container.vue.d.ts +0 -2
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/ConversationsTab/Item.d.vue.ts +13 -0
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/ConversationsTab/Item.vue +46 -0
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/ConversationsTab/Item.vue.d.ts +13 -0
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/ConversationsTab/index.vue +74 -0
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/RatingsTab/Item.d.vue.ts +11 -0
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/RatingsTab/Item.vue +55 -0
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/RatingsTab/Item.vue.d.ts +11 -0
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/RatingsTab/index.d.vue.ts +3 -0
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/RatingsTab/index.vue +116 -0
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/RatingsTab/index.vue.d.ts +3 -0
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/SplitView/ConversationDetail.d.vue.ts +7 -0
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/SplitView/ConversationDetail.vue +61 -0
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/SplitView/ConversationDetail.vue.d.ts +7 -0
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/SplitView/index.d.vue.ts +38 -0
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/SplitView/index.vue +137 -0
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/SplitView/index.vue.d.ts +38 -0
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/index.d.vue.ts +7 -0
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/index.vue +45 -0
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/index.vue.d.ts +7 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/ConversationList/index.d.vue.ts +2 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/ConversationList/index.vue +23 -36
- package/dist/modules/agent/runtime/app/features/agent/Panel/ConversationList/index.vue.d.ts +2 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/Feedback/index.vue +11 -28
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/Item.d.vue.ts +8 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/Item.vue +20 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/Item.vue.d.ts +8 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/Separator.d.vue.ts +3 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/Separator.vue +3 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/Separator.vue.d.ts +3 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/index.vue +31 -31
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue +55 -9
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/index.vue +12 -6
- package/dist/modules/agent/runtime/app/features/agent/Panel/PendingMutation/index.vue +2 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/Plan/index.vue +13 -10
- package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.d.vue.ts +3 -3
- package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.vue +18 -16
- package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.vue.d.ts +3 -3
- package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/index.vue +44 -13
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.d.vue.ts +1 -61
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue +145 -142
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue.d.ts +1 -61
- package/dist/modules/agent/runtime/app/features/agent/Transcript/MessageContent.d.vue.ts +7 -0
- package/dist/modules/agent/runtime/app/features/agent/Transcript/MessageContent.vue +41 -0
- package/dist/modules/agent/runtime/app/features/agent/Transcript/MessageContent.vue.d.ts +7 -0
- package/dist/modules/agent/runtime/app/features/agent/Transcript/index.vue +83 -122
- package/dist/modules/agent/runtime/app/features/agent/index.vue +101 -4
- package/dist/modules/agent/runtime/app/features/agent/types.d.ts +85 -18
- package/dist/modules/agent/runtime/app/helpers/historySignature.d.ts +14 -0
- package/dist/modules/agent/runtime/app/helpers/historySignature.js +13 -0
- package/dist/modules/agent/runtime/app/helpers/id.d.ts +6 -0
- package/dist/modules/agent/runtime/app/helpers/id.js +3 -0
- package/dist/modules/agent/runtime/app/helpers/index.d.ts +0 -14
- package/dist/modules/agent/runtime/app/helpers/index.js +1 -19
- package/dist/modules/agent/runtime/app/helpers/markdown.d.ts +7 -0
- package/dist/modules/agent/runtime/app/helpers/markdown.js +5 -0
- package/dist/modules/agent/runtime/app/helpers/pageStructure.js +7 -19
- package/dist/modules/agent/runtime/app/helpers/parseConversationData.d.ts +27 -0
- package/dist/modules/agent/runtime/app/helpers/parseConversationData.js +42 -0
- package/dist/modules/agent/runtime/app/prompts/fixReadability.js +5 -4
- package/dist/modules/agent/runtime/app/providers/agentProvider.d.ts +24 -2
- package/dist/modules/agent/runtime/app/providers/agentProvider.js +138 -53
- package/dist/modules/agent/runtime/app/providers/conversationProvider.d.ts +9 -10
- package/dist/modules/agent/runtime/app/providers/conversationProvider.js +10 -39
- package/dist/modules/agent/runtime/app/providers/toolsProvider.js +43 -40
- package/dist/modules/agent/runtime/app/tools/{add_content_search_paragraph → add_content_search_paragraphs}/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/add_fragment/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.js +4 -2
- package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.js +37 -28
- package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.js +10 -10
- package/dist/modules/agent/runtime/app/tools/add_template/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/ask_question/Component.vue +25 -15
- package/dist/modules/agent/runtime/app/tools/ask_question/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/ask_question/index.js +5 -4
- package/dist/modules/agent/runtime/app/tools/{check_readability → check_readability_for_texts}/index.js +16 -23
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.d.vue.ts +4 -23
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue +80 -594
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue.d.ts +4 -23
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.d.ts +18 -17
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.js +56 -47
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/useFieldRewriteStream.d.ts +64 -0
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/useFieldRewriteStream.js +502 -0
- package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.js +4 -2
- package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.js +8 -8
- package/dist/modules/agent/runtime/app/tools/fieldDiffApproval.d.ts +49 -0
- package/dist/modules/agent/runtime/app/tools/fieldDiffApproval.js +64 -0
- package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.js +14 -13
- package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.js +12 -18
- package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.js +21 -22
- package/dist/modules/agent/runtime/app/tools/get_content_fields/index.js +20 -24
- package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.js +5 -3
- package/dist/modules/agent/runtime/app/tools/get_page_structure/index.js +3 -1
- package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.js +35 -49
- package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.js +8 -11
- package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.js +8 -4
- package/dist/modules/agent/runtime/app/tools/get_readability_issues/index.js +4 -2
- package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.js +3 -1
- package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.js +6 -2
- package/dist/modules/agent/runtime/app/tools/helpers.d.ts +28 -22
- package/dist/modules/agent/runtime/app/tools/helpers.js +64 -39
- package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.js +36 -4
- package/dist/modules/agent/runtime/app/tools/readability.d.ts +45 -0
- package/dist/modules/agent/runtime/app/tools/readability.js +51 -0
- package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.js +8 -7
- package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.js +2 -1
- package/dist/modules/agent/runtime/app/tools/replace_media_field/index.js +1 -1
- package/dist/modules/agent/runtime/app/tools/schemas.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/schemas.js +27 -0
- package/dist/modules/agent/runtime/app/tools/search_content/index.js +3 -1
- package/dist/modules/agent/runtime/app/tools/search_media/index.js +1 -1
- package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.js +11 -10
- package/dist/modules/agent/runtime/app/tools/search_templates/index.js +3 -1
- package/dist/modules/agent/runtime/app/tools/search_text/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/select_media/Component.vue +22 -8
- package/dist/modules/agent/runtime/app/tools/select_media/index.js +1 -1
- package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.js +9 -14
- package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.js +9 -9
- package/dist/modules/agent/runtime/app/tools/update_text_fields/Component.d.vue.ts +6 -15
- package/dist/modules/agent/runtime/app/tools/update_text_fields/Component.vue +48 -92
- package/dist/modules/agent/runtime/app/tools/update_text_fields/Component.vue.d.ts +6 -15
- package/dist/modules/agent/runtime/app/tools/update_text_fields/index.d.ts +34 -13
- package/dist/modules/agent/runtime/app/tools/update_text_fields/index.js +84 -52
- package/dist/modules/agent/runtime/app/tools/web_fetch/index.js +1 -1
- package/dist/modules/agent/runtime/app/types/index.d.ts +55 -7
- package/dist/modules/agent/runtime/app/types/index.js +55 -8
- package/dist/modules/agent/runtime/server/agent.js +4 -3
- package/dist/modules/agent/runtime/server/classes/ConversationHistory/index.d.ts +93 -0
- package/dist/modules/agent/runtime/server/classes/ConversationHistory/index.js +241 -0
- package/dist/modules/agent/runtime/server/classes/ConversationMessage/index.d.ts +102 -0
- package/dist/modules/agent/runtime/server/classes/ConversationMessage/index.js +156 -0
- package/dist/modules/agent/runtime/server/{Session.d.ts → classes/Session/index.d.ts} +46 -14
- package/dist/modules/agent/runtime/server/{Session.js → classes/Session/index.js} +350 -382
- package/dist/modules/agent/runtime/server/{SessionManager.d.ts → classes/SessionManager/index.d.ts} +2 -2
- package/dist/modules/agent/runtime/server/{SessionManager.js → classes/SessionManager/index.js} +4 -19
- package/dist/modules/agent/runtime/server/classes/StreamAccumulator/index.d.ts +58 -0
- package/dist/modules/agent/runtime/server/classes/StreamAccumulator/index.js +72 -0
- package/dist/modules/agent/runtime/server/default-skills/adding-new-paragraphs.js +0 -1
- package/dist/modules/agent/runtime/server/default-skills/fixReadability.js +1 -1
- package/dist/modules/agent/runtime/server/default-skills/rewriteAndTranslate.js +8 -8
- package/dist/modules/agent/runtime/server/default-system-prompts/introduction.js +1 -1
- package/dist/modules/agent/runtime/server/default-system-prompts/workflow.js +0 -1
- package/dist/modules/agent/runtime/server/{agentPrompt.d.ts → helpers/agentPrompt.d.ts} +3 -3
- package/dist/modules/agent/runtime/server/helpers/errors.d.ts +10 -0
- package/dist/modules/agent/runtime/server/helpers/errors.js +63 -0
- package/dist/modules/agent/runtime/server/helpers/messages.d.ts +6 -0
- package/dist/modules/agent/runtime/server/helpers/messages.js +70 -0
- package/dist/modules/agent/runtime/server/helpers/models.d.ts +20 -0
- package/dist/modules/agent/runtime/server/helpers/models.js +15 -0
- package/dist/modules/agent/runtime/server/{routing.d.ts → helpers/routing.d.ts} +2 -2
- package/dist/modules/agent/runtime/server/{routing.js → helpers/routing.js} +2 -9
- package/dist/modules/agent/runtime/server/helpers/security.d.ts +22 -0
- package/dist/modules/agent/runtime/server/helpers/security.js +44 -0
- package/dist/modules/agent/runtime/server/helpers/skills.d.ts +14 -0
- package/dist/modules/agent/runtime/server/helpers/skills.js +22 -0
- package/dist/modules/agent/runtime/server/helpers/socket.d.ts +4 -0
- package/dist/modules/agent/runtime/server/helpers/socket.js +3 -0
- package/dist/modules/agent/runtime/server/helpers/text.d.ts +5 -0
- package/dist/modules/agent/runtime/server/helpers/text.js +3 -0
- package/dist/modules/agent/runtime/server/providers/anthropic.js +22 -3
- package/dist/modules/agent/runtime/server/providers/openai.js +4 -0
- package/dist/modules/agent/runtime/server/route.js +2 -2
- package/dist/modules/agent/runtime/server/server-tools/index.d.ts +2 -0
- package/dist/modules/agent/runtime/server/server-tools/load_tools/index.js +1 -5
- package/dist/modules/agent/runtime/server/stream.js +6 -29
- package/dist/modules/agent/runtime/shared/toolParams.d.ts +28 -0
- package/dist/modules/agent/runtime/shared/toolParams.js +27 -0
- package/dist/modules/agent/runtime/shared/toolResult.d.ts +94 -0
- package/dist/modules/agent/runtime/shared/toolResult.js +155 -0
- package/dist/modules/agent/runtime/shared/types.d.ts +1 -3
- package/dist/modules/agent/runtime/shared/types.js +8 -1
- package/dist/modules/charts/index.d.mts +3 -17
- package/dist/modules/charts/index.mjs +241 -16
- package/dist/modules/charts/runtime/blokkli/chart-types/advanced/definition.d.ts +5 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/advanced/definition.js +26 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/advanced/render.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/advanced/render.vue +120 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/advanced/render.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/agePyramid/definition.d.ts +6 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/agePyramid/definition.js +40 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/agePyramid/illustration.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/agePyramid/illustration.vue +41 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/agePyramid/illustration.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/agePyramid/render.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/agePyramid/render.vue +94 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/agePyramid/render.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/area/definition.d.ts +7 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/area/definition.js +49 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/area/illustration.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/area/illustration.vue +56 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/area/illustration.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/area/render.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/area/render.vue +99 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/area/render.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/{chartTypes/bar.d.ts → blokkli/chart-types/bar/definition.d.ts} +3 -3
- package/dist/modules/charts/runtime/{chartTypes/bar.js → blokkli/chart-types/bar/definition.js} +12 -31
- package/dist/modules/charts/runtime/blokkli/chart-types/bar/illustration.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/bar/illustration.vue +34 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/bar/illustration.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/bar/render.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/bar/render.vue +107 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/bar/render.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/donut/definition.d.ts +7 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/donut/definition.js +35 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/donut/illustration.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/donut/illustration.vue +35 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/donut/illustration.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/donut/render.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/donut/render.vue +87 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/donut/render.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/{chartTypes/heatmap.d.ts → blokkli/chart-types/heatmap/definition.d.ts} +3 -3
- package/dist/modules/charts/runtime/blokkli/chart-types/heatmap/definition.js +29 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/heatmap/illustration.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/heatmap/illustration.vue +27 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/heatmap/illustration.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/heatmap/render.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/heatmap/render.vue +113 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/heatmap/render.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/line/definition.d.ts +7 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/line/definition.js +49 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/line/illustration.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/line/illustration.vue +59 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/line/illustration.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/line/render.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/line/render.vue +98 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/line/render.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/pie/definition.d.ts +6 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/pie/definition.js +29 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/pie/illustration.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/pie/illustration.vue +20 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/pie/illustration.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/pie/render.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/pie/render.vue +71 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/pie/render.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/radar/definition.d.ts +7 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/radar/definition.js +45 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/radar/illustration.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/radar/illustration.vue +60 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/radar/illustration.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/radar/render.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/radar/render.vue +95 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/radar/render.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/radialBar/definition.d.ts +6 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/radialBar/definition.js +29 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/radialBar/illustration.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/radialBar/illustration.vue +32 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/radialBar/illustration.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/radialBar/render.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/radialBar/render.vue +77 -0
- package/dist/modules/charts/runtime/blokkli/chart-types/radialBar/render.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/blokkli/skills/charts.js +36 -2
- package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.d.ts +81 -19
- package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.js +79 -32
- package/dist/modules/charts/runtime/blokkli/tools/create_advanced_chart/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/create_advanced_chart/index.js +88 -0
- package/dist/modules/charts/runtime/blokkli/tools/create_chart/index.js +8 -4
- package/dist/modules/charts/runtime/blokkli/tools/get_advanced_chart_config/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_advanced_chart_config/index.js +65 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_data/index.js +36 -8
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_type_options/index.js +4 -2
- package/dist/modules/charts/runtime/blokkli/tools/update_advanced_chart/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/update_advanced_chart/index.js +73 -0
- package/dist/modules/charts/runtime/blokkli/tools/update_chart/index.js +43 -20
- package/dist/modules/charts/runtime/chart-types/definition/index.d.ts +7 -0
- package/dist/modules/charts/runtime/chart-types/definition/index.js +3 -0
- package/dist/modules/charts/runtime/chart-types/definition/options/index.d.ts +43 -0
- package/dist/modules/charts/runtime/{chartTypes/shared.js → chart-types/definition/options/index.js} +30 -23
- package/dist/modules/charts/runtime/chart-types/index.d.ts +21 -0
- package/dist/modules/charts/runtime/chart-types/index.js +25 -0
- package/dist/modules/charts/runtime/components/ChartRenderer/index.d.vue.ts +19 -145
- package/dist/modules/charts/runtime/components/ChartRenderer/index.vue +193 -99
- package/dist/modules/charts/runtime/components/ChartRenderer/index.vue.d.ts +19 -145
- package/dist/modules/charts/runtime/features/charts/Editor/AdvancedConfigPanel/index.d.vue.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/AdvancedConfigPanel/index.vue +149 -0
- package/dist/modules/charts/runtime/features/charts/Editor/AdvancedConfigPanel/index.vue.d.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CategoryColorOverridesPanel/index.d.vue.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CategoryColorOverridesPanel/index.vue +62 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CategoryColorOverridesPanel/index.vue.d.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/Field.d.vue.ts +14 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/Field.vue +89 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/Field.vue.d.ts +14 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.d.vue.ts +3 -3
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.vue +45 -52
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.vue.d.ts +3 -3
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/TypeCard.d.vue.ts +7 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/TypeCard.vue +55 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/TypeCard.vue.d.ts +7 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/TypeGrid.d.vue.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/TypeGrid.vue +24 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/TypeGrid.vue.d.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.d.vue.ts +2 -2
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.vue +48 -26
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.vue.d.ts +2 -2
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.d.vue.ts +0 -2
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue +64 -20
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue.d.ts +0 -2
- package/dist/modules/charts/runtime/features/charts/Editor/CsvExport/index.d.vue.ts +9 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvExport/index.vue +55 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvExport/index.vue.d.ts +9 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/FilterEditor/index.d.vue.ts +16 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/FilterEditor/index.vue +88 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/FilterEditor/index.vue.d.ts +16 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/FiltersSection/index.d.vue.ts +13 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/FiltersSection/index.vue +111 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/FiltersSection/index.vue.d.ts +13 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/GroupBySection/index.d.vue.ts +14 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/GroupBySection/index.vue +100 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/GroupBySection/index.vue.d.ts +14 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/OutputPreviewTable/index.d.vue.ts +17 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/OutputPreviewTable/index.vue +152 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/OutputPreviewTable/index.vue.d.ts +17 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/PreviewDialog.d.vue.ts +14 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/PreviewDialog.vue +340 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/PreviewDialog.vue.d.ts +14 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/csvHelpers.d.ts +69 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/csvHelpers.js +368 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.d.vue.ts +6 -17
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.vue +37 -64
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.vue.d.ts +6 -17
- package/dist/modules/charts/runtime/features/charts/Editor/DataSourcePicker/index.d.vue.ts +16 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DataSourcePicker/index.vue +80 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DataSourcePicker/index.vue.d.ts +16 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.d.vue.ts +3 -3
- package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.vue +29 -18
- package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.vue.d.ts +3 -3
- package/dist/modules/charts/runtime/features/charts/Editor/DateFormatEditor/index.d.vue.ts +13 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DateFormatEditor/index.vue +71 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DateFormatEditor/index.vue.d.ts +13 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DynamicPreviewStatus/index.d.vue.ts +16 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DynamicPreviewStatus/index.vue +57 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DynamicPreviewStatus/index.vue.d.ts +16 -0
- package/dist/modules/charts/runtime/features/charts/Editor/FootnoteEditor/index.d.vue.ts +4 -5
- package/dist/modules/charts/runtime/features/charts/Editor/FootnoteEditor/index.vue +63 -51
- package/dist/modules/charts/runtime/features/charts/Editor/FootnoteEditor/index.vue.d.ts +4 -5
- package/dist/modules/charts/runtime/features/charts/Editor/NumberFormatEditor/index.d.vue.ts +21 -0
- package/dist/modules/charts/runtime/features/charts/Editor/NumberFormatEditor/index.vue +120 -0
- package/dist/modules/charts/runtime/features/charts/Editor/NumberFormatEditor/index.vue.d.ts +21 -0
- package/dist/modules/charts/runtime/features/charts/Editor/OrphanOverridesWarning/index.d.vue.ts +18 -0
- package/dist/modules/charts/runtime/features/charts/Editor/OrphanOverridesWarning/index.vue +65 -0
- package/dist/modules/charts/runtime/features/charts/Editor/OrphanOverridesWarning/index.vue.d.ts +18 -0
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.d.vue.ts +2 -1
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.vue +8 -2
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.vue.d.ts +2 -1
- package/dist/modules/charts/runtime/features/charts/Editor/SeriesOverridesPanel/index.d.vue.ts +13 -0
- package/dist/modules/charts/runtime/features/charts/Editor/SeriesOverridesPanel/index.vue +95 -0
- package/dist/modules/charts/runtime/features/charts/Editor/SeriesOverridesPanel/index.vue.d.ts +13 -0
- package/dist/{runtime/editor/components/AutoHeight → modules/charts/runtime/features/charts/Editor/TranslationsEditor/TranslationRow}/index.d.vue.ts +1 -1
- package/dist/modules/charts/runtime/features/charts/Editor/TranslationsEditor/TranslationRow/index.vue +19 -0
- package/dist/{runtime/editor/components/AutoHeight → modules/charts/runtime/features/charts/Editor/TranslationsEditor/TranslationRow}/index.vue.d.ts +1 -1
- package/dist/modules/charts/runtime/features/charts/Editor/TranslationsEditor/index.d.vue.ts +17 -0
- package/dist/modules/charts/runtime/features/charts/Editor/TranslationsEditor/index.vue +264 -0
- package/dist/modules/charts/runtime/features/charts/Editor/TranslationsEditor/index.vue.d.ts +17 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.d.vue.ts +1 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.vue +477 -141
- package/dist/modules/charts/runtime/features/charts/Editor/index.vue.d.ts +1 -0
- package/dist/modules/charts/runtime/features/charts/Editor/useChartDataSourcePreview.d.ts +6 -0
- package/dist/modules/charts/runtime/features/charts/Editor/useChartDataSourcePreview.js +17 -0
- package/dist/modules/charts/runtime/features/charts/Editor/useChartEditorState.d.ts +8 -2
- package/dist/modules/charts/runtime/features/charts/Editor/useChartEditorState.js +85 -5
- package/dist/modules/charts/runtime/helpers/adapterTypes.d.ts +38 -0
- package/dist/modules/charts/runtime/helpers/adapterTypes.js +1 -0
- package/dist/modules/charts/runtime/helpers/dateFormat.d.ts +20 -0
- package/dist/modules/charts/runtime/helpers/dateFormat.js +121 -0
- package/dist/modules/charts/runtime/helpers/echarts.d.ts +6 -0
- package/dist/modules/charts/runtime/helpers/echarts.js +5 -0
- package/dist/modules/charts/runtime/helpers/index.d.ts +17 -14
- package/dist/modules/charts/runtime/helpers/index.js +24 -27
- package/dist/modules/charts/runtime/helpers/nextCategoryValue.d.ts +19 -0
- package/dist/modules/charts/runtime/helpers/nextCategoryValue.js +160 -0
- package/dist/modules/charts/runtime/helpers/numberFormat.d.ts +13 -0
- package/dist/modules/charts/runtime/helpers/numberFormat.js +31 -0
- package/dist/modules/charts/runtime/helpers/previewInjection.d.ts +14 -0
- package/dist/modules/charts/runtime/helpers/previewInjection.js +3 -0
- package/dist/modules/charts/runtime/types.d.ts +238 -15
- package/dist/modules/drupal/graphql/base/fragment.paragraphsBlokkliMutationItem.graphql +23 -0
- package/dist/modules/drupal/graphql/base/query.pbConfig.graphql +12 -3
- package/dist/modules/drupal/graphql/base/query.pbUsers.graphql +10 -0
- package/dist/modules/drupal/graphql/features/agent.graphql +75 -23
- package/dist/modules/drupal/graphql/features/block-transfer.graphql +42 -0
- package/dist/modules/drupal/graphql/features/comments.graphql +81 -11
- package/dist/modules/drupal/index.d.mts +2 -1
- package/dist/modules/drupal/index.mjs +8 -0
- package/dist/modules/drupal/runtime/adapter/index.js +221 -34
- package/dist/modules/iframes/index.d.mts +2 -1
- package/dist/modules/iframes/runtime/features/iframes/Editor/index.vue +4 -2
- package/dist/modules/index.d.mts +2 -1
- package/dist/modules/readability/index.d.mts +2 -1
- package/dist/modules/table-of-contents/index.d.mts +2 -1
- package/dist/modules/tailwind/index.d.mts +2 -2
- package/dist/modules/tailwind/index.mjs +228 -2
- package/dist/runtime/components/Blocks/NotImplemented/index.vue +24 -51
- package/dist/runtime/components/BlokkliItem.vue +3 -31
- package/dist/runtime/editor/adapter/index.d.ts +16 -0
- package/dist/runtime/editor/components/Actions/Interactions/Button.d.vue.ts +9 -0
- package/dist/runtime/editor/components/Actions/Interactions/Button.vue +19 -0
- package/dist/runtime/editor/components/Actions/Interactions/Button.vue.d.ts +9 -0
- package/dist/runtime/editor/components/Actions/Interactions/index.vue +24 -88
- package/dist/runtime/editor/components/Actions/ItemDropdown/Item.d.vue.ts +7 -0
- package/dist/runtime/editor/components/Actions/ItemDropdown/Item.vue +50 -0
- package/dist/runtime/editor/components/Actions/ItemDropdown/Item.vue.d.ts +7 -0
- package/dist/runtime/editor/components/Actions/ItemDropdown/index.vue +4 -22
- package/dist/runtime/editor/components/Actions/Title/index.d.vue.ts +3 -0
- package/dist/runtime/editor/components/Actions/Title/index.vue +295 -0
- package/dist/runtime/editor/components/Actions/Title/index.vue.d.ts +3 -0
- package/dist/runtime/editor/components/Actions/index.vue +24 -779
- package/dist/runtime/editor/components/AddListItem/index.vue +2 -0
- package/dist/runtime/editor/components/AnimationCanvas/index.vue +4 -2
- package/dist/runtime/editor/components/AppMenu/Inner.vue +12 -7
- package/dist/runtime/editor/components/AppMenu/MenuButton.d.vue.ts +4 -9
- package/dist/runtime/editor/components/AppMenu/MenuButton.vue +56 -194
- package/dist/runtime/editor/components/AppMenu/MenuButton.vue.d.ts +4 -9
- package/dist/runtime/editor/components/ArtboardTooltip/index.vue +120 -145
- package/dist/runtime/editor/components/Avatar/index.d.vue.ts +30 -0
- package/dist/runtime/editor/components/Avatar/index.vue +120 -0
- package/dist/runtime/editor/components/Avatar/index.vue.d.ts +30 -0
- package/dist/runtime/editor/components/Banner/Inner.vue +1 -1
- package/dist/runtime/editor/components/Banner/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/Banner/index.vue +21 -18
- package/dist/runtime/editor/components/Banner/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/BlockPreviewItem/index.vue +35 -41
- package/dist/runtime/editor/components/BlockPreviewRenderer/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue +13 -19
- package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/BlockProxy/index.vue +56 -130
- package/dist/runtime/editor/components/BlokkliRootErrorBoundary.vue +117 -48
- package/dist/runtime/editor/components/BundleSelector/Group.d.vue.ts +12 -0
- package/dist/runtime/editor/components/BundleSelector/Group.vue +28 -0
- package/dist/runtime/editor/components/BundleSelector/Group.vue.d.ts +12 -0
- package/dist/runtime/editor/components/BundleSelector/index.vue +31 -211
- package/dist/runtime/editor/components/BundleSelector/types.d.ts +21 -0
- package/dist/runtime/editor/components/BundleSelector/types.js +0 -0
- package/dist/runtime/editor/components/Button/index.d.vue.ts +29 -0
- package/dist/runtime/editor/components/Button/index.vue +36 -0
- package/dist/runtime/editor/components/Button/index.vue.d.ts +29 -0
- package/dist/runtime/editor/components/ButtonAction/index.d.vue.ts +13 -0
- package/dist/runtime/editor/components/ButtonAction/index.vue +25 -0
- package/dist/runtime/editor/components/ButtonAction/index.vue.d.ts +13 -0
- package/dist/runtime/editor/components/Dialog/index.d.vue.ts +11 -2
- package/dist/runtime/editor/components/Dialog/index.vue +164 -241
- package/dist/runtime/editor/components/Dialog/index.vue.d.ts +11 -2
- package/dist/runtime/editor/components/DiffApproval/Highlight/Item.d.vue.ts +6 -0
- package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue +28 -19
- package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue.d.ts +6 -0
- package/dist/runtime/editor/components/DiffApproval/Highlight/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue +7 -119
- package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.d.vue.ts +11 -2
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue +115 -248
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue.d.ts +11 -2
- package/dist/runtime/editor/components/DiffApproval/index.d.vue.ts +16 -0
- package/dist/runtime/editor/components/DiffApproval/index.vue +6 -1
- package/dist/runtime/editor/components/DiffApproval/index.vue.d.ts +16 -0
- package/dist/runtime/editor/components/DiffViewer/DiffDisplay/index.vue +1 -1
- package/dist/runtime/editor/components/DiffViewer/State.vue +294 -297
- package/dist/runtime/editor/{features/analyze/Summary/Chart.d.vue.ts → components/DonutChart/index.d.vue.ts} +4 -4
- package/dist/runtime/editor/{features/analyze/Summary/Chart.vue → components/DonutChart/index.vue} +4 -3
- package/dist/runtime/editor/{features/analyze/Summary/Chart.vue.d.ts → components/DonutChart/index.vue.d.ts} +4 -4
- package/dist/runtime/editor/components/DraggableList.vue +71 -84
- package/dist/runtime/editor/components/Dropdown/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/Dropdown/index.vue +91 -89
- package/dist/runtime/editor/components/Dropdown/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/EditIndicator.d.vue.ts +0 -1
- package/dist/runtime/editor/components/EditIndicator.vue +105 -37
- package/dist/runtime/editor/components/EditIndicator.vue.d.ts +0 -1
- package/dist/runtime/editor/components/EditProvider.vue +29 -35
- package/dist/runtime/editor/components/FileDropHandler/index.vue +24 -20
- package/dist/runtime/editor/components/FlexTextarea/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/FlexTextarea/index.vue +8 -4
- package/dist/runtime/editor/components/FlexTextarea/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/Form/Checkboxes/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/Form/Checkboxes/index.vue +2 -2
- package/dist/runtime/editor/components/Form/Checkboxes/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/Form/Datepicker/index.vue +29 -175
- package/dist/runtime/editor/components/Form/Number/index.d.vue.ts +36 -0
- package/dist/runtime/editor/components/Form/Number/index.vue +79 -0
- package/dist/runtime/editor/components/Form/Number/index.vue.d.ts +36 -0
- package/dist/runtime/editor/components/Form/Radio/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/Form/Radio/index.vue +2 -2
- package/dist/runtime/editor/components/Form/Radio/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/Form/RadioBox/index.d.vue.ts +33 -0
- package/dist/runtime/editor/components/Form/RadioBox/index.vue +40 -0
- package/dist/runtime/editor/components/Form/RadioBox/index.vue.d.ts +33 -0
- package/dist/runtime/editor/components/Form/RadioTabs/index.vue +55 -0
- package/dist/runtime/editor/components/Form/Search/index.d.vue.ts +88 -0
- package/dist/runtime/editor/components/Form/Search/index.vue +289 -0
- package/dist/runtime/editor/components/Form/Search/index.vue.d.ts +88 -0
- package/dist/runtime/editor/components/Form/Search/types.d.ts +19 -0
- package/dist/runtime/editor/components/Form/Search/types.js +0 -0
- package/dist/runtime/editor/components/Form/Text/index.d.vue.ts +6 -2
- package/dist/runtime/editor/components/Form/Text/index.vue +12 -4
- package/dist/runtime/editor/components/Form/Text/index.vue.d.ts +6 -2
- package/dist/runtime/editor/components/Form/TextDark/index.d.vue.ts +24 -0
- package/dist/runtime/editor/components/Form/TextDark/index.vue +56 -0
- package/dist/runtime/editor/components/Form/TextDark/index.vue.d.ts +24 -0
- package/dist/runtime/editor/components/Form/Textarea/index.d.vue.ts +2 -0
- package/dist/runtime/editor/components/Form/Textarea/index.vue +13 -4
- package/dist/runtime/editor/components/Form/Textarea/index.vue.d.ts +2 -0
- package/dist/runtime/editor/components/Form/Toggle/index.d.vue.ts +12 -1
- package/dist/runtime/editor/components/Form/Toggle/index.vue +66 -216
- package/dist/runtime/editor/components/Form/Toggle/index.vue.d.ts +12 -1
- package/dist/runtime/editor/components/FormOverlay/index.vue +17 -25
- package/dist/runtime/editor/components/Icon/index.vue +9 -3
- package/dist/runtime/editor/components/Indicators/index.vue +74 -147
- package/dist/runtime/editor/components/InfoBox/index.d.vue.ts +7 -4
- package/dist/runtime/editor/components/InfoBox/index.vue +18 -69
- package/dist/runtime/editor/components/InfoBox/index.vue.d.ts +7 -4
- package/dist/runtime/editor/components/InlineActions/Button/index.d.vue.ts +19 -0
- package/dist/runtime/editor/components/InlineActions/Button/index.vue +27 -0
- package/dist/runtime/editor/components/InlineActions/Button/index.vue.d.ts +19 -0
- package/dist/runtime/editor/components/InlineActions/index.d.vue.ts +13 -0
- package/dist/runtime/editor/components/InlineActions/index.vue +5 -0
- package/dist/runtime/editor/components/InlineActions/index.vue.d.ts +13 -0
- package/dist/runtime/editor/components/Konami/Game/index.vue +56 -65
- package/dist/runtime/editor/components/Messages/Item/index.vue +1 -1
- package/dist/runtime/editor/components/Messages/index.vue +65 -74
- package/dist/runtime/editor/components/NestedEditorOverlay/index.d.vue.ts +2 -1
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +43 -209
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue.d.ts +2 -1
- package/dist/runtime/editor/components/Overlay/index.vue +52 -75
- package/dist/runtime/editor/components/Pagination/index.vue +18 -24
- package/dist/runtime/editor/components/Panel/Action/index.d.vue.ts +11 -0
- package/dist/runtime/editor/components/Panel/Action/index.vue +25 -0
- package/dist/runtime/editor/components/Panel/Action/index.vue.d.ts +11 -0
- package/dist/runtime/editor/components/Panel/AddButton/index.d.vue.ts +8 -0
- package/dist/runtime/editor/components/Panel/AddButton/index.vue +17 -0
- package/dist/runtime/editor/components/Panel/AddButton/index.vue.d.ts +8 -0
- package/dist/runtime/editor/components/Panel/Details/index.d.vue.ts +25 -0
- package/dist/runtime/editor/components/Panel/Details/index.vue +45 -0
- package/dist/runtime/editor/components/Panel/Details/index.vue.d.ts +25 -0
- package/dist/runtime/editor/components/Panel/Item/index.d.vue.ts +65 -0
- package/dist/runtime/editor/components/Panel/Item/index.vue +99 -0
- package/dist/runtime/editor/components/Panel/Item/index.vue.d.ts +65 -0
- package/dist/runtime/editor/components/Panel/Section/index.d.vue.ts +26 -0
- package/dist/runtime/editor/components/Panel/Section/index.vue +94 -0
- package/dist/runtime/editor/components/Panel/Section/index.vue.d.ts +26 -0
- package/dist/runtime/editor/components/Panel/Sheet/index.d.vue.ts +20 -0
- package/dist/runtime/editor/components/Panel/Sheet/index.vue +34 -0
- package/dist/runtime/editor/components/Panel/Sheet/index.vue.d.ts +20 -0
- package/dist/runtime/editor/components/Panel/Tabs/index.d.vue.ts +28 -0
- package/dist/runtime/editor/components/Panel/Tabs/index.vue +25 -0
- package/dist/runtime/editor/components/Panel/Tabs/index.vue.d.ts +28 -0
- package/dist/runtime/editor/components/Pill/index.d.vue.ts +28 -0
- package/dist/runtime/editor/components/Pill/index.vue +37 -0
- package/dist/runtime/editor/components/Pill/index.vue.d.ts +28 -0
- package/dist/runtime/editor/components/PluginConfigForm/index.vue +15 -16
- package/dist/runtime/editor/components/PluginConfigFormInline/FilterSelect/index.vue +116 -248
- package/dist/runtime/editor/components/PluginConfigFormInline/index.vue +43 -58
- package/dist/runtime/editor/components/Popup/index.vue +56 -47
- package/dist/runtime/editor/components/PreviewProvider.vue +3 -3
- package/dist/runtime/editor/components/Reorder/index.d.vue.ts +53 -0
- package/dist/runtime/editor/components/Reorder/index.vue +123 -0
- package/dist/runtime/editor/components/Reorder/index.vue.d.ts +53 -0
- package/dist/runtime/editor/components/Resizable/index.d.vue.ts +10 -2
- package/dist/runtime/editor/components/Resizable/index.vue +84 -79
- package/dist/runtime/editor/components/Resizable/index.vue.d.ts +10 -2
- package/dist/runtime/editor/components/ResizableEditorView/index.d.vue.ts +26 -0
- package/dist/runtime/editor/components/ResizableEditorView/index.vue +76 -0
- package/dist/runtime/editor/components/ResizableEditorView/index.vue.d.ts +26 -0
- package/dist/runtime/editor/components/RichText/Editor/CleanTaskItem.d.ts +10 -0
- package/dist/runtime/editor/components/RichText/Editor/CleanTaskItem.js +59 -0
- package/dist/runtime/editor/components/RichText/Editor/Panel/Link/index.d.vue.ts +19 -0
- package/dist/runtime/editor/components/RichText/Editor/Panel/Link/index.vue +67 -0
- package/dist/runtime/editor/components/RichText/Editor/Panel/Link/index.vue.d.ts +19 -0
- package/dist/runtime/editor/components/RichText/Editor/Panel/index.d.vue.ts +20 -0
- package/dist/runtime/editor/components/RichText/Editor/Panel/index.vue +35 -0
- package/dist/runtime/editor/components/RichText/Editor/Panel/index.vue.d.ts +20 -0
- package/dist/runtime/editor/components/RichText/Editor/SuggestionList/Emojis.d.vue.ts +24 -0
- package/dist/runtime/editor/components/RichText/Editor/SuggestionList/Emojis.vue +44 -0
- package/dist/runtime/editor/components/RichText/Editor/SuggestionList/Emojis.vue.d.ts +24 -0
- package/dist/runtime/editor/components/RichText/Editor/SuggestionList/Mentions.d.vue.ts +23 -0
- package/dist/runtime/editor/components/RichText/Editor/SuggestionList/Mentions.vue +35 -0
- package/dist/runtime/editor/components/RichText/Editor/SuggestionList/Mentions.vue.d.ts +23 -0
- package/dist/runtime/editor/components/RichText/Editor/SuggestionList/index.d.vue.ts +30 -0
- package/dist/runtime/editor/components/RichText/Editor/SuggestionList/index.vue +69 -0
- package/dist/runtime/editor/components/RichText/Editor/SuggestionList/index.vue.d.ts +30 -0
- package/dist/runtime/editor/components/RichText/Editor/Toolbar/Button/index.d.vue.ts +18 -0
- package/dist/runtime/editor/components/RichText/Editor/Toolbar/Button/index.vue +31 -0
- package/dist/runtime/editor/components/RichText/Editor/Toolbar/Button/index.vue.d.ts +18 -0
- package/dist/runtime/editor/components/RichText/Editor/Toolbar/Group/index.d.vue.ts +3 -0
- package/dist/runtime/editor/components/RichText/Editor/Toolbar/Group/index.vue +13 -0
- package/dist/runtime/editor/components/RichText/Editor/Toolbar/Group/index.vue.d.ts +3 -0
- package/dist/runtime/editor/components/RichText/Editor/Toolbar/index.d.vue.ts +13 -0
- package/dist/runtime/editor/components/RichText/Editor/Toolbar/index.vue +7 -0
- package/dist/runtime/editor/components/RichText/Editor/Toolbar/index.vue.d.ts +13 -0
- package/dist/runtime/editor/components/RichText/Editor/index.d.vue.ts +31 -0
- package/dist/runtime/editor/components/RichText/Editor/index.vue +386 -0
- package/dist/runtime/editor/components/RichText/Editor/index.vue.d.ts +31 -0
- package/dist/runtime/editor/components/RichText/Renderer/enrichRichContent.d.ts +12 -0
- package/dist/runtime/editor/components/RichText/Renderer/enrichRichContent.js +42 -0
- package/dist/runtime/editor/components/RichText/Renderer/index.d.vue.ts +23 -0
- package/dist/runtime/editor/components/RichText/Renderer/index.vue +39 -0
- package/dist/runtime/editor/components/RichText/Renderer/index.vue.d.ts +23 -0
- package/dist/runtime/editor/components/ScaleToFit/index.vue +18 -21
- package/dist/runtime/editor/components/ScheduleDate/index.d.vue.ts +2 -2
- package/dist/runtime/editor/components/ScheduleDate/index.vue +21 -12
- package/dist/runtime/editor/components/ScheduleDate/index.vue.d.ts +2 -2
- package/dist/runtime/editor/components/SearchOverlay/index.d.vue.ts +3 -3
- package/dist/runtime/editor/components/SearchOverlay/index.vue +31 -112
- package/dist/runtime/editor/components/SearchOverlay/index.vue.d.ts +3 -3
- package/dist/runtime/editor/components/SidebarFloater/index.d.vue.ts +16 -0
- package/dist/runtime/editor/components/SidebarFloater/index.vue +45 -0
- package/dist/runtime/editor/components/SidebarFloater/index.vue.d.ts +16 -0
- package/dist/runtime/editor/components/StatusIcon/index.vue +42 -91
- package/dist/runtime/editor/components/SystemRequirements/index.vue +40 -46
- package/dist/runtime/editor/components/Tabs/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/Tabs/index.vue +5 -3
- package/dist/runtime/editor/components/Tabs/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/Toolbar/index.vue +155 -138
- package/dist/runtime/editor/components/Tooltip/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/Tooltip/index.vue +15 -5
- package/dist/runtime/editor/components/Tooltip/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/Transition/Collapse/index.d.vue.ts +13 -0
- package/dist/runtime/editor/components/Transition/Collapse/index.vue +20 -0
- package/dist/runtime/editor/components/Transition/Collapse/index.vue.d.ts +13 -0
- package/dist/runtime/editor/components/Transition/List/index.d.vue.ts +21 -0
- package/dist/runtime/editor/components/Transition/List/index.vue +31 -0
- package/dist/runtime/editor/components/Transition/List/index.vue.d.ts +21 -0
- package/dist/runtime/editor/components/Transition/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/Transition/index.vue +2 -1
- package/dist/runtime/editor/components/Transition/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/index.d.ts +11 -2
- package/dist/runtime/editor/components/index.js +10 -4
- package/dist/runtime/editor/composables/defineEditorComponent.d.ts +126 -0
- package/dist/runtime/editor/composables/defineEditorComponent.js +6 -0
- package/dist/runtime/editor/composables/index.d.ts +1 -0
- package/dist/runtime/editor/composables/index.js +4 -0
- package/dist/runtime/editor/composables/useDialog.d.ts +1 -1
- package/dist/runtime/editor/composables/useDialog.js +2 -2
- package/dist/runtime/editor/composables/useEditableFieldOverride.js +16 -8
- package/dist/runtime/editor/composables/useGlobalBlokkliObject.d.ts +17 -3
- package/dist/runtime/editor/composables/useGlobalBlokkliObject.js +6 -0
- package/dist/runtime/editor/css/output.css +1 -1
- package/dist/runtime/editor/events/index.d.ts +22 -2
- package/dist/runtime/editor/features/add-list/Actions/index.vue +5 -1
- package/dist/runtime/editor/features/add-list/Blocks/index.vue +6 -1
- package/dist/runtime/editor/features/add-list/Help/Item.vue +16 -5
- package/dist/runtime/editor/features/add-list/Help/index.vue +127 -168
- package/dist/runtime/editor/features/add-list/index.vue +171 -324
- package/dist/runtime/editor/features/analyze/Ignored/index.vue +6 -22
- package/dist/runtime/editor/features/analyze/Main.vue +49 -43
- package/dist/runtime/editor/features/analyze/Results/Results.vue +6 -28
- package/dist/runtime/editor/features/analyze/Results/ResultsItem.vue +19 -9
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodes.vue +23 -6
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodesTarget.vue +2 -4
- package/dist/runtime/editor/features/analyze/Results/Section.d.vue.ts +10 -0
- package/dist/runtime/editor/features/analyze/Results/Section.vue +42 -0
- package/dist/runtime/editor/features/analyze/Results/Section.vue.d.ts +10 -0
- package/dist/runtime/editor/features/analyze/Results/Status.vue +12 -6
- package/dist/runtime/editor/features/analyze/Summary/index.vue +19 -8
- package/dist/runtime/editor/features/analyze/index.vue +3 -454
- package/dist/runtime/editor/features/anchors/Overlay/index.vue +3 -11
- package/dist/runtime/editor/features/artboard/Overview/index.vue +6 -8
- package/dist/runtime/editor/features/artboard/Renderer.vue +40 -28
- package/dist/runtime/editor/features/artboard/Scrollbar/index.vue +22 -63
- package/dist/runtime/editor/features/block-scheduler/Dialog/ScheduleSection.d.vue.ts +3 -0
- package/dist/runtime/editor/features/block-scheduler/Dialog/ScheduleSection.vue +38 -25
- package/dist/runtime/editor/features/block-scheduler/Dialog/ScheduleSection.vue.d.ts +3 -0
- package/dist/runtime/editor/features/block-scheduler/Dialog/index.vue +21 -85
- package/dist/runtime/editor/features/block-scheduler/index.vue +9 -65
- package/dist/runtime/editor/features/block-transfer/SummaryDialog/index.d.vue.ts +11 -0
- package/dist/runtime/editor/features/block-transfer/SummaryDialog/index.vue +188 -0
- package/dist/runtime/editor/features/block-transfer/SummaryDialog/index.vue.d.ts +11 -0
- package/dist/runtime/editor/features/block-transfer/index.d.vue.ts +3 -0
- package/dist/runtime/editor/features/block-transfer/index.vue +235 -0
- package/dist/runtime/editor/features/block-transfer/index.vue.d.ts +3 -0
- package/dist/runtime/editor/features/block-transfer/types.d.ts +101 -0
- package/dist/runtime/editor/features/block-transfer/types.js +0 -0
- package/dist/runtime/editor/features/breadcrumbs/Crumb/index.d.vue.ts +31 -0
- package/dist/runtime/editor/features/breadcrumbs/Crumb/index.vue +105 -0
- package/dist/runtime/editor/features/breadcrumbs/Crumb/index.vue.d.ts +31 -0
- package/dist/runtime/editor/features/breadcrumbs/index.vue +56 -195
- package/dist/runtime/editor/features/breadcrumbs/types.d.ts +17 -0
- package/dist/runtime/editor/features/breadcrumbs/types.js +0 -0
- package/dist/runtime/editor/features/changelog/Dialog/index.vue +14 -68
- package/dist/runtime/editor/features/changelog/changelog.json +8 -0
- package/dist/runtime/editor/features/changelog/index.vue +1 -1
- package/dist/runtime/editor/features/clipboard/DropElement/index.vue +137 -152
- package/dist/runtime/editor/features/clipboard/index.vue +24 -143
- package/dist/runtime/editor/features/clipboard/types.d.ts +9 -0
- package/dist/runtime/editor/features/command-palette/Palette/Item/index.vue +6 -3
- package/dist/runtime/editor/features/command-palette/Palette/index.vue +4 -1
- package/dist/runtime/editor/features/comments/AddForm/index.vue +25 -14
- package/dist/runtime/editor/features/comments/Comment/Actions/index.d.vue.ts +27 -0
- package/dist/runtime/editor/features/comments/Comment/Actions/index.vue +93 -0
- package/dist/runtime/editor/features/comments/Comment/Actions/index.vue.d.ts +27 -0
- package/dist/runtime/editor/features/comments/Comment/EditForm/index.d.vue.ts +15 -0
- package/dist/runtime/editor/features/comments/Comment/EditForm/index.vue +38 -0
- package/dist/runtime/editor/features/comments/Comment/EditForm/index.vue.d.ts +15 -0
- package/dist/runtime/editor/features/comments/Comment/Meta/index.d.vue.ts +12 -0
- package/dist/runtime/editor/features/comments/Comment/Meta/index.vue +30 -0
- package/dist/runtime/editor/features/comments/Comment/Meta/index.vue.d.ts +12 -0
- package/dist/runtime/editor/features/comments/Comment/index.d.vue.ts +16 -14
- package/dist/runtime/editor/features/comments/Comment/index.vue +112 -28
- package/dist/runtime/editor/features/comments/Comment/index.vue.d.ts +16 -14
- package/dist/runtime/editor/features/comments/CommentInput/index.d.vue.ts +25 -10
- package/dist/runtime/editor/features/comments/CommentInput/index.vue +77 -19
- package/dist/runtime/editor/features/comments/CommentInput/index.vue.d.ts +25 -10
- package/dist/runtime/editor/features/comments/Overlay/Item/index.d.vue.ts +32 -5
- package/dist/runtime/editor/features/comments/Overlay/Item/index.vue +85 -47
- package/dist/runtime/editor/features/comments/Overlay/Item/index.vue.d.ts +32 -5
- package/dist/runtime/editor/features/comments/Overlay/index.d.vue.ts +29 -7
- package/dist/runtime/editor/features/comments/Overlay/index.vue +42 -11
- package/dist/runtime/editor/features/comments/Overlay/index.vue.d.ts +29 -7
- package/dist/runtime/editor/features/comments/Sidebar/AddForm/index.d.vue.ts +9 -0
- package/dist/runtime/editor/features/comments/Sidebar/AddForm/index.vue +58 -0
- package/dist/runtime/editor/features/comments/Sidebar/AddForm/index.vue.d.ts +9 -0
- package/dist/runtime/editor/features/comments/Sidebar/index.d.vue.ts +50 -0
- package/dist/runtime/editor/features/comments/Sidebar/index.vue +111 -0
- package/dist/runtime/editor/features/comments/Sidebar/index.vue.d.ts +50 -0
- package/dist/runtime/editor/features/comments/Thread/ReplyForm/index.d.vue.ts +11 -0
- package/dist/runtime/editor/features/comments/Thread/ReplyForm/index.vue +58 -0
- package/dist/runtime/editor/features/comments/Thread/ReplyForm/index.vue.d.ts +11 -0
- package/dist/runtime/editor/features/comments/Thread/index.d.vue.ts +44 -0
- package/dist/runtime/editor/features/comments/Thread/index.vue +142 -0
- package/dist/runtime/editor/features/comments/Thread/index.vue.d.ts +44 -0
- package/dist/runtime/editor/features/comments/index.vue +85 -259
- package/dist/runtime/editor/features/comments/types.d.ts +42 -8
- package/dist/runtime/editor/features/debug/Main.vue +148 -146
- package/dist/runtime/editor/features/debug/Section/Logging.vue +5 -2
- package/dist/runtime/editor/features/debug/Section/Rendering.vue +3 -3
- package/dist/runtime/editor/features/delete/index.vue +1 -1
- package/dist/runtime/editor/features/dev-mode/index.vue +31 -35
- package/dist/runtime/editor/features/diff/index.vue +1 -1
- package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +123 -1
- package/dist/runtime/editor/features/dragging-overlay/Renderer/index.vue +51 -0
- package/dist/runtime/editor/features/dragging-overlay/index.vue +143 -313
- package/dist/runtime/editor/features/dragging-overlay/types.d.ts +28 -0
- package/dist/runtime/editor/features/dragging-overlay/types.js +0 -0
- package/dist/runtime/editor/features/droppable-field-edit/Overlay/index.vue +26 -24
- package/dist/runtime/editor/features/edit/index.vue +3 -6
- package/dist/runtime/editor/features/edit-form/index.vue +1 -1
- package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue +17 -15
- package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue +1 -0
- package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/ChunkOverlay.vue +48 -51
- package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/index.vue +9 -1
- package/dist/runtime/editor/features/editable-field/Overlay/index.vue +137 -183
- package/dist/runtime/editor/features/editable-mask/index.vue +5 -5
- package/dist/runtime/editor/features/entity-title/index.vue +15 -3
- package/dist/runtime/editor/features/exit/index.vue +1 -1
- package/dist/runtime/editor/features/fragments/Dialog/index.vue +8 -91
- package/dist/runtime/editor/features/help/Shortcuts/index.vue +48 -60
- package/dist/runtime/editor/features/help/index.vue +10 -11
- package/dist/runtime/editor/features/highlights/Renderer/fragment.glsl +1 -1
- package/dist/runtime/editor/features/highlights/Renderer/index.vue +1 -1
- package/dist/runtime/editor/features/history/List/index.vue +217 -208
- package/dist/runtime/editor/features/history/index.vue +2 -2
- package/dist/runtime/editor/features/hover/Renderer/index.vue +4 -2
- package/dist/runtime/editor/features/hover/Renderer/vertex.glsl +3 -1
- package/dist/runtime/editor/features/hover/index.vue +2 -2
- package/dist/runtime/editor/features/import-existing/Dialog/Item.vue +19 -32
- package/dist/runtime/editor/features/import-existing/Dialog/index.vue +39 -26
- package/dist/runtime/editor/features/import-existing/index.vue +1 -1
- package/dist/runtime/editor/features/library/{LibraryDialog → DialogBrowseLibrary}/index.vue +2 -2
- package/dist/runtime/editor/features/library/{ReusableDialog → DialogMakeReusable}/index.vue +25 -22
- package/dist/runtime/editor/features/library/index.vue +4 -4
- package/dist/runtime/editor/features/media-library/Library/index.vue +1 -1
- package/dist/runtime/editor/features/media-library/index.vue +126 -182
- package/dist/runtime/editor/features/multi-select/index.vue +2 -6
- package/dist/runtime/editor/features/options/Form/Checkbox/index.d.vue.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Checkbox/index.vue +6 -3
- package/dist/runtime/editor/features/options/Form/Checkbox/index.vue.d.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue +12 -7
- package/dist/runtime/editor/features/options/Form/Color/index.vue +1 -1
- package/dist/runtime/editor/features/options/Form/ComplexType/index.vue +1 -0
- package/dist/runtime/editor/features/options/Form/DateTimeLocal/index.vue +4 -1
- package/dist/runtime/editor/features/options/Form/Item.vue +6 -1
- package/dist/runtime/editor/features/options/Form/Number/index.d.vue.ts +10 -13
- package/dist/runtime/editor/features/options/Form/Number/index.vue +79 -13
- package/dist/runtime/editor/features/options/Form/Number/index.vue.d.ts +10 -13
- package/dist/runtime/editor/features/options/Form/Radios/index.vue +1 -0
- package/dist/runtime/editor/features/options/Form/Range/index.vue +1 -1
- package/dist/runtime/editor/features/options/Form/Text/index.vue +1 -1
- package/dist/runtime/editor/features/options/Form/index.vue +34 -24
- package/dist/runtime/editor/features/options/index.vue +700 -695
- package/dist/runtime/editor/features/preview-grant/QrCode/index.vue +17 -10
- package/dist/runtime/editor/features/preview-grant/index.vue +1 -0
- package/dist/runtime/editor/features/publish/Dialog/Item.vue +53 -9
- package/dist/runtime/editor/features/publish/Dialog/PublishOption.vue +36 -12
- package/dist/runtime/editor/features/publish/Dialog/Summary.vue +41 -30
- package/dist/runtime/editor/features/publish/Dialog/index.vue +141 -133
- package/dist/runtime/editor/features/publish/index.vue +3 -838
- package/dist/runtime/editor/features/referenced-entities/List/Item/index.vue +1 -1
- package/dist/runtime/editor/features/responsive-preview/Frame/index.vue +163 -179
- package/dist/runtime/editor/features/revert/index.vue +1 -1
- package/dist/runtime/editor/features/search/Overlay/Results/Content/index.vue +1 -1
- package/dist/runtime/editor/features/search/Overlay/Results/Page/index.vue +1 -1
- package/dist/runtime/editor/features/search/index.vue +340 -442
- package/dist/runtime/editor/features/selection/AddButtons/Renderer/index.vue +33 -58
- package/dist/runtime/editor/features/selection/AddButtons/index.vue +23 -7
- package/dist/runtime/editor/features/selection/Renderer/index.vue +1 -1
- package/dist/runtime/editor/features/selection/types.d.ts +22 -0
- package/dist/runtime/editor/features/selection/types.js +0 -0
- package/dist/runtime/editor/features/settings/Dialog/FeatureSetting/index.vue +30 -40
- package/dist/runtime/editor/features/settings/Dialog/index.vue +31 -24
- package/dist/runtime/editor/features/settings/index.vue +2 -151
- package/dist/runtime/editor/features/structure/List/Item/index.vue +3 -4
- package/dist/runtime/editor/features/structure/index.vue +132 -152
- package/dist/runtime/editor/features/templates/{Dialog → DialogBrowseTemplates}/index.vue +1 -1
- package/dist/runtime/editor/features/templates/{CreateDialog → DialogCreateTemplate}/index.vue +11 -12
- package/dist/runtime/editor/features/templates/{ManageDialog → DialogManageTemplates}/Item.vue +35 -30
- package/dist/runtime/editor/features/templates/DialogManageTemplates/index.vue +117 -0
- package/dist/runtime/editor/features/templates/index.vue +7 -5
- package/dist/runtime/editor/features/theme/index.vue +38 -56
- package/dist/runtime/editor/features/touch-action-bar/Bar/index.vue +15 -30
- package/dist/runtime/editor/features/tour/Overlay/index.vue +137 -196
- package/dist/runtime/editor/features/transform/Dialog/index.vue +102 -111
- package/dist/runtime/editor/features/translations/AutoTranslate/index.d.vue.ts +3 -0
- package/dist/runtime/editor/features/translations/AutoTranslate/index.vue +138 -0
- package/dist/runtime/editor/features/translations/AutoTranslate/index.vue.d.ts +3 -0
- package/dist/runtime/editor/features/translations/Banner/index.vue +13 -7
- package/dist/runtime/editor/features/translations/CsvDialog/Export/index.vue +58 -46
- package/dist/runtime/editor/features/translations/CsvDialog/Import/index.vue +51 -35
- package/dist/runtime/editor/features/translations/CsvDialog/index.vue +4 -5
- package/dist/runtime/editor/features/translations/LanguageSwitcher/Dropdown/index.d.vue.ts +13 -0
- package/dist/runtime/editor/features/translations/LanguageSwitcher/Dropdown/index.vue +49 -0
- package/dist/runtime/editor/features/translations/LanguageSwitcher/Dropdown/index.vue.d.ts +13 -0
- package/dist/runtime/editor/features/translations/LanguageSwitcher/InlineButtons/index.d.vue.ts +12 -0
- package/dist/runtime/editor/features/translations/LanguageSwitcher/InlineButtons/index.vue +48 -0
- package/dist/runtime/editor/features/translations/LanguageSwitcher/InlineButtons/index.vue.d.ts +12 -0
- package/dist/runtime/editor/features/translations/LanguageSwitcher/index.d.vue.ts +7 -0
- package/dist/runtime/editor/features/translations/LanguageSwitcher/index.vue +64 -0
- package/dist/runtime/editor/features/translations/LanguageSwitcher/index.vue.d.ts +7 -0
- package/dist/runtime/editor/features/translations/LanguageSwitcher/types.d.ts +8 -0
- package/dist/runtime/editor/features/translations/LanguageSwitcher/types.js +0 -0
- package/dist/runtime/editor/features/translations/SelectionTable/index.d.vue.ts +5 -18
- package/dist/runtime/editor/features/translations/SelectionTable/index.vue +18 -54
- package/dist/runtime/editor/features/translations/SelectionTable/index.vue.d.ts +5 -18
- package/dist/runtime/editor/features/translations/TranslateDialog/index.vue +123 -106
- package/dist/runtime/editor/features/translations/index.vue +26 -239
- package/dist/runtime/editor/features/validations/Overlay/index.vue +60 -117
- package/dist/runtime/editor/features/validations/index.vue +16 -35
- package/dist/runtime/editor/features/workspace/Overlay/Item.vue +9 -17
- package/dist/runtime/editor/features/workspace/Overlay/index.vue +4 -2
- package/dist/runtime/editor/features/workspace/index.vue +1 -1
- package/dist/runtime/editor/helpers/diff/index.d.ts +12 -0
- package/dist/runtime/editor/helpers/diff/index.js +9 -0
- package/dist/runtime/editor/helpers/options/index.js +7 -1
- package/dist/runtime/editor/helpers/string/index.d.ts +8 -0
- package/dist/runtime/editor/helpers/string/index.js +7 -0
- package/dist/runtime/editor/icons/svg/ghost.svg +1 -0
- package/dist/runtime/editor/plugins/BlockIndicator/index.vue +2 -0
- package/dist/runtime/editor/plugins/ContextMenu/Menu/index.vue +3 -2
- package/dist/runtime/editor/plugins/ItemAction/index.d.vue.ts +13 -3
- package/dist/runtime/editor/plugins/ItemAction/index.vue +36 -16
- package/dist/runtime/editor/plugins/ItemAction/index.vue.d.ts +13 -3
- package/dist/runtime/editor/plugins/Sidebar/Detached/index.d.vue.ts +1 -1
- package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue.d.ts +1 -1
- package/dist/runtime/editor/plugins/Sidebar/index.d.vue.ts +3 -3
- package/dist/runtime/editor/plugins/Sidebar/index.vue +212 -302
- package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +3 -3
- package/dist/runtime/editor/plugins/ToolbarButton/index.vue +4 -2
- package/dist/runtime/editor/plugins/ViewOption/index.vue +2 -0
- package/dist/runtime/editor/providers/config.d.ts +8 -0
- package/dist/runtime/editor/providers/config.js +18 -0
- package/dist/runtime/editor/providers/directive.d.ts +8 -0
- package/dist/runtime/editor/providers/directive.js +6 -0
- package/dist/runtime/editor/providers/state.d.ts +0 -16
- package/dist/runtime/editor/providers/state.js +1 -19
- package/dist/runtime/editor/providers/texts.d.ts +8 -1
- package/dist/runtime/editor/providers/texts.js +5 -2
- package/dist/runtime/editor/providers/ui.d.ts +43 -2
- package/dist/runtime/editor/providers/ui.js +43 -2
- package/dist/runtime/editor/providers/user.d.ts +20 -0
- package/dist/runtime/editor/providers/user.js +14 -0
- package/dist/runtime/editor/translations/de.json +310 -306
- package/dist/runtime/editor/translations/fr.json +38 -132
- package/dist/runtime/editor/translations/gsw_CH.json +250 -246
- package/dist/runtime/editor/translations/it.json +38 -132
- package/dist/runtime/editor/types/app.d.ts +4 -0
- package/dist/runtime/editor/types/clipboard.d.ts +53 -0
- package/dist/runtime/editor/types/clipboard.js +23 -0
- package/dist/runtime/editor/types/config.d.ts +5 -0
- package/dist/runtime/editor/types/config.js +0 -0
- package/dist/runtime/editor/types/permissions.d.ts +1 -0
- package/dist/runtime/editor/types/ui.d.ts +1 -0
- package/dist/runtime/editor/types/user.d.ts +9 -0
- package/dist/runtime/editor/types/user.js +0 -0
- package/dist/runtime/helpers/runtimeHelpers/index.d.ts +1 -1
- package/dist/runtime/helpers/runtimeHelpers/index.js +7 -0
- package/dist/runtime/types/definitions.d.ts +3 -0
- package/dist/shared/{editor.Bpw1EP57.d.mts → editor.D28NbXr3.d.mts} +20 -4
- package/dist/shared/{editor.FygP6XeF.mjs → editor.Gu7mgJ5Q.mjs} +33 -1
- package/dist/types.d.mts +1 -1
- package/package.json +29 -15
- package/dist/chunks/tailwindConfig.mjs +0 -222
- package/dist/modules/agent/runtime/app/features/agent/Panel/Attachment/PreviewCsv/index.vue +0 -31
- package/dist/modules/agent/runtime/app/features/agent/Panel/Attachment/PreviewHtml/index.vue +0 -12
- package/dist/modules/agent/runtime/app/features/agent/Panel/Attachment/PreviewMarkdown/index.vue +0 -17
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Assistant/index.vue +0 -38
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Tool/index.vue +0 -61
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/User/index.vue +0 -28
- package/dist/modules/agent/runtime/app/features/agent/Panel/DebugGallery/index.vue +0 -161
- package/dist/modules/agent/runtime/app/tools/update_text_fields/Details/index.d.vue.ts +0 -6
- package/dist/modules/agent/runtime/app/tools/update_text_fields/Details/index.vue +0 -24
- package/dist/modules/agent/runtime/app/tools/update_text_fields/Details/index.vue.d.ts +0 -6
- package/dist/modules/agent/runtime/server/helpers.d.ts +0 -77
- package/dist/modules/agent/runtime/server/helpers.js +0 -354
- package/dist/modules/charts/runtime/chartTypes/area.d.ts +0 -7
- package/dist/modules/charts/runtime/chartTypes/area.js +0 -68
- package/dist/modules/charts/runtime/chartTypes/define.d.ts +0 -2
- package/dist/modules/charts/runtime/chartTypes/define.js +0 -3
- package/dist/modules/charts/runtime/chartTypes/donut.d.ts +0 -6
- package/dist/modules/charts/runtime/chartTypes/donut.js +0 -45
- package/dist/modules/charts/runtime/chartTypes/heatmap.js +0 -54
- package/dist/modules/charts/runtime/chartTypes/index.d.ts +0 -39
- package/dist/modules/charts/runtime/chartTypes/index.js +0 -47
- package/dist/modules/charts/runtime/chartTypes/line.d.ts +0 -7
- package/dist/modules/charts/runtime/chartTypes/line.js +0 -68
- package/dist/modules/charts/runtime/chartTypes/pie.d.ts +0 -5
- package/dist/modules/charts/runtime/chartTypes/pie.js +0 -28
- package/dist/modules/charts/runtime/chartTypes/radar.d.ts +0 -7
- package/dist/modules/charts/runtime/chartTypes/radar.js +0 -52
- package/dist/modules/charts/runtime/chartTypes/radialBar.d.ts +0 -6
- package/dist/modules/charts/runtime/chartTypes/radialBar.js +0 -44
- package/dist/modules/charts/runtime/chartTypes/shared.d.ts +0 -67
- package/dist/modules/charts/runtime/chartTypes/types.d.ts +0 -29
- package/dist/runtime/editor/components/AutoHeight/index.vue +0 -55
- package/dist/runtime/editor/features/templates/ManageDialog/index.vue +0 -128
- /package/dist/{modules/charts/runtime/chartTypes/types.js → global/types/colorOptions.js} +0 -0
- /package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Attachment/PreviewCode/index.d.vue.ts +0 -0
- /package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Attachment/PreviewCode/index.vue.d.ts +0 -0
- /package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Attachment/PreviewCsv/index.d.vue.ts +0 -0
- /package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Attachment/PreviewCsv/index.vue.d.ts +0 -0
- /package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Attachment/PreviewHtml/index.d.vue.ts +0 -0
- /package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Attachment/PreviewHtml/index.vue.d.ts +0 -0
- /package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Attachment/PreviewMarkdown/index.d.vue.ts +0 -0
- /package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Attachment/PreviewMarkdown/index.vue.d.ts +0 -0
- /package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/Item/Assistant/index.d.vue.ts +0 -0
- /package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/Item/Assistant/index.vue.d.ts +0 -0
- /package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/Item/Tool/index.d.vue.ts +0 -0
- /package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/Item/Tool/index.vue.d.ts +0 -0
- /package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/Item/Unknown/index.d.vue.ts +0 -0
- /package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/Item/Unknown/index.vue.d.ts +0 -0
- /package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/Item/index.d.vue.ts +0 -0
- /package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/Item/index.vue +0 -0
- /package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/Item/index.vue.d.ts +0 -0
- /package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/Thinking/index.d.vue.ts +0 -0
- /package/dist/modules/agent/runtime/app/{features/agent/Panel → components}/Conversation/Thinking/index.vue.d.ts +0 -0
- /package/dist/modules/agent/runtime/app/{tools/delegate_text_rewrite/Details → components/FieldDiffDetails}/index.vue +0 -0
- /package/dist/modules/agent/runtime/app/features/agent/{Panel/DebugGallery → ConversationsAdmin/ConversationsTab}/index.d.vue.ts +0 -0
- /package/dist/modules/agent/runtime/app/features/agent/{Panel/DebugGallery → ConversationsAdmin/ConversationsTab}/index.vue.d.ts +0 -0
- /package/dist/modules/agent/runtime/app/tools/{add_content_search_paragraph → add_content_search_paragraphs}/index.d.ts +0 -0
- /package/dist/modules/agent/runtime/app/tools/{check_readability → check_readability_for_texts}/index.d.ts +0 -0
- /package/dist/modules/agent/runtime/server/{streamParser.d.ts → classes/FieldStreamParser/index.d.ts} +0 -0
- /package/dist/modules/agent/runtime/server/{streamParser.js → classes/FieldStreamParser/index.js} +0 -0
- /package/dist/modules/agent/runtime/server/{agentPrompt.js → helpers/agentPrompt.js} +0 -0
- /package/dist/runtime/editor/features/library/{LibraryDialog → DialogBrowseLibrary}/Item/index.d.vue.ts +0 -0
- /package/dist/runtime/editor/features/library/{LibraryDialog → DialogBrowseLibrary}/Item/index.vue +0 -0
- /package/dist/runtime/editor/features/library/{LibraryDialog → DialogBrowseLibrary}/Item/index.vue.d.ts +0 -0
- /package/dist/runtime/editor/features/library/{LibraryDialog → DialogBrowseLibrary}/index.d.vue.ts +0 -0
- /package/dist/runtime/editor/features/library/{LibraryDialog → DialogBrowseLibrary}/index.vue.d.ts +0 -0
- /package/dist/runtime/editor/features/library/{ReusableDialog → DialogMakeReusable}/index.d.vue.ts +0 -0
- /package/dist/runtime/editor/features/library/{ReusableDialog → DialogMakeReusable}/index.vue.d.ts +0 -0
- /package/dist/runtime/editor/features/templates/{Dialog → DialogBrowseTemplates}/Item/index.d.vue.ts +0 -0
- /package/dist/runtime/editor/features/templates/{Dialog → DialogBrowseTemplates}/Item/index.vue +0 -0
- /package/dist/runtime/editor/features/templates/{Dialog → DialogBrowseTemplates}/Item/index.vue.d.ts +0 -0
- /package/dist/runtime/editor/features/templates/{Dialog → DialogBrowseTemplates}/index.d.vue.ts +0 -0
- /package/dist/runtime/editor/features/templates/{Dialog → DialogBrowseTemplates}/index.vue.d.ts +0 -0
- /package/dist/runtime/editor/features/templates/{CreateDialog → DialogCreateTemplate}/index.d.vue.ts +0 -0
- /package/dist/runtime/editor/features/templates/{CreateDialog → DialogCreateTemplate}/index.vue.d.ts +0 -0
- /package/dist/runtime/editor/features/templates/{ManageDialog → DialogManageTemplates}/Item.d.vue.ts +0 -0
- /package/dist/runtime/editor/features/templates/{ManageDialog → DialogManageTemplates}/Item.vue.d.ts +0 -0
- /package/dist/runtime/editor/features/templates/{ManageDialog → DialogManageTemplates}/index.d.vue.ts +0 -0
- /package/dist/runtime/editor/features/templates/{ManageDialog → DialogManageTemplates}/index.vue.d.ts +0 -0
|
@@ -1,23 +1,31 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
2
|
+
import { coerceStringifiedParams } from "../../../shared/toolParams.js";
|
|
3
|
+
import { ToolResult } from "../../../shared/toolResult.js";
|
|
4
|
+
import {
|
|
5
|
+
buildSystemPrompt,
|
|
6
|
+
buildSystemPromptEntries
|
|
7
|
+
} from "../../helpers/agentPrompt.js";
|
|
3
8
|
import { provider, models } from "#blokkli-build/agent-server";
|
|
9
|
+
import { send } from "../../helpers/socket.js";
|
|
10
|
+
import {
|
|
11
|
+
ConversationHistory
|
|
12
|
+
} from "../ConversationHistory/index.js";
|
|
4
13
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import completePlanStepTool from "./server-tools/complete_plan_step/index.js";
|
|
14
|
+
UserPromptMessage,
|
|
15
|
+
AssistantMessage,
|
|
16
|
+
ToolRelayMessage
|
|
17
|
+
} from "../ConversationMessage/index.js";
|
|
18
|
+
import { resolveSkills } from "../../helpers/skills.js";
|
|
19
|
+
import { classifyError } from "../../helpers/errors.js";
|
|
20
|
+
import { computeStateHash, verifyStateHash } from "../../helpers/security.js";
|
|
21
|
+
import { validateMessages } from "../../helpers/messages.js";
|
|
22
|
+
import { getDefaultModel, createUsageTurn } from "../../helpers/models.js";
|
|
23
|
+
import { buildDefinition, stripSchemaOverhead } from "../../server-tools/index.js";
|
|
24
|
+
import { StreamAccumulator } from "../StreamAccumulator/index.js";
|
|
25
|
+
import loadSkillTool from "../../server-tools/load_skills/index.js";
|
|
26
|
+
import loadToolsTool from "../../server-tools/load_tools/index.js";
|
|
27
|
+
import createPlanTool from "../../server-tools/create_plan/index.js";
|
|
28
|
+
import completePlanStepTool from "../../server-tools/complete_plan_step/index.js";
|
|
21
29
|
const serverTools = [
|
|
22
30
|
loadSkillTool,
|
|
23
31
|
loadToolsTool,
|
|
@@ -25,7 +33,8 @@ const serverTools = [
|
|
|
25
33
|
completePlanStepTool
|
|
26
34
|
];
|
|
27
35
|
export class Session {
|
|
28
|
-
|
|
36
|
+
/** The single, immutable source of truth for the conversation. */
|
|
37
|
+
history = new ConversationHistory();
|
|
29
38
|
pendingToolCalls = /* @__PURE__ */ new Map();
|
|
30
39
|
abortController = null;
|
|
31
40
|
isProcessing = false;
|
|
@@ -45,8 +54,6 @@ export class Session {
|
|
|
45
54
|
planStepHasWork = false;
|
|
46
55
|
/** Pending plan approval promise resolver */
|
|
47
56
|
pendingPlanApproval = null;
|
|
48
|
-
/** Pre-pruned messages snapshot for transcript (captured before pruneMessages) */
|
|
49
|
-
unprunedMessages = [];
|
|
50
57
|
/** Last generic tool definitions for transcript */
|
|
51
58
|
lastTools = [];
|
|
52
59
|
/** Last raw request payload for transcript (dev only) */
|
|
@@ -122,7 +129,7 @@ export class Session {
|
|
|
122
129
|
this.loadedSkills = /* @__PURE__ */ new Set();
|
|
123
130
|
this.pageContext = pageContext;
|
|
124
131
|
}
|
|
125
|
-
start(peer, prompt, apiKey, authSecret, selectedUuids, autoLoadTools, autoLoadSkills, preSeededResults, autoExecuteTools) {
|
|
132
|
+
start(peer, prompt, apiKey, authSecret, selectedUuids, autoLoadTools, autoLoadSkills, preSeededResults, autoExecuteTools, rollbackToUserMessageIndex) {
|
|
126
133
|
if (this.isProcessing) {
|
|
127
134
|
send(peer, {
|
|
128
135
|
type: "error",
|
|
@@ -131,6 +138,19 @@ export class Session {
|
|
|
131
138
|
});
|
|
132
139
|
return;
|
|
133
140
|
}
|
|
141
|
+
if (rollbackToUserMessageIndex !== void 0) {
|
|
142
|
+
try {
|
|
143
|
+
this.truncateAtUserMessage(rollbackToUserMessageIndex);
|
|
144
|
+
} catch (e) {
|
|
145
|
+
send(peer, {
|
|
146
|
+
type: "error",
|
|
147
|
+
errorType: "bad_request",
|
|
148
|
+
message: e instanceof Error ? e.message : "Rollback target out of range"
|
|
149
|
+
});
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
this.isProcessing = true;
|
|
134
154
|
this.runAgentLoop(
|
|
135
155
|
peer,
|
|
136
156
|
prompt,
|
|
@@ -143,6 +163,24 @@ export class Session {
|
|
|
143
163
|
autoExecuteTools
|
|
144
164
|
);
|
|
145
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* Remove the Nth real user turn (0-based) and every message after it.
|
|
168
|
+
* "Real user turn" excludes tool-result relays. Throws if the index is
|
|
169
|
+
* out of range — typically because the target turn has been pruned away.
|
|
170
|
+
*/
|
|
171
|
+
truncateAtUserMessage(targetIndex) {
|
|
172
|
+
this.history.truncateAtUserTurn(targetIndex);
|
|
173
|
+
this.lastTools = [];
|
|
174
|
+
this.lastDebugPayload = null;
|
|
175
|
+
for (const pending of this.pendingToolCalls.values()) {
|
|
176
|
+
pending.reject(new Error("Rollback cancelled pending tool call"));
|
|
177
|
+
}
|
|
178
|
+
this.pendingToolCalls.clear();
|
|
179
|
+
if (this.pendingPlanApproval) {
|
|
180
|
+
this.pendingPlanApproval.resolve(false);
|
|
181
|
+
this.pendingPlanApproval = null;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
146
184
|
resolveToolResult(callId, result) {
|
|
147
185
|
const pending = this.pendingToolCalls.get(callId);
|
|
148
186
|
if (pending) {
|
|
@@ -193,8 +231,7 @@ export class Session {
|
|
|
193
231
|
}
|
|
194
232
|
newConversation(peer, authSecret) {
|
|
195
233
|
this.abortController?.abort();
|
|
196
|
-
this.
|
|
197
|
-
this.unprunedMessages = [];
|
|
234
|
+
this.history.clear();
|
|
198
235
|
this.lastTools = [];
|
|
199
236
|
this.lastDebugPayload = null;
|
|
200
237
|
this.activatedLazyTools.clear();
|
|
@@ -218,7 +255,7 @@ export class Session {
|
|
|
218
255
|
this.pendingPlanApproval = null;
|
|
219
256
|
}
|
|
220
257
|
this.plan = null;
|
|
221
|
-
this.
|
|
258
|
+
this.history.clear();
|
|
222
259
|
this.toolNames = [];
|
|
223
260
|
this.lazyToolNames = [];
|
|
224
261
|
this.activatedLazyTools.clear();
|
|
@@ -237,7 +274,7 @@ export class Session {
|
|
|
237
274
|
* for client-side persistence.
|
|
238
275
|
*/
|
|
239
276
|
getConversationStateForPersistence(authSecret) {
|
|
240
|
-
const prunedMessages =
|
|
277
|
+
const prunedMessages = this.history.projectForPersistence();
|
|
241
278
|
const activatedLazyTools = Array.from(this.activatedLazyTools);
|
|
242
279
|
const hash = computeStateHash(
|
|
243
280
|
prunedMessages,
|
|
@@ -262,8 +299,7 @@ export class Session {
|
|
|
262
299
|
if (issues.length > 0) {
|
|
263
300
|
return { success: false, reason: "Invalid message structure" };
|
|
264
301
|
}
|
|
265
|
-
this.
|
|
266
|
-
this.unprunedMessages = [];
|
|
302
|
+
this.history.replaceAll(state.messages);
|
|
267
303
|
this.lastTools = [];
|
|
268
304
|
const validLazyToolNames = new Set(this.lazyToolNames);
|
|
269
305
|
this.activatedLazyTools = new Set(
|
|
@@ -318,6 +354,7 @@ export class Session {
|
|
|
318
354
|
}
|
|
319
355
|
async runAgentLoop(peer, prompt, apiKey, authSecret, selectedUuids, autoLoadTools, autoLoadSkills, preSeededResults, autoExecuteTools) {
|
|
320
356
|
if (this.toolNames.length === 0) {
|
|
357
|
+
this.isProcessing = false;
|
|
321
358
|
send(peer, {
|
|
322
359
|
type: "error",
|
|
323
360
|
errorType: "bad_request",
|
|
@@ -326,6 +363,7 @@ export class Session {
|
|
|
326
363
|
return;
|
|
327
364
|
}
|
|
328
365
|
if (!this.pageContext) {
|
|
366
|
+
this.isProcessing = false;
|
|
329
367
|
send(peer, {
|
|
330
368
|
type: "error",
|
|
331
369
|
errorType: "bad_request",
|
|
@@ -368,39 +406,21 @@ ${skill.content}`
|
|
|
368
406
|
);
|
|
369
407
|
}
|
|
370
408
|
userParts.push(prompt);
|
|
371
|
-
const userMessage = autoLoadedSkillBlocks.length > 0 ?
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
]
|
|
377
|
-
} : { role: "user", content: userParts.join("\n\n") };
|
|
378
|
-
this.messages.push(userMessage);
|
|
409
|
+
const userMessage = autoLoadedSkillBlocks.length > 0 ? new UserPromptMessage([
|
|
410
|
+
...autoLoadedSkillBlocks,
|
|
411
|
+
{ type: "text", text: userParts.join("\n\n") }
|
|
412
|
+
]) : new UserPromptMessage(userParts.join("\n\n"));
|
|
413
|
+
this.history.append(userMessage);
|
|
379
414
|
if (preSeededResults?.length) {
|
|
380
415
|
for (let i = 0; i < preSeededResults.length; i++) {
|
|
381
416
|
const preSeeded = preSeededResults[i];
|
|
382
417
|
const toolUseId = `preseed_${i}`;
|
|
383
|
-
this.
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
name: preSeeded.toolName,
|
|
390
|
-
input: preSeeded.params
|
|
391
|
-
}
|
|
392
|
-
]
|
|
393
|
-
});
|
|
394
|
-
this.messages.push({
|
|
395
|
-
role: "user",
|
|
396
|
-
content: [
|
|
397
|
-
{
|
|
398
|
-
type: "tool_result",
|
|
399
|
-
tool_use_id: toolUseId,
|
|
400
|
-
content: JSON.stringify(preSeeded.result)
|
|
401
|
-
}
|
|
402
|
-
]
|
|
403
|
-
});
|
|
418
|
+
this.pushToolExchange(
|
|
419
|
+
toolUseId,
|
|
420
|
+
preSeeded.toolName,
|
|
421
|
+
preSeeded.params,
|
|
422
|
+
ToolResult.fromWire(JSON.stringify(preSeeded.result))
|
|
423
|
+
);
|
|
404
424
|
}
|
|
405
425
|
}
|
|
406
426
|
let allAutoToolsSkipLlm = false;
|
|
@@ -419,78 +439,32 @@ ${skill.content}`
|
|
|
419
439
|
});
|
|
420
440
|
try {
|
|
421
441
|
const clientResult = await this.waitForToolResult(callId);
|
|
422
|
-
|
|
423
|
-
role: "assistant",
|
|
424
|
-
content: [
|
|
425
|
-
{
|
|
426
|
-
type: "tool_use",
|
|
427
|
-
id: toolUseId,
|
|
428
|
-
name: autoTool.toolName,
|
|
429
|
-
input: autoTool.params
|
|
430
|
-
}
|
|
431
|
-
]
|
|
432
|
-
});
|
|
442
|
+
let result;
|
|
433
443
|
if (clientResult.error) {
|
|
434
444
|
hasErrors = true;
|
|
435
445
|
allSkip = false;
|
|
436
|
-
|
|
437
|
-
role: "user",
|
|
438
|
-
content: [
|
|
439
|
-
{
|
|
440
|
-
type: "tool_result",
|
|
441
|
-
tool_use_id: toolUseId,
|
|
442
|
-
content: JSON.stringify({ error: clientResult.error }),
|
|
443
|
-
is_error: true
|
|
444
|
-
}
|
|
445
|
-
]
|
|
446
|
-
});
|
|
446
|
+
result = ToolResult.error(clientResult.error);
|
|
447
447
|
} else {
|
|
448
448
|
if (!clientResult.skipLlmResponse) {
|
|
449
449
|
allSkip = false;
|
|
450
450
|
}
|
|
451
|
-
|
|
452
|
-
if (typeof resultForLLM === "object" && resultForLLM !== null && "agentMessage" in resultForLLM) {
|
|
453
|
-
const { agentMessage, ...rest } = resultForLLM;
|
|
454
|
-
resultForLLM = { ...rest, label: agentMessage };
|
|
455
|
-
}
|
|
456
|
-
this.messages.push({
|
|
457
|
-
role: "user",
|
|
458
|
-
content: [
|
|
459
|
-
{
|
|
460
|
-
type: "tool_result",
|
|
461
|
-
tool_use_id: toolUseId,
|
|
462
|
-
content: JSON.stringify(resultForLLM)
|
|
463
|
-
}
|
|
464
|
-
]
|
|
465
|
-
});
|
|
451
|
+
result = ToolResult.fromClientResult(clientResult.result);
|
|
466
452
|
}
|
|
453
|
+
this.pushToolExchange(
|
|
454
|
+
toolUseId,
|
|
455
|
+
autoTool.toolName,
|
|
456
|
+
autoTool.params,
|
|
457
|
+
result
|
|
458
|
+
);
|
|
467
459
|
} catch {
|
|
468
460
|
hasErrors = true;
|
|
469
461
|
allSkip = false;
|
|
470
|
-
this.
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
name: autoTool.toolName,
|
|
477
|
-
input: autoTool.params
|
|
478
|
-
}
|
|
479
|
-
]
|
|
480
|
-
});
|
|
481
|
-
this.messages.push({
|
|
482
|
-
role: "user",
|
|
483
|
-
content: [
|
|
484
|
-
{
|
|
485
|
-
type: "tool_result",
|
|
486
|
-
tool_use_id: toolUseId,
|
|
487
|
-
content: JSON.stringify({
|
|
488
|
-
error: "Auto-executed tool call was cancelled."
|
|
489
|
-
}),
|
|
490
|
-
is_error: true
|
|
491
|
-
}
|
|
492
|
-
]
|
|
493
|
-
});
|
|
462
|
+
this.pushToolExchange(
|
|
463
|
+
toolUseId,
|
|
464
|
+
autoTool.toolName,
|
|
465
|
+
autoTool.params,
|
|
466
|
+
ToolResult.error("Auto-executed tool call was cancelled.")
|
|
467
|
+
);
|
|
494
468
|
}
|
|
495
469
|
}
|
|
496
470
|
allAutoToolsSkipLlm = allSkip && !hasErrors;
|
|
@@ -502,7 +476,6 @@ ${skill.content}`
|
|
|
502
476
|
return;
|
|
503
477
|
}
|
|
504
478
|
this.abortController = new AbortController();
|
|
505
|
-
this.isProcessing = true;
|
|
506
479
|
let toolCallCounter = 0;
|
|
507
480
|
let planRetryCount = 0;
|
|
508
481
|
let streamRetryCount = 0;
|
|
@@ -510,19 +483,19 @@ ${skill.content}`
|
|
|
510
483
|
let lastToolCallKey = "";
|
|
511
484
|
let consecutiveIdenticalCalls = 0;
|
|
512
485
|
const MAX_IDENTICAL_CALLS = 2;
|
|
486
|
+
let consecutiveValidationFailures = 0;
|
|
487
|
+
const MAX_HIDDEN_VALIDATION_FAILURES = 2;
|
|
513
488
|
try {
|
|
514
489
|
while (true) {
|
|
515
490
|
if (this.abortController.signal.aborted) {
|
|
516
491
|
break;
|
|
517
492
|
}
|
|
518
493
|
send(peer, { type: "thinking" });
|
|
519
|
-
const
|
|
494
|
+
const accumulator = new StreamAccumulator();
|
|
495
|
+
const assistantContent = accumulator.blocks;
|
|
520
496
|
const toolResults = [];
|
|
521
497
|
const extraBlocks = [];
|
|
522
498
|
let messagesCommittedByPlanTool = false;
|
|
523
|
-
let currentToolUse = null;
|
|
524
|
-
let currentTextContent = "";
|
|
525
|
-
let inTextBlock = false;
|
|
526
499
|
const eagerTools = this.resolveToolDefinitions(this.toolNames);
|
|
527
500
|
const activatedToolNames = this.lazyToolNames.filter(
|
|
528
501
|
(name) => this.activatedLazyTools.has(name)
|
|
@@ -537,7 +510,8 @@ ${skill.content}`
|
|
|
537
510
|
const defCtx = {
|
|
538
511
|
resolvedSkills,
|
|
539
512
|
plan: this.plan,
|
|
540
|
-
unloadedLazyTools
|
|
513
|
+
unloadedLazyTools,
|
|
514
|
+
lazyToolNames: this.lazyToolNames
|
|
541
515
|
};
|
|
542
516
|
const serverToolDefs = serverTools.map((t) => buildDefinition(t, defCtx)).filter((d) => d !== null);
|
|
543
517
|
const allTools = [...serverToolDefs, ...eagerTools, ...activatedTools];
|
|
@@ -555,11 +529,14 @@ ${skill.content}`
|
|
|
555
529
|
const stream = provider.createStream(
|
|
556
530
|
{
|
|
557
531
|
apiKey,
|
|
558
|
-
model: (models
|
|
532
|
+
model: getDefaultModel(models)?.name ?? ""
|
|
559
533
|
},
|
|
560
534
|
{
|
|
561
535
|
systemPrompt,
|
|
562
|
-
|
|
536
|
+
// Pure projection of the immutable history — recomputed each round
|
|
537
|
+
// from pristine canonical (applies the age + token-budget ceilings
|
|
538
|
+
// and eager volatile-staleness without ever mutating the source).
|
|
539
|
+
messages: this.history.projectForLlm(this.volatileLookup()),
|
|
563
540
|
tools: allTools,
|
|
564
541
|
maxTokens: 4096,
|
|
565
542
|
signal: this.abortController.signal
|
|
@@ -575,70 +552,42 @@ ${skill.content}`
|
|
|
575
552
|
this.lastDebugPayload = event.payload;
|
|
576
553
|
break;
|
|
577
554
|
case "text_start":
|
|
578
|
-
|
|
579
|
-
currentTextContent = "";
|
|
555
|
+
accumulator.startText();
|
|
580
556
|
break;
|
|
581
|
-
case "text_delta":
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
currentTextContent += transformed;
|
|
557
|
+
case "text_delta": {
|
|
558
|
+
const transformed = accumulator.pushTextDelta(event.text);
|
|
559
|
+
if (transformed !== null) {
|
|
585
560
|
send(peer, { type: "text_delta", content: transformed });
|
|
586
561
|
}
|
|
587
562
|
break;
|
|
563
|
+
}
|
|
588
564
|
case "text_end":
|
|
589
|
-
|
|
590
|
-
assistantContent.push({
|
|
591
|
-
type: "text",
|
|
592
|
-
text: currentTextContent
|
|
593
|
-
});
|
|
594
|
-
}
|
|
595
|
-
currentTextContent = "";
|
|
596
|
-
inTextBlock = false;
|
|
565
|
+
accumulator.endText();
|
|
597
566
|
break;
|
|
598
567
|
case "tool_use_start":
|
|
599
|
-
|
|
600
|
-
id: event.id,
|
|
601
|
-
name: event.name,
|
|
602
|
-
inputJson: ""
|
|
603
|
-
};
|
|
568
|
+
accumulator.startToolUse(event.id, event.name);
|
|
604
569
|
break;
|
|
605
570
|
case "tool_use_delta":
|
|
606
|
-
|
|
607
|
-
currentToolUse.inputJson += event.partial_json;
|
|
608
|
-
}
|
|
571
|
+
accumulator.pushToolUseDelta(event.partial_json);
|
|
609
572
|
break;
|
|
610
|
-
case "tool_use_end":
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
input = JSON.parse(currentToolUse.inputJson || "{}");
|
|
615
|
-
} catch {
|
|
616
|
-
input = {};
|
|
617
|
-
assistantContent.push({
|
|
618
|
-
type: "tool_use",
|
|
619
|
-
id: currentToolUse.id,
|
|
620
|
-
name: currentToolUse.name,
|
|
621
|
-
input
|
|
622
|
-
});
|
|
573
|
+
case "tool_use_end": {
|
|
574
|
+
const finished = accumulator.finishToolUse();
|
|
575
|
+
if (finished) {
|
|
576
|
+
if (!finished.ok) {
|
|
623
577
|
toolResults.push({
|
|
624
578
|
type: "tool_result",
|
|
625
|
-
tool_use_id:
|
|
579
|
+
tool_use_id: finished.id,
|
|
626
580
|
content: JSON.stringify({
|
|
627
581
|
error: "Your tool call produced malformed JSON input. Please try again."
|
|
628
582
|
}),
|
|
629
583
|
is_error: true
|
|
630
584
|
});
|
|
631
|
-
currentToolUse = null;
|
|
632
585
|
break;
|
|
633
586
|
}
|
|
587
|
+
const { id: toolUseId, name: toolName, input } = finished;
|
|
588
|
+
const inputJson = finished.inputJson;
|
|
634
589
|
const callId = `tc_${toolCallCounter++}`;
|
|
635
|
-
|
|
636
|
-
type: "tool_use",
|
|
637
|
-
id: currentToolUse.id,
|
|
638
|
-
name: currentToolUse.name,
|
|
639
|
-
input
|
|
640
|
-
});
|
|
641
|
-
const toolCallKey = currentToolUse.name + ":" + currentToolUse.inputJson;
|
|
590
|
+
const toolCallKey = toolName + ":" + inputJson;
|
|
642
591
|
if (toolCallKey === lastToolCallKey) {
|
|
643
592
|
consecutiveIdenticalCalls++;
|
|
644
593
|
} else {
|
|
@@ -648,159 +597,65 @@ ${skill.content}`
|
|
|
648
597
|
if (consecutiveIdenticalCalls > MAX_IDENTICAL_CALLS) {
|
|
649
598
|
toolResults.push({
|
|
650
599
|
type: "tool_result",
|
|
651
|
-
tool_use_id:
|
|
600
|
+
tool_use_id: toolUseId,
|
|
652
601
|
content: JSON.stringify({
|
|
653
|
-
error: `You have called "${
|
|
602
|
+
error: `You have called "${toolName}" ${consecutiveIdenticalCalls} times in a row with identical parameters and received the same result each time. Stop repeating this call. Use the information you already have or try a different approach.`
|
|
654
603
|
}),
|
|
655
604
|
is_error: true
|
|
656
605
|
});
|
|
657
|
-
currentToolUse = null;
|
|
658
606
|
break;
|
|
659
607
|
}
|
|
660
608
|
const matchedServerTool = serverTools.find(
|
|
661
|
-
(t) => t.name ===
|
|
609
|
+
(t) => t.name === toolName
|
|
662
610
|
);
|
|
663
611
|
if (matchedServerTool) {
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
currentToolUse = null;
|
|
674
|
-
break;
|
|
675
|
-
}
|
|
676
|
-
const handlerCtx = {
|
|
677
|
-
toolUseId: currentToolUse.id,
|
|
678
|
-
send: (msg) => send(peer, msg),
|
|
679
|
-
resolvedSkills,
|
|
680
|
-
lazyToolNames: this.lazyToolNames,
|
|
681
|
-
activatedLazyTools: this.activatedLazyTools,
|
|
682
|
-
loadedSkills: this.loadedSkills,
|
|
683
|
-
plan: this.plan,
|
|
684
|
-
setPlan: (p) => {
|
|
685
|
-
this.plan = p;
|
|
686
|
-
},
|
|
687
|
-
toClientPlan: () => this.toClientPlan(),
|
|
688
|
-
waitForPlanApproval: () => this.waitForPlanApproval(),
|
|
689
|
-
assistantContent,
|
|
690
|
-
commitMessagesEarly: (toolResult) => {
|
|
691
|
-
if (assistantContent.length) {
|
|
692
|
-
this.messages.push({
|
|
693
|
-
role: "assistant",
|
|
694
|
-
content: [...assistantContent]
|
|
695
|
-
});
|
|
696
|
-
assistantContent.length = 0;
|
|
697
|
-
}
|
|
698
|
-
this.messages.push({
|
|
699
|
-
role: "user",
|
|
700
|
-
content: [toolResult]
|
|
701
|
-
});
|
|
702
|
-
},
|
|
703
|
-
updateLastToolResult: (toolUseId, content) => {
|
|
704
|
-
const lastMsg = this.messages[this.messages.length - 1];
|
|
705
|
-
if (lastMsg.role === "user" && Array.isArray(lastMsg.content)) {
|
|
706
|
-
const resultBlock = lastMsg.content.find(
|
|
707
|
-
(b) => b.type === "tool_result" && b.tool_use_id === toolUseId
|
|
708
|
-
);
|
|
709
|
-
if (resultBlock && resultBlock.type === "tool_result") {
|
|
710
|
-
resultBlock.content = content;
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
},
|
|
714
|
-
planStepHasWork: this.planStepHasWork,
|
|
715
|
-
markPlanStepWork: () => {
|
|
716
|
-
this.planStepHasWork = true;
|
|
717
|
-
},
|
|
718
|
-
resetPlanStepWork: () => {
|
|
719
|
-
this.planStepHasWork = false;
|
|
720
|
-
}
|
|
721
|
-
};
|
|
722
|
-
try {
|
|
723
|
-
const coercedInput = {};
|
|
724
|
-
for (const key of Object.keys(input)) {
|
|
725
|
-
const value = input[key];
|
|
726
|
-
if (typeof value === "string" && (value[0] === "[" || value[0] === "{")) {
|
|
727
|
-
try {
|
|
728
|
-
coercedInput[key] = JSON.parse(value);
|
|
729
|
-
} catch {
|
|
730
|
-
coercedInput[key] = value;
|
|
731
|
-
}
|
|
732
|
-
} else {
|
|
733
|
-
coercedInput[key] = value;
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
const parsed = matchedServerTool.inputSchema(defCtx).parse(coercedInput);
|
|
737
|
-
const result = await matchedServerTool.handle(
|
|
738
|
-
handlerCtx,
|
|
739
|
-
parsed
|
|
740
|
-
);
|
|
741
|
-
toolResults.push(...result.toolResults);
|
|
742
|
-
if (result.extraBlocks) {
|
|
743
|
-
extraBlocks.push(...result.extraBlocks);
|
|
744
|
-
}
|
|
745
|
-
if (result.messagesCommitted) {
|
|
746
|
-
messagesCommittedByPlanTool = true;
|
|
612
|
+
const dispatch = await this.dispatchServerTool(
|
|
613
|
+
matchedServerTool,
|
|
614
|
+
{
|
|
615
|
+
toolUseId,
|
|
616
|
+
input,
|
|
617
|
+
defCtx,
|
|
618
|
+
resolvedSkills,
|
|
619
|
+
peer,
|
|
620
|
+
assistantContent
|
|
747
621
|
}
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
is_error: true
|
|
756
|
-
});
|
|
622
|
+
);
|
|
623
|
+
toolResults.push(...dispatch.toolResults);
|
|
624
|
+
if (dispatch.extraBlocks) {
|
|
625
|
+
extraBlocks.push(...dispatch.extraBlocks);
|
|
626
|
+
}
|
|
627
|
+
if (dispatch.messagesCommitted) {
|
|
628
|
+
messagesCommittedByPlanTool = true;
|
|
757
629
|
}
|
|
758
|
-
currentToolUse = null;
|
|
759
630
|
break;
|
|
760
631
|
}
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
try {
|
|
768
|
-
const clientResult = await this.waitForToolResult(callId);
|
|
769
|
-
if (clientResult.error) {
|
|
770
|
-
toolResults.push({
|
|
771
|
-
type: "tool_result",
|
|
772
|
-
tool_use_id: currentToolUse.id,
|
|
773
|
-
content: JSON.stringify({
|
|
774
|
-
error: clientResult.error
|
|
775
|
-
}),
|
|
776
|
-
is_error: true
|
|
777
|
-
});
|
|
778
|
-
} else {
|
|
779
|
-
let resultForLLM = clientResult.result;
|
|
780
|
-
if (typeof resultForLLM === "object" && resultForLLM !== null && "agentMessage" in resultForLLM) {
|
|
781
|
-
const { agentMessage, ...rest } = resultForLLM;
|
|
782
|
-
resultForLLM = { ...rest, label: agentMessage };
|
|
783
|
-
}
|
|
784
|
-
toolResults.push({
|
|
785
|
-
type: "tool_result",
|
|
786
|
-
tool_use_id: currentToolUse.id,
|
|
787
|
-
content: JSON.stringify(resultForLLM)
|
|
788
|
-
});
|
|
789
|
-
this.planStepHasWork = true;
|
|
790
|
-
}
|
|
791
|
-
} catch (error) {
|
|
632
|
+
const validation = this.validateClientToolInput(
|
|
633
|
+
toolName,
|
|
634
|
+
input
|
|
635
|
+
);
|
|
636
|
+
if (!validation.ok && consecutiveValidationFailures < MAX_HIDDEN_VALIDATION_FAILURES) {
|
|
637
|
+
consecutiveValidationFailures++;
|
|
792
638
|
toolResults.push({
|
|
793
639
|
type: "tool_result",
|
|
794
|
-
tool_use_id:
|
|
795
|
-
content: JSON.stringify({
|
|
796
|
-
error: error.message
|
|
797
|
-
}),
|
|
640
|
+
tool_use_id: toolUseId,
|
|
641
|
+
content: JSON.stringify({ error: validation.error }),
|
|
798
642
|
is_error: true
|
|
799
643
|
});
|
|
644
|
+
break;
|
|
800
645
|
}
|
|
801
|
-
|
|
646
|
+
consecutiveValidationFailures = 0;
|
|
647
|
+
toolResults.push(
|
|
648
|
+
...await this.dispatchClientTool({
|
|
649
|
+
toolUseId,
|
|
650
|
+
toolName,
|
|
651
|
+
callId,
|
|
652
|
+
input,
|
|
653
|
+
peer
|
|
654
|
+
})
|
|
655
|
+
);
|
|
802
656
|
}
|
|
803
657
|
break;
|
|
658
|
+
}
|
|
804
659
|
case "reasoning_summary":
|
|
805
660
|
assistantContent.push({
|
|
806
661
|
type: "reasoning",
|
|
@@ -809,21 +664,13 @@ ${skill.content}`
|
|
|
809
664
|
encryptedContent: event.encryptedContent
|
|
810
665
|
});
|
|
811
666
|
break;
|
|
812
|
-
case "message_end":
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
send(peer, {
|
|
816
|
-
type: "usage",
|
|
817
|
-
usage: {
|
|
818
|
-
inputTokens: event.inputTokens,
|
|
819
|
-
outputTokens: event.outputTokens,
|
|
820
|
-
cacheCreationInputTokens: event.cacheCreationInputTokens ?? 0,
|
|
821
|
-
cacheReadInputTokens: event.cacheReadInputTokens ?? 0,
|
|
822
|
-
pricing: defaultModel?.pricing ?? null
|
|
823
|
-
}
|
|
824
|
-
});
|
|
667
|
+
case "message_end": {
|
|
668
|
+
const usage = createUsageTurn(event, getDefaultModel(models));
|
|
669
|
+
if (usage) {
|
|
670
|
+
send(peer, { type: "usage", usage });
|
|
825
671
|
}
|
|
826
672
|
break;
|
|
673
|
+
}
|
|
827
674
|
case "error":
|
|
828
675
|
throw event.error;
|
|
829
676
|
}
|
|
@@ -839,8 +686,8 @@ ${skill.content}`
|
|
|
839
686
|
);
|
|
840
687
|
continue;
|
|
841
688
|
}
|
|
842
|
-
if (isRetryable && this.
|
|
843
|
-
this.
|
|
689
|
+
if (isRetryable && this.history.peekLast() === userMessage) {
|
|
690
|
+
this.history.popLast();
|
|
844
691
|
console.error(
|
|
845
692
|
"[blokkli agent] Transient stream error, retries exhausted:",
|
|
846
693
|
streamError
|
|
@@ -858,17 +705,18 @@ ${skill.content}`
|
|
|
858
705
|
this.planStepHasWork = false;
|
|
859
706
|
continue;
|
|
860
707
|
}
|
|
708
|
+
let assistantNames;
|
|
861
709
|
if (assistantContent.length) {
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
});
|
|
710
|
+
const assistant = new AssistantMessage([...assistantContent]);
|
|
711
|
+
assistantNames = assistant.toolUseNames();
|
|
712
|
+
this.history.append(assistant);
|
|
866
713
|
}
|
|
867
714
|
if (toolResults.length) {
|
|
868
|
-
|
|
715
|
+
const relay = ToolRelayMessage.fromWire({
|
|
869
716
|
role: "user",
|
|
870
717
|
content: [...toolResults, ...extraBlocks]
|
|
871
|
-
});
|
|
718
|
+
}).withResolvedNames((id) => assistantNames?.get(id));
|
|
719
|
+
this.history.append(relay);
|
|
872
720
|
planRetryCount = 0;
|
|
873
721
|
streamRetryCount = 0;
|
|
874
722
|
}
|
|
@@ -895,15 +743,6 @@ ${skill.content}`
|
|
|
895
743
|
} finally {
|
|
896
744
|
this.isProcessing = false;
|
|
897
745
|
this.abortController = null;
|
|
898
|
-
this.unprunedMessages = structuredClone(this.messages);
|
|
899
|
-
pruneMessages(
|
|
900
|
-
this.messages,
|
|
901
|
-
KEEP_RECENT_TURNS,
|
|
902
|
-
this.buildToolMetadataMap()
|
|
903
|
-
);
|
|
904
|
-
if (this.loadedSkills.size > 0) {
|
|
905
|
-
this.reconcileLoadedSkills();
|
|
906
|
-
}
|
|
907
746
|
this.sendConversationState(peer, authSecret);
|
|
908
747
|
}
|
|
909
748
|
}
|
|
@@ -922,53 +761,196 @@ ${skill.content}`
|
|
|
922
761
|
});
|
|
923
762
|
}
|
|
924
763
|
/**
|
|
925
|
-
*
|
|
926
|
-
*
|
|
764
|
+
* Build the context object passed to a server-side tool handler. `assistantContent`
|
|
765
|
+
* is the live block array for the current turn — `commitMessagesEarly` flushes and
|
|
766
|
+
* resets it in place, so it must be the same reference the stream loop appends to.
|
|
927
767
|
*/
|
|
928
|
-
|
|
929
|
-
const
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
768
|
+
buildServerToolContext(args) {
|
|
769
|
+
const { toolUseId, peer, resolvedSkills, assistantContent } = args;
|
|
770
|
+
return {
|
|
771
|
+
toolUseId,
|
|
772
|
+
send: (msg) => send(peer, msg),
|
|
773
|
+
resolvedSkills,
|
|
774
|
+
lazyToolNames: this.lazyToolNames,
|
|
775
|
+
activatedLazyTools: this.activatedLazyTools,
|
|
776
|
+
loadedSkills: this.loadedSkills,
|
|
777
|
+
plan: this.plan,
|
|
778
|
+
setPlan: (p) => {
|
|
779
|
+
this.plan = p;
|
|
780
|
+
},
|
|
781
|
+
toClientPlan: () => this.toClientPlan(),
|
|
782
|
+
waitForPlanApproval: () => this.waitForPlanApproval(),
|
|
783
|
+
assistantContent,
|
|
784
|
+
commitMessagesEarly: (toolResult) => {
|
|
785
|
+
let names;
|
|
786
|
+
if (assistantContent.length) {
|
|
787
|
+
const assistant = new AssistantMessage([...assistantContent]);
|
|
788
|
+
names = assistant.toolUseNames();
|
|
789
|
+
this.history.append(assistant);
|
|
790
|
+
assistantContent.length = 0;
|
|
791
|
+
}
|
|
792
|
+
this.history.append(
|
|
793
|
+
ToolRelayMessage.fromWire({
|
|
794
|
+
role: "user",
|
|
795
|
+
content: [toolResult]
|
|
796
|
+
}).withResolvedNames((id) => names?.get(id))
|
|
797
|
+
);
|
|
798
|
+
},
|
|
799
|
+
updateLastToolResult: (id, content) => {
|
|
800
|
+
this.history.replaceLastResult(id, ToolResult.fromWire(content));
|
|
801
|
+
},
|
|
802
|
+
planStepHasWork: this.planStepHasWork,
|
|
803
|
+
markPlanStepWork: () => {
|
|
804
|
+
this.planStepHasWork = true;
|
|
805
|
+
},
|
|
806
|
+
resetPlanStepWork: () => {
|
|
807
|
+
this.planStepHasWork = false;
|
|
935
808
|
}
|
|
936
|
-
}
|
|
937
|
-
this.messages.push({ role: "user", content: text });
|
|
938
|
-
}
|
|
809
|
+
};
|
|
939
810
|
}
|
|
940
811
|
/**
|
|
941
|
-
*
|
|
942
|
-
*
|
|
812
|
+
* Dispatch a server-side tool: reject if unavailable, coerce + validate input,
|
|
813
|
+
* run the handler. Returns the blocks to merge into the turn's results.
|
|
943
814
|
*/
|
|
944
|
-
|
|
945
|
-
const
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
815
|
+
async dispatchServerTool(tool, args) {
|
|
816
|
+
const { toolUseId, input, defCtx, resolvedSkills, peer, assistantContent } = args;
|
|
817
|
+
if (tool.isAvailable && !tool.isAvailable(defCtx)) {
|
|
818
|
+
return {
|
|
819
|
+
toolResults: [
|
|
820
|
+
{
|
|
821
|
+
type: "tool_result",
|
|
822
|
+
tool_use_id: toolUseId,
|
|
823
|
+
content: JSON.stringify({
|
|
824
|
+
error: "This tool is not available right now."
|
|
825
|
+
}),
|
|
826
|
+
is_error: true
|
|
827
|
+
}
|
|
828
|
+
]
|
|
829
|
+
};
|
|
953
830
|
}
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
831
|
+
const handlerCtx = this.buildServerToolContext({
|
|
832
|
+
toolUseId,
|
|
833
|
+
peer,
|
|
834
|
+
resolvedSkills,
|
|
835
|
+
assistantContent
|
|
836
|
+
});
|
|
837
|
+
try {
|
|
838
|
+
const parsed = tool.inputSchema(defCtx).parse(coerceStringifiedParams(input));
|
|
839
|
+
const result = await tool.handle(handlerCtx, parsed);
|
|
840
|
+
return {
|
|
841
|
+
toolResults: result.toolResults,
|
|
842
|
+
extraBlocks: result.extraBlocks,
|
|
843
|
+
messagesCommitted: result.messagesCommitted
|
|
844
|
+
};
|
|
845
|
+
} catch (e) {
|
|
846
|
+
return {
|
|
847
|
+
toolResults: [
|
|
848
|
+
{
|
|
849
|
+
type: "tool_result",
|
|
850
|
+
tool_use_id: toolUseId,
|
|
851
|
+
content: JSON.stringify({
|
|
852
|
+
error: `Invalid input: ${e.message}`
|
|
853
|
+
}),
|
|
854
|
+
is_error: true
|
|
855
|
+
}
|
|
856
|
+
]
|
|
857
|
+
};
|
|
958
858
|
}
|
|
959
859
|
}
|
|
960
860
|
/**
|
|
961
|
-
*
|
|
861
|
+
* Dispatch a client-side tool: send the call to the peer and await its result.
|
|
862
|
+
* An `agentMessage` on the result replaces the `label` in the payload fed back
|
|
863
|
+
* to the LLM (the label is UI-only). Returns the tool_result block(s).
|
|
962
864
|
*/
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
865
|
+
/**
|
|
866
|
+
* Validate an LLM-generated client tool call against its Zod `paramsSchema`
|
|
867
|
+
* (the same schema the client parses with), server-side, before dispatching
|
|
868
|
+
* to the peer. Returns an error string on a schema failure so the caller can
|
|
869
|
+
* reject it silently. Unknown tools pass through (handled by normal dispatch).
|
|
870
|
+
*/
|
|
871
|
+
validateClientToolInput(toolName, input) {
|
|
872
|
+
const bundled = this.bundledToolMap.get(toolName);
|
|
873
|
+
if (!bundled) return { ok: true };
|
|
874
|
+
const parsed = bundled.paramsSchema.safeParse(
|
|
875
|
+
coerceStringifiedParams(input)
|
|
876
|
+
);
|
|
877
|
+
if (parsed.success) return { ok: true };
|
|
878
|
+
return {
|
|
879
|
+
ok: false,
|
|
880
|
+
error: `Invalid input: ${z.prettifyError(parsed.error)}`
|
|
881
|
+
};
|
|
882
|
+
}
|
|
883
|
+
async dispatchClientTool(args) {
|
|
884
|
+
const { toolUseId, toolName, callId, input, peer } = args;
|
|
885
|
+
send(peer, {
|
|
886
|
+
type: "tool_call",
|
|
887
|
+
callId,
|
|
888
|
+
tool: toolName,
|
|
889
|
+
params: input
|
|
890
|
+
});
|
|
891
|
+
try {
|
|
892
|
+
const clientResult = await this.waitForToolResult(callId);
|
|
893
|
+
if (clientResult.error) {
|
|
894
|
+
return [
|
|
895
|
+
{
|
|
896
|
+
type: "tool_result",
|
|
897
|
+
tool_use_id: toolUseId,
|
|
898
|
+
content: JSON.stringify({ error: clientResult.error }),
|
|
899
|
+
is_error: true
|
|
900
|
+
}
|
|
901
|
+
];
|
|
969
902
|
}
|
|
903
|
+
let resultForLLM = clientResult.result;
|
|
904
|
+
if (typeof resultForLLM === "object" && resultForLLM !== null && "agentMessage" in resultForLLM) {
|
|
905
|
+
const { agentMessage, ...rest } = resultForLLM;
|
|
906
|
+
resultForLLM = { ...rest, label: agentMessage };
|
|
907
|
+
}
|
|
908
|
+
this.planStepHasWork = true;
|
|
909
|
+
return [
|
|
910
|
+
{
|
|
911
|
+
type: "tool_result",
|
|
912
|
+
tool_use_id: toolUseId,
|
|
913
|
+
content: JSON.stringify(resultForLLM)
|
|
914
|
+
}
|
|
915
|
+
];
|
|
916
|
+
} catch (error) {
|
|
917
|
+
return [
|
|
918
|
+
{
|
|
919
|
+
type: "tool_result",
|
|
920
|
+
tool_use_id: toolUseId,
|
|
921
|
+
content: JSON.stringify({ error: error.message }),
|
|
922
|
+
is_error: true
|
|
923
|
+
}
|
|
924
|
+
];
|
|
970
925
|
}
|
|
971
|
-
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* Append a synthetic assistant `tool_use` + user `tool_result` message pair —
|
|
929
|
+
* the shape used to inject pre-seeded results and to record auto-executed tool
|
|
930
|
+
* calls before the LLM loop starts.
|
|
931
|
+
*/
|
|
932
|
+
pushToolExchange(toolUseId, toolName, input, result) {
|
|
933
|
+
this.history.appendToolExchange(
|
|
934
|
+
new AssistantMessage([
|
|
935
|
+
{ type: "tool_use", id: toolUseId, name: toolName, input }
|
|
936
|
+
]),
|
|
937
|
+
new ToolRelayMessage([{ toolUseId, toolName, result }])
|
|
938
|
+
);
|
|
939
|
+
}
|
|
940
|
+
/**
|
|
941
|
+
* Safely push a user message, merging with the last message if it's also a
|
|
942
|
+
* user message — the LLM API rejects consecutive same-role messages.
|
|
943
|
+
*/
|
|
944
|
+
safePushUserMessage(text) {
|
|
945
|
+
this.history.mergeOrAppendUserText(text);
|
|
946
|
+
}
|
|
947
|
+
/**
|
|
948
|
+
* Whether a tool's results go stale after a mutation — used by the live
|
|
949
|
+
* projection's eager volatile eviction. Volatility is a property of the tool
|
|
950
|
+
* definition, so it holds regardless of the current tool set.
|
|
951
|
+
*/
|
|
952
|
+
volatileLookup() {
|
|
953
|
+
return (name) => !!(name && this.bundledToolMap.get(name)?.volatile);
|
|
972
954
|
}
|
|
973
955
|
buildTranscript() {
|
|
974
956
|
const system = this.pageContext ? buildSystemPromptEntries(
|
|
@@ -980,21 +962,7 @@ ${skill.content}`
|
|
|
980
962
|
this.getActivePlanContext(),
|
|
981
963
|
this.loadedSkills
|
|
982
964
|
) : [];
|
|
983
|
-
const messages = this.
|
|
984
|
-
const entry = {
|
|
985
|
-
type: msg.role === "assistant" ? "agent" : "user",
|
|
986
|
-
seen: msg.content
|
|
987
|
-
};
|
|
988
|
-
const unpruned = this.unprunedMessages[i];
|
|
989
|
-
if (unpruned) {
|
|
990
|
-
const seenJson = JSON.stringify(msg.content);
|
|
991
|
-
const fullJson = JSON.stringify(unpruned.content);
|
|
992
|
-
if (seenJson !== fullJson) {
|
|
993
|
-
entry.full = unpruned.content;
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
|
-
return entry;
|
|
997
|
-
});
|
|
965
|
+
const messages = this.history.buildTranscriptMessages(this.volatileLookup());
|
|
998
966
|
const tools = this.lastTools.map((t) => ({
|
|
999
967
|
name: t.name,
|
|
1000
968
|
description: t.description,
|