@langgraph-js/sdk 4.4.0 → 4.5.0
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/tool/ToolUI.js +2 -2
- package/package.json +2 -2
- package/src/tool/ToolUI.ts +2 -2
package/dist/tool/ToolUI.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getMessageContent } from "../ui-store/createChatStore.js";
|
|
2
|
-
import {
|
|
2
|
+
import { parse, Allow } from "partial-json";
|
|
3
3
|
import { createActionRequestID } from "../humanInTheLoop.js";
|
|
4
4
|
export class ToolRenderData {
|
|
5
5
|
message;
|
|
@@ -86,7 +86,7 @@ export class ToolRenderData {
|
|
|
86
86
|
}
|
|
87
87
|
getInputRepaired() {
|
|
88
88
|
try {
|
|
89
|
-
return
|
|
89
|
+
return parse(this.message.tool_input || "", Allow.ALL);
|
|
90
90
|
}
|
|
91
91
|
catch (e) {
|
|
92
92
|
return {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langgraph-js/sdk",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "The UI SDK for LangGraph - seamlessly integrate your AI agents with frontend interfaces",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"camelcase-keys": "^10.0.1",
|
|
54
54
|
"change-case": "^5.4.4",
|
|
55
55
|
"eventemitter3": "^5.0.1",
|
|
56
|
-
"jsonrepair": "^3.12.0",
|
|
57
56
|
"nanostores": "^1.0.1",
|
|
57
|
+
"partial-json": "^0.1.7",
|
|
58
58
|
"ts-debounce": "^4.0.0",
|
|
59
59
|
"zod": "^4",
|
|
60
60
|
"zod-to-json-schema": "^3.24.5"
|
package/src/tool/ToolUI.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { RenderMessage } from "../LangGraphClient.js";
|
|
|
2
2
|
|
|
3
3
|
import { LangGraphClient } from "../LangGraphClient.js";
|
|
4
4
|
import { getMessageContent } from "../ui-store/createChatStore.js";
|
|
5
|
-
import {
|
|
5
|
+
import { parse, Allow } from "partial-json";
|
|
6
6
|
import { createActionRequestID, HumanInTheLoopDecision, InterruptResponse } from "../humanInTheLoop.js";
|
|
7
7
|
|
|
8
8
|
export type DeepPartial<T> = {
|
|
@@ -90,7 +90,7 @@ export class ToolRenderData<I, D> {
|
|
|
90
90
|
}
|
|
91
91
|
getInputRepaired(): DeepPartial<I> {
|
|
92
92
|
try {
|
|
93
|
-
return
|
|
93
|
+
return parse(this.message.tool_input || "", Allow.ALL);
|
|
94
94
|
} catch (e) {
|
|
95
95
|
return {};
|
|
96
96
|
}
|