wtfai 1.1.0 → 1.1.1

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/README.md CHANGED
@@ -109,7 +109,8 @@ const session = client.createSession('workflow-id', {
109
109
 
110
110
  ```typescript
111
111
  session.on('start', ({ threadId, title }) => {
112
- // 工作流开始执行,获取到 threadId 和默认标题
112
+ // 工作流开始执行,获取到 threadId
113
+ // title 只有新会话才会有(默认为工作流名称),追问会话不会返回
113
114
  })
114
115
 
115
116
  session.on('nodeStart', ({ nodeId }) => {
package/dist/session.js CHANGED
@@ -139,7 +139,9 @@ class WorkflowSession {
139
139
  });
140
140
  this.emit('start', {
141
141
  threadId: data.t,
142
- title: data.ti
142
+ ...data.ti && {
143
+ title: data.ti
144
+ }
143
145
  });
144
146
  },
145
147
  onNodeStart: (data)=>{
package/dist/types.d.ts CHANGED
@@ -94,7 +94,7 @@ export type SessionEventType = 'start' | 'nodeStart' | 'nodeEnd' | 'token' | 'lo
94
94
  export interface SessionEventListeners {
95
95
  start: (data: {
96
96
  threadId: string;
97
- title: string;
97
+ title?: string;
98
98
  }) => void;
99
99
  nodeStart: (data: {
100
100
  nodeId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wtfai",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -35,7 +35,7 @@
35
35
  "compressorjs": "^1.2.1",
36
36
  "cos-js-sdk-v5": "^1.10.1",
37
37
  "uuid": "^13.0.0",
38
- "@our-llm/shared": "2.0.1"
38
+ "@our-llm/shared": "2.0.2"
39
39
  },
40
40
  "scripts": {
41
41
  "build": "rslib build",