@langgraph-js/sdk 3.8.3 → 3.8.4
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/LangGraphClient.js
CHANGED
|
@@ -332,13 +332,13 @@ export class LangGraphClient extends EventEmitter {
|
|
|
332
332
|
}
|
|
333
333
|
else if (chunk.event === "values") {
|
|
334
334
|
const data = chunk.data;
|
|
335
|
-
if (data
|
|
335
|
+
if (data?.__interrupt__) {
|
|
336
336
|
this._status = "interrupted";
|
|
337
337
|
this.humanInTheLoop = camelcaseKeys(data.__interrupt__, {
|
|
338
338
|
deep: true,
|
|
339
339
|
});
|
|
340
340
|
}
|
|
341
|
-
else if (data
|
|
341
|
+
else if (data?.messages) {
|
|
342
342
|
const isResume = !!command?.resume;
|
|
343
343
|
const isLongerThanLocal = data.messages.length >= this.messageProcessor.getGraphMessages().length;
|
|
344
344
|
// resume 情况下,长度低于前端 message 的统统不接受
|
package/package.json
CHANGED
package/src/LangGraphClient.ts
CHANGED
|
@@ -457,17 +457,19 @@ export class LangGraphClient<TStateType = unknown> extends EventEmitter<LangGrap
|
|
|
457
457
|
this.emit("message", chunk);
|
|
458
458
|
return true;
|
|
459
459
|
} else if (chunk.event === "values") {
|
|
460
|
-
const data = chunk.data as
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
460
|
+
const data = chunk.data as
|
|
461
|
+
| {
|
|
462
|
+
__interrupt__?: InterruptData;
|
|
463
|
+
messages: Message[];
|
|
464
|
+
}
|
|
465
|
+
| undefined;
|
|
464
466
|
|
|
465
|
-
if (data
|
|
467
|
+
if (data?.__interrupt__) {
|
|
466
468
|
this._status = "interrupted";
|
|
467
469
|
this.humanInTheLoop = camelcaseKeys(data.__interrupt__, {
|
|
468
470
|
deep: true,
|
|
469
471
|
});
|
|
470
|
-
} else if (data
|
|
472
|
+
} else if (data?.messages) {
|
|
471
473
|
const isResume = !!command?.resume;
|
|
472
474
|
const isLongerThanLocal = data.messages.length >= this.messageProcessor.getGraphMessages().length;
|
|
473
475
|
// resume 情况下,长度低于前端 message 的统统不接受
|