@blokkli/editor 2.0.0-alpha.36 → 2.0.0-alpha.38
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 +4 -3
- package/dist/module.d.mts +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +71 -4
- package/dist/modules/agent/index.d.mts +1 -1
- package/dist/modules/agent/index.mjs +276 -6
- package/dist/modules/agent/runtime/app/composables/agentProvider.js +31 -14
- 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 +66 -59
- 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/index.vue +89 -37
- 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.d.ts +2 -0
- 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.js +2 -1
- 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 +2 -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 +0 -52
- package/dist/modules/agent/runtime/app/tools/schemas.js +0 -187
- 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 +25 -6
- package/dist/modules/agent/runtime/server/Session.js +109 -30
- 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/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 +46 -11
- package/dist/modules/agent/runtime/shared/types.js +22 -10
- package/dist/modules/charts/index.d.mts +1 -1
- package/dist/modules/charts/index.mjs +21 -7
- package/dist/modules/charts/runtime/blokkli/skills/charts.js +6 -6
- package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.d.ts +25 -2
- package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.js +39 -1
- package/dist/modules/charts/runtime/blokkli/tools/create_chart/index.js +24 -17
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_data/index.js +11 -19
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_type_options/index.js +2 -4
- package/dist/modules/charts/runtime/blokkli/tools/update_chart/index.js +8 -20
- package/dist/modules/charts/runtime/chartTypes/area.d.ts +6 -1
- package/dist/modules/charts/runtime/chartTypes/bar.d.ts +7 -1
- package/dist/modules/charts/runtime/chartTypes/define.d.ts +1 -1
- package/dist/modules/charts/runtime/chartTypes/donut.d.ts +5 -1
- package/dist/modules/charts/runtime/chartTypes/heatmap.d.ts +3 -1
- package/dist/modules/charts/runtime/chartTypes/index.d.ts +18 -0
- package/dist/modules/charts/runtime/chartTypes/line.d.ts +6 -1
- package/dist/modules/charts/runtime/chartTypes/pie.d.ts +4 -1
- package/dist/modules/charts/runtime/chartTypes/radar.d.ts +6 -1
- package/dist/modules/charts/runtime/chartTypes/radialBar.d.ts +5 -1
- package/dist/modules/charts/runtime/chartTypes/shared.d.ts +20 -5
- package/dist/modules/charts/runtime/chartTypes/types.d.ts +6 -6
- package/dist/modules/charts/runtime/components/ChartRenderer/index.d.vue.ts +145 -2
- package/dist/modules/charts/runtime/components/ChartRenderer/index.vue +2 -2
- package/dist/modules/charts/runtime/components/ChartRenderer/index.vue.d.ts +145 -2
- 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 +3 -2
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.vue.d.ts +3 -2
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.vue +1 -2
- package/dist/modules/charts/runtime/features/charts/Editor/FootnoteEditor/index.vue +1 -1
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.d.vue.ts +2 -0
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.vue +35 -13
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.vue.d.ts +2 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.d.vue.ts +1 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.vue +9 -3
- package/dist/modules/charts/runtime/features/charts/Editor/index.vue.d.ts +1 -0
- package/dist/modules/charts/runtime/features/charts/Editor/useChartEditorState.js +1 -1
- package/dist/modules/charts/runtime/features/charts/index.vue +6 -6
- package/dist/modules/charts/runtime/helpers/index.d.ts +25 -0
- package/dist/modules/charts/runtime/helpers/index.js +63 -0
- package/dist/modules/charts/runtime/types.d.ts +10 -28
- package/dist/modules/charts/runtime/types.js +0 -64
- 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 +4 -4
- package/dist/modules/table-of-contents/index.d.mts +1 -1
- package/dist/runtime/components/BlokkliItem.vue +1 -1
- package/dist/runtime/composables/defineBlokkli.js +1 -1
- package/dist/runtime/editor/components/AnimationCanvas/index.vue +13 -7
- package/dist/runtime/editor/components/Banner/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/Banner/index.vue +1 -1
- package/dist/runtime/editor/components/Banner/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/DropdownItem/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/DropdownItem/index.vue +3 -2
- package/dist/runtime/editor/components/DropdownItem/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/EditProvider.vue +7 -4
- package/dist/runtime/editor/components/FlexTextarea/index.d.vue.ts +4 -0
- package/dist/runtime/editor/components/FlexTextarea/index.vue +24 -101
- package/dist/runtime/editor/components/FlexTextarea/index.vue.d.ts +4 -0
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +28 -9
- 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/Resizable/index.vue +4 -1
- package/dist/runtime/editor/components/Toolbar/index.vue +107 -6
- package/dist/runtime/editor/components/index.d.ts +4 -3
- package/dist/runtime/editor/components/index.js +6 -4
- 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/css/output.css +1 -1
- package/dist/runtime/editor/events/index.d.ts +9 -0
- 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/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 +585 -337
- package/dist/runtime/editor/features/clipboard/types.d.ts +14 -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/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/library/index.vue +14 -0
- package/dist/runtime/editor/features/media-library/index.vue +32 -1
- 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 +3 -2
- package/dist/runtime/editor/features/options/Form/Item.vue +10 -2
- package/dist/runtime/editor/features/options/Form/Item.vue.d.ts +3 -2
- package/dist/runtime/editor/features/options/Form/index.vue +5 -0
- package/dist/runtime/editor/features/search/index.vue +25 -1
- package/dist/runtime/editor/features/structure/index.vue +25 -1
- package/dist/runtime/editor/features/tour/index.vue +22 -12
- 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/index.d.vue.ts +13 -2
- package/dist/runtime/editor/plugins/Sidebar/index.vue +4 -2
- package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +13 -2
- 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/dragdrop.d.ts +55 -0
- package/dist/runtime/editor/providers/dragdrop.js +37 -0
- 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 +73 -61
- package/dist/runtime/editor/translations/fr.json +67 -55
- package/dist/runtime/editor/translations/gsw_CH.json +71 -59
- package/dist/runtime/editor/translations/it.json +67 -55
- 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/injections.d.ts +1 -1
- package/dist/runtime/types/blockOptions.d.ts +2 -1
- package/dist/runtime/types/definitions.d.ts +4 -0
- package/dist/shared/{editor.CWQIFIEQ.d.mts → editor.BdBm1Z7C.d.mts} +12 -0
- package/dist/types.d.mts +1 -1
- package/package.json +5 -3
- package/dist/modules/charts/runtime/components/Fragment/BlokkliChart.d.vue.ts +0 -3
- package/dist/modules/charts/runtime/components/Fragment/BlokkliChart.vue +0 -29
- package/dist/modules/charts/runtime/components/Fragment/BlokkliChart.vue.d.ts +0 -3
- 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.d.vue.ts +0 -11
- package/dist/runtime/editor/features/clipboard/List/index.vue +0 -72
- package/dist/runtime/editor/features/clipboard/List/index.vue.d.ts +0 -11
- 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/features/agent/Panel/Conversation/Item/Assistant/index.vue
CHANGED
|
@@ -16,13 +16,13 @@ const props = defineProps({
|
|
|
16
16
|
});
|
|
17
17
|
const { state } = useBlokkli();
|
|
18
18
|
const contentEl = ref();
|
|
19
|
-
marked.setOptions({ gfm: true, breaks: true });
|
|
20
19
|
function renderContent(content) {
|
|
21
20
|
const container = contentEl.value;
|
|
22
21
|
if (!container) return;
|
|
23
22
|
const ownerName = state.owner.value?.name || "";
|
|
24
23
|
container.innerHTML = marked.parse(
|
|
25
|
-
content.replaceAll(PLACEHOLDER_USER_NAME, ownerName)
|
|
24
|
+
content.replaceAll(PLACEHOLDER_USER_NAME, ownerName),
|
|
25
|
+
{ gfm: true, breaks: true }
|
|
26
26
|
);
|
|
27
27
|
}
|
|
28
28
|
watch(
|
package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/User/index.vue
CHANGED
|
@@ -22,8 +22,7 @@ const props = defineProps({
|
|
|
22
22
|
content: { type: String, required: true },
|
|
23
23
|
attachments: { type: Array, required: false }
|
|
24
24
|
});
|
|
25
|
-
marked.setOptions({ gfm: true, breaks: true });
|
|
26
25
|
const html = computed(() => {
|
|
27
|
-
return props.content ? marked.parse(props.content) : "";
|
|
26
|
+
return props.content ? marked.parse(props.content, { gfm: true, breaks: true }) : "";
|
|
28
27
|
});
|
|
29
28
|
</script>
|
|
@@ -47,7 +47,6 @@ import { computed } from "#imports";
|
|
|
47
47
|
import Conversation from "../Conversation/index.vue";
|
|
48
48
|
import PendingMutation from "../PendingMutation/index.vue";
|
|
49
49
|
import { mcpTools } from "#blokkli-build/agent-client";
|
|
50
|
-
import { isToolDefinition } from "#blokkli/agent/app/helpers";
|
|
51
50
|
const mockContext = {
|
|
52
51
|
app: null,
|
|
53
52
|
itemEntityType: "paragraph",
|
|
@@ -153,7 +152,7 @@ const mockMutations = [
|
|
|
153
152
|
}
|
|
154
153
|
];
|
|
155
154
|
const toolsWithMockParams = computed(
|
|
156
|
-
() => mcpTools.filter(
|
|
155
|
+
() => mcpTools.filter(
|
|
157
156
|
(tool) => !!tool.component && !!tool.mockParams
|
|
158
157
|
)
|
|
159
158
|
);
|
|
@@ -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, {
|
|
@@ -1,83 +1,90 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="bk-agent-input-actions">
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
<template #button>
|
|
6
|
-
<div
|
|
7
|
-
class="bk-button bk-is-white bk-is-small bk-is-icon-only"
|
|
8
|
-
:title="$t('aiAgentMoreOptions', 'More options')"
|
|
9
|
-
>
|
|
10
|
-
<Icon name="bk_mdi_more_horiz" />
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
3
|
+
<TransitionHeight opacity>
|
|
4
|
+
<div v-if="isExpanded" class="bk-agent-input-actions-expanded">
|
|
13
5
|
<TokenUsage :usage-turns />
|
|
14
|
-
<hr />
|
|
15
6
|
<DropdownItem
|
|
16
|
-
icon="
|
|
17
|
-
:text="$t('
|
|
18
|
-
@click="
|
|
7
|
+
icon="bk_mdi_bug_report"
|
|
8
|
+
:text="$t('aiAgentShowTranscript', 'Show transcript...')"
|
|
9
|
+
@click="$emit('show-transcript')"
|
|
19
10
|
/>
|
|
20
11
|
<DropdownItem
|
|
21
|
-
icon="
|
|
12
|
+
icon="bk_mdi_forum"
|
|
22
13
|
:text="$t('aiAgentPastConversations', 'Past conversations')"
|
|
23
|
-
|
|
14
|
+
:disabled="!isConnected"
|
|
15
|
+
@click="$emit('show-conversations')"
|
|
24
16
|
/>
|
|
25
|
-
<hr />
|
|
26
|
-
<DropdownItem
|
|
27
|
-
icon="bk_mdi_bug_report"
|
|
28
|
-
:text="$t('aiAgentShowTranscript', 'Show transcript...')"
|
|
29
|
-
@click="onShowTranscript"
|
|
30
|
-
/>
|
|
31
|
-
</Dropdown>
|
|
32
|
-
</div>
|
|
33
|
-
<div class="bk-agent-input-actions-right">
|
|
34
|
-
<div v-show="hasText" class="bk-agent-input-actions-keyboard">
|
|
35
|
-
{{ $t("aiAgentNewLineHint", "Shift + Enter for new line") }}
|
|
36
17
|
</div>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
18
|
+
</TransitionHeight>
|
|
19
|
+
<div class="bk-agent-input-actions-bar">
|
|
20
|
+
<div class="bk-agent-input-actions-left">
|
|
21
|
+
<button
|
|
22
|
+
class="bk-agent-input-actions-button"
|
|
23
|
+
:class="{ 'bk-is-active': isExpanded }"
|
|
24
|
+
:disabled="!isConnected"
|
|
25
|
+
@click="isExpanded = !isExpanded"
|
|
26
|
+
>
|
|
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>
|
|
32
|
+
</div>
|
|
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>
|
|
45
|
+
</div>
|
|
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>
|
|
66
|
+
</div>
|
|
53
67
|
</div>
|
|
54
68
|
</div>
|
|
55
69
|
</template>
|
|
56
70
|
|
|
57
71
|
<script setup>
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
72
|
+
import { ref, useBlokkli } from "#imports";
|
|
73
|
+
import {
|
|
74
|
+
Icon,
|
|
75
|
+
DropdownItem,
|
|
76
|
+
TransitionHeight
|
|
77
|
+
} from "#blokkli/editor/components";
|
|
60
78
|
import TokenUsage from "./TokenUsage/index.vue";
|
|
61
79
|
defineProps({
|
|
62
80
|
isProcessing: { type: Boolean, required: true },
|
|
63
81
|
isConnected: { type: Boolean, required: true },
|
|
64
82
|
canSubmit: { type: Boolean, required: true },
|
|
65
83
|
hasText: { type: Boolean, required: true },
|
|
84
|
+
hasConversation: { type: Boolean, required: true },
|
|
66
85
|
usageTurns: { type: Array, required: true }
|
|
67
86
|
});
|
|
68
|
-
|
|
87
|
+
defineEmits(["submit", "cancel", "new-conversation", "show-transcript", "show-conversations"]);
|
|
69
88
|
const { $t } = useBlokkli();
|
|
70
|
-
const
|
|
71
|
-
function onNewConversation() {
|
|
72
|
-
dropdown.value?.close();
|
|
73
|
-
emit("new-conversation");
|
|
74
|
-
}
|
|
75
|
-
function onShowConversations() {
|
|
76
|
-
dropdown.value?.close();
|
|
77
|
-
emit("show-conversations");
|
|
78
|
-
}
|
|
79
|
-
function onShowTranscript() {
|
|
80
|
-
dropdown.value?.close();
|
|
81
|
-
emit("show-transcript");
|
|
82
|
-
}
|
|
89
|
+
const isExpanded = ref(false);
|
|
83
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("");
|
|
@@ -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">
|
|
@@ -64,13 +71,37 @@
|
|
|
64
71
|
/>
|
|
65
72
|
</DialogModal>
|
|
66
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>
|
|
67
87
|
</Teleport>
|
|
68
88
|
</template>
|
|
69
89
|
|
|
70
90
|
<script setup>
|
|
71
|
-
import {
|
|
91
|
+
import {
|
|
92
|
+
useBlokkli,
|
|
93
|
+
defineBlokkliFeature,
|
|
94
|
+
onBeforeUnmount,
|
|
95
|
+
computed,
|
|
96
|
+
useTemplateRef
|
|
97
|
+
} from "#imports";
|
|
72
98
|
import { PluginSidebar } from "#blokkli/editor/plugins";
|
|
73
|
-
import {
|
|
99
|
+
import {
|
|
100
|
+
DialogModal,
|
|
101
|
+
BlokkliTransition,
|
|
102
|
+
Icon,
|
|
103
|
+
Popup
|
|
104
|
+
} from "#blokkli/editor/components";
|
|
74
105
|
import agentProvider from "#blokkli/agent/app/composables/agentProvider";
|
|
75
106
|
import { agentPrompts, agentName } from "#blokkli-build/agent-client";
|
|
76
107
|
import AgentPanel from "./Panel/index.vue";
|
|
@@ -92,6 +123,27 @@ const { adapter } = defineBlokkliFeature({
|
|
|
92
123
|
});
|
|
93
124
|
const app = useBlokkli();
|
|
94
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
|
+
});
|
|
95
147
|
const {
|
|
96
148
|
isConnected,
|
|
97
149
|
hasBeenReady,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { McpToolDefinition,
|
|
2
|
-
import type { ClientToolDefinition } from '#blokkli/agent/shared/types';
|
|
1
|
+
import type { McpToolDefinition, McpToolContext, McpToolCategory, MutationAction, QueryResult, ToolError } from '#blokkli/agent/app/types';
|
|
3
2
|
import type { BlokkliAdapter } from '#blokkli/editor/adapter';
|
|
4
3
|
import type { EditMode } from '#blokkli/editor/types/state';
|
|
5
4
|
/**
|
|
@@ -7,10 +6,20 @@ import type { EditMode } from '#blokkli/editor/types/state';
|
|
|
7
6
|
*/
|
|
8
7
|
export declare function createToolMap(tools: McpToolDefinition[]): Record<string, McpToolDefinition>;
|
|
9
8
|
/**
|
|
10
|
-
* Get
|
|
9
|
+
* Get tool names for the server.
|
|
11
10
|
* Filters by edit mode and adapter methods if provided.
|
|
11
|
+
* All tools are static and resolved from bundled metadata on the server.
|
|
12
12
|
*/
|
|
13
|
-
export declare function
|
|
13
|
+
export declare function getToolInfoForServer(tools: McpToolDefinition[], editMode: EditMode, adapter?: BlokkliAdapter<unknown>): string[];
|
|
14
|
+
/**
|
|
15
|
+
* Coerce stringified JSON values back to their actual types.
|
|
16
|
+
*
|
|
17
|
+
* LLMs sometimes double-serialize array or object parameters, sending e.g.
|
|
18
|
+
* `"[\"readability\"]"` (a string) instead of `["readability"]` (an array).
|
|
19
|
+
* This walks the params and attempts JSON.parse on any string that looks like
|
|
20
|
+
* a JSON array or object.
|
|
21
|
+
*/
|
|
22
|
+
export declare function coerceStringifiedParams(params: Record<string, unknown>): Record<string, unknown>;
|
|
14
23
|
/**
|
|
15
24
|
* Execute a tool by name with the given context and parameters.
|
|
16
25
|
* Validates parameters with Zod before executing.
|
|
@@ -37,19 +46,7 @@ export declare function isQueryResult(result: unknown): result is QueryResult;
|
|
|
37
46
|
*/
|
|
38
47
|
export declare function isToolError(result: unknown): result is ToolError;
|
|
39
48
|
/**
|
|
40
|
-
*
|
|
41
|
-
|
|
42
|
-
export declare function isToolFactory(item: McpToolItem): item is McpToolFactory;
|
|
43
|
-
/**
|
|
44
|
-
* Check if a tool item is a static tool definition (not a factory).
|
|
45
|
-
*/
|
|
46
|
-
export declare function isToolDefinition(item: McpToolItem): item is McpToolDefinition;
|
|
47
|
-
/**
|
|
48
|
-
* Resolve an array of tool items (static definitions + factories) into
|
|
49
|
-
* a flat array of McpToolDefinition objects.
|
|
50
|
-
*
|
|
51
|
-
* Each factory's resolve callback is called to produce tools. The individual
|
|
52
|
-
* tools returned by factories have their own requiredAdapterMethods, which
|
|
53
|
-
* are checked later by getToolsForServer.
|
|
49
|
+
* Resolve an array of tool definitions into a flat array.
|
|
50
|
+
* All tools are now static — no factory resolution needed.
|
|
54
51
|
*/
|
|
55
|
-
export declare function resolveTools(tools:
|
|
52
|
+
export declare function resolveTools(tools: McpToolDefinition[], _context: McpToolContext): Promise<McpToolDefinition[]>;
|
|
@@ -1,24 +1,7 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
1
|
export function createToolMap(tools) {
|
|
3
2
|
return Object.fromEntries(tools.map((t) => [t.name, t]));
|
|
4
3
|
}
|
|
5
|
-
function
|
|
6
|
-
if (Array.isArray(obj)) {
|
|
7
|
-
return obj.map(stripSchemaOverhead);
|
|
8
|
-
}
|
|
9
|
-
if (typeof obj === "object" && obj !== null) {
|
|
10
|
-
const result = {};
|
|
11
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
12
|
-
if (key === "$schema") continue;
|
|
13
|
-
if (key === "additionalProperties" && value === false) continue;
|
|
14
|
-
if (key === "propertyNames") continue;
|
|
15
|
-
result[key] = stripSchemaOverhead(value);
|
|
16
|
-
}
|
|
17
|
-
return result;
|
|
18
|
-
}
|
|
19
|
-
return obj;
|
|
20
|
-
}
|
|
21
|
-
export function getToolsForServer(tools, editMode, adapter) {
|
|
4
|
+
export function getToolInfoForServer(tools, editMode, adapter) {
|
|
22
5
|
return tools.filter((tool) => {
|
|
23
6
|
if (!tool.modes.includes(editMode)) return false;
|
|
24
7
|
if (!tool.requiredAdapterMethods) return true;
|
|
@@ -26,23 +9,31 @@ export function getToolsForServer(tools, editMode, adapter) {
|
|
|
26
9
|
return tool.requiredAdapterMethods.every(
|
|
27
10
|
(method) => typeof adapter[method] === "function"
|
|
28
11
|
);
|
|
29
|
-
}).map((
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
12
|
+
}).map((t) => t.name);
|
|
13
|
+
}
|
|
14
|
+
export function coerceStringifiedParams(params) {
|
|
15
|
+
const result = {};
|
|
16
|
+
for (const key of Object.keys(params)) {
|
|
17
|
+
const value = params[key];
|
|
18
|
+
if (typeof value === "string" && (value[0] === "[" || value[0] === "{")) {
|
|
19
|
+
try {
|
|
20
|
+
result[key] = JSON.parse(value);
|
|
21
|
+
} catch {
|
|
22
|
+
result[key] = value;
|
|
23
|
+
}
|
|
24
|
+
} else {
|
|
25
|
+
result[key] = value;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return result;
|
|
39
29
|
}
|
|
40
30
|
export async function executeTool(toolMap, name, context, params) {
|
|
41
31
|
const tool = toolMap[name];
|
|
42
32
|
if (!tool) {
|
|
43
33
|
throw new Error(`Unknown tool: ${name}`);
|
|
44
34
|
}
|
|
45
|
-
const
|
|
35
|
+
const coerced = coerceStringifiedParams(params);
|
|
36
|
+
const validatedParams = tool.paramsSchema.parse(coerced);
|
|
46
37
|
return tool.execute(context, validatedParams);
|
|
47
38
|
}
|
|
48
39
|
export function getToolCategory(toolMap, name) {
|
|
@@ -68,21 +59,6 @@ export function isQueryResult(result) {
|
|
|
68
59
|
export function isToolError(result) {
|
|
69
60
|
return typeof result === "object" && result !== null && "error" in result && typeof result.error === "string";
|
|
70
61
|
}
|
|
71
|
-
export function
|
|
72
|
-
return
|
|
73
|
-
}
|
|
74
|
-
export function isToolDefinition(item) {
|
|
75
|
-
return !isToolFactory(item);
|
|
76
|
-
}
|
|
77
|
-
export async function resolveTools(tools, context) {
|
|
78
|
-
const resolved = [];
|
|
79
|
-
for (const tool of tools) {
|
|
80
|
-
if (isToolFactory(tool)) {
|
|
81
|
-
const factoryTools = await tool.resolve(context);
|
|
82
|
-
resolved.push(...factoryTools);
|
|
83
|
-
} else {
|
|
84
|
-
resolved.push(tool);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
return resolved;
|
|
62
|
+
export async function resolveTools(tools, _context) {
|
|
63
|
+
return tools;
|
|
88
64
|
}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
getFieldType,
|
|
3
3
|
getEditableValue,
|
|
4
4
|
getParagraphChildren
|
|
5
|
-
} from "#blokkli/agent/app/tools/
|
|
5
|
+
} from "#blokkli/agent/app/tools/helpers";
|
|
6
6
|
import { itemEntityType } from "#blokkli-build/config";
|
|
7
7
|
const MAX_CONTENT_LENGTH = 150;
|
|
8
8
|
function stripHtml(html) {
|