@blokkli/editor 2.0.0-alpha.32 → 2.0.0-alpha.34
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/features.d.ts +4 -0
- package/dist/module.d.mts +5 -27
- package/dist/module.json +1 -1
- package/dist/module.mjs +430 -10823
- 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/defineBlokkliFeature.d.ts +5 -3
- package/dist/runtime/composables/defineBlokkliFeature.js +2 -1
- 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/BlockPreviewRenderer/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/Dialog/index.d.vue.ts +2 -2
- package/dist/runtime/editor/components/Dialog/index.vue.d.ts +2 -2
- 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 +29 -8
- 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/index.d.vue.ts +2 -1
- package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +32 -13
- 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 +7 -0
- package/dist/runtime/editor/providers/definition.js +6 -0
- 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/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 +8 -2
- package/package.json +29 -7
|
@@ -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,45 @@
|
|
|
1
|
+
import type { UsageTurn } from '#blokkli/agent/shared/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
isProcessing: boolean;
|
|
4
|
+
isConnected: boolean;
|
|
5
|
+
hasPendingApproval: boolean;
|
|
6
|
+
hasConversation: boolean;
|
|
7
|
+
hasActivePlan: boolean;
|
|
8
|
+
usageTurns: UsageTurn[];
|
|
9
|
+
};
|
|
10
|
+
declare function focus(): void;
|
|
11
|
+
declare function clearAttachments(): void;
|
|
12
|
+
type __VLS_ModelProps = {
|
|
13
|
+
modelValue: string;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
16
|
+
declare var __VLS_14: {};
|
|
17
|
+
type __VLS_Slots = {} & {
|
|
18
|
+
default?: (props: typeof __VLS_14) => any;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
21
|
+
focus: typeof focus;
|
|
22
|
+
clearAttachments: typeof clearAttachments;
|
|
23
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
submit: (attachments: Attachment[]) => void;
|
|
25
|
+
cancel: () => void;
|
|
26
|
+
"new-conversation": () => void;
|
|
27
|
+
"show-transcript": () => void;
|
|
28
|
+
"show-conversations": () => void;
|
|
29
|
+
"update:modelValue": (value: string) => void;
|
|
30
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
31
|
+
onCancel?: (() => any) | undefined;
|
|
32
|
+
onSubmit?: ((attachments: Attachment[]) => any) | undefined;
|
|
33
|
+
"onNew-conversation"?: (() => any) | undefined;
|
|
34
|
+
"onShow-transcript"?: (() => any) | undefined;
|
|
35
|
+
"onShow-conversations"?: (() => any) | undefined;
|
|
36
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
37
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
39
|
+
declare const _default: typeof __VLS_export;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="bk-agent-input"
|
|
4
|
+
:class="{
|
|
5
|
+
'bk-is-active': hasActivePlan
|
|
6
|
+
}"
|
|
7
|
+
@paste.capture="onPaste"
|
|
8
|
+
>
|
|
9
|
+
<TransitionHeight opacity :duration="600">
|
|
10
|
+
<div v-if="attachments.length" class="bk-agent-input-attachments">
|
|
11
|
+
<AttachmentChip
|
|
12
|
+
v-for="att in attachments"
|
|
13
|
+
:key="att.id"
|
|
14
|
+
:attachment="att"
|
|
15
|
+
removable
|
|
16
|
+
@remove="removeAttachment(att.id)"
|
|
17
|
+
/>
|
|
18
|
+
</div>
|
|
19
|
+
</TransitionHeight>
|
|
20
|
+
<slot />
|
|
21
|
+
<TransitionHeight opacity :duration="600">
|
|
22
|
+
<div v-if="!hasActivePlan || !isProcessing">
|
|
23
|
+
<FlexTextarea
|
|
24
|
+
ref="textarea"
|
|
25
|
+
v-model="model"
|
|
26
|
+
:max-height="150"
|
|
27
|
+
submit-on-enter
|
|
28
|
+
paste-markdown
|
|
29
|
+
rows="2"
|
|
30
|
+
:placeholder="placeholder"
|
|
31
|
+
@submit="onSubmit"
|
|
32
|
+
/>
|
|
33
|
+
</div>
|
|
34
|
+
</TransitionHeight>
|
|
35
|
+
|
|
36
|
+
<Actions
|
|
37
|
+
:is-processing="isProcessing"
|
|
38
|
+
:is-connected="isConnected"
|
|
39
|
+
:can-submit="canSubmit"
|
|
40
|
+
:usage-turns="usageTurns"
|
|
41
|
+
:has-text
|
|
42
|
+
@submit="onSubmit"
|
|
43
|
+
@cancel="$emit('cancel')"
|
|
44
|
+
@new-conversation="$emit('new-conversation')"
|
|
45
|
+
@show-transcript="$emit('show-transcript')"
|
|
46
|
+
@show-conversations="$emit('show-conversations')"
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<script setup>
|
|
52
|
+
import { ref, computed, useBlokkli, useTemplateRef } from "#imports";
|
|
53
|
+
import { FlexTextarea, TransitionHeight } from "#blokkli/editor/components";
|
|
54
|
+
import AttachmentChip from "../Attachment/index.vue";
|
|
55
|
+
import Actions from "./Actions/index.vue";
|
|
56
|
+
import { generateUUID } from "#blokkli/editor/helpers/uuid";
|
|
57
|
+
const ATTACHMENT_THRESHOLD = 500;
|
|
58
|
+
const props = defineProps({
|
|
59
|
+
isProcessing: { type: Boolean, required: true },
|
|
60
|
+
isConnected: { type: Boolean, required: true },
|
|
61
|
+
hasPendingApproval: { type: Boolean, required: true },
|
|
62
|
+
hasConversation: { type: Boolean, required: true },
|
|
63
|
+
hasActivePlan: { type: Boolean, required: true },
|
|
64
|
+
usageTurns: { type: Array, required: true }
|
|
65
|
+
});
|
|
66
|
+
const { $t } = useBlokkli();
|
|
67
|
+
const placeholder = computed(() => {
|
|
68
|
+
if (props.isProcessing) {
|
|
69
|
+
return $t("aiAgentProcessing", "Processing...");
|
|
70
|
+
}
|
|
71
|
+
if (props.hasPendingApproval) {
|
|
72
|
+
return $t("aiAgentAwaitingApproval", "Awaiting your approval...");
|
|
73
|
+
}
|
|
74
|
+
if (props.hasConversation) {
|
|
75
|
+
return $t("aiAgentPlaceholderReply", "Reply...");
|
|
76
|
+
}
|
|
77
|
+
return $t("aiAgentPlaceholder", "What should we work on?");
|
|
78
|
+
});
|
|
79
|
+
const emit = defineEmits(["submit", "cancel", "new-conversation", "show-transcript", "show-conversations"]);
|
|
80
|
+
const model = defineModel({ type: String, ...{ required: true } });
|
|
81
|
+
const attachments = ref([]);
|
|
82
|
+
function onPaste(e) {
|
|
83
|
+
const text = e.clipboardData?.getData("text/plain");
|
|
84
|
+
if (!text || text.length < ATTACHMENT_THRESHOLD) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (attachments.value.some((a) => a.content === text)) {
|
|
88
|
+
e.preventDefault();
|
|
89
|
+
e.stopPropagation();
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
e.preventDefault();
|
|
93
|
+
e.stopPropagation();
|
|
94
|
+
attachments.value.push({
|
|
95
|
+
type: "text",
|
|
96
|
+
id: generateUUID(),
|
|
97
|
+
content: text
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function removeAttachment(id) {
|
|
101
|
+
attachments.value = attachments.value.filter((a) => a.id !== id);
|
|
102
|
+
}
|
|
103
|
+
const hasText = computed(() => !!model.value.trim());
|
|
104
|
+
const canSubmit = computed(() => {
|
|
105
|
+
return (hasText.value || attachments.value.length > 0) && !props.isProcessing && props.isConnected;
|
|
106
|
+
});
|
|
107
|
+
function onSubmit() {
|
|
108
|
+
if (!canSubmit.value) return;
|
|
109
|
+
emit("submit", attachments.value);
|
|
110
|
+
attachments.value = [];
|
|
111
|
+
}
|
|
112
|
+
const textarea = useTemplateRef("textarea");
|
|
113
|
+
function focus() {
|
|
114
|
+
textarea.value?.focus();
|
|
115
|
+
}
|
|
116
|
+
function clearAttachments() {
|
|
117
|
+
attachments.value = [];
|
|
118
|
+
}
|
|
119
|
+
defineExpose({ focus, clearAttachments });
|
|
120
|
+
</script>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { UsageTurn } from '#blokkli/agent/shared/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
isProcessing: boolean;
|
|
4
|
+
isConnected: boolean;
|
|
5
|
+
hasPendingApproval: boolean;
|
|
6
|
+
hasConversation: boolean;
|
|
7
|
+
hasActivePlan: boolean;
|
|
8
|
+
usageTurns: UsageTurn[];
|
|
9
|
+
};
|
|
10
|
+
declare function focus(): void;
|
|
11
|
+
declare function clearAttachments(): void;
|
|
12
|
+
type __VLS_ModelProps = {
|
|
13
|
+
modelValue: string;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
16
|
+
declare var __VLS_14: {};
|
|
17
|
+
type __VLS_Slots = {} & {
|
|
18
|
+
default?: (props: typeof __VLS_14) => any;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
21
|
+
focus: typeof focus;
|
|
22
|
+
clearAttachments: typeof clearAttachments;
|
|
23
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
submit: (attachments: Attachment[]) => void;
|
|
25
|
+
cancel: () => void;
|
|
26
|
+
"new-conversation": () => void;
|
|
27
|
+
"show-transcript": () => void;
|
|
28
|
+
"show-conversations": () => void;
|
|
29
|
+
"update:modelValue": (value: string) => void;
|
|
30
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
31
|
+
onCancel?: (() => any) | undefined;
|
|
32
|
+
onSubmit?: ((attachments: Attachment[]) => any) | undefined;
|
|
33
|
+
"onNew-conversation"?: (() => any) | undefined;
|
|
34
|
+
"onShow-transcript"?: (() => any) | undefined;
|
|
35
|
+
"onShow-conversations"?: (() => any) | undefined;
|
|
36
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
37
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
39
|
+
declare const _default: typeof __VLS_export;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { MutationAction } from '#blokkli/agent/app/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
action: MutationAction;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
approve: () => void;
|
|
7
|
+
reject: () => void;
|
|
8
|
+
"always-approve": () => void;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onApprove?: (() => any) | undefined;
|
|
11
|
+
onReject?: (() => any) | undefined;
|
|
12
|
+
"onAlways-approve"?: (() => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ToolCard :icon="actionIcon" :title="action.label" @cancel="$emit('reject')">
|
|
3
|
+
<template #actions>
|
|
4
|
+
<button
|
|
5
|
+
class="bk-button bk-is-small bk-is-lime bk-is-fullwidth"
|
|
6
|
+
@click="$emit('approve')"
|
|
7
|
+
>
|
|
8
|
+
<Icon name="bk_mdi_check" />
|
|
9
|
+
{{ $t("aiAgentApprove", "Approve") }}
|
|
10
|
+
</button>
|
|
11
|
+
<button
|
|
12
|
+
class="bk-button bk-is-small bk-is-lime-outline"
|
|
13
|
+
@click="$emit('always-approve')"
|
|
14
|
+
>
|
|
15
|
+
<Icon name="bk_mdi_done_all" />
|
|
16
|
+
{{ $t("aiAgentAlwaysApprove", "Always") }}
|
|
17
|
+
</button>
|
|
18
|
+
</template>
|
|
19
|
+
</ToolCard>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script setup>
|
|
23
|
+
import { computed, useBlokkli } from "#imports";
|
|
24
|
+
import { Icon } from "#blokkli/editor/components";
|
|
25
|
+
import ToolCard from "../ToolCard/index.vue";
|
|
26
|
+
const props = defineProps({
|
|
27
|
+
action: { type: null, required: true }
|
|
28
|
+
});
|
|
29
|
+
defineEmits(["approve", "reject", "always-approve"]);
|
|
30
|
+
const { $t } = useBlokkli();
|
|
31
|
+
const actionIcon = computed(() => {
|
|
32
|
+
switch (props.action.type) {
|
|
33
|
+
case "rewrite":
|
|
34
|
+
return "bk_mdi_edit";
|
|
35
|
+
case "add":
|
|
36
|
+
return "bk_mdi_add";
|
|
37
|
+
case "delete":
|
|
38
|
+
return "bk_mdi_delete";
|
|
39
|
+
case "move":
|
|
40
|
+
return "bk_mdi_drag_pan";
|
|
41
|
+
case "options":
|
|
42
|
+
return "bk_mdi_tune";
|
|
43
|
+
default:
|
|
44
|
+
return "bk_mdi_edit";
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
</script>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { MutationAction } from '#blokkli/agent/app/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
action: MutationAction;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
approve: () => void;
|
|
7
|
+
reject: () => void;
|
|
8
|
+
"always-approve": () => void;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onApprove?: (() => any) | undefined;
|
|
11
|
+
onReject?: (() => any) | undefined;
|
|
12
|
+
"onAlways-approve"?: (() => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ClientPlanState } from '#blokkli/agent/shared/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
plan: ClientPlanState;
|
|
4
|
+
pendingApproval: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
approve: () => any;
|
|
8
|
+
reject: () => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onApprove?: (() => any) | undefined;
|
|
11
|
+
onReject?: (() => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ToolCard
|
|
3
|
+
class="bk-agent-plan"
|
|
4
|
+
icon="bk_mdi_inventory"
|
|
5
|
+
:title="plan.title"
|
|
6
|
+
:hide-cancel="!pendingApproval"
|
|
7
|
+
@cancel="$emit('reject')"
|
|
8
|
+
>
|
|
9
|
+
<div class="bk-agent-plan-steps">
|
|
10
|
+
<div
|
|
11
|
+
v-for="(step, index) in plan.steps"
|
|
12
|
+
:key="index"
|
|
13
|
+
class="bk-agent-plan-step"
|
|
14
|
+
:class="{
|
|
15
|
+
'bk-is-pending': step.status === 'pending',
|
|
16
|
+
'bk-is-in-progress': step.status === 'in_progress',
|
|
17
|
+
'bk-is-completed': step.status === 'completed'
|
|
18
|
+
}"
|
|
19
|
+
>
|
|
20
|
+
<StatusIcon
|
|
21
|
+
:status="planStepToStatus(step.status)"
|
|
22
|
+
:bullet-text="index + 1"
|
|
23
|
+
/>
|
|
24
|
+
<span class="bk-agent-plan-step-label">{{ step.label }}</span>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<template v-if="pendingApproval" #actions>
|
|
29
|
+
<button
|
|
30
|
+
class="bk-button bk-is-small bk-is-lime bk-is-fullwidth"
|
|
31
|
+
@click="$emit('approve')"
|
|
32
|
+
>
|
|
33
|
+
<Icon name="bk_mdi_check" />
|
|
34
|
+
{{ $t("aiAgentApprovePlan", "Accept plan") }}
|
|
35
|
+
</button>
|
|
36
|
+
</template>
|
|
37
|
+
</ToolCard>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script setup>
|
|
41
|
+
import { useBlokkli } from "#imports";
|
|
42
|
+
import { Icon, StatusIcon } from "#blokkli/editor/components";
|
|
43
|
+
import ToolCard from "../ToolCard/index.vue";
|
|
44
|
+
defineProps({
|
|
45
|
+
plan: { type: Object, required: true },
|
|
46
|
+
pendingApproval: { type: Boolean, required: true }
|
|
47
|
+
});
|
|
48
|
+
defineEmits(["approve", "reject"]);
|
|
49
|
+
const { $t } = useBlokkli();
|
|
50
|
+
function planStepToStatus(stepStatus) {
|
|
51
|
+
if (stepStatus === "completed") return "success";
|
|
52
|
+
if (stepStatus === "in_progress") return "active";
|
|
53
|
+
return "pending";
|
|
54
|
+
}
|
|
55
|
+
</script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ClientPlanState } from '#blokkli/agent/shared/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
plan: ClientPlanState;
|
|
4
|
+
pendingApproval: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
approve: () => any;
|
|
8
|
+
reject: () => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onApprove?: (() => any) | undefined;
|
|
11
|
+
onReject?: (() => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { BlokkliIcon } from '#blokkli-build/icons';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
icon: BlokkliIcon;
|
|
4
|
+
title: string;
|
|
5
|
+
hideCancel?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare var __VLS_11: {}, __VLS_13: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_11) => any;
|
|
10
|
+
} & {
|
|
11
|
+
actions?: (props: typeof __VLS_13) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
|
+
cancel: () => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
onCancel?: (() => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bk-agent-tool-card">
|
|
3
|
+
<div class="bk-agent-tool-card-header">
|
|
4
|
+
<div class="bk-agent-tool-card-header-left">
|
|
5
|
+
<Icon :name="icon" />
|
|
6
|
+
<span>{{ title }}</span>
|
|
7
|
+
</div>
|
|
8
|
+
<div v-if="!hideCancel" class="bk-agent-tool-card-header-cancel">
|
|
9
|
+
<button type="button" @click="$emit('cancel')">
|
|
10
|
+
<Icon name="bk_mdi_close" />
|
|
11
|
+
</button>
|
|
12
|
+
<div class="bk-tooltip">
|
|
13
|
+
<span>{{ $t("aiAgentReject", "Reject") }}</span>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<slot />
|
|
19
|
+
|
|
20
|
+
<div v-if="$slots.actions" class="bk-agent-tool-card-actions">
|
|
21
|
+
<slot name="actions" />
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script setup>
|
|
27
|
+
import { Icon } from "#blokkli/editor/components";
|
|
28
|
+
import { useBlokkli } from "#imports";
|
|
29
|
+
defineProps({
|
|
30
|
+
icon: { type: null, required: true },
|
|
31
|
+
title: { type: String, required: true },
|
|
32
|
+
hideCancel: { type: Boolean, required: false }
|
|
33
|
+
});
|
|
34
|
+
defineEmits(["cancel"]);
|
|
35
|
+
const { $t } = useBlokkli();
|
|
36
|
+
</script>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { BlokkliIcon } from '#blokkli-build/icons';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
icon: BlokkliIcon;
|
|
4
|
+
title: string;
|
|
5
|
+
hideCancel?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare var __VLS_11: {}, __VLS_13: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_11) => any;
|
|
10
|
+
} & {
|
|
11
|
+
actions?: (props: typeof __VLS_13) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
|
+
cancel: () => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
onCancel?: (() => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Hallo! Ich bin @agent-name, dein Assistent für die Inhaltsbearbeitung.
|
|
2
|
+
|
|
3
|
+
Ich kann dir helfen, diese Seite zu gestalten — sag mir einfach, was du
|
|
4
|
+
brauchst:
|
|
5
|
+
|
|
6
|
+
- **Blöcke hinzufügen, verschieben und löschen** auf der Seite
|
|
7
|
+
- **Textinhalte bearbeiten und umschreiben**
|
|
8
|
+
- **Optionen ändern** wie Hintergrundfarbe oder Layout
|
|
9
|
+
- **Medien suchen und ersetzen** wie Bilder oder Videos
|
|
10
|
+
- **Vorlagen einfügen** aus der Vorlagenbibliothek
|
|
11
|
+
- **Inhalte übersetzen** in andere Sprachen
|
|
12
|
+
|
|
13
|
+
Ein paar Dinge, die du beachten solltest:
|
|
14
|
+
|
|
15
|
+
- **Speichern oder veröffentlichen** — das musst du selbst machen
|
|
16
|
+
- **Andere Seiten bearbeiten** — ich kann nur auf der aktuellen Seite arbeiten
|
|
17
|
+
- **Globale Inhalte löschen** wie Bilder, Videos oder Seiten
|
|
18
|
+
|
|
19
|
+
Probier eines davon aus, um loszulegen:
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Hey! I'm @agent-name, your content editing assistant.
|
|
2
|
+
|
|
3
|
+
I can help you shape this page — just tell me what you need:
|
|
4
|
+
|
|
5
|
+
- **Add, move and delete** blocks on the page
|
|
6
|
+
- **Edit and rewrite** text content
|
|
7
|
+
- **Change options** like background color or layout
|
|
8
|
+
- **Search and replace** media such as images or videos
|
|
9
|
+
- **Insert templates** from the template library
|
|
10
|
+
- **Translate** content to other languages
|
|
11
|
+
|
|
12
|
+
A few things to keep in mind:
|
|
13
|
+
|
|
14
|
+
- **Save or publish** changes — you need to do that yourself
|
|
15
|
+
- **Edit other pages** — I can only work on the current page
|
|
16
|
+
- **Delete global content** like images, videos or pages
|
|
17
|
+
|
|
18
|
+
Try one of these to get started:
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
agentName: string;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
5
|
+
prompt: (value: string) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
7
|
+
onPrompt?: ((value: string) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bk-agent-welcome">
|
|
3
|
+
<div class="bk-agent-message-text" v-html="welcomeHtml" />
|
|
4
|
+
<div v-if="defaultPrompts.length" class="bk-agent-welcome-prompts">
|
|
5
|
+
<button
|
|
6
|
+
v-for="(prompt, index) in defaultPrompts"
|
|
7
|
+
:key="index"
|
|
8
|
+
type="button"
|
|
9
|
+
@click.prevent="emit('prompt', prompt)"
|
|
10
|
+
>
|
|
11
|
+
<Icon name="bk_mdi_chat" />
|
|
12
|
+
<span>{{ prompt }}</span>
|
|
13
|
+
</button>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="bk-agent-welcome-disclaimer">
|
|
16
|
+
<div v-html="disclaimer" />
|
|
17
|
+
<Icon name="bk_mdi_priority_high" />
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script setup>
|
|
23
|
+
import { computed, useBlokkli } from "#imports";
|
|
24
|
+
import { marked } from "marked";
|
|
25
|
+
import welcomeMdEn from "./en.md?raw";
|
|
26
|
+
import welcomeMdDe from "./de.md?raw";
|
|
27
|
+
import { defaultPrompts } from "#blokkli-build/agent-client";
|
|
28
|
+
import { Icon } from "#blokkli/editor/components";
|
|
29
|
+
const props = defineProps({
|
|
30
|
+
agentName: { type: String, required: true }
|
|
31
|
+
});
|
|
32
|
+
const emit = defineEmits(["prompt"]);
|
|
33
|
+
const { $t, ui } = useBlokkli();
|
|
34
|
+
const welcomeMd = ui.interfaceLanguage.value === "de" ? welcomeMdDe : welcomeMdEn;
|
|
35
|
+
const welcomeHtml = await Promise.resolve(marked.parse(welcomeMd)).then(
|
|
36
|
+
(v) => v.replaceAll("@agent-name", props.agentName)
|
|
37
|
+
);
|
|
38
|
+
const disclaimer = computed(() => {
|
|
39
|
+
return $t(
|
|
40
|
+
"aiAgentWelcomeDisclaimer",
|
|
41
|
+
`@agent can make mistakes! Always check the output. <strong>Do not enter sensitive information.</strong>`
|
|
42
|
+
).replace("@agent", props.agentName);
|
|
43
|
+
});
|
|
44
|
+
</script>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
agentName: string;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
5
|
+
prompt: (value: string) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
7
|
+
onPrompt?: ((value: string) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { AgentConversationSummary, PendingMutationState, PendingToolCall } from '#blokkli/agent/app/composables';
|
|
2
|
+
import type { ConversationItem, ActiveItem } from '#blokkli/agent/app/types';
|
|
3
|
+
import type { ClientPlanState, UsageTurn } from '#blokkli/agent/shared/types';
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
agentName: string;
|
|
6
|
+
isShown: boolean;
|
|
7
|
+
debugStyling?: boolean;
|
|
8
|
+
conversation: ConversationItem[];
|
|
9
|
+
activeItem: ActiveItem | null;
|
|
10
|
+
isThinking: boolean;
|
|
11
|
+
isProcessing: boolean;
|
|
12
|
+
isConnected: boolean;
|
|
13
|
+
hasBeenReady: boolean;
|
|
14
|
+
pendingToolCall: PendingToolCall | null;
|
|
15
|
+
pendingMutation: PendingMutationState | null;
|
|
16
|
+
autoApprove: boolean;
|
|
17
|
+
conversationList: AgentConversationSummary[];
|
|
18
|
+
showConversationList: boolean;
|
|
19
|
+
plan: ClientPlanState | null;
|
|
20
|
+
usageTurns: UsageTurn[];
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
23
|
+
cancel: () => any;
|
|
24
|
+
retry: () => any;
|
|
25
|
+
approve: () => any;
|
|
26
|
+
reject: () => any;
|
|
27
|
+
newConversation: () => any;
|
|
28
|
+
showConversations: () => any;
|
|
29
|
+
connect: () => any;
|
|
30
|
+
sendPrompt: (prompt: string, displayPrompt?: string | undefined, selectedUuids?: string[] | undefined, attachments?: Attachment[] | undefined) => any;
|
|
31
|
+
setAutoApprove: (value: boolean) => any;
|
|
32
|
+
getTranscript: () => any;
|
|
33
|
+
toolComponentDone: (result: unknown) => any;
|
|
34
|
+
switchConversation: (id: string) => any;
|
|
35
|
+
deleteConversation: (id: string) => any;
|
|
36
|
+
hideConversations: () => any;
|
|
37
|
+
approvePlan: () => any;
|
|
38
|
+
rejectPlan: () => any;
|
|
39
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
40
|
+
onCancel?: (() => any) | undefined;
|
|
41
|
+
onRetry?: (() => any) | undefined;
|
|
42
|
+
onApprove?: (() => any) | undefined;
|
|
43
|
+
onReject?: (() => any) | undefined;
|
|
44
|
+
onNewConversation?: (() => any) | undefined;
|
|
45
|
+
onShowConversations?: (() => any) | undefined;
|
|
46
|
+
onConnect?: (() => any) | undefined;
|
|
47
|
+
onSendPrompt?: ((prompt: string, displayPrompt?: string | undefined, selectedUuids?: string[] | undefined, attachments?: Attachment[] | undefined) => any) | undefined;
|
|
48
|
+
onSetAutoApprove?: ((value: boolean) => any) | undefined;
|
|
49
|
+
onGetTranscript?: (() => any) | undefined;
|
|
50
|
+
onToolComponentDone?: ((result: unknown) => any) | undefined;
|
|
51
|
+
onSwitchConversation?: ((id: string) => any) | undefined;
|
|
52
|
+
onDeleteConversation?: ((id: string) => any) | undefined;
|
|
53
|
+
onHideConversations?: (() => any) | undefined;
|
|
54
|
+
onApprovePlan?: (() => any) | undefined;
|
|
55
|
+
onRejectPlan?: (() => any) | undefined;
|
|
56
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
57
|
+
declare const _default: typeof __VLS_export;
|
|
58
|
+
export default _default;
|