@langgraph-js/sdk 3.3.0 → 3.3.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.
@@ -245,7 +245,7 @@ export class LangGraphClient extends EventEmitter {
245
245
  messages: messagesToSend,
246
246
  fe_tools: await this.tools.toJSON(this.currentAssistant.graph_id),
247
247
  },
248
- streamMode: ["messages", "values", "updates"],
248
+ streamMode: ["messages", "values"],
249
249
  streamSubgraphs: true,
250
250
  command,
251
251
  });
@@ -9,7 +9,7 @@ import { useArtifacts } from "../artifacts/index.js";
9
9
  * @en Formats a Date object into a time string.
10
10
  */
11
11
  export const formatTime = (date) => {
12
- return date.toLocaleTimeString("en-US");
12
+ return date.toLocaleTimeString();
13
13
  };
14
14
  /**
15
15
  * @zh 格式化数字为带千位分隔符的字符串。
@@ -46,7 +46,8 @@ export const getMessageContent = (content) => {
46
46
  */
47
47
  export const getHistoryContent = (thread) => {
48
48
  var _a, _b, _c;
49
- const content = (_c = (_b = (_a = thread === null || thread === void 0 ? void 0 : thread.values) === null || _a === void 0 ? void 0 : _a.messages) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.content;
49
+ /** @ts-ignore */
50
+ const content = thread.title || thread.name || ((_c = (_b = (_a = thread === null || thread === void 0 ? void 0 : thread.values) === null || _a === void 0 ? void 0 : _a.messages) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.content);
50
51
  if (content && Array.isArray(content)) {
51
52
  return content.map((item) => {
52
53
  if (item.type === "text") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langgraph-js/sdk",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
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",
@@ -346,7 +346,7 @@ export class LangGraphClient<TStateType = unknown> extends EventEmitter<LangGrap
346
346
  messages: messagesToSend,
347
347
  fe_tools: await this.tools.toJSON(this.currentAssistant!.graph_id),
348
348
  },
349
- streamMode: ["messages", "values", "updates"],
349
+ streamMode: ["messages", "values"],
350
350
  streamSubgraphs: true,
351
351
  command,
352
352
  });
@@ -12,7 +12,7 @@ import { useArtifacts } from "../artifacts/index.js";
12
12
  * @en Formats a Date object into a time string.
13
13
  */
14
14
  export const formatTime = (date: Date) => {
15
- return date.toLocaleTimeString("en-US");
15
+ return date.toLocaleTimeString();
16
16
  };
17
17
 
18
18
  /**
@@ -47,7 +47,8 @@ export const getMessageContent = (content: any) => {
47
47
  * @en Gets the text representation of Thread content in history.
48
48
  */
49
49
  export const getHistoryContent = (thread: Thread) => {
50
- const content = (thread?.values as any)?.messages?.[0]?.content;
50
+ /** @ts-ignore */
51
+ const content: string | any[] = thread.title || thread.name || (thread?.values as any)?.messages?.[0]?.content;
51
52
  if (content && Array.isArray(content)) {
52
53
  return content.map((item: any) => {
53
54
  if (item.type === "text") {