wtfai 1.5.4 → 1.5.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/dist/session.d.ts +2 -1
- package/dist/session.js +4 -0
- package/package.json +7 -7
package/dist/session.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare class WorkflowSession {
|
|
|
16
16
|
private disposed;
|
|
17
17
|
constructor(workflowId: string, baseUrl: string, uploadService: UploadService, headers?: Record<string, string>, options?: SessionOptions);
|
|
18
18
|
private iframeMethods;
|
|
19
|
+
getWorkflowId(): string;
|
|
19
20
|
/**
|
|
20
21
|
* 注册可供 iframe 调用的自定义方法
|
|
21
22
|
*/
|
|
@@ -71,7 +72,7 @@ export declare class WorkflowSession {
|
|
|
71
72
|
*/
|
|
72
73
|
updateSessionTitle(title: string): Promise<void>;
|
|
73
74
|
/**
|
|
74
|
-
*
|
|
75
|
+
* 执行指定的工作流(临时/嵌套执行),工作流需要使用消息生成组件来生成消息供收集
|
|
75
76
|
* 不会影响当前会话的状态(messages 等)
|
|
76
77
|
* @param workflowId 目标工作流 ID
|
|
77
78
|
* @param input 输入数据(与 send 方法一致)
|
package/dist/session.js
CHANGED
|
@@ -11,6 +11,9 @@ function _define_property(obj, key, value) {
|
|
|
11
11
|
return obj;
|
|
12
12
|
}
|
|
13
13
|
class WorkflowSession {
|
|
14
|
+
getWorkflowId() {
|
|
15
|
+
return this.workflowId;
|
|
16
|
+
}
|
|
14
17
|
registerIframeMethods(methods) {
|
|
15
18
|
this.assertNotDisposed();
|
|
16
19
|
this.iframeMethods = {
|
|
@@ -218,6 +221,7 @@ class WorkflowSession {
|
|
|
218
221
|
executeWorkflowSSE(`${this.baseUrl}/workflows/${workflowId}/execute`, {
|
|
219
222
|
input: executionInput,
|
|
220
223
|
threadId: tempThreadId,
|
|
224
|
+
hostWorkflowId: this.workflowId,
|
|
221
225
|
...rest
|
|
222
226
|
}, {
|
|
223
227
|
onNodeEnd: (data)=>{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wtfai",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
],
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@eslint/js": "^9.39.2",
|
|
17
|
-
"@rsbuild/plugin-react": "^1.4.
|
|
18
|
-
"@rslib/core": "^0.19.
|
|
19
|
-
"@types/react": "^19.2.
|
|
17
|
+
"@rsbuild/plugin-react": "^1.4.5",
|
|
18
|
+
"@rslib/core": "^0.19.5",
|
|
19
|
+
"@types/react": "^19.2.13",
|
|
20
20
|
"eslint": "^9.39.2",
|
|
21
21
|
"eslint-config-prettier": "^10.1.8",
|
|
22
22
|
"eslint-plugin-prettier": "^5.5.5",
|
|
23
|
-
"globals": "^17.
|
|
23
|
+
"globals": "^17.3.0",
|
|
24
24
|
"prettier": "^3.8.1",
|
|
25
25
|
"react": "^19.2.4",
|
|
26
26
|
"typescript": "^5.9.3",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"react-dom": ">=16.9.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ant-design/x": "^2.2.
|
|
35
|
-
"@ant-design/x-markdown": "^2.2.
|
|
34
|
+
"@ant-design/x": "^2.2.1",
|
|
35
|
+
"@ant-design/x-markdown": "^2.2.1",
|
|
36
36
|
"@microsoft/fetch-event-source": "^2.0.1",
|
|
37
37
|
"clsx": "^2.1.1",
|
|
38
38
|
"compressorjs": "^1.2.1",
|