@blokkli/editor 2.0.0-alpha.31 → 2.0.0-alpha.33
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/constants/index.d.ts +1 -0
- package/dist/global/constants/index.js +1 -0
- package/dist/global/types/blockOptions.d.ts +16 -0
- package/dist/global/types/features.d.ts +4 -0
- package/dist/module.d.mts +1 -24
- package/dist/module.json +1 -1
- package/dist/module.mjs +453 -10828
- package/dist/modules/agent/index.d.mts +64 -0
- package/dist/modules/agent/index.mjs +407 -0
- package/dist/modules/agent/runtime/app/composables/agentProvider.d.ts +55 -0
- package/dist/modules/agent/runtime/app/composables/agentProvider.js +875 -0
- package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentPrompt.d.ts +32 -0
- package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentPrompt.js +6 -0
- package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentTool.d.ts +65 -0
- package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentTool.js +6 -0
- package/dist/modules/agent/runtime/app/composables/index.d.ts +4 -0
- package/dist/modules/agent/runtime/app/composables/index.js +2 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Attachment/index.d.vue.ts +12 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Attachment/index.vue +62 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Attachment/index.vue.d.ts +12 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Assistant/index.d.vue.ts +9 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Assistant/index.vue +38 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Assistant/index.vue.d.ts +9 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Error/index.d.vue.ts +14 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Error/index.vue +68 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Error/index.vue.d.ts +14 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/ServerTool/index.d.vue.ts +10 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/ServerTool/index.vue +72 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/ServerTool/index.vue.d.ts +10 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Tool/index.d.vue.ts +13 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Tool/index.vue +37 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Tool/index.vue.d.ts +13 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Unknown/index.d.vue.ts +8 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Unknown/index.vue +17 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Unknown/index.vue.d.ts +8 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/User/index.d.vue.ts +11 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/User/index.vue +29 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/User/index.vue.d.ts +11 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/index.d.vue.ts +12 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/index.vue +30 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/index.vue.d.ts +12 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Thinking/index.d.vue.ts +3 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Thinking/index.vue +14 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Thinking/index.vue.d.ts +3 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/index.d.vue.ts +13 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/index.vue +46 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/index.vue.d.ts +13 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/ConversationList/index.d.vue.ts +15 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/ConversationList/index.vue +50 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/ConversationList/index.vue.d.ts +15 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/DebugGallery/index.d.vue.ts +3 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/DebugGallery/index.vue +160 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/DebugGallery/index.vue.d.ts +3 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/DropdownItem/index.d.vue.ts +12 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/DropdownItem/index.vue +15 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/DropdownItem/index.vue.d.ts +12 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/index.d.vue.ts +7 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/index.vue +67 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/index.vue.d.ts +7 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.d.vue.ts +23 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue +109 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue.d.ts +23 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/index.d.vue.ts +45 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/index.vue +120 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/index.vue.d.ts +45 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/PendingMutation/index.d.vue.ts +15 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/PendingMutation/index.vue +47 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/PendingMutation/index.vue.d.ts +15 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Plan/index.d.vue.ts +14 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Plan/index.vue +55 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Plan/index.vue.d.ts +14 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.d.vue.ts +25 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.vue +36 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.vue.d.ts +25 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/de.md +19 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/en.md +18 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/index.d.vue.ts +10 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/index.vue +44 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/index.vue.d.ts +10 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.d.vue.ts +58 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue +274 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue.d.ts +58 -0
- package/dist/modules/agent/runtime/app/features/agent/index.d.vue.ts +3 -0
- package/dist/modules/agent/runtime/app/features/agent/index.vue +162 -0
- package/dist/modules/agent/runtime/app/features/agent/index.vue.d.ts +3 -0
- package/dist/modules/agent/runtime/app/features/agent/types.d.ts +58 -0
- package/dist/modules/agent/runtime/app/features/agent/types.js +0 -0
- package/dist/modules/agent/runtime/app/helpers/index.d.ts +55 -0
- package/dist/modules/agent/runtime/app/helpers/index.js +88 -0
- package/dist/modules/agent/runtime/app/helpers/pageStructure.d.ts +5 -0
- package/dist/modules/agent/runtime/app/helpers/pageStructure.js +106 -0
- package/dist/modules/agent/runtime/app/helpers/validation.d.ts +35 -0
- package/dist/modules/agent/runtime/app/helpers/validation.js +77 -0
- package/dist/modules/agent/runtime/app/tools/add_content_search_paragraph/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/add_content_search_paragraph/index.js +69 -0
- package/dist/modules/agent/runtime/app/tools/add_fragment/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/add_fragment/index.js +83 -0
- package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.js +62 -0
- package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.js +289 -0
- package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.js +76 -0
- package/dist/modules/agent/runtime/app/tools/add_template/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/add_template/index.js +58 -0
- package/dist/modules/agent/runtime/app/tools/ask_question/Component.d.vue.ts +19 -0
- package/dist/modules/agent/runtime/app/tools/ask_question/Component.vue +113 -0
- package/dist/modules/agent/runtime/app/tools/ask_question/Component.vue.d.ts +19 -0
- package/dist/modules/agent/runtime/app/tools/ask_question/index.d.ts +17 -0
- package/dist/modules/agent/runtime/app/tools/ask_question/index.js +54 -0
- package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Component.d.vue.ts +29 -0
- package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Component.vue +190 -0
- package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Component.vue.d.ts +29 -0
- package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Item.d.vue.ts +20 -0
- package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Item.vue +90 -0
- package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Item.vue.d.ts +20 -0
- package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/index.d.ts +18 -0
- package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/index.js +55 -0
- package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.js +47 -0
- package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.js +47 -0
- package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.js +144 -0
- package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.js +180 -0
- package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.js +33 -0
- package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.js +93 -0
- package/dist/modules/agent/runtime/app/tools/get_available_bundles/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_available_bundles/index.js +104 -0
- package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.js +108 -0
- package/dist/modules/agent/runtime/app/tools/get_content_fields/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_content_fields/index.js +192 -0
- package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.js +102 -0
- package/dist/modules/agent/runtime/app/tools/get_page_structure/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_page_structure/index.js +113 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.js +275 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.js +63 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.js +180 -0
- package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.js +46 -0
- package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.js +54 -0
- package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.js +69 -0
- package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.js +95 -0
- package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.js +80 -0
- package/dist/modules/agent/runtime/app/tools/replace_media_field/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/replace_media_field/index.js +85 -0
- package/dist/modules/agent/runtime/app/tools/schemas.d.ts +128 -0
- package/dist/modules/agent/runtime/app/tools/schemas.js +242 -0
- package/dist/modules/agent/runtime/app/tools/search_content/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/search_content/index.js +65 -0
- package/dist/modules/agent/runtime/app/tools/search_media/index.d.ts +14 -0
- package/dist/modules/agent/runtime/app/tools/search_media/index.js +60 -0
- package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.js +75 -0
- package/dist/modules/agent/runtime/app/tools/search_templates/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/search_templates/index.js +51 -0
- package/dist/modules/agent/runtime/app/tools/search_text/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/search_text/index.js +114 -0
- package/dist/modules/agent/runtime/app/tools/select_media/Component.d.vue.ts +29 -0
- package/dist/modules/agent/runtime/app/tools/select_media/Component.vue +70 -0
- package/dist/modules/agent/runtime/app/tools/select_media/Component.vue.d.ts +29 -0
- package/dist/modules/agent/runtime/app/tools/select_media/index.d.ts +30 -0
- package/dist/modules/agent/runtime/app/tools/select_media/index.js +74 -0
- package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.js +109 -0
- package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.js +74 -0
- package/dist/modules/agent/runtime/app/tools/web_fetch/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/web_fetch/index.js +51 -0
- package/dist/modules/agent/runtime/app/types/index.d.ts +440 -0
- package/dist/modules/agent/runtime/app/types/index.js +51 -0
- package/dist/modules/agent/runtime/server/Session.d.ts +94 -0
- package/dist/modules/agent/runtime/server/Session.js +734 -0
- package/dist/modules/agent/runtime/server/SessionManager.d.ts +21 -0
- package/dist/modules/agent/runtime/server/SessionManager.js +80 -0
- package/dist/modules/agent/runtime/server/agent.d.ts +2 -0
- package/dist/modules/agent/runtime/server/agent.js +148 -0
- package/dist/modules/agent/runtime/server/agentPrompt.d.ts +22 -0
- package/dist/modules/agent/runtime/server/agentPrompt.js +53 -0
- package/dist/modules/agent/runtime/server/default-skills/adding-new-paragraphs.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-skills/adding-new-paragraphs.js +21 -0
- package/dist/modules/agent/runtime/server/default-skills/pageReview.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-skills/pageReview.js +28 -0
- package/dist/modules/agent/runtime/server/default-skills/reusable-paragraphs.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-skills/reusable-paragraphs.js +21 -0
- package/dist/modules/agent/runtime/server/default-skills/rewriteAndTranslate.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-skills/rewriteAndTranslate.js +14 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/architecture.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/architecture.js +39 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/available-skills.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/available-skills.js +18 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/available-tools.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/available-tools.js +18 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/fragments.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/fragments.js +19 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/important-rules.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/important-rules.js +22 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/interaction.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/interaction.js +20 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/introduction.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/introduction.js +14 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/page-context.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/page-context.js +60 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/paragraph-bundles.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/paragraph-bundles.js +37 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/plan-mode.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/plan-mode.js +36 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/security.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/security.js +27 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/workflow.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/workflow.js +22 -0
- package/dist/modules/agent/runtime/server/fetch.d.ts +2 -0
- package/dist/modules/agent/runtime/server/fetch.js +127 -0
- package/dist/modules/agent/runtime/server/helpers.d.ts +77 -0
- package/dist/modules/agent/runtime/server/helpers.js +352 -0
- package/dist/modules/agent/runtime/server/providers/anthropic.d.ts +12 -0
- package/dist/modules/agent/runtime/server/providers/anthropic.js +128 -0
- package/dist/modules/agent/runtime/server/providers/openai.d.ts +12 -0
- package/dist/modules/agent/runtime/server/providers/openai.js +165 -0
- package/dist/modules/agent/runtime/server/providers/types.d.ts +74 -0
- package/dist/modules/agent/runtime/server/providers/types.js +0 -0
- package/dist/modules/agent/runtime/server/server-tools/complete_plan_step/index.d.ts +3 -0
- package/dist/modules/agent/runtime/server/server-tools/complete_plan_step/index.js +79 -0
- package/dist/modules/agent/runtime/server/server-tools/create_plan/index.d.ts +9 -0
- package/dist/modules/agent/runtime/server/server-tools/create_plan/index.js +86 -0
- package/dist/modules/agent/runtime/server/server-tools/index.d.ts +86 -0
- package/dist/modules/agent/runtime/server/server-tools/index.js +30 -0
- package/dist/modules/agent/runtime/server/server-tools/load_skill/index.d.ts +7 -0
- package/dist/modules/agent/runtime/server/server-tools/load_skill/index.js +58 -0
- package/dist/modules/agent/runtime/server/server-tools/load_tools/index.d.ts +7 -0
- package/dist/modules/agent/runtime/server/server-tools/load_tools/index.js +43 -0
- package/dist/modules/agent/runtime/server/skills/defineBlokkliAgentSkill.d.ts +23 -0
- package/dist/modules/agent/runtime/server/skills/defineBlokkliAgentSkill.js +3 -0
- package/dist/modules/agent/runtime/server/skills/index.d.ts +2 -0
- package/dist/modules/agent/runtime/server/skills/index.js +1 -0
- package/dist/modules/agent/runtime/server/skills/types.d.ts +45 -0
- package/dist/modules/agent/runtime/server/skills/types.js +0 -0
- package/dist/modules/agent/runtime/server/system-prompts/defineBlokkliAgentSystemPrompt.d.ts +21 -0
- package/dist/modules/agent/runtime/server/system-prompts/defineBlokkliAgentSystemPrompt.js +3 -0
- package/dist/modules/agent/runtime/server/system-prompts/helpers.d.ts +20 -0
- package/dist/modules/agent/runtime/server/system-prompts/helpers.js +41 -0
- package/dist/modules/agent/runtime/server/system-prompts/index.d.ts +2 -0
- package/dist/modules/agent/runtime/server/system-prompts/index.js +1 -0
- package/dist/modules/agent/runtime/server/system-prompts/types.d.ts +49 -0
- package/dist/modules/agent/runtime/server/system-prompts/types.js +0 -0
- package/dist/modules/agent/runtime/shared/placeholders.d.ts +4 -0
- package/dist/modules/agent/runtime/shared/placeholders.js +1 -0
- package/dist/modules/agent/runtime/shared/types.d.ts +426 -0
- package/dist/modules/agent/runtime/shared/types.js +147 -0
- package/dist/modules/drupal/graphql/base/query.pbConfig.graphql +27 -2
- package/dist/modules/drupal/graphql/features/agent.graphql +69 -0
- package/dist/modules/drupal/graphql/features/search.graphql +5 -0
- package/dist/modules/drupal/graphql/features/templates.graphql +36 -2
- package/dist/modules/drupal/graphql/mutations/add_multiple.graphql +25 -0
- package/dist/modules/drupal/graphql/mutations/bulk_update_field_values.graphql +15 -0
- package/dist/modules/drupal/graphql/mutations/rearrange.graphql +23 -0
- package/dist/modules/drupal/graphql/mutations/replace_entity_reference.graphql +25 -0
- package/dist/modules/drupal/graphql/mutations/swap.graphql +16 -0
- package/dist/modules/drupal/index.d.mts +18 -2
- package/dist/modules/drupal/index.mjs +60 -12
- package/dist/modules/drupal/runtime/adapter/index.js +246 -21
- package/dist/modules/drupal/runtime/components/BlokkliDrupalEditTemplate/index.d.vue.ts +9 -0
- package/dist/modules/drupal/runtime/components/BlokkliDrupalEditTemplate/index.vue +26 -0
- package/dist/modules/drupal/runtime/components/BlokkliDrupalEditTemplate/index.vue.d.ts +9 -0
- package/dist/runtime/components/Blocks/Fragment/index.vue +11 -2
- package/dist/runtime/components/BlokkliItem.vue +3 -1
- package/dist/runtime/composables/defineBlokkli.js +1 -3
- package/dist/runtime/composables/defineBlokkliFeature.d.ts +5 -3
- package/dist/runtime/composables/defineBlokkliFeature.js +2 -1
- package/dist/runtime/composables/defineBlokkliProvider.js +1 -3
- package/dist/runtime/editor/adapter/index.d.ts +45 -4
- package/dist/runtime/editor/adapter/index.js +3 -0
- package/dist/runtime/editor/components/Actions/ItemDropdown.vue +6 -1
- package/dist/runtime/editor/components/Actions/index.vue +4 -1
- package/dist/runtime/editor/components/AddListItem/index.d.vue.ts +9 -1
- package/dist/runtime/editor/components/AddListItem/index.vue +36 -2
- package/dist/runtime/editor/components/AddListItem/index.vue.d.ts +9 -1
- package/dist/runtime/editor/components/AnimationCanvas/index.vue +17 -7
- package/dist/runtime/editor/components/ArtboardTooltip/index.d.vue.ts +3 -1
- package/dist/runtime/editor/components/ArtboardTooltip/index.vue +4 -3
- package/dist/runtime/editor/components/ArtboardTooltip/index.vue.d.ts +3 -1
- package/dist/runtime/editor/components/AutoHeight/index.d.vue.ts +16 -0
- package/dist/runtime/editor/components/AutoHeight/index.vue +32 -0
- package/dist/runtime/editor/components/AutoHeight/index.vue.d.ts +16 -0
- package/dist/runtime/editor/components/BlockPreviewItem/index.d.vue.ts +5 -1
- package/dist/runtime/editor/components/BlockPreviewItem/index.vue +10 -7
- package/dist/runtime/editor/components/BlockPreviewItem/index.vue.d.ts +5 -1
- package/dist/runtime/editor/components/DiffViewer/DiffValue.d.vue.ts +7 -0
- package/dist/runtime/editor/components/DiffViewer/DiffValue.vue +21 -0
- package/dist/runtime/editor/components/DiffViewer/DiffValue.vue.d.ts +7 -0
- package/dist/runtime/editor/components/DiffViewer/State.vue +4 -9
- package/dist/runtime/editor/components/EditProvider.vue +25 -4
- package/dist/runtime/editor/components/FeaturesRenderer/index.vue +26 -8
- package/dist/runtime/editor/components/FlexTextarea/index.d.vue.ts +31 -0
- package/dist/runtime/editor/components/FlexTextarea/index.vue +179 -0
- package/dist/runtime/editor/components/FlexTextarea/index.vue.d.ts +31 -0
- package/dist/runtime/editor/components/Form/Text/index.vue +23 -11
- package/dist/runtime/editor/components/Form/Toggle/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/Form/Toggle/index.vue +7 -3
- package/dist/runtime/editor/components/Form/Toggle/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/Icon/index.vue +3 -1
- package/dist/runtime/editor/components/Indicators/index.vue +20 -10
- package/dist/runtime/editor/components/ItemIcon/index.d.vue.ts +3 -0
- package/dist/runtime/editor/components/ItemIcon/index.vue +3 -2
- package/dist/runtime/editor/components/ItemIcon/index.vue.d.ts +3 -0
- package/dist/runtime/editor/components/ItemIconBox/index.vue +4 -1
- package/dist/runtime/editor/components/NestedEditorOverlay/index.d.vue.ts +3 -1
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +150 -71
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue.d.ts +3 -1
- package/dist/runtime/editor/components/PluginConfigForm/index.vue +6 -2
- package/dist/runtime/editor/components/RelativeTime/index.d.vue.ts +3 -2
- package/dist/runtime/editor/components/RelativeTime/index.vue +21 -7
- package/dist/runtime/editor/components/RelativeTime/index.vue.d.ts +3 -2
- package/dist/runtime/editor/components/StatusIcon/index.d.vue.ts +9 -0
- package/dist/runtime/editor/components/StatusIcon/index.vue +31 -0
- package/dist/runtime/editor/components/StatusIcon/index.vue.d.ts +9 -0
- package/dist/runtime/editor/components/SystemRequirements/index.vue +5 -1
- package/dist/runtime/editor/components/Transition/Height.vue +3 -2
- 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 +10 -6
- package/dist/runtime/editor/components/index.js +19 -11
- package/dist/runtime/editor/composables/index.d.ts +2 -0
- package/dist/runtime/editor/composables/index.js +2 -0
- package/dist/runtime/editor/composables/onElementResize.d.ts +3 -0
- package/dist/runtime/editor/composables/onElementResize.js +37 -0
- package/dist/runtime/editor/composables/useEditableFieldOverride.d.ts +24 -0
- package/dist/runtime/editor/composables/useEditableFieldOverride.js +130 -0
- package/dist/runtime/editor/composables/useStickyToolbar.d.ts +4 -3
- package/dist/runtime/editor/composables/useStickyToolbar.js +26 -10
- package/dist/runtime/editor/css/output.css +1 -1
- package/dist/runtime/editor/events/index.d.ts +31 -0
- package/dist/runtime/editor/features/add-list/Actions/Action.d.vue.ts +8 -1
- package/dist/runtime/editor/features/add-list/Actions/Action.vue +7 -1
- package/dist/runtime/editor/features/add-list/Actions/Action.vue.d.ts +8 -1
- package/dist/runtime/editor/features/add-list/Actions/index.d.vue.ts +11 -1
- package/dist/runtime/editor/features/add-list/Actions/index.vue +30 -10
- package/dist/runtime/editor/features/add-list/Actions/index.vue.d.ts +11 -1
- package/dist/runtime/editor/features/add-list/Blocks/index.d.vue.ts +11 -2
- package/dist/runtime/editor/features/add-list/Blocks/index.vue +27 -1
- package/dist/runtime/editor/features/add-list/Blocks/index.vue.d.ts +11 -2
- package/dist/runtime/editor/features/add-list/Help/Item.d.vue.ts +12 -0
- package/dist/runtime/editor/features/add-list/Help/Item.vue +186 -0
- package/dist/runtime/editor/features/add-list/Help/Item.vue.d.ts +12 -0
- package/dist/runtime/editor/features/add-list/Help/index.d.vue.ts +13 -0
- package/dist/runtime/editor/features/add-list/Help/index.vue +127 -0
- package/dist/runtime/editor/features/add-list/Help/index.vue.d.ts +13 -0
- package/dist/runtime/editor/features/add-list/docs.md +2 -2
- package/dist/runtime/editor/features/add-list/index.vue +108 -9
- package/dist/runtime/editor/features/add-list/types.d.ts +5 -0
- package/dist/runtime/editor/features/analyze/Main.vue +4 -1
- package/dist/runtime/editor/features/analyze/Summary/Chart.vue +9 -9
- package/dist/runtime/editor/features/analyze/index.vue +2 -14
- package/dist/runtime/editor/features/analyze/types.d.ts +4 -1
- package/dist/runtime/editor/features/artboard/Renderer.vue +43 -0
- package/dist/runtime/editor/features/assistant/docs.md +5 -5
- package/dist/runtime/editor/features/breadcrumbs/index.vue +4 -1
- package/dist/runtime/editor/features/clipboard/index.vue +6 -2
- package/dist/runtime/editor/features/comments/index.vue +1 -0
- package/dist/runtime/editor/features/comments/types.d.ts +6 -0
- package/dist/runtime/editor/features/dragging-overlay/DragItems/DragItem.d.vue.ts +1 -0
- package/dist/runtime/editor/features/dragging-overlay/DragItems/DragItem.vue +6 -31
- package/dist/runtime/editor/features/dragging-overlay/DragItems/DragItem.vue.d.ts +1 -0
- package/dist/runtime/editor/features/dragging-overlay/DragItems/index.d.vue.ts +2 -1
- package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +42 -18
- package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue.d.ts +2 -1
- package/dist/runtime/editor/features/dragging-overlay/Renderer/fragment.glsl +77 -2
- package/dist/runtime/editor/features/dragging-overlay/Renderer/index.d.vue.ts +1 -0
- package/dist/runtime/editor/features/dragging-overlay/Renderer/index.vue +143 -52
- package/dist/runtime/editor/features/dragging-overlay/Renderer/index.vue.d.ts +1 -0
- package/dist/runtime/editor/features/dragging-overlay/Renderer/vertex.glsl +84 -31
- package/dist/runtime/editor/features/dragging-overlay/index.vue +3 -2
- package/dist/runtime/editor/features/edit/index.vue +7 -1
- package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue +13 -23
- package/dist/runtime/editor/features/editable-field/Overlay/index.vue +10 -102
- package/dist/runtime/editor/features/editable-field/types.d.ts +12 -2
- package/dist/runtime/editor/features/entity-title/index.vue +7 -7
- package/dist/runtime/editor/features/fragments/index.vue +1 -1
- package/dist/runtime/editor/features/import-existing/Dialog/index.vue +8 -13
- package/dist/runtime/editor/features/library/ReusableDialog/index.vue +6 -1
- package/dist/runtime/editor/features/library/index.vue +14 -5
- package/dist/runtime/editor/features/library/types.d.ts +6 -0
- package/dist/runtime/editor/features/media-library/Library/Item.d.vue.ts +2 -2
- package/dist/runtime/editor/features/media-library/Library/Item.vue +17 -1
- package/dist/runtime/editor/features/media-library/Library/Item.vue.d.ts +2 -2
- package/dist/runtime/editor/features/media-library/Library/index.vue +6 -1
- package/dist/runtime/editor/features/media-library/index.vue +4 -4
- package/dist/runtime/editor/features/options/Form/index.vue +11 -43
- package/dist/runtime/editor/features/ownership/Banner/index.d.vue.ts +6 -3
- package/dist/runtime/editor/features/ownership/Banner/index.vue +10 -1
- package/dist/runtime/editor/features/ownership/Banner/index.vue.d.ts +6 -3
- package/dist/runtime/editor/features/ownership/index.vue +18 -6
- package/dist/runtime/editor/features/ownership/types.d.ts +5 -0
- package/dist/runtime/editor/features/publish/index.vue +5 -1
- package/dist/runtime/editor/features/search/Overlay/index.vue +5 -2
- package/dist/runtime/editor/features/search/index.vue +64 -3
- package/dist/runtime/editor/features/search/types.d.ts +16 -1
- package/dist/runtime/editor/features/selection/AddButtons/Renderer/index.vue +1 -3
- package/dist/runtime/editor/features/selection/AddButtons/index.vue +24 -4
- package/dist/runtime/editor/features/selection/Renderer/index.vue +5 -1
- package/dist/runtime/editor/features/selection/index.vue +5 -1
- package/dist/runtime/editor/features/settings/Dialog/index.vue +3 -1
- package/dist/runtime/editor/features/settings/index.vue +4 -1
- package/dist/runtime/editor/features/templates/CreateDialog/index.vue +21 -2
- package/dist/runtime/editor/features/templates/Dialog/Item/index.d.vue.ts +1 -1
- package/dist/runtime/editor/features/templates/Dialog/Item/index.vue +3 -3
- package/dist/runtime/editor/features/templates/Dialog/Item/index.vue.d.ts +1 -1
- package/dist/runtime/editor/features/templates/Dialog/index.vue +21 -5
- package/dist/runtime/editor/features/templates/ManageDialog/Item.d.vue.ts +8 -0
- package/dist/runtime/editor/features/templates/ManageDialog/Item.vue +147 -0
- package/dist/runtime/editor/features/templates/ManageDialog/Item.vue.d.ts +8 -0
- package/dist/runtime/editor/features/templates/ManageDialog/index.vue +30 -107
- package/dist/runtime/editor/features/templates/index.vue +7 -5
- package/dist/runtime/editor/features/templates/types.d.ts +11 -2
- package/dist/runtime/editor/features/transform/Dialog/index.vue +6 -1
- package/dist/runtime/editor/features/transform/index.vue +25 -20
- package/dist/runtime/editor/features/transform/types.d.ts +6 -4
- package/dist/runtime/editor/features/validations/index.vue +6 -1
- package/dist/runtime/editor/helpers/date/index.d.ts +1 -0
- package/dist/runtime/editor/helpers/date/index.js +3 -0
- package/dist/runtime/editor/helpers/options/index.d.ts +20 -0
- package/dist/runtime/editor/helpers/options/index.js +60 -0
- package/dist/runtime/editor/helpers/webgl/index.d.ts +5 -1
- package/dist/runtime/editor/helpers/webgl/index.js +45 -13
- package/dist/runtime/editor/icons/svg/stars.svg +1 -0
- package/dist/runtime/editor/plugins/Sidebar/Detached/index.d.vue.ts +1 -1
- package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue +13 -10
- package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue.d.ts +1 -1
- package/dist/runtime/editor/plugins/Sidebar/index.d.vue.ts +3 -1
- package/dist/runtime/editor/plugins/Sidebar/index.vue +14 -2
- package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +3 -1
- package/dist/runtime/editor/providers/adapters.d.ts +33 -0
- package/dist/runtime/editor/providers/adapters.js +88 -0
- package/dist/runtime/editor/providers/animation.js +3 -0
- package/dist/runtime/editor/providers/definition.d.ts +8 -1
- package/dist/runtime/editor/providers/definition.js +7 -3
- package/dist/runtime/editor/providers/dom.d.ts +7 -0
- package/dist/runtime/editor/providers/dom.js +12 -0
- package/dist/runtime/editor/providers/permissions.d.ts +6 -0
- package/dist/runtime/editor/providers/permissions.js +9 -0
- package/dist/runtime/editor/providers/plugin.d.ts +1 -0
- package/dist/runtime/editor/providers/state.js +1 -0
- package/dist/runtime/editor/providers/texts.js +20 -6
- package/dist/runtime/editor/providers/types.d.ts +7 -0
- package/dist/runtime/editor/providers/types.js +4 -0
- package/dist/runtime/editor/providers/ui.d.ts +40 -0
- package/dist/runtime/editor/providers/ui.js +27 -1
- package/dist/runtime/editor/translations/de.json +2738 -0
- package/dist/runtime/editor/translations/fr.json +2738 -0
- package/dist/runtime/editor/translations/gsw_CH.json +2738 -0
- package/dist/runtime/editor/translations/it.json +2738 -0
- package/dist/runtime/editor/types/app.d.ts +9 -2
- package/dist/runtime/editor/types/definitions.d.ts +5 -0
- package/dist/runtime/editor/types/features.d.ts +3 -1
- package/dist/runtime/editor/types/permissions.d.ts +17 -0
- package/dist/runtime/editor/types/permissions.js +0 -0
- package/dist/runtime/helpers/runtimeHelpers/index.d.ts +2 -1
- package/dist/runtime/helpers/runtimeHelpers/index.js +44 -6
- package/dist/runtime/types/index.d.ts +6 -0
- package/dist/shared/editor.CGf7C_0M.mjs +10 -0
- package/dist/shared/editor.DMFfaLVE.mjs +175 -0
- package/dist/shared/{editor.BKQCh70G.d.mts → editor.Iax3GCvt.d.mts} +94 -40
- package/dist/types.d.mts +7 -1
- package/package.json +29 -7
- package/dist/runtime/css/output.css +0 -1
- package/dist/runtime/material-icons/index.d.ts +0 -12
- package/dist/runtime/material-icons/index.js +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ItemUser v-if="item.type === 'user'" v-bind="item" />
|
|
3
|
+
<ItemAssistant v-else-if="item.type === 'assistant'" v-bind="item" />
|
|
4
|
+
<ItemTool
|
|
5
|
+
v-else-if="item.type === 'tool'"
|
|
6
|
+
v-bind="item"
|
|
7
|
+
:is-active="isActive"
|
|
8
|
+
/>
|
|
9
|
+
<ItemServerTool v-else-if="item.type === 'server_tool'" v-bind="item" />
|
|
10
|
+
<ItemError
|
|
11
|
+
v-else-if="item.type === 'error'"
|
|
12
|
+
v-bind="item"
|
|
13
|
+
@retry="emit('retry')"
|
|
14
|
+
/>
|
|
15
|
+
<ItemUnknown v-else-if="item.type === 'unknown'" v-bind="item" />
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script setup>
|
|
19
|
+
import ItemUser from "./User/index.vue";
|
|
20
|
+
import ItemAssistant from "./Assistant/index.vue";
|
|
21
|
+
import ItemTool from "./Tool/index.vue";
|
|
22
|
+
import ItemServerTool from "./ServerTool/index.vue";
|
|
23
|
+
import ItemError from "./Error/index.vue";
|
|
24
|
+
import ItemUnknown from "./Unknown/index.vue";
|
|
25
|
+
defineProps({
|
|
26
|
+
item: { type: null, required: true },
|
|
27
|
+
isActive: { type: Boolean, required: false }
|
|
28
|
+
});
|
|
29
|
+
const emit = defineEmits(["retry"]);
|
|
30
|
+
</script>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ConversationItem } from '#blokkli/agent/app/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
item: ConversationItem;
|
|
4
|
+
isActive?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
retry: () => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onRetry?: (() => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Thinking/index.d.vue.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bk-agent-message bk-is-assistant bk-agent-assistant-bubble">
|
|
3
|
+
<div class="bk-agent-thinking">
|
|
4
|
+
<Icon name="loader" />
|
|
5
|
+
<span>{{ $t("aiAgentThinking", "Thinking...") }}</span>
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script setup>
|
|
11
|
+
import { Icon } from "#blokkli/editor/components";
|
|
12
|
+
import { useBlokkli } from "#imports";
|
|
13
|
+
const { $t } = useBlokkli();
|
|
14
|
+
</script>
|
package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Thinking/index.vue.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ConversationItem, ActiveItem } from '#blokkli/agent/app/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
history: ConversationItem[];
|
|
4
|
+
activeItem: ActiveItem | null;
|
|
5
|
+
isThinking: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
retry: () => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onRetry?: (() => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bk-agent-conversation" @click="onClick">
|
|
3
|
+
<ConversationItemComponent
|
|
4
|
+
v-for="item in history"
|
|
5
|
+
:key="item.id"
|
|
6
|
+
:item="item"
|
|
7
|
+
@retry="emit('retry')"
|
|
8
|
+
/>
|
|
9
|
+
<ConversationItemComponent
|
|
10
|
+
v-if="activeItem"
|
|
11
|
+
:key="activeItem.id"
|
|
12
|
+
:item="activeItem"
|
|
13
|
+
is-active
|
|
14
|
+
/>
|
|
15
|
+
<Thinking v-if="isThinking" />
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup>
|
|
20
|
+
import ConversationItemComponent from "./Item/index.vue";
|
|
21
|
+
import Thinking from "./Thinking/index.vue";
|
|
22
|
+
import { useBlokkli } from "#imports";
|
|
23
|
+
defineProps({
|
|
24
|
+
history: { type: Array, required: true },
|
|
25
|
+
activeItem: { type: null, required: true },
|
|
26
|
+
isThinking: { type: Boolean, required: true }
|
|
27
|
+
});
|
|
28
|
+
const emit = defineEmits(["retry"]);
|
|
29
|
+
const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
30
|
+
const { eventBus, dom, blocks } = useBlokkli();
|
|
31
|
+
function onClick(e) {
|
|
32
|
+
const target = e.target;
|
|
33
|
+
if (target.tagName !== "A") return;
|
|
34
|
+
const href = target.getAttribute("href");
|
|
35
|
+
if (!href || !href.startsWith("#")) return;
|
|
36
|
+
const uuid = href.slice(1);
|
|
37
|
+
if (!UUID_REGEX.test(uuid)) return;
|
|
38
|
+
e.preventDefault();
|
|
39
|
+
eventBus.emit("scrollIntoView", { uuid, center: true });
|
|
40
|
+
const block = blocks.getBlock(uuid);
|
|
41
|
+
if (!block) return;
|
|
42
|
+
const element = dom.getDragElement(block);
|
|
43
|
+
if (!element) return;
|
|
44
|
+
eventBus.emit("highlight", element);
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ConversationItem, ActiveItem } from '#blokkli/agent/app/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
history: ConversationItem[];
|
|
4
|
+
activeItem: ActiveItem | null;
|
|
5
|
+
isThinking: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
retry: () => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onRetry?: (() => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AgentConversationSummary } from '#blokkli/agent/app/composables';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
conversations: AgentConversationSummary[];
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
switch: (id: string) => any;
|
|
7
|
+
delete: (id: string) => any;
|
|
8
|
+
close: () => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onSwitch?: ((id: string) => any) | undefined;
|
|
11
|
+
onDelete?: ((id: string) => any) | undefined;
|
|
12
|
+
onClose?: (() => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bk-agent-conversation-list">
|
|
3
|
+
<div class="bk-agent-conversation-list-header">
|
|
4
|
+
<span>{{ $t("aiAgentPastConversations", "Past conversations") }}</span>
|
|
5
|
+
<button @click="emit('close')">
|
|
6
|
+
<Icon name="bk_mdi_close" />
|
|
7
|
+
</button>
|
|
8
|
+
</div>
|
|
9
|
+
<div
|
|
10
|
+
v-if="conversations.length"
|
|
11
|
+
class="bk-agent-conversation-list-items bk-scrollbar-light"
|
|
12
|
+
>
|
|
13
|
+
<div
|
|
14
|
+
v-for="conv in conversations"
|
|
15
|
+
:key="conv.uuid"
|
|
16
|
+
class="bk-agent-conversation-list-item"
|
|
17
|
+
@click="emit('switch', conv.uuid)"
|
|
18
|
+
>
|
|
19
|
+
<div class="bk-agent-conversation-list-item-content">
|
|
20
|
+
<div class="bk-agent-conversation-list-item-text">
|
|
21
|
+
{{ conv.title }}
|
|
22
|
+
</div>
|
|
23
|
+
<span class="bk-agent-conversation-list-item-time">
|
|
24
|
+
<RelativeTime :timestamp="conv.updatedAt" />
|
|
25
|
+
</span>
|
|
26
|
+
</div>
|
|
27
|
+
<button
|
|
28
|
+
class="bk-agent-conversation-list-item-delete"
|
|
29
|
+
:title="$t('aiAgentDeleteConversation', 'Delete conversation')"
|
|
30
|
+
@click.stop="emit('delete', conv.uuid)"
|
|
31
|
+
>
|
|
32
|
+
<Icon name="bk_mdi_delete" />
|
|
33
|
+
</button>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<div v-else class="bk-agent-conversation-list-empty">
|
|
37
|
+
{{ $t("aiAgentNoConversations", "No past conversations.") }}
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<script setup>
|
|
43
|
+
import { useBlokkli } from "#imports";
|
|
44
|
+
import { Icon, RelativeTime } from "#blokkli/editor/components";
|
|
45
|
+
defineProps({
|
|
46
|
+
conversations: { type: Array, required: true }
|
|
47
|
+
});
|
|
48
|
+
const emit = defineEmits(["switch", "delete", "close"]);
|
|
49
|
+
const { $t } = useBlokkli();
|
|
50
|
+
</script>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AgentConversationSummary } from '#blokkli/agent/app/composables';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
conversations: AgentConversationSummary[];
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
switch: (id: string) => any;
|
|
7
|
+
delete: (id: string) => any;
|
|
8
|
+
close: () => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onSwitch?: ((id: string) => any) | undefined;
|
|
11
|
+
onDelete?: ((id: string) => any) | undefined;
|
|
12
|
+
onClose?: (() => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bk-agent-debug-gallery">
|
|
3
|
+
<h3>Conversation</h3>
|
|
4
|
+
<Conversation
|
|
5
|
+
:history="mockHistory"
|
|
6
|
+
:active-item="mockActiveItem"
|
|
7
|
+
:is-thinking="false"
|
|
8
|
+
/>
|
|
9
|
+
|
|
10
|
+
<h3>Pending Mutations</h3>
|
|
11
|
+
<PendingMutation
|
|
12
|
+
v-for="action in mockMutations"
|
|
13
|
+
:key="action.type"
|
|
14
|
+
:action="action"
|
|
15
|
+
@approve="() => {
|
|
16
|
+
}"
|
|
17
|
+
@reject="() => {
|
|
18
|
+
}"
|
|
19
|
+
@always-approve="() => {
|
|
20
|
+
}"
|
|
21
|
+
/>
|
|
22
|
+
|
|
23
|
+
<h3>Tool Components</h3>
|
|
24
|
+
<template v-for="tool in toolsWithMockParams" :key="tool.name">
|
|
25
|
+
<component
|
|
26
|
+
:is="tool.component"
|
|
27
|
+
:context="mockContext"
|
|
28
|
+
:params="tool.mockParams()"
|
|
29
|
+
@done="() => {
|
|
30
|
+
}"
|
|
31
|
+
/>
|
|
32
|
+
<component
|
|
33
|
+
:is="tool.component"
|
|
34
|
+
v-for="(variant, i) in tool.mockParamsVariants?.() ?? []"
|
|
35
|
+
:key="`${tool.name}-variant-${i}`"
|
|
36
|
+
:context="mockContext"
|
|
37
|
+
:params="variant"
|
|
38
|
+
@done="() => {
|
|
39
|
+
}"
|
|
40
|
+
/>
|
|
41
|
+
</template>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script setup>
|
|
46
|
+
import { computed } from "#imports";
|
|
47
|
+
import Conversation from "../Conversation/index.vue";
|
|
48
|
+
import PendingMutation from "../PendingMutation/index.vue";
|
|
49
|
+
import { mcpTools } from "#blokkli-build/agent-client";
|
|
50
|
+
import { isToolDefinition } from "#blokkli/agent/app/helpers";
|
|
51
|
+
const mockContext = {
|
|
52
|
+
app: null,
|
|
53
|
+
itemEntityType: "paragraph",
|
|
54
|
+
adapter: {}
|
|
55
|
+
};
|
|
56
|
+
const mockHistory = [
|
|
57
|
+
{
|
|
58
|
+
type: "user",
|
|
59
|
+
id: "msg-1",
|
|
60
|
+
content: "Add a new text block with a welcome message to the hero section.",
|
|
61
|
+
timestamp: Date.now() - 12e4
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
type: "tool",
|
|
65
|
+
id: "call-1",
|
|
66
|
+
callId: "call-1",
|
|
67
|
+
tool: "get_child_blocks",
|
|
68
|
+
label: "Get child blocks",
|
|
69
|
+
status: "success",
|
|
70
|
+
timestamp: Date.now() - 118e3
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
type: "tool",
|
|
74
|
+
id: "call-2",
|
|
75
|
+
callId: "call-2",
|
|
76
|
+
tool: "add_block",
|
|
77
|
+
label: "Add block",
|
|
78
|
+
status: "success",
|
|
79
|
+
timestamp: Date.now() - 116e3
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
type: "assistant",
|
|
83
|
+
id: "msg-2",
|
|
84
|
+
content: "I've added a text block with a welcome message to your hero section.",
|
|
85
|
+
timestamp: Date.now() - 115e3
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
type: "user",
|
|
89
|
+
id: "msg-3",
|
|
90
|
+
content: "Now delete the old introduction block.",
|
|
91
|
+
timestamp: Date.now() - 9e4
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
type: "tool",
|
|
95
|
+
id: "call-3",
|
|
96
|
+
callId: "call-3",
|
|
97
|
+
tool: "delete_block",
|
|
98
|
+
label: "Delete block",
|
|
99
|
+
status: "error",
|
|
100
|
+
timestamp: Date.now() - 88e3
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
type: "assistant",
|
|
104
|
+
id: "msg-4",
|
|
105
|
+
content: "I tried to delete the block but encountered an error.",
|
|
106
|
+
timestamp: Date.now() - 85e3
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
type: "user",
|
|
110
|
+
id: "msg-5",
|
|
111
|
+
content: "Can you rewrite the title and move the card block?",
|
|
112
|
+
timestamp: Date.now() - 6e4
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
type: "tool",
|
|
116
|
+
id: "call-4",
|
|
117
|
+
callId: "call-4",
|
|
118
|
+
tool: "batch_rewrite_text",
|
|
119
|
+
label: "Rewrite text",
|
|
120
|
+
status: "success",
|
|
121
|
+
timestamp: Date.now() - 58e3
|
|
122
|
+
}
|
|
123
|
+
];
|
|
124
|
+
const mockActiveItem = {
|
|
125
|
+
type: "tool",
|
|
126
|
+
id: "call-5",
|
|
127
|
+
callId: "call-5",
|
|
128
|
+
tool: "move_block",
|
|
129
|
+
label: "Move block after hero section",
|
|
130
|
+
status: "active",
|
|
131
|
+
timestamp: Date.now() - 55e3
|
|
132
|
+
};
|
|
133
|
+
const mockMutations = [
|
|
134
|
+
{
|
|
135
|
+
type: "add",
|
|
136
|
+
label: "Add image block to content field",
|
|
137
|
+
apply: () => void 0
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
type: "delete",
|
|
141
|
+
label: 'Delete text block "Introduction"',
|
|
142
|
+
apply: () => void 0
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
type: "move",
|
|
146
|
+
label: "Move card block after hero section",
|
|
147
|
+
apply: () => void 0
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
type: "rewrite",
|
|
151
|
+
label: "Rewrite title field content",
|
|
152
|
+
apply: () => void 0
|
|
153
|
+
}
|
|
154
|
+
];
|
|
155
|
+
const toolsWithMockParams = computed(
|
|
156
|
+
() => mcpTools.filter(isToolDefinition).filter(
|
|
157
|
+
(tool) => !!tool.component && !!tool.mockParams
|
|
158
|
+
)
|
|
159
|
+
);
|
|
160
|
+
</script>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BlokkliIcon } from '#blokkli-build/icons';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
icon: BlokkliIcon;
|
|
4
|
+
text: string;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
click: () => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onClick?: (() => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/DropdownItem/index.vue
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button @click="$emit('click')">
|
|
3
|
+
<Icon :name="icon" />
|
|
4
|
+
<span>{{ text }}</span>
|
|
5
|
+
</button>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script setup>
|
|
9
|
+
import { Icon } from "#blokkli/editor/components";
|
|
10
|
+
defineProps({
|
|
11
|
+
icon: { type: null, required: true },
|
|
12
|
+
text: { type: String, required: true }
|
|
13
|
+
});
|
|
14
|
+
defineEmits(["click"]);
|
|
15
|
+
</script>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BlokkliIcon } from '#blokkli-build/icons';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
icon: BlokkliIcon;
|
|
4
|
+
text: string;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
click: () => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onClick?: (() => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/index.d.vue.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { UsageTurn } from '#blokkli/agent/shared/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
usageTurns: UsageTurn[];
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/index.vue
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bk-agent-token-usage">
|
|
3
|
+
<ul>
|
|
4
|
+
<li
|
|
5
|
+
:title="
|
|
6
|
+
$t('aiAgentTokensInput', 'Tokens used to send context to the AI')
|
|
7
|
+
"
|
|
8
|
+
>
|
|
9
|
+
<div>{{ $t("aiAgentTokensInputLabel", "Input") }}</div>
|
|
10
|
+
<div>
|
|
11
|
+
{{ ui.formatNumber(totals.inputTokens) }}
|
|
12
|
+
</div>
|
|
13
|
+
</li>
|
|
14
|
+
<li class="bk-is-separator" />
|
|
15
|
+
<li :title="$t('aiAgentTokensCached', 'Reused input tokens (cheaper)')">
|
|
16
|
+
<div>{{ $t("aiAgentTokensCachedLabel", "Cached") }}</div>
|
|
17
|
+
<div>
|
|
18
|
+
{{ ui.formatNumber(totals.cacheReadInputTokens) }}
|
|
19
|
+
</div>
|
|
20
|
+
</li>
|
|
21
|
+
<li class="bk-is-separator" />
|
|
22
|
+
<li
|
|
23
|
+
:title="
|
|
24
|
+
$t('aiAgentTokensOutput', 'Tokens generated by the AI in responses')
|
|
25
|
+
"
|
|
26
|
+
>
|
|
27
|
+
<div>{{ $t("aiAgentTokensOutputLabel", "Output") }}</div>
|
|
28
|
+
<div>{{ ui.formatNumber(totals.outputTokens) }}</div>
|
|
29
|
+
</li>
|
|
30
|
+
<li class="bk-is-separator" />
|
|
31
|
+
<li
|
|
32
|
+
:title="$t('aiAgentTokensCost', 'Estimated cost for this conversation')"
|
|
33
|
+
>
|
|
34
|
+
<div>{{ $t("aiAgentTokensCostLabel", "Cost") }}</div>
|
|
35
|
+
<div>{{ totals.cost }}</div>
|
|
36
|
+
</li>
|
|
37
|
+
</ul>
|
|
38
|
+
</div>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<script setup>
|
|
42
|
+
import { computed, useBlokkli } from "#imports";
|
|
43
|
+
const props = defineProps({
|
|
44
|
+
usageTurns: { type: Array, required: true }
|
|
45
|
+
});
|
|
46
|
+
const { $t, ui } = useBlokkli();
|
|
47
|
+
const totals = computed(() => {
|
|
48
|
+
let inputTokens = 0;
|
|
49
|
+
let outputTokens = 0;
|
|
50
|
+
let cacheReadInputTokens = 0;
|
|
51
|
+
let cost = 0;
|
|
52
|
+
for (const turn of props.usageTurns) {
|
|
53
|
+
inputTokens += turn.inputTokens;
|
|
54
|
+
outputTokens += turn.outputTokens;
|
|
55
|
+
cacheReadInputTokens += turn.cacheReadInputTokens;
|
|
56
|
+
if (turn.pricing) {
|
|
57
|
+
cost += (turn.inputTokens * turn.pricing.input + turn.cacheCreationInputTokens * turn.pricing.cacheWrite + turn.cacheReadInputTokens * turn.pricing.cacheRead + turn.outputTokens * turn.pricing.output) / 1e6;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
inputTokens,
|
|
62
|
+
outputTokens,
|
|
63
|
+
cacheReadInputTokens,
|
|
64
|
+
cost: ui.formatPrice(cost)
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
</script>
|
package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/index.vue.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { UsageTurn } from '#blokkli/agent/shared/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
usageTurns: UsageTurn[];
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { UsageTurn } from '#blokkli/agent/shared/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
isProcessing: boolean;
|
|
4
|
+
isConnected: boolean;
|
|
5
|
+
canSubmit: boolean;
|
|
6
|
+
hasText: boolean;
|
|
7
|
+
usageTurns: UsageTurn[];
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
cancel: () => any;
|
|
11
|
+
submit: () => any;
|
|
12
|
+
"new-conversation": () => any;
|
|
13
|
+
"show-transcript": () => any;
|
|
14
|
+
"show-conversations": () => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
onCancel?: (() => any) | undefined;
|
|
17
|
+
onSubmit?: (() => any) | undefined;
|
|
18
|
+
"onNew-conversation"?: (() => any) | undefined;
|
|
19
|
+
"onShow-transcript"?: (() => any) | undefined;
|
|
20
|
+
"onShow-conversations"?: (() => any) | undefined;
|
|
21
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bk-agent-input-actions">
|
|
3
|
+
<div class="bk-agent-input-actions-left">
|
|
4
|
+
<div ref="menuContainer">
|
|
5
|
+
<button
|
|
6
|
+
class="bk-button bk-is-white bk-is-small bk-is-icon-only"
|
|
7
|
+
:title="$t('aiAgentMoreOptions', 'More options')"
|
|
8
|
+
:disabled="!isConnected"
|
|
9
|
+
@click="showMenu = !showMenu"
|
|
10
|
+
>
|
|
11
|
+
<Icon name="bk_mdi_more_horiz" />
|
|
12
|
+
</button>
|
|
13
|
+
<BlokkliTransition name="drop-up">
|
|
14
|
+
<div v-if="showMenu" class="bk-agent-more-dropdown">
|
|
15
|
+
<TokenUsage :usage-turns />
|
|
16
|
+
<hr />
|
|
17
|
+
<DropdownItem
|
|
18
|
+
icon="bk_mdi_add"
|
|
19
|
+
:text="$t('aiAgentNewConversation', 'Start new conversation')"
|
|
20
|
+
@click="onNewConversation"
|
|
21
|
+
/>
|
|
22
|
+
<DropdownItem
|
|
23
|
+
icon="bk_mdi_history"
|
|
24
|
+
:text="$t('aiAgentPastConversations', 'Past conversations')"
|
|
25
|
+
@click="onShowConversations"
|
|
26
|
+
/>
|
|
27
|
+
<hr />
|
|
28
|
+
<DropdownItem
|
|
29
|
+
icon="bk_mdi_bug_report"
|
|
30
|
+
:text="$t('aiAgentShowTranscript', 'Show transcript...')"
|
|
31
|
+
@click="onShowTranscript"
|
|
32
|
+
/>
|
|
33
|
+
</div>
|
|
34
|
+
</BlokkliTransition>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="bk-agent-input-actions-right">
|
|
38
|
+
<div v-show="hasText" class="bk-agent-input-actions-keyboard">
|
|
39
|
+
{{ $t("aiAgentNewLineHint", "Shift + Enter for new line") }}
|
|
40
|
+
</div>
|
|
41
|
+
<button
|
|
42
|
+
v-if="isProcessing"
|
|
43
|
+
class="bk-button bk-is-danger bk-is-small bk-is-icon-only"
|
|
44
|
+
:disabled="!isConnected"
|
|
45
|
+
@click="$emit('cancel')"
|
|
46
|
+
>
|
|
47
|
+
<Icon name="bk_mdi_stop" />
|
|
48
|
+
</button>
|
|
49
|
+
<button
|
|
50
|
+
v-else
|
|
51
|
+
class="bk-button bk-is-primary bk-is-small bk-is-icon-only"
|
|
52
|
+
:disabled="!canSubmit"
|
|
53
|
+
@click="$emit('submit')"
|
|
54
|
+
>
|
|
55
|
+
<Icon name="bk_mdi_arrow_upward" />
|
|
56
|
+
</button>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<script setup>
|
|
62
|
+
import {
|
|
63
|
+
ref,
|
|
64
|
+
onMounted,
|
|
65
|
+
onBeforeUnmount,
|
|
66
|
+
useTemplateRef,
|
|
67
|
+
useBlokkli
|
|
68
|
+
} from "#imports";
|
|
69
|
+
import { Icon, BlokkliTransition } from "#blokkli/editor/components";
|
|
70
|
+
import DropdownItem from "./DropdownItem/index.vue";
|
|
71
|
+
import TokenUsage from "./TokenUsage/index.vue";
|
|
72
|
+
defineProps({
|
|
73
|
+
isProcessing: { type: Boolean, required: true },
|
|
74
|
+
isConnected: { type: Boolean, required: true },
|
|
75
|
+
canSubmit: { type: Boolean, required: true },
|
|
76
|
+
hasText: { type: Boolean, required: true },
|
|
77
|
+
usageTurns: { type: Array, required: true }
|
|
78
|
+
});
|
|
79
|
+
const emit = defineEmits(["submit", "cancel", "new-conversation", "show-transcript", "show-conversations"]);
|
|
80
|
+
const { $t, eventBus } = useBlokkli();
|
|
81
|
+
const menuContainer = useTemplateRef("menuContainer");
|
|
82
|
+
const showMenu = ref(false);
|
|
83
|
+
function closeMenu() {
|
|
84
|
+
showMenu.value = false;
|
|
85
|
+
}
|
|
86
|
+
function onDocumentClick(e) {
|
|
87
|
+
if (!menuContainer.value?.contains(e.target)) {
|
|
88
|
+
closeMenu();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
eventBus.on("mouse:up", closeMenu);
|
|
92
|
+
onMounted(() => document.addEventListener("click", onDocumentClick));
|
|
93
|
+
onBeforeUnmount(() => {
|
|
94
|
+
document.removeEventListener("click", onDocumentClick);
|
|
95
|
+
eventBus.off("mouse:up", closeMenu);
|
|
96
|
+
});
|
|
97
|
+
function onNewConversation() {
|
|
98
|
+
showMenu.value = false;
|
|
99
|
+
emit("new-conversation");
|
|
100
|
+
}
|
|
101
|
+
function onShowConversations() {
|
|
102
|
+
showMenu.value = false;
|
|
103
|
+
emit("show-conversations");
|
|
104
|
+
}
|
|
105
|
+
function onShowTranscript() {
|
|
106
|
+
showMenu.value = false;
|
|
107
|
+
emit("show-transcript");
|
|
108
|
+
}
|
|
109
|
+
</script>
|