@langgraph-js/sdk 4.6.6 → 4.6.7
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/History.js +4 -4
- package/package.json +1 -1
- package/src/History.ts +4 -4
package/dist/History.js
CHANGED
|
@@ -106,10 +106,10 @@ export class History {
|
|
|
106
106
|
* @en Deletes the specified session
|
|
107
107
|
*/
|
|
108
108
|
async deleteSession(sessionId) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
// 注意:不要在此处检查 this.sessions.has(sessionId)!
|
|
110
|
+
// this.sessions 只记录本次运行中创建/激活过的会话,
|
|
111
|
+
// 而历史列表中的 thread 是直接从远端拉取的,并不在本地 Map 里。
|
|
112
|
+
// 如果加了提前 return,历史列表中未被激活过的 thread 将永远无法删除。
|
|
113
113
|
// 如果删除的是当前活跃会话,清空活跃会话
|
|
114
114
|
if (this.activeSessionId === sessionId) {
|
|
115
115
|
this.activeSessionId = null;
|
package/package.json
CHANGED
package/src/History.ts
CHANGED
|
@@ -151,10 +151,10 @@ export class History {
|
|
|
151
151
|
* @en Deletes the specified session
|
|
152
152
|
*/
|
|
153
153
|
async deleteSession(sessionId: string): Promise<boolean> {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
// 注意:不要在此处检查 this.sessions.has(sessionId)!
|
|
155
|
+
// this.sessions 只记录本次运行中创建/激活过的会话,
|
|
156
|
+
// 而历史列表中的 thread 是直接从远端拉取的,并不在本地 Map 里。
|
|
157
|
+
// 如果加了提前 return,历史列表中未被激活过的 thread 将永远无法删除。
|
|
158
158
|
|
|
159
159
|
// 如果删除的是当前活跃会话,清空活跃会话
|
|
160
160
|
if (this.activeSessionId === sessionId) {
|