@blokkli/editor 2.0.0-alpha.62 → 2.0.0-alpha.64
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 +32 -27
- package/dist/global/types/colorOptions.d.ts +16 -0
- package/dist/module.d.mts +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +275 -18
- package/dist/modules/agent/index.d.mts +1 -1
- package/dist/modules/agent/index.mjs +2 -1
- package/dist/modules/agent/runtime/app/components/Attachment/PreviewCsv/index.vue +1 -1
- package/dist/modules/agent/runtime/app/components/Conversation/Item/Assistant/index.vue +14 -5
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/ConversationsTab/Item.vue +2 -2
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/RatingsTab/Item.vue +2 -2
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/SplitView/ConversationDetail.vue +2 -2
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/SplitView/index.d.vue.ts +1 -1
- package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/SplitView/index.vue.d.ts +1 -1
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue +1 -1
- package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/index.vue +1 -1
- package/dist/modules/agent/runtime/app/features/agent/Transcript/MessageContent.vue +14 -1
- package/dist/modules/agent/runtime/app/features/agent/Transcript/index.vue +31 -13
- package/dist/modules/agent/runtime/app/features/agent/index.vue +1 -1
- package/dist/modules/agent/runtime/app/helpers/linkifyBlockUuids.d.ts +11 -0
- package/dist/modules/agent/runtime/app/helpers/linkifyBlockUuids.js +47 -0
- package/dist/modules/agent/runtime/app/tools/add_content_search_paragraphs/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/add_fragment/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/add_template/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/ask_question/Component.vue +1 -1
- package/dist/modules/agent/runtime/app/tools/ask_question/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.d.vue.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue +28 -26
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.d.ts +16 -1
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.d.vue.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue +59 -16
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.d.ts +15 -0
- package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/fieldDiffApproval.d.ts +85 -15
- package/dist/modules/agent/runtime/app/tools/fieldDiffApproval.js +136 -28
- package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.d.ts +2 -2
- package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.js +6 -2
- package/dist/modules/agent/runtime/app/tools/get_content_fields/index.d.ts +3 -3
- package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.d.ts +5 -5
- package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/replace_media_field/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/schemas.d.ts +17 -7
- package/dist/modules/agent/runtime/app/tools/schemas.js +29 -12
- package/dist/modules/agent/runtime/app/tools/search_text/index.js +1 -1
- package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.d.ts +1 -1
- package/dist/modules/agent/runtime/app/tools/update_text_fields/Component.d.vue.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/update_text_fields/Component.vue +54 -30
- package/dist/modules/agent/runtime/app/tools/update_text_fields/Component.vue.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/update_text_fields/index.d.ts +18 -3
- package/dist/modules/agent/runtime/server/classes/FieldStreamParser/index.js +10 -15
- package/dist/modules/agent/runtime/server/default-system-prompts/architecture.js +1 -1
- package/dist/modules/agent/runtime/server/default-system-prompts/important-rules.js +1 -0
- package/dist/modules/agent/runtime/shared/toolParams.d.ts +3 -3
- package/dist/modules/agent/runtime/shared/types.d.ts +3 -3
- package/dist/modules/charts/index.d.mts +14 -1
- package/dist/modules/charts/index.mjs +37 -2
- package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.d.ts +1 -1
- package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.js +12 -5
- package/dist/modules/charts/runtime/components/ChartRenderer/index.vue +7 -16
- package/dist/modules/charts/runtime/features/charts/Editor/AdvancedConfigPanel/index.vue +1 -1
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/Field.vue +19 -9
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue +7 -77
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/OutputPreviewTable/index.vue +1 -1
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/csvHelpers.d.ts +1 -1
- package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.vue +16 -8
- package/dist/modules/charts/runtime/features/charts/Editor/NumberFormatEditor/index.vue +23 -7
- package/dist/modules/charts/runtime/features/charts/Editor/index.vue +5 -6
- package/dist/modules/charts/runtime/features/charts/Editor/useChartEditorState.d.ts +1 -1
- package/dist/modules/charts/runtime/helpers/index.d.ts +2 -1
- package/dist/modules/charts/runtime/helpers/index.js +4 -2
- package/dist/modules/drupal/graphql/base/fragment.paragraphsBlokkliEditState.graphql +5 -0
- package/dist/modules/drupal/graphql/base/fragment.paragraphsBlokkliMutationResult.graphql +3 -0
- package/dist/modules/drupal/index.d.mts +1 -1
- package/dist/modules/drupal/runtime/adapter/index.js +5 -1
- package/dist/modules/iframes/index.d.mts +1 -1
- package/dist/modules/index.d.mts +1 -1
- package/dist/modules/readability/index.d.mts +1 -1
- package/dist/modules/readability/index.mjs +2 -1
- package/dist/modules/table-of-contents/index.d.mts +1 -1
- package/dist/runtime/components/Blocks/NotImplemented/index.vue +1 -1
- package/dist/runtime/composables/useBlokkliRuntimeConfig.d.ts +50 -0
- package/dist/runtime/composables/useBlokkliRuntimeConfig.js +34 -0
- package/dist/runtime/editor/adapter/index.d.ts +2 -1
- package/dist/runtime/editor/components/Actions/Title/index.vue +1 -1
- package/dist/runtime/editor/components/Actions/index.vue +1 -1
- package/dist/runtime/editor/components/ArtboardTooltip/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/ArtboardTooltip/index.vue +2 -2
- package/dist/runtime/editor/components/ArtboardTooltip/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/Avatar/index.vue +1 -1
- package/dist/runtime/editor/components/BlockPreviewItem/index.vue +1 -1
- package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue +1 -1
- package/dist/runtime/editor/components/BlockProxy/index.vue +1 -1
- package/dist/runtime/editor/components/BlokkliRootErrorBoundary.vue +1 -1
- package/dist/runtime/editor/components/BundleSelector/index.vue +1 -1
- package/dist/runtime/editor/components/ColorDropdown/index.d.vue.ts +26 -0
- package/dist/runtime/editor/components/ColorDropdown/index.vue +116 -0
- package/dist/runtime/editor/components/ColorDropdown/index.vue.d.ts +26 -0
- package/dist/runtime/editor/components/Dialog/index.vue +1 -1
- package/dist/runtime/editor/components/DiffApproval/Highlight/Item.d.vue.ts +14 -20
- package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue +97 -52
- package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue.d.ts +14 -20
- package/dist/runtime/editor/components/DiffApproval/Highlight/index.d.vue.ts +6 -6
- package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue +30 -21
- package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue.d.ts +6 -6
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.d.vue.ts +19 -9
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue +19 -10
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue.d.ts +19 -9
- package/dist/runtime/editor/components/DiffApproval/index.d.vue.ts +14 -6
- package/dist/runtime/editor/components/DiffApproval/index.vue +62 -35
- package/dist/runtime/editor/components/DiffApproval/index.vue.d.ts +14 -6
- package/dist/runtime/editor/components/DiffApproval/types.d.ts +32 -0
- package/dist/runtime/editor/components/DiffApproval/types.js +20 -0
- package/dist/runtime/editor/components/DiffViewer/State.vue +1 -1
- package/dist/runtime/editor/components/DraggableList.vue +1 -1
- package/dist/runtime/editor/components/Dropdown/index.d.vue.ts +6 -4
- package/dist/runtime/editor/components/Dropdown/index.vue +91 -31
- package/dist/runtime/editor/components/Dropdown/index.vue.d.ts +6 -4
- package/dist/runtime/editor/components/DropdownItem/index.vue +1 -1
- package/dist/runtime/editor/components/EditIndicator.vue +1 -1
- package/dist/runtime/editor/components/EditProvider.vue +2 -2
- package/dist/runtime/editor/components/FileDropHandler/index.vue +1 -1
- package/dist/runtime/editor/components/FlexTextarea/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/FlexTextarea/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/Form/RadioTabs/index.vue +1 -1
- package/dist/runtime/editor/components/Form/Search/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/Form/Search/index.vue +2 -2
- package/dist/runtime/editor/components/Form/Search/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/FormOverlay/index.vue +1 -1
- package/dist/runtime/editor/components/Icon/index.vue +1 -1
- package/dist/runtime/editor/components/Indicators/index.vue +31 -100
- package/dist/runtime/editor/components/Konami/Game/index.vue +1 -1
- package/dist/runtime/editor/components/Messages/index.vue +1 -1
- package/dist/runtime/editor/components/NestedEditorOverlay/index.d.vue.ts +3 -2
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +5 -4
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue.d.ts +3 -2
- package/dist/runtime/editor/components/Overlay/index.vue +1 -1
- package/dist/runtime/editor/components/Pagination/index.vue +1 -1
- package/dist/runtime/editor/components/Panel/Section/index.vue +1 -1
- package/dist/runtime/editor/components/Panel/Tabs/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/Panel/Tabs/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/PluginConfigForm/index.vue +1 -1
- package/dist/runtime/editor/components/PluginConfigFormInline/FilterSelect/index.vue +1 -1
- package/dist/runtime/editor/components/PluginConfigFormInline/index.vue +1 -1
- package/dist/runtime/editor/components/Popup/index.vue +1 -1
- package/dist/runtime/editor/components/PopupHost/index.d.vue.ts +13 -0
- package/dist/runtime/editor/components/PopupHost/index.vue +12 -0
- package/dist/runtime/editor/components/PopupHost/index.vue.d.ts +13 -0
- package/dist/runtime/editor/components/PreviewProvider.vue +3 -2
- package/dist/runtime/editor/components/RelativeTime/index.vue +7 -13
- package/dist/runtime/editor/components/Resizable/index.vue +1 -1
- package/dist/runtime/editor/components/RichText/Editor/index.vue +1 -1
- package/dist/runtime/editor/components/ScaleToFit/index.vue +1 -1
- package/dist/runtime/editor/components/SearchOverlay/index.vue +1 -1
- package/dist/runtime/editor/components/SidebarFloater/index.vue +1 -1
- package/dist/runtime/editor/components/StatusIcon/index.vue +1 -1
- package/dist/runtime/editor/components/StatusIndicator/index.vue +1 -1
- package/dist/runtime/editor/components/SystemRequirements/index.vue +1 -1
- package/dist/runtime/editor/components/Tabs/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/Tabs/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue +2 -1
- package/dist/runtime/editor/components/Toolbar/index.vue +1 -1
- package/dist/runtime/editor/components/Transition/Collapse/index.vue +1 -1
- package/dist/runtime/editor/components/Transition/List/index.vue +1 -1
- package/dist/runtime/editor/components/index.d.ts +2 -0
- package/dist/runtime/editor/components/index.js +2 -0
- package/dist/runtime/editor/composables/defineViewOption.js +5 -1
- package/dist/runtime/editor/composables/useStickyToolbar.js +1 -4
- package/dist/runtime/editor/css/output.css +1 -1
- package/dist/runtime/editor/features/add-list/Help/index.vue +1 -1
- package/dist/runtime/editor/features/add-list/index.vue +1 -1
- package/dist/runtime/editor/features/analyze/Main.vue +15 -2
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodes.vue +4 -1
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodesTarget.vue +25 -16
- package/dist/runtime/editor/features/analyze/analyzers/defaults/validations.d.ts +10 -0
- package/dist/runtime/editor/features/analyze/analyzers/defaults/validations.js +39 -0
- package/dist/runtime/editor/features/analyze/analyzers/helpers/Context.d.ts +5 -1
- package/dist/runtime/editor/features/analyze/analyzers/helpers/Context.js +5 -0
- package/dist/runtime/editor/features/analyze/index.vue +1 -2
- package/dist/runtime/editor/features/anchors/Overlay/index.vue +11 -5
- package/dist/runtime/editor/features/anchors/index.vue +2 -1
- package/dist/runtime/editor/features/artboard/Overview/index.vue +1 -1
- package/dist/runtime/editor/features/artboard/Renderer.vue +1 -1
- package/dist/runtime/editor/features/artboard/Scrollbar/index.vue +1 -1
- package/dist/runtime/editor/features/block-scheduler/Dialog/index.vue +1 -1
- package/dist/runtime/editor/features/block-transfer/index.vue +1 -1
- package/dist/runtime/editor/features/breadcrumbs/index.vue +1 -1
- package/dist/runtime/editor/features/changelog/changelog.json +17 -1
- package/dist/runtime/editor/features/clipboard/DropElement/index.vue +1 -1
- package/dist/runtime/editor/features/comments/AddForm/index.vue +1 -1
- package/dist/runtime/editor/features/comments/Comment/Meta/index.vue +1 -1
- package/dist/runtime/editor/features/comments/Comment/index.vue +1 -1
- package/dist/runtime/editor/features/comments/Thread/index.vue +1 -1
- package/dist/runtime/editor/features/complex-options/index.vue +1 -0
- package/dist/runtime/editor/features/debug/Main.vue +1 -1
- package/dist/runtime/editor/features/dev-mode/index.vue +1 -1
- package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +1 -1
- package/dist/runtime/editor/features/dragging-overlay/index.vue +1 -1
- package/dist/runtime/editor/features/droppable-field-edit/Overlay/index.vue +1 -1
- package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue +1 -1
- package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.d.vue.ts +1 -5
- package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue.d.ts +1 -5
- package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/ChunkOverlay.vue +1 -1
- package/dist/runtime/editor/features/editable-field/Overlay/index.vue +1 -1
- package/dist/runtime/editor/features/editable-mask/index.vue +1 -1
- package/dist/runtime/editor/features/entity-title/index.vue +17 -7
- package/dist/runtime/editor/features/help/Dialog/index.vue +1 -1
- package/dist/runtime/editor/features/help/Shortcuts/index.vue +1 -1
- package/dist/runtime/editor/features/history/List/index.vue +1 -1
- package/dist/runtime/editor/features/import-existing/Dialog/index.vue +1 -1
- package/dist/runtime/editor/features/library/index.vue +1 -0
- package/dist/runtime/editor/features/media-library/index.vue +1 -1
- package/dist/runtime/editor/features/options/Form/Item.vue +5 -12
- package/dist/runtime/editor/features/options/Form/Radios/index.d.vue.ts +5 -4
- package/dist/runtime/editor/features/options/Form/Radios/index.vue +8 -5
- package/dist/runtime/editor/features/options/Form/Radios/index.vue.d.ts +5 -4
- package/dist/runtime/editor/features/options/Form/Text/index.d.vue.ts +4 -0
- package/dist/runtime/editor/features/options/Form/Text/index.vue +11 -3
- package/dist/runtime/editor/features/options/Form/Text/index.vue.d.ts +4 -0
- package/dist/runtime/editor/features/options/index.vue +1 -1
- package/dist/runtime/editor/features/publish/Dialog/Item.vue +4 -7
- package/dist/runtime/editor/features/publish/Dialog/PublishOption.vue +1 -1
- package/dist/runtime/editor/features/publish/Dialog/Violations.d.vue.ts +12 -0
- package/dist/runtime/editor/features/publish/Dialog/Violations.vue +117 -0
- package/dist/runtime/editor/features/publish/Dialog/Violations.vue.d.ts +12 -0
- package/dist/runtime/editor/features/publish/Dialog/index.vue +61 -24
- package/dist/runtime/editor/features/publish/index.vue +2 -4
- package/dist/runtime/editor/features/publish/types.d.ts +0 -4
- package/dist/runtime/editor/features/referenced-entities/List/Item/index.vue +1 -0
- package/dist/runtime/editor/features/responsive-preview/Frame/index.vue +1 -1
- package/dist/runtime/editor/features/search/index.vue +1 -1
- package/dist/runtime/editor/features/selection/AddButtons/Renderer/index.vue +1 -1
- package/dist/runtime/editor/features/settings/Dialog/FeatureSetting/index.vue +1 -1
- package/dist/runtime/editor/features/settings/index.vue +1 -1
- package/dist/runtime/editor/features/structure/List/Item/index.vue +1 -1
- package/dist/runtime/editor/features/structure/index.vue +1 -1
- package/dist/runtime/editor/features/templates/DialogManageTemplates/Item.vue +1 -0
- package/dist/runtime/editor/features/templates/DialogManageTemplates/index.vue +1 -1
- package/dist/runtime/editor/features/theme/index.vue +1 -1
- package/dist/runtime/editor/features/touch-action-bar/Bar/index.vue +1 -1
- package/dist/runtime/editor/features/tour/Overlay/index.vue +1 -1
- package/dist/runtime/editor/features/transform/Dialog/index.vue +1 -1
- package/dist/runtime/editor/features/translations/SelectionTable/index.vue +1 -1
- package/dist/runtime/editor/features/workspace/index.vue +1 -1
- package/dist/runtime/editor/helpers/color/index.d.ts +7 -0
- package/dist/runtime/editor/helpers/color/index.js +14 -0
- package/dist/runtime/editor/helpers/diff/index.d.ts +98 -0
- package/dist/runtime/editor/helpers/diff/index.js +262 -0
- package/dist/runtime/editor/helpers/injections.d.ts +11 -0
- package/dist/runtime/editor/helpers/injections.js +1 -0
- package/dist/runtime/editor/helpers/options/index.d.ts +2 -0
- package/dist/runtime/editor/helpers/options/index.js +21 -0
- package/dist/runtime/editor/plugins/BlockIndicator/index.d.vue.ts +24 -1
- package/dist/runtime/editor/plugins/BlockIndicator/index.vue +17 -7
- package/dist/runtime/editor/plugins/BlockIndicator/index.vue.d.ts +24 -1
- package/dist/runtime/editor/plugins/ItemAction/index.d.vue.ts +1 -0
- package/dist/runtime/editor/plugins/ItemAction/index.vue +1 -1
- package/dist/runtime/editor/plugins/ItemAction/index.vue.d.ts +1 -0
- 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 +2 -2
- package/dist/runtime/editor/plugins/Sidebar/index.vue +1 -1
- package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +2 -2
- package/dist/runtime/editor/plugins/ToolbarButton/index.vue +1 -1
- package/dist/runtime/editor/providers/analyze.js +5 -2
- package/dist/runtime/editor/providers/animation.d.ts +2 -0
- package/dist/runtime/editor/providers/config.d.ts +3 -1
- package/dist/runtime/editor/providers/config.js +46 -15
- package/dist/runtime/editor/providers/definition.d.ts +4 -3
- package/dist/runtime/editor/providers/definition.js +10 -2
- package/dist/runtime/editor/providers/plugin.d.ts +1 -0
- package/dist/runtime/editor/providers/state.d.ts +21 -0
- package/dist/runtime/editor/providers/state.js +10 -0
- package/dist/runtime/editor/translations/de.json +9 -4
- package/dist/runtime/editor/translations/fr.json +4 -4
- package/dist/runtime/editor/translations/gsw_CH.json +9 -4
- package/dist/runtime/editor/translations/it.json +4 -4
- package/dist/runtime/editor/types/state.d.ts +7 -0
- package/dist/runtime/editor/types/ui.d.ts +1 -0
- package/dist/runtime/helpers/colors.d.ts +39 -0
- package/dist/runtime/helpers/colors.js +28 -0
- package/dist/runtime/types/colors.d.ts +11 -0
- package/dist/shared/{editor.D28NbXr3.d.mts → editor.BDyiQvbV.d.mts} +434 -406
- package/dist/shared/{editor.Gu7mgJ5Q.mjs → editor.BGemL1Oh.mjs} +146 -146
- package/dist/types.d.mts +1 -1
- package/package.json +74 -82
- package/dist/runtime/editor/features/validations/Overlay/Item.d.vue.ts +0 -7
- package/dist/runtime/editor/features/validations/Overlay/Item.vue +0 -36
- package/dist/runtime/editor/features/validations/Overlay/Item.vue.d.ts +0 -7
- package/dist/runtime/editor/features/validations/Overlay/index.d.vue.ts +0 -7
- package/dist/runtime/editor/features/validations/Overlay/index.vue +0 -115
- package/dist/runtime/editor/features/validations/Overlay/index.vue.d.ts +0 -7
- package/dist/runtime/editor/features/validations/SidebarItem/index.d.vue.ts +0 -10
- package/dist/runtime/editor/features/validations/SidebarItem/index.vue +0 -41
- package/dist/runtime/editor/features/validations/SidebarItem/index.vue.d.ts +0 -10
- package/dist/runtime/editor/features/validations/index.d.vue.ts +0 -3
- package/dist/runtime/editor/features/validations/index.vue +0 -91
- package/dist/runtime/editor/features/validations/index.vue.d.ts +0 -3
- package/dist/runtime/editor/types/config.d.ts +0 -5
- /package/dist/runtime/{editor/types/config.js → types/colors.js} +0 -0
|
@@ -3,7 +3,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
3
3
|
import * as path from 'node:path';
|
|
4
4
|
import { defineBlokkliModule } from '../index.mjs';
|
|
5
5
|
import * as fs from 'node:fs';
|
|
6
|
-
import { C as Collector, a as CollectedFile,
|
|
6
|
+
import { C as Collector, a as CollectedFile, e as extractStringProperty } from '../../shared/editor.BGemL1Oh.mjs';
|
|
7
7
|
import { d as defineCodeTemplate } from '../../shared/editor.6D5vApr0.mjs';
|
|
8
8
|
import MagicString from 'magic-string';
|
|
9
9
|
import { parse } from 'acorn';
|
|
@@ -645,6 +645,7 @@ export default defineNuxtConfig({
|
|
|
645
645
|
"#blokkli/agent/server",
|
|
646
646
|
moduleResolver.resolve("./runtime/server")
|
|
647
647
|
);
|
|
648
|
+
ctx.helper.addPackageDependency("mammoth", "marked", "turndown", "zod");
|
|
648
649
|
const moduleBlokkliDirs = ctx.helper.options.blokkliDirs || [];
|
|
649
650
|
const moduleToolsDir = moduleResolver.resolve("./runtime/app/tools");
|
|
650
651
|
const projectToolsDir = path.resolve(nuxt.options.rootDir, "blokkli/tools");
|
|
@@ -30,7 +30,7 @@ const bodyRows = computed(() => {
|
|
|
30
30
|
});
|
|
31
31
|
</script>
|
|
32
32
|
|
|
33
|
-
<style>/*! tailwindcss v4.
|
|
33
|
+
<style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
34
34
|
.bk-agent-attachment-table {
|
|
35
35
|
width: 100%;
|
|
36
36
|
border-collapse: collapse;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
<script setup>
|
|
8
8
|
import { computed, useBlokkli } from "#imports";
|
|
9
9
|
import Markdown from "#blokkli/agent/app/components/Markdown/index.vue";
|
|
10
|
+
import { linkifyBlockUuids } from "#blokkli/agent/app/helpers/linkifyBlockUuids";
|
|
10
11
|
import { PLACEHOLDER_USER_NAME } from "#blokkli/agent/shared/placeholders";
|
|
11
12
|
const props = defineProps({
|
|
12
13
|
id: { type: String, required: true },
|
|
@@ -14,11 +15,19 @@ const props = defineProps({
|
|
|
14
15
|
type: { type: String, required: true },
|
|
15
16
|
content: { type: String, required: true }
|
|
16
17
|
});
|
|
17
|
-
const { state } = useBlokkli();
|
|
18
|
-
const renderedContent = computed(
|
|
19
|
-
|
|
18
|
+
const { $t, state, blocks, types } = useBlokkli();
|
|
19
|
+
const renderedContent = computed(() => {
|
|
20
|
+
const withName = props.content.replaceAll(
|
|
20
21
|
PLACEHOLDER_USER_NAME,
|
|
21
22
|
state.owner.value?.name || ""
|
|
22
|
-
)
|
|
23
|
-
|
|
23
|
+
);
|
|
24
|
+
return linkifyBlockUuids(
|
|
25
|
+
withName,
|
|
26
|
+
(uuid) => {
|
|
27
|
+
const block = blocks.getBlock(uuid);
|
|
28
|
+
return block ? types.getBlockLabel(block.bundle) : null;
|
|
29
|
+
},
|
|
30
|
+
$t("deleted", "deleted")
|
|
31
|
+
);
|
|
32
|
+
});
|
|
24
33
|
</script>
|
package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/ConversationsTab/Item.vue
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
>
|
|
7
7
|
<Avatar
|
|
8
8
|
:deleted="!item.author"
|
|
9
|
-
:name="item.author?.name || $t('
|
|
9
|
+
:name="item.author?.name || `[${$t('deleted', 'deleted')}]`"
|
|
10
10
|
:seed="item.author?.id"
|
|
11
11
|
:image-url="item.author?.imageUrl"
|
|
12
12
|
/>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
{{ item.title || $t("agentConversationsUntitled", "Untitled") }}
|
|
16
16
|
</span>
|
|
17
17
|
<span class="_bk_text-xs _bk_text-mono-600 _bk_truncate _bk_flex _bk_gap-2">
|
|
18
|
-
<span>{{ item.author?.name || $t("
|
|
18
|
+
<span>{{ item.author?.name || `[${$t("deleted", "deleted")}]` }}</span>
|
|
19
19
|
<span v-if="item.host?.label" class="_bk_truncate">
|
|
20
20
|
· {{ item.host.label }}
|
|
21
21
|
</span>
|
package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/RatingsTab/Item.vue
CHANGED
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
<span class="_bk_text-xs _bk_text-mono-500 _bk_flex _bk_items-center _bk_gap-5 _bk_mt-3">
|
|
25
25
|
<Avatar
|
|
26
26
|
:deleted="!item.author"
|
|
27
|
-
:name="item.author?.name || $t('
|
|
27
|
+
:name="item.author?.name || `[${$t('deleted', 'deleted')}]`"
|
|
28
28
|
:seed="item.author?.id"
|
|
29
29
|
:image-url="item.author?.imageUrl"
|
|
30
30
|
/>
|
|
31
31
|
<span class="_bk_truncate">{{
|
|
32
|
-
item.author?.name || $t("
|
|
32
|
+
item.author?.name || `[${$t("deleted", "deleted")}]`
|
|
33
33
|
}}</span>
|
|
34
34
|
<span class="_bk_ml-auto _bk_shrink-0">
|
|
35
35
|
<RelativeTime :timestamp="item.createdAt" />
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
<span class="_bk_flex _bk_items-center _bk_gap-5">
|
|
11
11
|
<Avatar
|
|
12
12
|
:deleted="!parsed.author"
|
|
13
|
-
:name="parsed.author?.name || $t('
|
|
13
|
+
:name="parsed.author?.name || `[${$t('deleted', 'deleted')}]`"
|
|
14
14
|
:seed="parsed.author?.id"
|
|
15
15
|
:image-url="parsed.author?.imageUrl"
|
|
16
16
|
/>
|
|
17
|
-
{{ parsed.author?.name || $t("
|
|
17
|
+
{{ parsed.author?.name || `[${$t("deleted", "deleted")}]` }}
|
|
18
18
|
</span>
|
|
19
19
|
<span
|
|
20
20
|
v-if="parsed.host?.label"
|
package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/SplitView/index.d.vue.ts
CHANGED
|
@@ -25,7 +25,7 @@ declare const __VLS_export: <TItem>(__VLS_props: NonNullable<Awaited<typeof __VL
|
|
|
25
25
|
isSelected: boolean;
|
|
26
26
|
}) => unknown;
|
|
27
27
|
};
|
|
28
|
-
emit: (
|
|
28
|
+
emit: (event: "update:page", value: number) => void;
|
|
29
29
|
}>) => import("vue").VNode & {
|
|
30
30
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
31
31
|
};
|
package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/SplitView/index.vue.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ declare const __VLS_export: <TItem>(__VLS_props: NonNullable<Awaited<typeof __VL
|
|
|
25
25
|
isSelected: boolean;
|
|
26
26
|
}) => unknown;
|
|
27
27
|
};
|
|
28
|
-
emit: (
|
|
28
|
+
emit: (event: "update:page", value: number) => void;
|
|
29
29
|
}>) => import("vue").VNode & {
|
|
30
30
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
31
31
|
};
|
|
@@ -92,7 +92,7 @@ const { $t } = useBlokkli();
|
|
|
92
92
|
const isExpanded = ref(false);
|
|
93
93
|
</script>
|
|
94
94
|
|
|
95
|
-
<style>/*! tailwindcss v4.
|
|
95
|
+
<style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
96
96
|
.bk-agent-input-actions-button {
|
|
97
97
|
display: flex;
|
|
98
98
|
height: 40px;
|
|
@@ -42,7 +42,7 @@ const disclaimer = computed(() => {
|
|
|
42
42
|
});
|
|
43
43
|
</script>
|
|
44
44
|
|
|
45
|
-
<style>/*! tailwindcss v4.
|
|
45
|
+
<style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
46
46
|
.bk-agent-welcome-text ul + p {
|
|
47
47
|
margin-top: 30px;
|
|
48
48
|
}
|
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
Tool Result ({{ block.tool_use_id }})
|
|
28
28
|
<span v-if="block.is_error" class="_bk_text-red-dark _bk_ml-5">ERROR</span>
|
|
29
29
|
</div>
|
|
30
|
-
<pre class="bk-agent-transcript-block">{{
|
|
30
|
+
<pre class="bk-agent-transcript-block">{{
|
|
31
|
+
formatMaybeJson(block.content)
|
|
32
|
+
}}</pre>
|
|
31
33
|
</template>
|
|
32
34
|
</div>
|
|
33
35
|
</template>
|
|
@@ -38,4 +40,15 @@
|
|
|
38
40
|
defineProps({
|
|
39
41
|
content: { type: [String, Array], required: true }
|
|
40
42
|
});
|
|
43
|
+
function formatMaybeJson(value) {
|
|
44
|
+
const trimmed = value.trim();
|
|
45
|
+
if (!trimmed) return value;
|
|
46
|
+
const first = trimmed[0];
|
|
47
|
+
if (first !== "{" && first !== "[") return value;
|
|
48
|
+
try {
|
|
49
|
+
return JSON.stringify(JSON.parse(trimmed), null, 2);
|
|
50
|
+
} catch {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
41
54
|
</script>
|
|
@@ -39,6 +39,15 @@
|
|
|
39
39
|
<template #post-title>
|
|
40
40
|
<Pill :text="transcript.messages.length" />
|
|
41
41
|
</template>
|
|
42
|
+
<template #actions>
|
|
43
|
+
<PanelAction
|
|
44
|
+
:title="
|
|
45
|
+
copiedKey === 'conversation' ? 'Copied!' : 'Copy conversation JSON'
|
|
46
|
+
"
|
|
47
|
+
icon="bk_mdi_content_copy"
|
|
48
|
+
@click="copyConversation"
|
|
49
|
+
/>
|
|
50
|
+
</template>
|
|
42
51
|
<div>
|
|
43
52
|
<div
|
|
44
53
|
v-for="(message, i) in transcript.messages"
|
|
@@ -69,7 +78,7 @@
|
|
|
69
78
|
}}</pre>
|
|
70
79
|
<template #actions>
|
|
71
80
|
<PanelAction
|
|
72
|
-
:title="
|
|
81
|
+
:title="copiedKey === 'request' ? 'Copied!' : 'Copy JSON'"
|
|
73
82
|
icon="bk_mdi_content_copy"
|
|
74
83
|
@click="copyLastRequest"
|
|
75
84
|
/>
|
|
@@ -88,25 +97,34 @@ import { Pill } from "#blokkli/editor/components";
|
|
|
88
97
|
const props = defineProps({
|
|
89
98
|
transcript: { type: Object, required: true }
|
|
90
99
|
});
|
|
91
|
-
const
|
|
100
|
+
const copiedKey = ref(null);
|
|
92
101
|
let copiedTimeout = null;
|
|
93
102
|
onBeforeUnmount(() => {
|
|
94
103
|
if (copiedTimeout) {
|
|
95
104
|
clearTimeout(copiedTimeout);
|
|
96
105
|
}
|
|
97
106
|
});
|
|
107
|
+
function flashCopied(key) {
|
|
108
|
+
copiedKey.value = key;
|
|
109
|
+
if (copiedTimeout) {
|
|
110
|
+
clearTimeout(copiedTimeout);
|
|
111
|
+
}
|
|
112
|
+
copiedTimeout = setTimeout(() => {
|
|
113
|
+
copiedKey.value = null;
|
|
114
|
+
copiedTimeout = null;
|
|
115
|
+
}, 2e3);
|
|
116
|
+
}
|
|
98
117
|
function copyLastRequest() {
|
|
99
118
|
const json = JSON.stringify(props.transcript.lastRequest, null, 2);
|
|
100
|
-
navigator.clipboard.writeText(json).then(() =>
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
});
|
|
119
|
+
navigator.clipboard.writeText(json).then(() => flashCopied("request"));
|
|
120
|
+
}
|
|
121
|
+
function copyConversation() {
|
|
122
|
+
const snapshot = props.transcript.messages.map((m) => ({
|
|
123
|
+
type: m.type,
|
|
124
|
+
content: m.seen
|
|
125
|
+
}));
|
|
126
|
+
const json = JSON.stringify(snapshot, null, 2);
|
|
127
|
+
navigator.clipboard.writeText(json).then(() => flashCopied("conversation"));
|
|
110
128
|
}
|
|
111
129
|
</script>
|
|
112
130
|
|
|
@@ -116,7 +134,7 @@ export default {
|
|
|
116
134
|
};
|
|
117
135
|
</script>
|
|
118
136
|
|
|
119
|
-
<style>/*! tailwindcss v4.
|
|
137
|
+
<style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
120
138
|
.bk-agent-transcript-block {
|
|
121
139
|
margin: 0px;
|
|
122
140
|
border-radius: 4px;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Replace bare block UUIDs in markdown text with clickable chips. Known UUIDs
|
|
3
|
+
* become `<a class="bk-agent-block-ref" href="#uuid">label</a>`; UUIDs whose
|
|
4
|
+
* block is no longer on the page become a non-clickable
|
|
5
|
+
* `<span class="bk-agent-block-ref-deleted">[<deletedLabel>]</span>`.
|
|
6
|
+
*
|
|
7
|
+
* UUIDs inside fenced or inline code regions and UUIDs already used as a link
|
|
8
|
+
* target (preceded by `#`) are left alone, so existing `[text](#uuid)` links
|
|
9
|
+
* from older conversations pass through unchanged.
|
|
10
|
+
*/
|
|
11
|
+
export declare function linkifyBlockUuids(content: string, resolve: (uuid: string) => string | null, deletedLabel: string): string;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const UUID_PATTERN = /(?<![\w#-])[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?![\w-])/gi;
|
|
2
|
+
const CODE_REGION_PATTERN = /```[\s\S]*?```|`[^`\n]*`/g;
|
|
3
|
+
function escapeHtml(value) {
|
|
4
|
+
return value.replace(/[&<>"']/g, (c) => {
|
|
5
|
+
switch (c) {
|
|
6
|
+
case "&":
|
|
7
|
+
return "&";
|
|
8
|
+
case "<":
|
|
9
|
+
return "<";
|
|
10
|
+
case ">":
|
|
11
|
+
return ">";
|
|
12
|
+
case '"':
|
|
13
|
+
return """;
|
|
14
|
+
default:
|
|
15
|
+
return "'";
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
export function linkifyBlockUuids(content, resolve, deletedLabel) {
|
|
20
|
+
if (!content) return content;
|
|
21
|
+
const parts = [];
|
|
22
|
+
let cursor = 0;
|
|
23
|
+
CODE_REGION_PATTERN.lastIndex = 0;
|
|
24
|
+
let match;
|
|
25
|
+
while ((match = CODE_REGION_PATTERN.exec(content)) !== null) {
|
|
26
|
+
parts.push(
|
|
27
|
+
replaceOutsideCode(
|
|
28
|
+
content.slice(cursor, match.index),
|
|
29
|
+
resolve,
|
|
30
|
+
deletedLabel
|
|
31
|
+
)
|
|
32
|
+
);
|
|
33
|
+
parts.push(match[0]);
|
|
34
|
+
cursor = match.index + match[0].length;
|
|
35
|
+
}
|
|
36
|
+
parts.push(replaceOutsideCode(content.slice(cursor), resolve, deletedLabel));
|
|
37
|
+
return parts.join("");
|
|
38
|
+
}
|
|
39
|
+
function replaceOutsideCode(segment, resolve, deletedLabel) {
|
|
40
|
+
return segment.replace(UUID_PATTERN, (uuid) => {
|
|
41
|
+
const label = resolve(uuid);
|
|
42
|
+
if (label === null) {
|
|
43
|
+
return `<span class="bk-agent-block-ref-deleted">[${escapeHtml(deletedLabel)}]</span>`;
|
|
44
|
+
}
|
|
45
|
+
return `<a class="bk-agent-block-ref" href="#${uuid}">${escapeHtml(label)}</a>`;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
@@ -13,11 +13,11 @@ export declare const paramsSchema: z.ZodObject<{
|
|
|
13
13
|
}, z.core.$strip>;
|
|
14
14
|
export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
15
15
|
type: z.ZodEnum<{
|
|
16
|
+
options: "options";
|
|
16
17
|
rewrite: "rewrite";
|
|
17
18
|
delete: "delete";
|
|
18
19
|
add: "add";
|
|
19
20
|
move: "move";
|
|
20
|
-
options: "options";
|
|
21
21
|
}>;
|
|
22
22
|
label: z.ZodString;
|
|
23
23
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -10,11 +10,11 @@ export declare const paramsSchema: z.ZodObject<{
|
|
|
10
10
|
}, z.core.$strip>;
|
|
11
11
|
export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
12
12
|
type: z.ZodEnum<{
|
|
13
|
+
options: "options";
|
|
13
14
|
rewrite: "rewrite";
|
|
14
15
|
delete: "delete";
|
|
15
16
|
add: "add";
|
|
16
17
|
move: "move";
|
|
17
|
-
options: "options";
|
|
18
18
|
}>;
|
|
19
19
|
label: z.ZodString;
|
|
20
20
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -12,11 +12,11 @@ export declare const paramsSchema: z.ZodObject<{
|
|
|
12
12
|
}, z.core.$strip>;
|
|
13
13
|
export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
14
14
|
type: z.ZodEnum<{
|
|
15
|
+
options: "options";
|
|
15
16
|
rewrite: "rewrite";
|
|
16
17
|
delete: "delete";
|
|
17
18
|
add: "add";
|
|
18
19
|
move: "move";
|
|
19
|
-
options: "options";
|
|
20
20
|
}>;
|
|
21
21
|
label: z.ZodString;
|
|
22
22
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -20,11 +20,11 @@ export declare const paramsSchema: z.ZodObject<{
|
|
|
20
20
|
}, z.core.$strip>;
|
|
21
21
|
export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
22
22
|
type: z.ZodEnum<{
|
|
23
|
+
options: "options";
|
|
23
24
|
rewrite: "rewrite";
|
|
24
25
|
delete: "delete";
|
|
25
26
|
add: "add";
|
|
26
27
|
move: "move";
|
|
27
|
-
options: "options";
|
|
28
28
|
}>;
|
|
29
29
|
label: z.ZodString;
|
|
30
30
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -10,11 +10,11 @@ export declare const paramsSchema: z.ZodObject<{
|
|
|
10
10
|
}, z.core.$strip>;
|
|
11
11
|
export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
12
12
|
type: z.ZodEnum<{
|
|
13
|
+
options: "options";
|
|
13
14
|
rewrite: "rewrite";
|
|
14
15
|
delete: "delete";
|
|
15
16
|
add: "add";
|
|
16
17
|
move: "move";
|
|
17
|
-
options: "options";
|
|
18
18
|
}>;
|
|
19
19
|
label: z.ZodString;
|
|
20
20
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -10,11 +10,11 @@ export declare const paramsSchema: z.ZodObject<{
|
|
|
10
10
|
}, z.core.$strip>;
|
|
11
11
|
export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
12
12
|
type: z.ZodEnum<{
|
|
13
|
+
options: "options";
|
|
13
14
|
rewrite: "rewrite";
|
|
14
15
|
delete: "delete";
|
|
15
16
|
add: "add";
|
|
16
17
|
move: "move";
|
|
17
|
-
options: "options";
|
|
18
18
|
}>;
|
|
19
19
|
label: z.ZodString;
|
|
20
20
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -115,7 +115,7 @@ function cancel() {
|
|
|
115
115
|
}
|
|
116
116
|
</script>
|
|
117
117
|
|
|
118
|
-
<style>/*! tailwindcss v4.
|
|
118
|
+
<style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
119
119
|
:is(.bk-agent-tool-question-list .bk-radio,.bk-agent-tool-question-list .bk-checkbox) input + span {
|
|
120
120
|
font-size: var(--text-sm, 14px);
|
|
121
121
|
line-height: var(--bk-tw-leading, var(--text-sm--line-height, calc(1.25 / 0.875)));
|
|
@@ -5,7 +5,7 @@ export declare const paramsSchema: z.ZodObject<{
|
|
|
5
5
|
value: z.ZodString;
|
|
6
6
|
label: z.ZodString;
|
|
7
7
|
}, z.core.$strip>>;
|
|
8
|
-
multiSelect: z.ZodDefault<z.ZodOptional<z.
|
|
8
|
+
multiSelect: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>>;
|
|
9
9
|
paragraphUuids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
10
|
}, z.core.$strip>;
|
|
11
11
|
export declare const resultSchema: z.ZodObject<{
|
|
@@ -9,6 +9,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
9
9
|
acceptedCount: number;
|
|
10
10
|
rejectedByUser: Record<string, Record<string, {
|
|
11
11
|
reasonForRejection: string;
|
|
12
|
+
partial?: {
|
|
13
|
+
accepted: number;
|
|
14
|
+
total: number;
|
|
15
|
+
rejectedSegments: {
|
|
16
|
+
tag: string;
|
|
17
|
+
beforeHtml: string;
|
|
18
|
+
afterHtml: string;
|
|
19
|
+
status: "deleted" | "matched" | "inserted";
|
|
20
|
+
reasonForRejection: string;
|
|
21
|
+
}[];
|
|
22
|
+
} | undefined;
|
|
12
23
|
}>>;
|
|
13
24
|
label: string;
|
|
14
25
|
agentMessage?: string | undefined;
|
|
@@ -19,6 +30,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
19
30
|
acceptedCount: number;
|
|
20
31
|
rejectedByUser: Record<string, Record<string, {
|
|
21
32
|
reasonForRejection: string;
|
|
33
|
+
partial?: {
|
|
34
|
+
accepted: number;
|
|
35
|
+
total: number;
|
|
36
|
+
rejectedSegments: {
|
|
37
|
+
tag: string;
|
|
38
|
+
beforeHtml: string;
|
|
39
|
+
afterHtml: string;
|
|
40
|
+
status: "deleted" | "matched" | "inserted";
|
|
41
|
+
reasonForRejection: string;
|
|
42
|
+
}[];
|
|
43
|
+
} | undefined;
|
|
22
44
|
}>>;
|
|
23
45
|
label: string;
|
|
24
46
|
agentMessage?: string | undefined;
|
|
@@ -12,10 +12,13 @@
|
|
|
12
12
|
<script setup>
|
|
13
13
|
import { useBlokkli, ref, onMounted } from "#imports";
|
|
14
14
|
import { DiffApproval } from "#blokkli/editor/components";
|
|
15
|
+
import { splitIntoSegments } from "#blokkli/editor/helpers/diff";
|
|
15
16
|
import {
|
|
16
17
|
skippedFieldsMessage,
|
|
17
18
|
appendAgentNote,
|
|
18
|
-
rejectedWithoutReasonMessage
|
|
19
|
+
rejectedWithoutReasonMessage,
|
|
20
|
+
partialRejectionGuidance,
|
|
21
|
+
decideFieldUpdates
|
|
19
22
|
} from "../fieldDiffApproval";
|
|
20
23
|
const props = defineProps({
|
|
21
24
|
context: { type: null, required: true },
|
|
@@ -95,12 +98,18 @@ onMounted(async () => {
|
|
|
95
98
|
const uuid = result.key.substring(0, separatorIndex);
|
|
96
99
|
const fieldName = result.key.substring(separatorIndex + 1);
|
|
97
100
|
const source = byKey.get(result.key);
|
|
101
|
+
const segments = source ? splitIntoSegments(
|
|
102
|
+
source.value,
|
|
103
|
+
result.translatedText,
|
|
104
|
+
source.fieldType
|
|
105
|
+
) ?? void 0 : void 0;
|
|
98
106
|
return {
|
|
99
107
|
id: id++,
|
|
100
108
|
uuid,
|
|
101
109
|
fieldName,
|
|
102
110
|
fieldLabel: source ? resolveFieldLabel(source.entityType, source.entityBundle, fieldName) : fieldName,
|
|
103
|
-
value: result.translatedText
|
|
111
|
+
value: result.translatedText,
|
|
112
|
+
segments
|
|
104
113
|
};
|
|
105
114
|
});
|
|
106
115
|
phase.value = "approving";
|
|
@@ -108,49 +117,42 @@ onMounted(async () => {
|
|
|
108
117
|
async function onApply(data) {
|
|
109
118
|
const targetLanguage = entityContext.value.language;
|
|
110
119
|
const items = approvalItems.value;
|
|
111
|
-
const rejectedByUser =
|
|
112
|
-
|
|
113
|
-
for (const item of items) {
|
|
114
|
-
if (data.selected[item.id]) {
|
|
115
|
-
accepted.push(item);
|
|
116
|
-
continue;
|
|
117
|
-
}
|
|
118
|
-
const fields = rejectedByUser[item.uuid] ?? {};
|
|
119
|
-
fields[item.fieldName] = {
|
|
120
|
-
reasonForRejection: data.reasons[item.id] || ""
|
|
121
|
-
};
|
|
122
|
-
rejectedByUser[item.uuid] = fields;
|
|
123
|
-
}
|
|
124
|
-
if (accepted.length) {
|
|
120
|
+
const { updates, rejectedByUser, acceptedCount, totalCount } = decideFieldUpdates(items, data.selected, data.reasons);
|
|
121
|
+
if (updates.length) {
|
|
125
122
|
await state.mutateWithLoadingState(
|
|
126
123
|
() => adapter.importTranslationsBatched({
|
|
127
|
-
items:
|
|
124
|
+
items: updates.map((u) => ({
|
|
128
125
|
langcode: targetLanguage,
|
|
129
|
-
uuid:
|
|
130
|
-
fieldName:
|
|
131
|
-
fieldValue:
|
|
126
|
+
uuid: u.uuid,
|
|
127
|
+
fieldName: u.fieldName,
|
|
128
|
+
fieldValue: u.fieldValue
|
|
132
129
|
}))
|
|
133
130
|
})
|
|
134
131
|
);
|
|
135
132
|
}
|
|
136
|
-
const
|
|
137
|
-
const label = acceptedCount === items.length ? $t(
|
|
133
|
+
const label = acceptedCount === totalCount ? $t(
|
|
138
134
|
"aiAgentAutoTranslateAllApplied",
|
|
139
135
|
"All @count translations applied"
|
|
140
136
|
).replace("@count", String(acceptedCount)) : $t(
|
|
141
137
|
"aiAgentAutoTranslateSomeApplied",
|
|
142
138
|
"@applied of @total translations applied"
|
|
143
|
-
).replace("@applied", String(acceptedCount)).replace("@total", String(
|
|
144
|
-
const
|
|
139
|
+
).replace("@applied", String(acceptedCount)).replace("@total", String(totalCount));
|
|
140
|
+
const updatesByItem = new Map(
|
|
141
|
+
updates.map((u) => [`${u.uuid}:${u.fieldName}`, u.fieldValue])
|
|
142
|
+
);
|
|
143
|
+
const _details = items.filter((item) => updatesByItem.has(`${item.uuid}:${item.fieldName}`)).map((item) => ({
|
|
145
144
|
fieldLabel: item.fieldLabel,
|
|
146
145
|
before: "",
|
|
147
|
-
after: item.
|
|
146
|
+
after: updatesByItem.get(`${item.uuid}:${item.fieldName}`)
|
|
148
147
|
}));
|
|
149
148
|
emitDone({
|
|
150
149
|
acceptedCount,
|
|
151
150
|
rejectedByUser,
|
|
152
151
|
label,
|
|
153
|
-
agentMessage:
|
|
152
|
+
agentMessage: appendAgentNote(
|
|
153
|
+
partialRejectionGuidance(rejectedByUser),
|
|
154
|
+
rejectedWithoutReasonMessage(rejectedByUser)
|
|
155
|
+
),
|
|
154
156
|
historyIndex: state.currentMutationIndex.value,
|
|
155
157
|
_details
|
|
156
158
|
});
|
|
@@ -9,6 +9,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
9
9
|
acceptedCount: number;
|
|
10
10
|
rejectedByUser: Record<string, Record<string, {
|
|
11
11
|
reasonForRejection: string;
|
|
12
|
+
partial?: {
|
|
13
|
+
accepted: number;
|
|
14
|
+
total: number;
|
|
15
|
+
rejectedSegments: {
|
|
16
|
+
tag: string;
|
|
17
|
+
beforeHtml: string;
|
|
18
|
+
afterHtml: string;
|
|
19
|
+
status: "deleted" | "matched" | "inserted";
|
|
20
|
+
reasonForRejection: string;
|
|
21
|
+
}[];
|
|
22
|
+
} | undefined;
|
|
12
23
|
}>>;
|
|
13
24
|
label: string;
|
|
14
25
|
agentMessage?: string | undefined;
|
|
@@ -19,6 +30,17 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
19
30
|
acceptedCount: number;
|
|
20
31
|
rejectedByUser: Record<string, Record<string, {
|
|
21
32
|
reasonForRejection: string;
|
|
33
|
+
partial?: {
|
|
34
|
+
accepted: number;
|
|
35
|
+
total: number;
|
|
36
|
+
rejectedSegments: {
|
|
37
|
+
tag: string;
|
|
38
|
+
beforeHtml: string;
|
|
39
|
+
afterHtml: string;
|
|
40
|
+
status: "deleted" | "matched" | "inserted";
|
|
41
|
+
reasonForRejection: string;
|
|
42
|
+
}[];
|
|
43
|
+
} | undefined;
|
|
22
44
|
}>>;
|
|
23
45
|
label: string;
|
|
24
46
|
agentMessage?: string | undefined;
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { fieldDiffResultSchema } from '../schemas.js';
|
|
3
3
|
import { type SkippedField } from '../fieldDiffApproval.js';
|
|
4
4
|
export declare const paramsSchema: z.ZodObject<{
|
|
5
|
-
uuids: z.
|
|
5
|
+
uuids: z.ZodPreprocess<z.ZodArray<z.ZodString>>;
|
|
6
6
|
}, z.core.$strip>;
|
|
7
7
|
export type AutoTranslateParams = z.infer<typeof paramsSchema>;
|
|
8
8
|
export type AutoTranslateResult = z.infer<typeof fieldDiffResultSchema>;
|
|
@@ -19,6 +19,21 @@ export declare const resultSchema: z.ZodObject<{
|
|
|
19
19
|
acceptedCount: z.ZodNumber;
|
|
20
20
|
rejectedByUser: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
21
21
|
reasonForRejection: z.ZodString;
|
|
22
|
+
partial: z.ZodOptional<z.ZodObject<{
|
|
23
|
+
accepted: z.ZodNumber;
|
|
24
|
+
total: z.ZodNumber;
|
|
25
|
+
rejectedSegments: z.ZodArray<z.ZodObject<{
|
|
26
|
+
tag: z.ZodString;
|
|
27
|
+
beforeHtml: z.ZodString;
|
|
28
|
+
afterHtml: z.ZodString;
|
|
29
|
+
status: z.ZodEnum<{
|
|
30
|
+
deleted: "deleted";
|
|
31
|
+
matched: "matched";
|
|
32
|
+
inserted: "inserted";
|
|
33
|
+
}>;
|
|
34
|
+
reasonForRejection: z.ZodString;
|
|
35
|
+
}, z.core.$strip>>;
|
|
36
|
+
}, z.core.$strip>>;
|
|
22
37
|
}, z.core.$strip>>>;
|
|
23
38
|
label: z.ZodString;
|
|
24
39
|
agentMessage: z.ZodOptional<z.ZodString>;
|