@langchain/langgraph-sdk 0.0.52 → 0.0.53

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.
@@ -117,10 +117,10 @@ function LoadExternalComponent({ stream, message, meta, fallback, components, ..
117
117
  hasClientComponent,
118
118
  ]);
119
119
  if (hasClientComponent) {
120
- return React.createElement(clientComponent, message.content);
120
+ return React.createElement(clientComponent, message.props);
121
121
  }
122
122
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { id: shadowRootId, ref: ref, ...props }), (0, jsx_runtime_1.jsx)(UseStreamContext.Provider, { value: { stream, meta }, children: state?.target != null
123
- ? ReactDOM.createPortal(React.createElement(state.comp, message.content), state.target)
123
+ ? ReactDOM.createPortal(React.createElement(state.comp, message.props), state.target)
124
124
  : fallback })] }));
125
125
  }
126
126
  exports.LoadExternalComponent = LoadExternalComponent;
@@ -90,10 +90,10 @@ export function LoadExternalComponent({ stream, message, meta, fallback, compone
90
90
  hasClientComponent,
91
91
  ]);
92
92
  if (hasClientComponent) {
93
- return React.createElement(clientComponent, message.content);
93
+ return React.createElement(clientComponent, message.props);
94
94
  }
95
95
  return (_jsxs(_Fragment, { children: [_jsx("div", { id: shadowRootId, ref: ref, ...props }), _jsx(UseStreamContext.Provider, { value: { stream, meta }, children: state?.target != null
96
- ? ReactDOM.createPortal(React.createElement(state.comp, message.content), state.target)
96
+ ? ReactDOM.createPortal(React.createElement(state.comp, message.props), state.target)
97
97
  : fallback })] }));
98
98
  }
99
99
  export function bootstrapUiContext() {
@@ -18,10 +18,10 @@ const typedUi = (config) => {
18
18
  type: "ui",
19
19
  id: message?.id ?? (0, uuid_1.v4)(),
20
20
  name: message?.name,
21
- content: message?.content,
22
- additional_kwargs: {
21
+ props: message?.props,
22
+ metadata: {
23
23
  ...metadata,
24
- ...message?.additional_kwargs,
24
+ ...message?.metadata,
25
25
  ...(options?.message ? { message_id: options.message.id } : null),
26
26
  },
27
27
  };
@@ -13,8 +13,8 @@ export declare const typedUi: <Decl extends Record<string, ElementType>>(config:
13
13
  push: <K extends keyof Decl & string>(message: {
14
14
  id?: string | undefined;
15
15
  name: K;
16
- content: { [K_1 in keyof Decl]: ComponentPropsWithoutRef<Decl[K_1]>; }[K];
17
- additional_kwargs?: Record<string, unknown> | undefined;
16
+ props: { [K_1 in keyof Decl]: ComponentPropsWithoutRef<Decl[K_1]>; }[K];
17
+ metadata?: Record<string, unknown> | undefined;
18
18
  }, options?: {
19
19
  message?: MessageLike;
20
20
  }) => UIMessage;
@@ -15,10 +15,10 @@ export const typedUi = (config) => {
15
15
  type: "ui",
16
16
  id: message?.id ?? uuidv4(),
17
17
  name: message?.name,
18
- content: message?.content,
19
- additional_kwargs: {
18
+ props: message?.props,
19
+ metadata: {
20
20
  ...metadata,
21
- ...message?.additional_kwargs,
21
+ ...message?.metadata,
22
22
  ...(options?.message ? { message_id: options.message.id } : null),
23
23
  },
24
24
  };
@@ -2,8 +2,8 @@ export interface UIMessage {
2
2
  type: "ui";
3
3
  id: string;
4
4
  name: string;
5
- content: Record<string, unknown>;
6
- additional_kwargs: {
5
+ props: Record<string, unknown>;
6
+ metadata: {
7
7
  run_id: string;
8
8
  message_id?: string;
9
9
  [key: string]: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph-sdk",
3
- "version": "0.0.52",
3
+ "version": "0.0.53",
4
4
  "description": "Client library for interacting with the LangGraph API",
5
5
  "type": "module",
6
6
  "packageManager": "yarn@1.22.19",