@blokkli/editor 2.0.0-alpha.35 → 2.0.0-alpha.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/global/types/blockOptions.d.ts +10 -2
- package/dist/global/types/definitions.d.ts +12 -5
- package/dist/module.d.mts +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +126 -7
- package/dist/modules/agent/index.d.mts +1 -1
- package/dist/modules/agent/index.mjs +273 -25
- package/dist/modules/agent/runtime/app/composables/agentProvider.d.ts +2 -2
- package/dist/modules/agent/runtime/app/composables/agentProvider.js +34 -17
- package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentTool.d.ts +2 -20
- package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentTool.js +0 -3
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Assistant/index.vue +2 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/User/index.vue +1 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/DebugGallery/index.vue +1 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.d.vue.ts +1 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue +67 -86
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue.d.ts +1 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/index.vue +10 -12
- package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/de.md +2 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/en.md +2 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue +1 -5
- package/dist/modules/agent/runtime/app/features/agent/Transcript/index.d.vue.ts +8 -0
- package/dist/modules/agent/runtime/app/features/agent/Transcript/index.vue +138 -0
- package/dist/modules/agent/runtime/app/features/agent/Transcript/index.vue.d.ts +8 -0
- package/dist/modules/agent/runtime/app/features/agent/index.vue +94 -38
- package/dist/modules/agent/runtime/app/helpers/index.d.ts +16 -19
- package/dist/modules/agent/runtime/app/helpers/index.js +22 -46
- package/dist/modules/agent/runtime/app/helpers/pageStructure.js +1 -1
- package/dist/modules/agent/runtime/app/tools/add_content_search_paragraph/index.js +5 -9
- package/dist/modules/agent/runtime/app/tools/add_fragment/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.js +2 -3
- package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/add_template/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/analyze_content/index.js +120 -0
- package/dist/modules/agent/runtime/app/tools/check_readability/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/check_readability/index.js +57 -0
- package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.js +1 -1
- package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.js +176 -0
- package/dist/modules/agent/runtime/app/tools/get_content_fields/index.js +1 -1
- package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.js +7 -5
- package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.js +2 -1
- package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.js +2 -3
- package/dist/modules/agent/runtime/app/tools/helpers.d.ts +53 -0
- package/dist/modules/agent/runtime/app/tools/helpers.js +187 -0
- package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/schemas.d.ts +1 -44
- package/dist/modules/agent/runtime/app/tools/schemas.js +0 -174
- package/dist/modules/agent/runtime/app/tools/search_content/index.js +40 -47
- package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.js +2 -5
- package/dist/modules/agent/runtime/app/types/index.d.ts +0 -61
- package/dist/modules/agent/runtime/server/Session.d.ts +29 -8
- package/dist/modules/agent/runtime/server/Session.js +168 -85
- package/dist/modules/agent/runtime/server/SessionManager.d.ts +3 -0
- package/dist/modules/agent/runtime/server/SessionManager.js +4 -1
- package/dist/modules/agent/runtime/server/agent.js +3 -2
- package/dist/modules/agent/runtime/server/agentPrompt.d.ts +9 -1
- package/dist/modules/agent/runtime/server/agentPrompt.js +26 -0
- package/dist/modules/agent/runtime/server/default-skills/fixReadability.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-skills/fixReadability.js +69 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/page-context.js +28 -0
- package/dist/modules/agent/runtime/server/server-tools/index.d.ts +10 -2
- package/dist/modules/agent/runtime/server/server-tools/index.js +1 -1
- package/dist/modules/agent/runtime/server/server-tools/load_tools/index.js +1 -1
- package/dist/modules/agent/runtime/shared/types.d.ts +81 -12
- package/dist/modules/agent/runtime/shared/types.js +22 -10
- package/dist/modules/charts/index.d.mts +35 -0
- package/dist/modules/charts/index.mjs +57 -0
- package/dist/modules/charts/runtime/blokkli/skills/charts.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/skills/charts.js +42 -0
- package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.d.ts +86 -0
- package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.js +136 -0
- package/dist/modules/charts/runtime/blokkli/tools/create_chart/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/create_chart/index.js +93 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_data/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_data/index.js +66 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_type_options/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_type_options/index.js +40 -0
- package/dist/modules/charts/runtime/blokkli/tools/update_chart/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/update_chart/index.js +89 -0
- package/dist/modules/charts/runtime/chartTypes/area.d.ts +7 -0
- package/dist/modules/charts/runtime/chartTypes/area.js +68 -0
- package/dist/modules/charts/runtime/chartTypes/bar.d.ts +8 -0
- package/dist/modules/charts/runtime/chartTypes/bar.js +76 -0
- package/dist/modules/charts/runtime/chartTypes/define.d.ts +2 -0
- package/dist/modules/charts/runtime/chartTypes/define.js +3 -0
- package/dist/modules/charts/runtime/chartTypes/donut.d.ts +6 -0
- package/dist/modules/charts/runtime/chartTypes/donut.js +45 -0
- package/dist/modules/charts/runtime/chartTypes/heatmap.d.ts +4 -0
- package/dist/modules/charts/runtime/chartTypes/heatmap.js +54 -0
- package/dist/modules/charts/runtime/chartTypes/index.d.ts +39 -0
- package/dist/modules/charts/runtime/chartTypes/index.js +47 -0
- package/dist/modules/charts/runtime/chartTypes/line.d.ts +7 -0
- package/dist/modules/charts/runtime/chartTypes/line.js +68 -0
- package/dist/modules/charts/runtime/chartTypes/pie.d.ts +5 -0
- package/dist/modules/charts/runtime/chartTypes/pie.js +28 -0
- package/dist/modules/charts/runtime/chartTypes/radar.d.ts +7 -0
- package/dist/modules/charts/runtime/chartTypes/radar.js +52 -0
- package/dist/modules/charts/runtime/chartTypes/radialBar.d.ts +6 -0
- package/dist/modules/charts/runtime/chartTypes/radialBar.js +44 -0
- package/dist/modules/charts/runtime/chartTypes/shared.d.ts +67 -0
- package/dist/modules/charts/runtime/chartTypes/shared.js +103 -0
- package/dist/modules/charts/runtime/chartTypes/types.d.ts +29 -0
- package/dist/modules/charts/runtime/chartTypes/types.js +0 -0
- package/dist/modules/charts/runtime/components/ChartRenderer/index.d.vue.ts +147 -0
- package/dist/modules/charts/runtime/components/ChartRenderer/index.vue +120 -0
- package/dist/modules/charts/runtime/components/ChartRenderer/index.vue.d.ts +147 -0
- package/dist/modules/charts/runtime/components/index.d.ts +1 -0
- package/dist/modules/charts/runtime/components/index.js +1 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.d.vue.ts +16 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.vue +97 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.vue.d.ts +16 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.d.vue.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.vue +34 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.vue.d.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.d.vue.ts +12 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue +49 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue.d.ts +12 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.d.vue.ts +19 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.vue +89 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.vue.d.ts +19 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.d.vue.ts +23 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.vue +224 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.vue.d.ts +23 -0
- package/dist/{runtime/editor/features/clipboard/List → modules/charts/runtime/features/charts/Editor/FootnoteEditor}/index.d.vue.ts +4 -5
- package/dist/modules/charts/runtime/features/charts/Editor/FootnoteEditor/index.vue +61 -0
- package/dist/{runtime/editor/features/clipboard/List → modules/charts/runtime/features/charts/Editor/FootnoteEditor}/index.vue.d.ts +4 -5
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.d.vue.ts +10 -0
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.vue +45 -0
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.vue.d.ts +10 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.d.vue.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.vue +249 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.vue.d.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/useChartEditorState.d.ts +17 -0
- package/dist/modules/charts/runtime/features/charts/Editor/useChartEditorState.js +90 -0
- package/dist/modules/charts/runtime/features/charts/index.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/features/charts/index.vue +72 -0
- package/dist/modules/charts/runtime/features/charts/index.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/helpers/index.d.ts +26 -0
- package/dist/modules/charts/runtime/helpers/index.js +80 -0
- package/dist/modules/charts/runtime/types.d.ts +33 -0
- package/dist/modules/charts/runtime/types.js +0 -0
- package/dist/modules/drupal/graphql/features/fragments.graphql +2 -0
- package/dist/modules/drupal/index.d.mts +1 -1
- package/dist/modules/drupal/runtime/adapter/index.d.ts +3 -1
- package/dist/modules/drupal/runtime/adapter/index.js +16 -12
- package/dist/modules/table-of-contents/index.d.mts +11 -0
- package/dist/modules/table-of-contents/index.mjs +24 -0
- package/dist/modules/table-of-contents/runtime/components/BlokkliTableOfContents/index.d.vue.ts +44 -0
- package/dist/modules/table-of-contents/runtime/components/BlokkliTableOfContents/index.vue +43 -0
- package/dist/modules/table-of-contents/runtime/components/BlokkliTableOfContents/index.vue.d.ts +44 -0
- package/dist/modules/table-of-contents/runtime/types/index.d.ts +4 -0
- package/dist/modules/table-of-contents/runtime/types/index.js +0 -0
- package/dist/runtime/components/Blocks/Fragment/index.vue +6 -2
- package/dist/runtime/components/BlokkliItem.vue +9 -4
- package/dist/runtime/components/BlokkliProvider.d.vue.ts +7 -0
- package/dist/runtime/components/BlokkliProvider.vue +7 -1
- package/dist/runtime/components/BlokkliProvider.vue.d.ts +7 -0
- package/dist/runtime/composables/defineBlokkli.js +1 -1
- package/dist/runtime/composables/useBlokkliHelper.js +4 -2
- package/dist/runtime/editor/components/AnimationCanvas/index.vue +17 -27
- package/dist/runtime/editor/components/Banner/index.d.vue.ts +13 -2
- package/dist/runtime/editor/components/Banner/index.vue +4 -2
- package/dist/runtime/editor/components/Banner/index.vue.d.ts +13 -2
- package/dist/runtime/editor/components/Dropdown/index.d.vue.ts +27 -0
- package/dist/runtime/editor/components/Dropdown/index.vue +107 -0
- package/dist/runtime/editor/components/Dropdown/index.vue.d.ts +27 -0
- package/dist/{modules/agent/runtime/app/features/agent/Panel/Input/Actions → runtime/editor/components}/DropdownItem/index.d.vue.ts +1 -0
- package/dist/{modules/agent/runtime/app/features/agent/Panel/Input/Actions → runtime/editor/components}/DropdownItem/index.vue +3 -2
- package/dist/{modules/agent/runtime/app/features/agent/Panel/Input/Actions → runtime/editor/components}/DropdownItem/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/EditProvider.d.vue.ts +2 -0
- package/dist/runtime/editor/components/EditProvider.vue +11 -7
- package/dist/runtime/editor/components/EditProvider.vue.d.ts +2 -0
- package/dist/runtime/editor/components/FlexTextarea/index.d.vue.ts +5 -1
- package/dist/runtime/editor/components/FlexTextarea/index.vue +24 -101
- package/dist/runtime/editor/components/FlexTextarea/index.vue.d.ts +5 -1
- package/dist/runtime/editor/components/Form/Radio/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/Form/Radio/index.vue +3 -2
- package/dist/runtime/editor/components/Form/Radio/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/ItemIcon/index.vue +10 -2
- package/dist/runtime/editor/components/NestedEditorOverlay/index.d.vue.ts +13 -3
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +43 -16
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue.d.ts +13 -3
- package/dist/runtime/editor/components/Popup/index.d.vue.ts +30 -0
- package/dist/runtime/editor/components/Popup/index.vue +82 -0
- package/dist/runtime/editor/components/Popup/index.vue.d.ts +30 -0
- package/dist/runtime/editor/components/PreviewProvider.d.vue.ts +2 -0
- package/dist/runtime/editor/components/PreviewProvider.vue +3 -2
- package/dist/runtime/editor/components/PreviewProvider.vue.d.ts +2 -0
- package/dist/runtime/editor/components/Resizable/index.vue +4 -1
- package/dist/runtime/editor/components/ShortcutIndicator/index.vue +1 -1
- package/dist/runtime/editor/components/Toolbar/index.vue +107 -6
- package/dist/runtime/editor/components/index.d.ts +4 -1
- package/dist/runtime/editor/components/index.js +6 -0
- package/dist/runtime/editor/composables/defineDropAreas.js +3 -3
- package/dist/runtime/editor/composables/defineDropHandler.d.ts +3 -0
- package/dist/runtime/editor/composables/defineDropHandler.js +10 -0
- package/dist/runtime/editor/composables/index.d.ts +1 -0
- package/dist/runtime/editor/composables/index.js +1 -0
- package/dist/runtime/editor/composables/onElementResize.js +0 -1
- package/dist/runtime/editor/composables/useEditableFieldOverride.js +4 -5
- package/dist/runtime/editor/css/output.css +1 -1
- package/dist/runtime/editor/events/index.d.ts +16 -0
- package/dist/runtime/editor/features/add-list/Help/Item.vue +5 -2
- package/dist/runtime/editor/features/add-list/index.vue +58 -1
- package/dist/runtime/editor/features/analyze/Main.d.vue.ts +3 -2
- package/dist/runtime/editor/features/analyze/Main.vue +28 -44
- package/dist/runtime/editor/features/analyze/Main.vue.d.ts +3 -2
- package/dist/runtime/editor/features/analyze/analyzers/readability.js +65 -0
- package/dist/runtime/editor/features/analyze/analyzers/types.d.ts +19 -0
- package/dist/runtime/editor/features/analyze/index.vue +18 -15
- package/dist/runtime/editor/features/artboard/Renderer.vue +1 -1
- package/dist/runtime/editor/features/clipboard/DropElement/Video.d.vue.ts +8 -0
- package/dist/runtime/editor/features/clipboard/{List/Item → DropElement}/Video.vue +1 -5
- package/dist/runtime/editor/features/clipboard/DropElement/Video.vue.d.ts +8 -0
- package/dist/runtime/editor/features/clipboard/DropElement/helpers.d.ts +1 -0
- package/dist/runtime/editor/features/clipboard/DropElement/helpers.js +14 -0
- package/dist/runtime/editor/features/clipboard/DropElement/index.d.vue.ts +16 -0
- package/dist/runtime/editor/features/clipboard/DropElement/index.vue +97 -0
- package/dist/runtime/editor/features/clipboard/DropElement/index.vue.d.ts +16 -0
- package/dist/runtime/editor/features/clipboard/helpers.d.ts +15 -0
- package/dist/runtime/editor/features/clipboard/helpers.js +62 -0
- package/dist/runtime/editor/features/clipboard/index.vue +586 -338
- package/dist/runtime/editor/features/clipboard/types.d.ts +14 -2
- package/dist/runtime/editor/features/debug/index.vue +1 -1
- package/dist/runtime/editor/features/dev-mode/index.vue +86 -2
- package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +17 -5
- package/dist/runtime/editor/features/dragging-overlay/Renderer/index.vue +2 -2
- package/dist/runtime/editor/features/dragging-overlay/index.vue +125 -219
- package/dist/runtime/editor/features/edit/index.vue +20 -0
- package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue +4 -4
- package/dist/runtime/editor/features/editable-field/Overlay/index.vue +6 -0
- package/dist/runtime/editor/features/fragments/types.d.ts +1 -0
- package/dist/runtime/editor/features/hover/Renderer/index.vue +30 -3
- package/dist/runtime/editor/features/hover/index.vue +1 -1
- package/dist/runtime/editor/features/library/index.vue +14 -0
- package/dist/runtime/editor/features/media-library/index.vue +32 -1
- package/dist/runtime/editor/features/options/Form/Checkbox/index.d.vue.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Checkbox/index.vue +3 -3
- package/dist/runtime/editor/features/options/Form/Checkbox/index.vue.d.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.d.vue.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue +5 -5
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue.d.ts +2 -2
- package/dist/runtime/editor/features/options/Form/ComplexType/index.d.vue.ts +11 -0
- package/dist/runtime/editor/features/options/Form/ComplexType/index.vue +36 -0
- package/dist/runtime/editor/features/options/Form/ComplexType/index.vue.d.ts +11 -0
- package/dist/runtime/editor/features/options/Form/Item.d.vue.ts +5 -4
- package/dist/runtime/editor/features/options/Form/Item.vue +24 -50
- package/dist/runtime/editor/features/options/Form/Item.vue.d.ts +5 -4
- package/dist/runtime/editor/features/options/Form/Number/index.d.vue.ts +3 -3
- package/dist/runtime/editor/features/options/Form/Number/index.vue +7 -17
- package/dist/runtime/editor/features/options/Form/Number/index.vue.d.ts +3 -3
- package/dist/runtime/editor/features/options/Form/Range/index.d.vue.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Range/index.vue +4 -4
- package/dist/runtime/editor/features/options/Form/Range/index.vue.d.ts +2 -2
- package/dist/runtime/editor/features/options/Form/index.vue +15 -5
- package/dist/runtime/editor/features/search/index.vue +25 -1
- package/dist/runtime/editor/features/selection/index.vue +2 -2
- package/dist/runtime/editor/features/structure/index.vue +25 -1
- package/dist/runtime/editor/features/tour/index.vue +22 -12
- package/dist/runtime/editor/features/transform/index.vue +1 -3
- package/dist/runtime/editor/helpers/clipboardData/index.d.ts +11 -0
- package/dist/runtime/editor/helpers/clipboardData/index.js +157 -0
- package/dist/runtime/editor/helpers/options/index.js +5 -0
- package/dist/runtime/editor/icons/svg/stars.svg +5 -1
- package/dist/runtime/editor/plugins/Sidebar/Detached/index.d.vue.ts +1 -1
- package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue.d.ts +1 -1
- package/dist/runtime/editor/plugins/Sidebar/index.d.vue.ts +15 -4
- package/dist/runtime/editor/plugins/Sidebar/index.vue +4 -2
- package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +15 -4
- package/dist/runtime/editor/providers/analyze.d.ts +43 -0
- package/dist/runtime/editor/providers/analyze.js +78 -0
- package/dist/runtime/editor/providers/animation.d.ts +4 -0
- package/dist/runtime/editor/providers/animation.js +6 -0
- package/dist/runtime/editor/providers/definition.d.ts +2 -2
- package/dist/runtime/editor/providers/definition.js +7 -1
- package/dist/runtime/editor/providers/dom.d.ts +5 -0
- package/dist/runtime/editor/providers/dom.js +11 -2
- package/dist/runtime/editor/providers/dragdrop.d.ts +55 -0
- package/dist/runtime/editor/providers/dragdrop.js +37 -0
- package/dist/runtime/editor/providers/fields.d.ts +19 -1
- package/dist/runtime/editor/providers/fields.js +54 -2
- package/dist/runtime/editor/providers/storage.js +15 -0
- package/dist/runtime/editor/providers/ui.d.ts +6 -0
- package/dist/runtime/editor/providers/ui.js +19 -0
- package/dist/runtime/editor/translations/de.json +338 -58
- package/dist/runtime/editor/translations/fr.json +331 -51
- package/dist/runtime/editor/translations/gsw_CH.json +336 -56
- package/dist/runtime/editor/translations/it.json +331 -51
- package/dist/runtime/editor/types/app.d.ts +4 -2
- package/dist/runtime/editor/types/draggable.d.ts +1 -0
- package/dist/runtime/editor/types/ui.d.ts +1 -1
- package/dist/runtime/helpers/imports/index.d.ts +8 -1
- package/dist/runtime/helpers/imports/index.js +15 -6
- package/dist/runtime/helpers/injections.d.ts +6 -2
- package/dist/runtime/helpers/injections.js +3 -0
- package/dist/runtime/helpers/runtimeHelpers/index.js +14 -0
- package/dist/runtime/types/blockOptions.d.ts +2 -1
- package/dist/runtime/types/definitions.d.ts +12 -5
- package/dist/runtime/types/provider.d.ts +2 -0
- package/dist/shared/editor.6D5vApr0.mjs +30 -0
- package/dist/shared/{editor.DMFfaLVE.mjs → editor.BFIzNSQM.mjs} +1 -30
- package/dist/shared/{editor.Iax3GCvt.d.mts → editor.BdBm1Z7C.d.mts} +34 -0
- package/dist/types.d.mts +1 -1
- package/package.json +21 -3
- package/dist/modules/agent/runtime/app/tools/get_available_bundles/index.js +0 -104
- package/dist/runtime/editor/features/clipboard/List/Item/File.d.vue.ts +0 -4
- package/dist/runtime/editor/features/clipboard/List/Item/File.vue +0 -60
- package/dist/runtime/editor/features/clipboard/List/Item/File.vue.d.ts +0 -4
- package/dist/runtime/editor/features/clipboard/List/Item/Video.d.vue.ts +0 -4
- package/dist/runtime/editor/features/clipboard/List/Item/Video.vue.d.ts +0 -4
- package/dist/runtime/editor/features/clipboard/List/index.vue +0 -72
- package/dist/runtime/editor/features/tour/Popup/index.d.vue.ts +0 -9
- package/dist/runtime/editor/features/tour/Popup/index.vue +0 -34
- package/dist/runtime/editor/features/tour/Popup/index.vue.d.ts +0 -9
- package/dist/runtime/editor/providers/dropArea.d.ts +0 -48
- package/dist/runtime/editor/providers/dropArea.js +0 -22
- /package/dist/modules/agent/runtime/app/tools/{get_available_bundles → analyze_content}/index.d.ts +0 -0
|
@@ -1,109 +1,90 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="bk-agent-input-actions">
|
|
3
|
-
<
|
|
4
|
-
<div
|
|
3
|
+
<TransitionHeight opacity>
|
|
4
|
+
<div v-if="isExpanded" class="bk-agent-input-actions-expanded">
|
|
5
|
+
<TokenUsage :usage-turns />
|
|
6
|
+
<DropdownItem
|
|
7
|
+
icon="bk_mdi_bug_report"
|
|
8
|
+
:text="$t('aiAgentShowTranscript', 'Show transcript...')"
|
|
9
|
+
@click="$emit('show-transcript')"
|
|
10
|
+
/>
|
|
11
|
+
<DropdownItem
|
|
12
|
+
icon="bk_mdi_forum"
|
|
13
|
+
:text="$t('aiAgentPastConversations', 'Past conversations')"
|
|
14
|
+
:disabled="!isConnected"
|
|
15
|
+
@click="$emit('show-conversations')"
|
|
16
|
+
/>
|
|
17
|
+
</div>
|
|
18
|
+
</TransitionHeight>
|
|
19
|
+
<div class="bk-agent-input-actions-bar">
|
|
20
|
+
<div class="bk-agent-input-actions-left">
|
|
5
21
|
<button
|
|
6
|
-
class="bk-
|
|
7
|
-
:
|
|
22
|
+
class="bk-agent-input-actions-button"
|
|
23
|
+
:class="{ 'bk-is-active': isExpanded }"
|
|
8
24
|
:disabled="!isConnected"
|
|
9
|
-
@click="
|
|
25
|
+
@click="isExpanded = !isExpanded"
|
|
10
26
|
>
|
|
11
|
-
<Icon
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<div v-if="
|
|
15
|
-
<
|
|
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
|
-
/>
|
|
27
|
+
<Icon
|
|
28
|
+
:name="isExpanded ? 'bk_mdi_collapse_all' : 'bk_mdi_expand_all'"
|
|
29
|
+
/>
|
|
30
|
+
<div v-if="!isExpanded" class="bk-tooltip">
|
|
31
|
+
<span>{{ $t("aiAgentExpandButton", "Show more") }}</span>
|
|
33
32
|
</div>
|
|
34
|
-
</
|
|
33
|
+
</button>
|
|
34
|
+
<button
|
|
35
|
+
v-show="!hasText && hasConversation"
|
|
36
|
+
class="bk-agent-input-actions-button"
|
|
37
|
+
:disabled="!isConnected"
|
|
38
|
+
@click="$emit('new-conversation')"
|
|
39
|
+
>
|
|
40
|
+
<Icon name="bk_mdi_add" />
|
|
41
|
+
<span>{{
|
|
42
|
+
$t("aiAgentNewConversation", "Start new conversation")
|
|
43
|
+
}}</span>
|
|
44
|
+
</button>
|
|
35
45
|
</div>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
46
|
+
<div class="bk-agent-input-actions-right">
|
|
47
|
+
<div v-show="hasText" class="bk-agent-input-actions-keyboard">
|
|
48
|
+
{{ $t("textareaNewLineHint", "Shift + Enter for new line") }}
|
|
49
|
+
</div>
|
|
50
|
+
<button
|
|
51
|
+
v-if="isProcessing"
|
|
52
|
+
class="bk-button bk-is-danger bk-is-small bk-is-icon-only"
|
|
53
|
+
:disabled="!isConnected"
|
|
54
|
+
@click="$emit('cancel')"
|
|
55
|
+
>
|
|
56
|
+
<Icon name="bk_mdi_stop" />
|
|
57
|
+
</button>
|
|
58
|
+
<button
|
|
59
|
+
v-else
|
|
60
|
+
class="bk-button bk-is-primary bk-is-small bk-is-icon-only"
|
|
61
|
+
:disabled="!canSubmit"
|
|
62
|
+
@click="$emit('submit')"
|
|
63
|
+
>
|
|
64
|
+
<Icon name="bk_mdi_arrow_upward" />
|
|
65
|
+
</button>
|
|
40
66
|
</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
67
|
</div>
|
|
58
68
|
</div>
|
|
59
69
|
</template>
|
|
60
70
|
|
|
61
71
|
<script setup>
|
|
72
|
+
import { ref, useBlokkli } from "#imports";
|
|
62
73
|
import {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
useBlokkli
|
|
68
|
-
} from "#imports";
|
|
69
|
-
import { Icon, BlokkliTransition } from "#blokkli/editor/components";
|
|
70
|
-
import DropdownItem from "./DropdownItem/index.vue";
|
|
74
|
+
Icon,
|
|
75
|
+
DropdownItem,
|
|
76
|
+
TransitionHeight
|
|
77
|
+
} from "#blokkli/editor/components";
|
|
71
78
|
import TokenUsage from "./TokenUsage/index.vue";
|
|
72
79
|
defineProps({
|
|
73
80
|
isProcessing: { type: Boolean, required: true },
|
|
74
81
|
isConnected: { type: Boolean, required: true },
|
|
75
82
|
canSubmit: { type: Boolean, required: true },
|
|
76
83
|
hasText: { type: Boolean, required: true },
|
|
84
|
+
hasConversation: { type: Boolean, required: true },
|
|
77
85
|
usageTurns: { type: Array, required: true }
|
|
78
86
|
});
|
|
79
|
-
|
|
80
|
-
const { $t
|
|
81
|
-
const
|
|
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
|
-
}
|
|
87
|
+
defineEmits(["submit", "cancel", "new-conversation", "show-transcript", "show-conversations"]);
|
|
88
|
+
const { $t } = useBlokkli();
|
|
89
|
+
const isExpanded = ref(false);
|
|
109
90
|
</script>
|
|
@@ -4,6 +4,7 @@ type __VLS_Props = {
|
|
|
4
4
|
isConnected: boolean;
|
|
5
5
|
canSubmit: boolean;
|
|
6
6
|
hasText: boolean;
|
|
7
|
+
hasConversation: boolean;
|
|
7
8
|
usageTurns: UsageTurn[];
|
|
8
9
|
};
|
|
9
10
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
:class="{
|
|
5
5
|
'bk-is-active': hasActivePlan
|
|
6
6
|
}"
|
|
7
|
-
@paste.capture="onPaste"
|
|
8
7
|
>
|
|
9
8
|
<TransitionHeight opacity :duration="600">
|
|
10
9
|
<div v-if="attachments.length" class="bk-agent-input-attachments">
|
|
@@ -26,6 +25,7 @@
|
|
|
26
25
|
:max-height="150"
|
|
27
26
|
submit-on-enter
|
|
28
27
|
paste-markdown
|
|
28
|
+
:on-before-paste="onPaste"
|
|
29
29
|
rows="2"
|
|
30
30
|
:placeholder="placeholder"
|
|
31
31
|
@submit="onSubmit"
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
:can-submit="canSubmit"
|
|
40
40
|
:usage-turns="usageTurns"
|
|
41
41
|
:has-text
|
|
42
|
+
:has-conversation
|
|
42
43
|
@submit="onSubmit"
|
|
43
44
|
@cancel="$emit('cancel')"
|
|
44
45
|
@new-conversation="$emit('new-conversation')"
|
|
@@ -79,23 +80,20 @@ const placeholder = computed(() => {
|
|
|
79
80
|
const emit = defineEmits(["submit", "cancel", "new-conversation", "show-transcript", "show-conversations"]);
|
|
80
81
|
const model = defineModel({ type: String, ...{ required: true } });
|
|
81
82
|
const attachments = ref([]);
|
|
82
|
-
function onPaste(
|
|
83
|
-
const
|
|
84
|
-
if (!
|
|
85
|
-
return;
|
|
83
|
+
function onPaste(data) {
|
|
84
|
+
const content = data.toMarkdown();
|
|
85
|
+
if (!content || content.length < ATTACHMENT_THRESHOLD) {
|
|
86
|
+
return false;
|
|
86
87
|
}
|
|
87
|
-
if (attachments.value.some((a) => a.content ===
|
|
88
|
-
|
|
89
|
-
e.stopPropagation();
|
|
90
|
-
return;
|
|
88
|
+
if (attachments.value.some((a) => a.content === content)) {
|
|
89
|
+
return true;
|
|
91
90
|
}
|
|
92
|
-
e.preventDefault();
|
|
93
|
-
e.stopPropagation();
|
|
94
91
|
attachments.value.push({
|
|
95
92
|
type: "text",
|
|
96
93
|
id: generateUUID(),
|
|
97
|
-
content
|
|
94
|
+
content
|
|
98
95
|
});
|
|
96
|
+
return true;
|
|
99
97
|
}
|
|
100
98
|
function removeAttachment(id) {
|
|
101
99
|
attachments.value = attachments.value.filter((a) => a.id !== id);
|
|
@@ -10,10 +10,10 @@ brauchst:
|
|
|
10
10
|
- **Vorlagen einfügen** aus der Vorlagenbibliothek
|
|
11
11
|
- **Inhalte übersetzen** in andere Sprachen
|
|
12
12
|
|
|
13
|
-
Ein paar Dinge, die
|
|
13
|
+
Ein paar Dinge, die ich nicht kann:
|
|
14
14
|
|
|
15
15
|
- **Speichern oder veröffentlichen** — das musst du selbst machen
|
|
16
|
-
- **Andere Seiten bearbeiten** — ich kann nur auf der aktuellen
|
|
16
|
+
- **Andere Seiten bearbeiten** — ich kann nur auf der aktuellen arbeiten
|
|
17
17
|
- **Globale Inhalte löschen** wie Bilder, Videos oder Seiten
|
|
18
18
|
|
|
19
19
|
Probier eines davon aus, um loszulegen:
|
|
@@ -9,10 +9,10 @@ I can help you shape this page — just tell me what you need:
|
|
|
9
9
|
- **Insert templates** from the template library
|
|
10
10
|
- **Translate** content to other languages
|
|
11
11
|
|
|
12
|
-
A few things
|
|
12
|
+
A few things I can't do:
|
|
13
13
|
|
|
14
14
|
- **Save or publish** changes — you need to do that yourself
|
|
15
|
-
- **Edit other pages** — I can only work on the current
|
|
15
|
+
- **Edit other pages** — I can only work on the current one
|
|
16
16
|
- **Delete global content** like images, videos or pages
|
|
17
17
|
|
|
18
18
|
Try one of these to get started:
|
|
@@ -121,7 +121,6 @@ import AgentInput from "./Input/index.vue";
|
|
|
121
121
|
import ConversationList from "./ConversationList/index.vue";
|
|
122
122
|
import Plan from "./Plan/index.vue";
|
|
123
123
|
import { mcpTools } from "#blokkli-build/agent-client";
|
|
124
|
-
import { isToolDefinition } from "#blokkli/agent/app/helpers";
|
|
125
124
|
import { itemEntityType } from "#blokkli-build/config";
|
|
126
125
|
const props = defineProps({
|
|
127
126
|
agentName: { type: String, required: true },
|
|
@@ -158,12 +157,9 @@ const toolContext = computed(() => ({
|
|
|
158
157
|
itemEntityType,
|
|
159
158
|
adapter: app.adapter
|
|
160
159
|
}));
|
|
161
|
-
const staticTools = mcpTools.filter(isToolDefinition);
|
|
162
160
|
const pendingToolComponent = computed(() => {
|
|
163
161
|
if (!props.pendingToolCall) return null;
|
|
164
|
-
const tool =
|
|
165
|
-
(t) => t.name === props.pendingToolCall.toolName
|
|
166
|
-
);
|
|
162
|
+
const tool = mcpTools.find((t) => t.name === props.pendingToolCall.toolName);
|
|
167
163
|
return tool?.component || null;
|
|
168
164
|
});
|
|
169
165
|
const inputValue = ref("");
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Transcript } from '#blokkli/agent/shared/types';
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
5
|
+
transcript: Transcript;
|
|
6
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
7
|
+
transcript: Transcript;
|
|
8
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bk-agent-transcript">
|
|
3
|
+
<section class="bk-agent-transcript-section">
|
|
4
|
+
<h3>System Prompts ({{ transcript.system.length }})</h3>
|
|
5
|
+
<details
|
|
6
|
+
v-for="prompt in transcript.system"
|
|
7
|
+
:key="prompt.id"
|
|
8
|
+
class="bk-agent-transcript-entry"
|
|
9
|
+
>
|
|
10
|
+
<summary>{{ prompt.name }}</summary>
|
|
11
|
+
<pre class="bk-agent-transcript-block">{{ prompt.content }}</pre>
|
|
12
|
+
</details>
|
|
13
|
+
</section>
|
|
14
|
+
|
|
15
|
+
<section class="bk-agent-transcript-section">
|
|
16
|
+
<h3>Tools ({{ transcript.tools.length }})</h3>
|
|
17
|
+
<details
|
|
18
|
+
v-for="tool in transcript.tools"
|
|
19
|
+
:key="tool.name"
|
|
20
|
+
class="bk-agent-transcript-entry"
|
|
21
|
+
>
|
|
22
|
+
<summary>{{ tool.name }}</summary>
|
|
23
|
+
<div class="bk-agent-transcript-block">
|
|
24
|
+
<p>{{ tool.description }}</p>
|
|
25
|
+
<pre>{{ JSON.stringify(tool.input_schema, null, 2) }}</pre>
|
|
26
|
+
</div>
|
|
27
|
+
</details>
|
|
28
|
+
</section>
|
|
29
|
+
|
|
30
|
+
<section class="bk-agent-transcript-section">
|
|
31
|
+
<h3>Messages ({{ transcript.messages.length }})</h3>
|
|
32
|
+
<div
|
|
33
|
+
v-for="(message, i) in transcript.messages"
|
|
34
|
+
:key="i"
|
|
35
|
+
class="bk-agent-transcript-message"
|
|
36
|
+
>
|
|
37
|
+
<div class="bk-agent-transcript-role">
|
|
38
|
+
{{ message.type === "agent" ? "AGENT" : "USER" }}
|
|
39
|
+
<span v-if="message.full" class="bk-agent-transcript-pruned"
|
|
40
|
+
>(pruned)</span
|
|
41
|
+
>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="bk-agent-transcript-content">
|
|
44
|
+
<template v-if="typeof message.seen === 'string'">
|
|
45
|
+
<pre class="bk-agent-transcript-block">{{ message.seen }}</pre>
|
|
46
|
+
</template>
|
|
47
|
+
<template v-else>
|
|
48
|
+
<div
|
|
49
|
+
v-for="(block, j) in message.seen"
|
|
50
|
+
:key="j"
|
|
51
|
+
class="bk-agent-transcript-block"
|
|
52
|
+
>
|
|
53
|
+
<template v-if="block.type === 'text'">
|
|
54
|
+
<pre>{{ block.text }}</pre>
|
|
55
|
+
</template>
|
|
56
|
+
<template v-else-if="block.type === 'skill'">
|
|
57
|
+
<div class="bk-agent-transcript-label">
|
|
58
|
+
Skill: {{ block.name }}
|
|
59
|
+
</div>
|
|
60
|
+
<pre>{{ block.text }}</pre>
|
|
61
|
+
</template>
|
|
62
|
+
<template v-else-if="block.type === 'tool_use'">
|
|
63
|
+
<div class="bk-agent-transcript-label">
|
|
64
|
+
Tool Use: {{ block.name }} ({{ block.id }})
|
|
65
|
+
</div>
|
|
66
|
+
<pre>{{ JSON.stringify(block.input, null, 2) }}</pre>
|
|
67
|
+
</template>
|
|
68
|
+
<template v-else-if="block.type === 'tool_result'">
|
|
69
|
+
<div class="bk-agent-transcript-label">
|
|
70
|
+
Tool Result ({{ block.tool_use_id }})
|
|
71
|
+
<span v-if="block.is_error" class="bk-agent-transcript-error"
|
|
72
|
+
>ERROR</span
|
|
73
|
+
>
|
|
74
|
+
</div>
|
|
75
|
+
<pre>{{ block.content }}</pre>
|
|
76
|
+
</template>
|
|
77
|
+
</div>
|
|
78
|
+
</template>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<details v-if="message.full" class="bk-agent-transcript-entry">
|
|
82
|
+
<summary>Original (before pruning)</summary>
|
|
83
|
+
<div class="bk-agent-transcript-content">
|
|
84
|
+
<template v-if="typeof message.full === 'string'">
|
|
85
|
+
<pre class="bk-agent-transcript-block">{{ message.full }}</pre>
|
|
86
|
+
</template>
|
|
87
|
+
<template v-else>
|
|
88
|
+
<div
|
|
89
|
+
v-for="(block, j) in message.full"
|
|
90
|
+
:key="j"
|
|
91
|
+
class="bk-agent-transcript-block"
|
|
92
|
+
>
|
|
93
|
+
<template v-if="block.type === 'text'">
|
|
94
|
+
<pre>{{ block.text }}</pre>
|
|
95
|
+
</template>
|
|
96
|
+
<template v-else-if="block.type === 'skill'">
|
|
97
|
+
<div class="bk-agent-transcript-label">
|
|
98
|
+
Skill: {{ block.name }}
|
|
99
|
+
</div>
|
|
100
|
+
<pre>{{ block.text }}</pre>
|
|
101
|
+
</template>
|
|
102
|
+
<template v-else-if="block.type === 'tool_use'">
|
|
103
|
+
<div class="bk-agent-transcript-label">
|
|
104
|
+
Tool Use: {{ block.name }} ({{ block.id }})
|
|
105
|
+
</div>
|
|
106
|
+
<pre>{{ JSON.stringify(block.input, null, 2) }}</pre>
|
|
107
|
+
</template>
|
|
108
|
+
<template v-else-if="block.type === 'tool_result'">
|
|
109
|
+
<div class="bk-agent-transcript-label">
|
|
110
|
+
Tool Result ({{ block.tool_use_id }})
|
|
111
|
+
<span
|
|
112
|
+
v-if="block.is_error"
|
|
113
|
+
class="bk-agent-transcript-error"
|
|
114
|
+
>ERROR</span
|
|
115
|
+
>
|
|
116
|
+
</div>
|
|
117
|
+
<pre>{{ block.content }}</pre>
|
|
118
|
+
</template>
|
|
119
|
+
</div>
|
|
120
|
+
</template>
|
|
121
|
+
</div>
|
|
122
|
+
</details>
|
|
123
|
+
</div>
|
|
124
|
+
</section>
|
|
125
|
+
</div>
|
|
126
|
+
</template>
|
|
127
|
+
|
|
128
|
+
<script setup>
|
|
129
|
+
defineProps({
|
|
130
|
+
transcript: { type: Object, required: true }
|
|
131
|
+
});
|
|
132
|
+
</script>
|
|
133
|
+
|
|
134
|
+
<script>
|
|
135
|
+
export default {
|
|
136
|
+
name: "AgentTranscript"
|
|
137
|
+
};
|
|
138
|
+
</script>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Transcript } from '#blokkli/agent/shared/types';
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
5
|
+
transcript: Transcript;
|
|
6
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
7
|
+
transcript: Transcript;
|
|
8
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<PluginSidebar
|
|
3
3
|
id="agent"
|
|
4
|
-
v-slot="{ isShown }"
|
|
5
4
|
:title="agentName"
|
|
5
|
+
:tooltip-title
|
|
6
6
|
:tour-text="
|
|
7
7
|
$t('aiAgentTourText', 'Chat with an AI assistant to edit page content.')
|
|
8
8
|
"
|
|
@@ -10,41 +10,48 @@
|
|
|
10
10
|
weight="-900"
|
|
11
11
|
render-always
|
|
12
12
|
beta
|
|
13
|
+
region="right-bottom"
|
|
14
|
+
@toggle="closeAgentPopup"
|
|
13
15
|
>
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
16
|
+
<template #icon>
|
|
17
|
+
<Icon name="stars" class="bk-is-animated" />
|
|
18
|
+
</template>
|
|
19
|
+
<template #default="{ isShown }">
|
|
20
|
+
<AgentPanel
|
|
21
|
+
:is-shown
|
|
22
|
+
:debug-styling="DEBUG_STYLING"
|
|
23
|
+
:agent-name
|
|
24
|
+
:conversation
|
|
25
|
+
:active-item
|
|
26
|
+
:is-thinking
|
|
27
|
+
:is-processing
|
|
28
|
+
:is-connected
|
|
29
|
+
:has-been-ready
|
|
30
|
+
:pending-tool-call
|
|
31
|
+
:pending-mutation
|
|
32
|
+
:auto-approve
|
|
33
|
+
:conversation-list
|
|
34
|
+
:show-conversation-list
|
|
35
|
+
:plan
|
|
36
|
+
:usage-turns="usageTurns"
|
|
37
|
+
@connect="connect"
|
|
38
|
+
@send-prompt="sendPrompt"
|
|
39
|
+
@retry="retry"
|
|
40
|
+
@cancel="cancel"
|
|
41
|
+
@approve="approve"
|
|
42
|
+
@reject="reject"
|
|
43
|
+
@set-auto-approve="setAutoApprove"
|
|
44
|
+
@new-conversation="newConversation"
|
|
45
|
+
@get-transcript="getTranscript"
|
|
46
|
+
@tool-component-done="onToolComponentDone"
|
|
47
|
+
@switch-conversation="switchConversation"
|
|
48
|
+
@delete-conversation="deleteConversation"
|
|
49
|
+
@show-conversations="onShowConversations"
|
|
50
|
+
@hide-conversations="onHideConversations"
|
|
51
|
+
@approve-plan="approvePlan"
|
|
52
|
+
@reject-plan="rejectPlan"
|
|
53
|
+
/>
|
|
54
|
+
</template>
|
|
48
55
|
</PluginSidebar>
|
|
49
56
|
|
|
50
57
|
<Teleport :to="ui.mainLayoutElement.value">
|
|
@@ -58,19 +65,47 @@
|
|
|
58
65
|
full-screen
|
|
59
66
|
@cancel="showTranscript = false"
|
|
60
67
|
>
|
|
61
|
-
<
|
|
68
|
+
<AgentTranscript
|
|
69
|
+
v-if="transcriptContent"
|
|
70
|
+
:transcript="transcriptContent"
|
|
71
|
+
/>
|
|
62
72
|
</DialogModal>
|
|
63
73
|
</BlokkliTransition>
|
|
74
|
+
|
|
75
|
+
<Popup
|
|
76
|
+
id="agent"
|
|
77
|
+
ref="popup"
|
|
78
|
+
:title="$t('aiAgentPopupTitle', 'AI-Assistant')"
|
|
79
|
+
:cta="$t('aiAgentIntroPopupCta', 'Get started')"
|
|
80
|
+
theme="primary"
|
|
81
|
+
position="bottom-right"
|
|
82
|
+
@submit="openAgent"
|
|
83
|
+
>
|
|
84
|
+
<Icon name="stars" class="bk-is-animated" />
|
|
85
|
+
<p v-html="popupText" />
|
|
86
|
+
</Popup>
|
|
64
87
|
</Teleport>
|
|
65
88
|
</template>
|
|
66
89
|
|
|
67
90
|
<script setup>
|
|
68
|
-
import {
|
|
91
|
+
import {
|
|
92
|
+
useBlokkli,
|
|
93
|
+
defineBlokkliFeature,
|
|
94
|
+
onBeforeUnmount,
|
|
95
|
+
computed,
|
|
96
|
+
useTemplateRef
|
|
97
|
+
} from "#imports";
|
|
69
98
|
import { PluginSidebar } from "#blokkli/editor/plugins";
|
|
70
|
-
import {
|
|
99
|
+
import {
|
|
100
|
+
DialogModal,
|
|
101
|
+
BlokkliTransition,
|
|
102
|
+
Icon,
|
|
103
|
+
Popup
|
|
104
|
+
} from "#blokkli/editor/components";
|
|
71
105
|
import agentProvider from "#blokkli/agent/app/composables/agentProvider";
|
|
72
106
|
import { agentPrompts, agentName } from "#blokkli-build/agent-client";
|
|
73
107
|
import AgentPanel from "./Panel/index.vue";
|
|
108
|
+
import AgentTranscript from "./Transcript/index.vue";
|
|
74
109
|
import { defineItemDropdownAction } from "#blokkli/editor/composables";
|
|
75
110
|
const DEBUG_STYLING = false;
|
|
76
111
|
const { adapter } = defineBlokkliFeature({
|
|
@@ -88,6 +123,27 @@ const { adapter } = defineBlokkliFeature({
|
|
|
88
123
|
});
|
|
89
124
|
const app = useBlokkli();
|
|
90
125
|
const { $t, ui } = app;
|
|
126
|
+
const popup = useTemplateRef("popup");
|
|
127
|
+
function closeAgentPopup() {
|
|
128
|
+
if (popup.value) {
|
|
129
|
+
popup.value.closePopup();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
function openAgent() {
|
|
133
|
+
app.eventBus.emit("sidebar:open", "agent");
|
|
134
|
+
}
|
|
135
|
+
const popupText = computed(() => {
|
|
136
|
+
return $t(
|
|
137
|
+
"aiAgentIntroPopup",
|
|
138
|
+
"Need help editing? @name is your AI assistant \u2014 it can add, move, and update blocks and much more. Give it a try!"
|
|
139
|
+
).replace("@name", `<em>${agentName}</em>`);
|
|
140
|
+
});
|
|
141
|
+
const tooltipTitle = computed(() => {
|
|
142
|
+
return $t("agentSidebarTooltipLabel", "@name (AI-Assistant)").replace(
|
|
143
|
+
"@name",
|
|
144
|
+
agentName
|
|
145
|
+
);
|
|
146
|
+
});
|
|
91
147
|
const {
|
|
92
148
|
isConnected,
|
|
93
149
|
hasBeenReady,
|