@axiom-lattice/react-sdk 2.1.55 → 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
@@ -668,6 +668,7 @@ function useChat(threadId, assistantId, options = {}) {
668
668
  chunkMessageMerger.current.removeMessageById(lastMessage.id);
669
669
  const stopResumeStream = client.resumeStream(
670
670
  {
671
+ assistantId,
671
672
  threadId,
672
673
  messageId: lastMessage.id,
673
674
  knownContent: "",
@@ -1803,7 +1804,13 @@ function AgentThreadProvider({
1803
1804
  }
1804
1805
  let interrupt;
1805
1806
  if (chunk.type === "interrupt") {
1806
- 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
+ };
1807
1814
  } else if (anyChunk.type === "queue_status") {
1808
1815
  return;
1809
1816
  } else {
@@ -1827,7 +1834,8 @@ function AgentThreadProvider({
1827
1834
  ...prev,
1828
1835
  todos: todos || prev.todos,
1829
1836
  messages: updatedMessages,
1830
- isLoading: true
1837
+ isLoading: true,
1838
+ interrupts: interrupt ? [interrupt] : void 0
1831
1839
  }));
1832
1840
  },
1833
1841
  []
@@ -1965,6 +1973,7 @@ function AgentThreadProvider({
1965
1973
  error: null
1966
1974
  }));
1967
1975
  const resumeStreamOptions = {
1976
+ assistantId: assistantId || clientAssistantId,
1968
1977
  threadId,
1969
1978
  messageId: targetMessageId,
1970
1979
  knownContent: "",