@axiom-lattice/react-sdk 2.1.56 → 2.1.57

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/index.d.mts CHANGED
@@ -144,7 +144,7 @@ interface ChatStateWithAgent extends ChatState {
144
144
  */
145
145
  interface PendingMessage {
146
146
  id: string;
147
- content: any;
147
+ content: string;
148
148
  type: 'human' | 'system';
149
149
  sequence: number;
150
150
  createdAt: Date | string;
package/dist/index.d.ts CHANGED
@@ -144,7 +144,7 @@ interface ChatStateWithAgent extends ChatState {
144
144
  */
145
145
  interface PendingMessage {
146
146
  id: string;
147
- content: any;
147
+ content: string;
148
148
  type: 'human' | 'system';
149
149
  sequence: number;
150
150
  createdAt: Date | string;
package/dist/index.js CHANGED
@@ -1804,7 +1804,13 @@ function AgentThreadProvider({
1804
1804
  }
1805
1805
  let interrupt;
1806
1806
  if (chunk.type === "interrupt") {
1807
- interrupt = chunk;
1807
+ const rawChunk = chunk;
1808
+ interrupt = {
1809
+ type: "interrupt",
1810
+ id: rawChunk.id,
1811
+ role: "ai",
1812
+ value: rawChunk.data?.content || rawChunk.data
1813
+ };
1808
1814
  } else if (anyChunk.type === "queue_status") {
1809
1815
  return;
1810
1816
  } else {
@@ -1828,7 +1834,8 @@ function AgentThreadProvider({
1828
1834
  ...prev,
1829
1835
  todos: todos || prev.todos,
1830
1836
  messages: updatedMessages,
1831
- isLoading: true
1837
+ isLoading: true,
1838
+ interrupts: interrupt ? [interrupt] : void 0
1832
1839
  }));
1833
1840
  },
1834
1841
  []