@blueking/bkflow-canvas-editor 0.1.0-beta.7 → 0.1.0-beta.8
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 +1 -1
- package/dist/index.esm.js +45 -27
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -36120,17 +36120,17 @@ const DbIcon = defineComponent({
|
|
|
36120
36120
|
messages: [
|
|
36121
36121
|
{ role: "system", content: "" },
|
|
36122
36122
|
{ role: "user", content: "" }
|
|
36123
|
-
]
|
|
36123
|
+
],
|
|
36124
|
+
chat_history: ""
|
|
36124
36125
|
}), j = shallowRef([]);
|
|
36125
36126
|
watch(
|
|
36126
36127
|
() => $.inputData,
|
|
36127
|
-
() => {
|
|
36128
|
-
|
|
36129
|
-
|
|
36130
|
-
|
|
36131
|
-
|
|
36132
|
-
|
|
36133
|
-
}, k()) : z.value.messages = cloneDeep$1($.inputData.messages.value);
|
|
36128
|
+
(Ne) => {
|
|
36129
|
+
const xe = "messages" in Ne && Array.isArray(Ne.messages.value) && Ne.messages.value.length >= 2, _e = "chat_history" in Ne && typeof Ne.chat_history?.value == "string";
|
|
36130
|
+
z.value.messages = xe ? cloneDeep$1(Ne.messages.value) : [
|
|
36131
|
+
{ role: "system", content: "" },
|
|
36132
|
+
{ role: "user", content: "" }
|
|
36133
|
+
], z.value.chat_history = _e ? Ne.chat_history.value : "", (!xe || !_e) && k();
|
|
36134
36134
|
},
|
|
36135
36135
|
{
|
|
36136
36136
|
immediate: !0
|
|
@@ -36164,27 +36164,27 @@ const DbIcon = defineComponent({
|
|
|
36164
36164
|
return t({
|
|
36165
36165
|
validate: async () => L.value.validate().then(() => !0).catch(() => !1)
|
|
36166
36166
|
}), (Ne, xe) => {
|
|
36167
|
-
const _e = resolveComponent("bk-form-item"), oe = resolveComponent("bk-
|
|
36167
|
+
const _e = resolveComponent("bk-form-item"), oe = resolveComponent("bk-input"), he = resolveComponent("bk-form"), Ce = resolveDirective("bk-tooltips");
|
|
36168
36168
|
return openBlock(), createElementBlock("div", _hoisted_1$n, [
|
|
36169
|
-
createVNode(
|
|
36169
|
+
createVNode(he, {
|
|
36170
36170
|
ref_key: "formRef",
|
|
36171
36171
|
ref: L,
|
|
36172
36172
|
"form-type": "vertical",
|
|
36173
36173
|
model: z.value
|
|
36174
36174
|
}, {
|
|
36175
36175
|
default: withCtx(() => [
|
|
36176
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(z.value.messages, (
|
|
36177
|
-
key:
|
|
36176
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(z.value.messages, ($e, Ve) => (openBlock(), createBlock(_e, {
|
|
36177
|
+
key: Ve,
|
|
36178
36178
|
label: "Prompt",
|
|
36179
|
-
property: `messages[${
|
|
36180
|
-
required:
|
|
36179
|
+
property: `messages[${Ve}]`,
|
|
36180
|
+
required: Ve > 0,
|
|
36181
36181
|
rules: [
|
|
36182
36182
|
{
|
|
36183
|
-
validator: (
|
|
36183
|
+
validator: (Fe) => Ve === 0 || Fe.content.trim().length > 0,
|
|
36184
36184
|
message: "请输入Prompt内容"
|
|
36185
36185
|
},
|
|
36186
36186
|
{
|
|
36187
|
-
validator: (
|
|
36187
|
+
validator: (Fe) => de(Ve, Fe.role),
|
|
36188
36188
|
message: "最后一个提示词必须为【用户】role"
|
|
36189
36189
|
}
|
|
36190
36190
|
]
|
|
@@ -36192,27 +36192,27 @@ const DbIcon = defineComponent({
|
|
|
36192
36192
|
default: withCtx(() => [
|
|
36193
36193
|
createElementVNode("div", _hoisted_2$i, [
|
|
36194
36194
|
createVNode(RoleTypeSelector, {
|
|
36195
|
-
modelValue:
|
|
36196
|
-
"onUpdate:modelValue": [(
|
|
36197
|
-
index:
|
|
36195
|
+
modelValue: $e.role,
|
|
36196
|
+
"onUpdate:modelValue": [(Fe) => $e.role = Fe, k],
|
|
36197
|
+
index: Ve,
|
|
36198
36198
|
disabled: !$.editable
|
|
36199
36199
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "index", "disabled"]),
|
|
36200
36200
|
createVNode(PromptImport, {
|
|
36201
36201
|
prompts: j.value,
|
|
36202
36202
|
disabled: !$.editable,
|
|
36203
|
-
onImport: (
|
|
36203
|
+
onImport: (Fe) => ae(Ve, Fe)
|
|
36204
36204
|
}, null, 8, ["prompts", "disabled", "onImport"]),
|
|
36205
|
-
|
|
36205
|
+
Ve > 0 && z.value.messages.length > 2 ? withDirectives((openBlock(), createBlock(unref(Del), {
|
|
36206
36206
|
key: 0,
|
|
36207
36207
|
class: normalizeClass(["delete-prompt-btn", { disabled: !$.editable }]),
|
|
36208
|
-
onClick: (
|
|
36208
|
+
onClick: (Fe) => ie(Ve)
|
|
36209
36209
|
}, null, 8, ["class", "onClick"])), [
|
|
36210
|
-
[
|
|
36210
|
+
[Ce, "删除"]
|
|
36211
36211
|
]) : createCommentVNode("", !0)
|
|
36212
36212
|
]),
|
|
36213
36213
|
createVNode(VariableInput, {
|
|
36214
|
-
modelValue:
|
|
36215
|
-
"onUpdate:modelValue": (
|
|
36214
|
+
modelValue: $e.content,
|
|
36215
|
+
"onUpdate:modelValue": (Fe) => $e.content = Fe,
|
|
36216
36216
|
options: $.fullVariableList,
|
|
36217
36217
|
type: "textarea",
|
|
36218
36218
|
placeholder: "请输入",
|
|
@@ -36228,14 +36228,32 @@ const DbIcon = defineComponent({
|
|
|
36228
36228
|
prompts: j.value,
|
|
36229
36229
|
disabled: !$.editable,
|
|
36230
36230
|
onAdd: pe
|
|
36231
|
-
}, null, 8, ["prompts", "disabled"])
|
|
36231
|
+
}, null, 8, ["prompts", "disabled"]),
|
|
36232
|
+
createVNode(_e, {
|
|
36233
|
+
label: "聊天历史",
|
|
36234
|
+
property: "chat_history"
|
|
36235
|
+
}, {
|
|
36236
|
+
default: withCtx(() => [
|
|
36237
|
+
createVNode(oe, {
|
|
36238
|
+
modelValue: z.value.chat_history,
|
|
36239
|
+
"onUpdate:modelValue": xe[0] || (xe[0] = ($e) => z.value.chat_history = $e),
|
|
36240
|
+
type: "textarea",
|
|
36241
|
+
placeholder: "请输入聊天历史",
|
|
36242
|
+
rows: 4,
|
|
36243
|
+
resize: !1,
|
|
36244
|
+
disabled: !$.editable,
|
|
36245
|
+
onBlur: k
|
|
36246
|
+
}, null, 8, ["modelValue", "disabled"])
|
|
36247
|
+
]),
|
|
36248
|
+
_: 1
|
|
36249
|
+
})
|
|
36232
36250
|
]),
|
|
36233
36251
|
_: 1
|
|
36234
36252
|
}, 8, ["model"])
|
|
36235
36253
|
]);
|
|
36236
36254
|
};
|
|
36237
36255
|
}
|
|
36238
|
-
}), LlmForm = /* @__PURE__ */ _export_sfc$1(_sfc_main$n, [["__scopeId", "data-v-
|
|
36256
|
+
}), LlmForm = /* @__PURE__ */ _export_sfc$1(_sfc_main$n, [["__scopeId", "data-v-aef06045"]]), _hoisted_1$m = { class: "knowledgebase-input-params" }, _hoisted_2$h = { class: "settings-query-param-item-slider-wrapper" }, _hoisted_3$f = { class: "resource-reject-threshold-tips" }, _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
36239
36257
|
__name: "index",
|
|
36240
36258
|
props: {
|
|
36241
36259
|
inputData: {},
|