@blueking/bkflow-canvas-editor 0.0.17 → 0.0.19
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/index.cjs.js +2 -2
- package/dist/index.esm.js +32 -26
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -5733,38 +5733,44 @@ const getRenderFormInputItemDefaultValue = (e) => {
|
|
|
5733
5733
|
}
|
|
5734
5734
|
return t;
|
|
5735
5735
|
}, getUniformApiPluginFormValue = (e) => "default" in e ? e.default : "", getPluginDefaultComponentData = (e, t) => {
|
|
5736
|
-
const { url: n, methods: r, inputs: i } = t,
|
|
5737
|
-
return e === "uniform_api" ? (
|
|
5736
|
+
const { url: n, methods: r, inputs: i, polling: y, credential_key: g } = t, k = {};
|
|
5737
|
+
return e === "uniform_api" ? (k.uniform_api_plugin_url = {
|
|
5738
5738
|
value: n || "",
|
|
5739
5739
|
hook: !1
|
|
5740
|
-
},
|
|
5740
|
+
}, k.uniform_api_plugin_method = {
|
|
5741
5741
|
value: r && r.length > 0 ? r[0] : "",
|
|
5742
5742
|
hook: !1
|
|
5743
|
-
},
|
|
5744
|
-
y
|
|
5745
|
-
|
|
5743
|
+
}, y && (k.uniform_api_plugin_polling = {
|
|
5744
|
+
value: y,
|
|
5745
|
+
hook: !1
|
|
5746
|
+
}), g && (k.uniform_api_plugin_credential_key = {
|
|
5747
|
+
value: g,
|
|
5748
|
+
hook: !1
|
|
5749
|
+
}), i.forEach(($) => {
|
|
5750
|
+
k[$.key] = {
|
|
5751
|
+
value: getUniformApiPluginFormValue($),
|
|
5746
5752
|
need_render: !0,
|
|
5747
5753
|
hook: !1
|
|
5748
5754
|
};
|
|
5749
|
-
})) : e === "remote_plugin" ? (
|
|
5755
|
+
})) : e === "remote_plugin" ? (k.plugin_code = {
|
|
5750
5756
|
value: t.code,
|
|
5751
5757
|
hook: !1
|
|
5752
|
-
},
|
|
5758
|
+
}, k.plugin_version = {
|
|
5753
5759
|
value: t.version,
|
|
5754
5760
|
hook: !1
|
|
5755
|
-
}, t.inputParamsFormType === "renderform" ? i.forEach((
|
|
5756
|
-
|
|
5757
|
-
value: getRenderFormInputItemDefaultValue(
|
|
5761
|
+
}, t.inputParamsFormType === "renderform" ? i.forEach(($) => {
|
|
5762
|
+
k[$.tag_code] = {
|
|
5763
|
+
value: getRenderFormInputItemDefaultValue($),
|
|
5758
5764
|
need_render: !0,
|
|
5759
5765
|
hook: !1
|
|
5760
5766
|
};
|
|
5761
|
-
}) : t.inputParamsFormType) : e === "inner" && i.forEach((
|
|
5762
|
-
|
|
5763
|
-
value: getRenderFormInputItemDefaultValue(
|
|
5767
|
+
}) : t.inputParamsFormType) : e === "inner" && i.forEach(($) => {
|
|
5768
|
+
k[$.tag_code] = {
|
|
5769
|
+
value: getRenderFormInputItemDefaultValue($),
|
|
5764
5770
|
need_render: !0,
|
|
5765
5771
|
hook: !1
|
|
5766
5772
|
};
|
|
5767
|
-
}),
|
|
5773
|
+
}), k;
|
|
5768
5774
|
}, getInputFormsFromConstants = async (e, t) => {
|
|
5769
5775
|
if (!t || Object.keys(t).length === 0)
|
|
5770
5776
|
return [];
|
|
@@ -29699,17 +29705,17 @@ const AiopsForm = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_re
|
|
|
29699
29705
|
setup(e, { emit: t }) {
|
|
29700
29706
|
const n = [
|
|
29701
29707
|
{
|
|
29702
|
-
code: "
|
|
29708
|
+
code: "assistant",
|
|
29703
29709
|
name: "AI",
|
|
29704
29710
|
description: "这条 Prompt 作为AI回答的结果"
|
|
29705
29711
|
},
|
|
29706
29712
|
{
|
|
29707
|
-
code: "
|
|
29713
|
+
code: "system",
|
|
29708
29714
|
name: "系统",
|
|
29709
29715
|
description: "这条 Prompt 作为系统输入来定义角色,会在整个会话中生效"
|
|
29710
29716
|
},
|
|
29711
29717
|
{
|
|
29712
|
-
code: "
|
|
29718
|
+
code: "user",
|
|
29713
29719
|
name: "用户",
|
|
29714
29720
|
description: "这条 Prompt 作为用户的输入,可以更详细描述对角色的要求"
|
|
29715
29721
|
},
|
|
@@ -29718,7 +29724,7 @@ const AiopsForm = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_re
|
|
|
29718
29724
|
name: "等待回答",
|
|
29719
29725
|
description: "这条Prompt作为AI的提问,会等待用户输入回答内容"
|
|
29720
29726
|
}
|
|
29721
|
-
], r = e, i = t, y = computed(() => n.find((V) => V.code === r.modelValue)?.name), g = () => n.filter(($) => $.code === "
|
|
29727
|
+
], r = e, i = t, y = computed(() => n.find((V) => V.code === r.modelValue)?.name), g = () => n.filter(($) => $.code === "system" ? r.index === 0 : !0), k = ($) => {
|
|
29722
29728
|
i("update:modelValue", $);
|
|
29723
29729
|
};
|
|
29724
29730
|
return ($, V) => {
|
|
@@ -29770,7 +29776,7 @@ const AiopsForm = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_re
|
|
|
29770
29776
|
]);
|
|
29771
29777
|
};
|
|
29772
29778
|
}
|
|
29773
|
-
}), RoleTypeSelector = /* @__PURE__ */ _export_sfc$1(_sfc_main$n, [["__scopeId", "data-v-
|
|
29779
|
+
}), RoleTypeSelector = /* @__PURE__ */ _export_sfc$1(_sfc_main$n, [["__scopeId", "data-v-cc8e9eb1"]]), _hoisted_1$m = { class: "bkflow-canvas-icon bkflow-canvas-daoru import-trigger" }, _hoisted_2$f = { class: "prompt-content-tips" }, _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
29774
29780
|
__name: "prompt-import",
|
|
29775
29781
|
props: {
|
|
29776
29782
|
prompts: {},
|
|
@@ -29907,14 +29913,14 @@ const AiopsForm = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_re
|
|
|
29907
29913
|
};
|
|
29908
29914
|
}), g("change", Ce);
|
|
29909
29915
|
}, V = ref(), L = ref({
|
|
29910
|
-
messages: [{ role: "
|
|
29916
|
+
messages: [{ role: "system", content: "" }],
|
|
29911
29917
|
content: ""
|
|
29912
29918
|
}), re = shallowRef([]);
|
|
29913
29919
|
watch(
|
|
29914
29920
|
() => y.inputData,
|
|
29915
29921
|
() => {
|
|
29916
29922
|
L.value = {
|
|
29917
|
-
messages: k("messages", [{ role: "
|
|
29923
|
+
messages: k("messages", [{ role: "system", content: "" }]),
|
|
29918
29924
|
content: k("content", "")
|
|
29919
29925
|
}, (!("messages" in y.inputData) || !("content" in y.inputData)) && $();
|
|
29920
29926
|
},
|
|
@@ -29939,7 +29945,7 @@ const AiopsForm = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_re
|
|
|
29939
29945
|
re.value = Ce.response;
|
|
29940
29946
|
}, oe = (Ce) => {
|
|
29941
29947
|
L.value.messages.push({
|
|
29942
|
-
role: "
|
|
29948
|
+
role: "user",
|
|
29943
29949
|
content: Ce
|
|
29944
29950
|
}), $();
|
|
29945
29951
|
}, z = (Ce, he) => {
|
|
@@ -30031,7 +30037,7 @@ const AiopsForm = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_re
|
|
|
30031
30037
|
]);
|
|
30032
30038
|
};
|
|
30033
30039
|
}
|
|
30034
|
-
}), LlmForm = /* @__PURE__ */ _export_sfc$1(_sfc_main$k, [["__scopeId", "data-v-
|
|
30040
|
+
}), LlmForm = /* @__PURE__ */ _export_sfc$1(_sfc_main$k, [["__scopeId", "data-v-39ddb79b"]]), _hoisted_1$j = { class: "node-config-input-params" }, _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
30035
30041
|
__name: "input-params",
|
|
30036
30042
|
props: {
|
|
30037
30043
|
node: {},
|
|
@@ -31628,7 +31634,7 @@ const AiopsForm = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_re
|
|
|
31628
31634
|
alias: Cn,
|
|
31629
31635
|
meta_url: hn,
|
|
31630
31636
|
api_key: jt = "incident",
|
|
31631
|
-
version: vn = "",
|
|
31637
|
+
version: vn = "v2.0.0",
|
|
31632
31638
|
category: Et,
|
|
31633
31639
|
category_id: wn
|
|
31634
31640
|
} = Ne;
|
|
@@ -31745,7 +31751,7 @@ const AiopsForm = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_re
|
|
|
31745
31751
|
}, null, 8, ["show", "flow-id", "actived", "bkflow-tag", "plugin-group-list"]))
|
|
31746
31752
|
]));
|
|
31747
31753
|
}
|
|
31748
|
-
}), FlowCanvas = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["__scopeId", "data-v-
|
|
31754
|
+
}), FlowCanvas = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["__scopeId", "data-v-bfe93680"]]), _hoisted_1$3 = { class: "execute-flow-slider" }, _hoisted_2$3 = { class: "flow-name-wrapper" }, _hoisted_3$3 = { class: "form-params-wrapper" }, _hoisted_4$3 = {
|
|
31749
31755
|
key: 0,
|
|
31750
31756
|
class: "sideslider-footer-buttons"
|
|
31751
31757
|
}, _sfc_main$3 = /* @__PURE__ */ defineComponent({
|