@shenghuabi/workflow 1.0.4 → 1.0.6
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/index.js +17 -17
- package/index.js.map +2 -2
- package/index.mjs +24 -28
- package/index.mjs.map +3 -3
- package/inline/node/chat/chat.node.define.d.ts +5 -5
- package/inline/node/chat/main/index.d.ts +5 -5
- package/package.json +6 -4
- package/share/common/handle.define.d.ts +2 -2
- package/share/common/llm.define.d.ts +3 -3
- package/share/index.js +14 -14
- package/share/index.js.map +2 -2
- package/share/index.mjs +20 -23
- package/share/index.mjs.map +3 -3
- package/webview/index.js +12 -12
- package/webview/index.js.map +2 -2
- package/webview/index.mjs +18 -20
- package/webview/index.mjs.map +3 -3
package/index.mjs
CHANGED
|
@@ -112,17 +112,16 @@ function generateHandle(value, label = value) {
|
|
|
112
112
|
|
|
113
113
|
// packages/workflow/share/common/examples.define.ts
|
|
114
114
|
import {
|
|
115
|
+
actions as actions2,
|
|
115
116
|
condition,
|
|
116
|
-
|
|
117
|
-
renderConfig,
|
|
118
|
-
topClass
|
|
117
|
+
renderConfig
|
|
119
118
|
} from "@piying/view-angular-core";
|
|
120
119
|
import * as v from "valibot";
|
|
121
120
|
|
|
122
121
|
// packages/workflow/share/util/layout.ts
|
|
123
|
-
import {
|
|
122
|
+
import { actions } from "@piying/view-angular-core";
|
|
124
123
|
function asColumn() {
|
|
125
|
-
return
|
|
124
|
+
return actions.class.component("grid gap-2");
|
|
126
125
|
}
|
|
127
126
|
|
|
128
127
|
// packages/workflow/share/common/examples.define.ts
|
|
@@ -138,23 +137,23 @@ var EXAMPLES_DEFINE = v.pipe(
|
|
|
138
137
|
v.description(
|
|
139
138
|
"选中后会尝试使用yaml解析为对象,再序列化为对应的响应类型"
|
|
140
139
|
),
|
|
141
|
-
|
|
140
|
+
actions2.wrappers.set(["tooltip"])
|
|
142
141
|
),
|
|
143
|
-
value: v.pipe(v.string(), v.title("问题"),
|
|
142
|
+
value: v.pipe(v.string(), v.title("问题"), actions2.class.top("flex-1"))
|
|
144
143
|
}),
|
|
145
144
|
// todo 待修复
|
|
146
|
-
|
|
145
|
+
actions2.class.top("flex gap-2 items-center")
|
|
147
146
|
),
|
|
148
147
|
output: v.pipe(
|
|
149
148
|
v.object({
|
|
150
149
|
format: v.pipe(
|
|
151
150
|
v.optional(v.boolean(), false),
|
|
152
151
|
v.description("是否需要格式化"),
|
|
153
|
-
|
|
152
|
+
actions2.wrappers.set(["tooltip"])
|
|
154
153
|
),
|
|
155
|
-
value: v.pipe(v.string(), v.title("回答"),
|
|
154
|
+
value: v.pipe(v.string(), v.title("回答"), actions2.class.top("flex-1"))
|
|
156
155
|
}),
|
|
157
|
-
|
|
156
|
+
actions2.class.top("flex gap-2 items-center")
|
|
158
157
|
)
|
|
159
158
|
}),
|
|
160
159
|
asColumn()
|
|
@@ -199,10 +198,8 @@ var HandleDataDefine = v2.pipe(
|
|
|
199
198
|
|
|
200
199
|
// packages/workflow/share/common/inline-template.define.ts
|
|
201
200
|
import {
|
|
202
|
-
|
|
203
|
-
disableWhen
|
|
204
|
-
setWrappers,
|
|
205
|
-
topClass as topClass2
|
|
201
|
+
actions as actions3,
|
|
202
|
+
disableWhen
|
|
206
203
|
} from "@piying/view-angular-core";
|
|
207
204
|
import { map } from "rxjs";
|
|
208
205
|
import * as v3 from "valibot";
|
|
@@ -214,8 +211,8 @@ var INLINE_Template = v3.pipe(
|
|
|
214
211
|
v3.optional(v3.string(), "{{NODE.description}}"),
|
|
215
212
|
v3.title("模板"),
|
|
216
213
|
v3.description("允许使用变量:{{NODE.xxx}}(参考节点帮助)"),
|
|
217
|
-
|
|
218
|
-
|
|
214
|
+
actions3.wrappers.set(["tooltip", "form-field"]),
|
|
215
|
+
actions3.class.top("flex-1"),
|
|
219
216
|
disableWhen({
|
|
220
217
|
listen: (fn) => fn({
|
|
221
218
|
list: [["..", "enable"]]
|
|
@@ -223,7 +220,7 @@ var INLINE_Template = v3.pipe(
|
|
|
223
220
|
})
|
|
224
221
|
)
|
|
225
222
|
}),
|
|
226
|
-
|
|
223
|
+
actions3.class.component("flex gap-2")
|
|
227
224
|
);
|
|
228
225
|
var INLINE_Template2 = v3.pipe(
|
|
229
226
|
v3.object({
|
|
@@ -233,8 +230,8 @@ var INLINE_Template2 = v3.pipe(
|
|
|
233
230
|
v3.optional(v3.string()),
|
|
234
231
|
v3.title("模板"),
|
|
235
232
|
v3.description("允许使用变量:{{ENTRY.xxx}}(参考节点帮助)"),
|
|
236
|
-
|
|
237
|
-
|
|
233
|
+
actions3.wrappers.set(["tooltip", "form-field"]),
|
|
234
|
+
actions3.class.top("flex-1"),
|
|
238
235
|
disableWhen({
|
|
239
236
|
listen: (fn) => fn({
|
|
240
237
|
list: [["..", "enable"]]
|
|
@@ -242,13 +239,13 @@ var INLINE_Template2 = v3.pipe(
|
|
|
242
239
|
})
|
|
243
240
|
)
|
|
244
241
|
}),
|
|
245
|
-
|
|
242
|
+
actions3.class.component("flex gap-2 items-center")
|
|
246
243
|
);
|
|
247
244
|
|
|
248
245
|
// packages/workflow/share/common/llm.define.ts
|
|
249
246
|
import {
|
|
250
247
|
asVirtualGroup,
|
|
251
|
-
|
|
248
|
+
actions as actions4,
|
|
252
249
|
setComponent as setComponent2
|
|
253
250
|
} from "@piying/view-angular-core";
|
|
254
251
|
import { condition as condition3 } from "@piying/valibot-visit";
|
|
@@ -264,7 +261,7 @@ function llmModelConfig(item) {
|
|
|
264
261
|
v4.optional(v4.string()),
|
|
265
262
|
v4.title("预定义模型配置"),
|
|
266
263
|
setComponent2("select"),
|
|
267
|
-
|
|
264
|
+
actions4.inputs.patchAsync({
|
|
268
265
|
options: (field) => field.context.getModelList()
|
|
269
266
|
})
|
|
270
267
|
),
|
|
@@ -396,9 +393,8 @@ var NODE_COMMON = {
|
|
|
396
393
|
// packages/workflow/inline/node/chat/chat.node.define.ts
|
|
397
394
|
import * as v7 from "valibot";
|
|
398
395
|
import {
|
|
399
|
-
|
|
396
|
+
actions as actions5,
|
|
400
397
|
condition as condition4,
|
|
401
|
-
patchInputs,
|
|
402
398
|
setComponent as setComponent3,
|
|
403
399
|
valueChange
|
|
404
400
|
} from "@piying/view-angular-core";
|
|
@@ -412,7 +408,7 @@ var CHAT_NODE_DEFINE = v7.looseObject({
|
|
|
412
408
|
/** 处理时解析 */
|
|
413
409
|
responseFormat: v7.pipe(
|
|
414
410
|
v7.optional(v7.picklist(ResponseFormat)),
|
|
415
|
-
|
|
411
|
+
actions5.inputs.patch({
|
|
416
412
|
options: [
|
|
417
413
|
// 有输入json时
|
|
418
414
|
{
|
|
@@ -438,7 +434,7 @@ var CHAT_NODE_DEFINE = v7.looseObject({
|
|
|
438
434
|
/** 处理后解析 */
|
|
439
435
|
parseBy: v7.pipe(
|
|
440
436
|
v7.optional(v7.picklist(ResponseList)),
|
|
441
|
-
|
|
437
|
+
actions5.inputs.patch({
|
|
442
438
|
options: [
|
|
443
439
|
{ label: "直接返回", value: void 0 },
|
|
444
440
|
{
|
|
@@ -473,7 +469,7 @@ var CHAT_NODE_DEFINE = v7.looseObject({
|
|
|
473
469
|
),
|
|
474
470
|
examples: EXAMPLES_DEFINE
|
|
475
471
|
}),
|
|
476
|
-
|
|
472
|
+
actions5.class.component("grid auto-rows-auto gap-2")
|
|
477
473
|
),
|
|
478
474
|
value: v7.pipe(
|
|
479
475
|
v7.custom(Boolean),
|