@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.mjs CHANGED
@@ -570,6 +570,7 @@ function useChat(threadId, assistantId, options = {}) {
570
570
  chunkMessageMerger.current.removeMessageById(lastMessage.id);
571
571
  const stopResumeStream = client.resumeStream(
572
572
  {
573
+ assistantId,
573
574
  threadId,
574
575
  messageId: lastMessage.id,
575
576
  knownContent: "",
@@ -1734,7 +1735,13 @@ function AgentThreadProvider({
1734
1735
  }
1735
1736
  let interrupt;
1736
1737
  if (chunk.type === "interrupt") {
1737
- interrupt = chunk;
1738
+ const rawChunk = chunk;
1739
+ interrupt = {
1740
+ type: "interrupt",
1741
+ id: rawChunk.id,
1742
+ role: "ai",
1743
+ value: rawChunk.data?.content || rawChunk.data
1744
+ };
1738
1745
  } else if (anyChunk.type === "queue_status") {
1739
1746
  return;
1740
1747
  } else {
@@ -1758,7 +1765,8 @@ function AgentThreadProvider({
1758
1765
  ...prev,
1759
1766
  todos: todos || prev.todos,
1760
1767
  messages: updatedMessages,
1761
- isLoading: true
1768
+ isLoading: true,
1769
+ interrupts: interrupt ? [interrupt] : void 0
1762
1770
  }));
1763
1771
  },
1764
1772
  []
@@ -1896,6 +1904,7 @@ function AgentThreadProvider({
1896
1904
  error: null
1897
1905
  }));
1898
1906
  const resumeStreamOptions = {
1907
+ assistantId: assistantId || clientAssistantId,
1899
1908
  threadId,
1900
1909
  messageId: targetMessageId,
1901
1910
  knownContent: "",