@arbidocs/sdk 0.3.131 → 0.3.132

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/browser.js CHANGED
@@ -3908,6 +3908,7 @@ async function streamSSE(response, callbacks = {}) {
3908
3908
  },
3909
3909
  "response.output_text.done": (raw) => {
3910
3910
  const data = JSON.parse(raw);
3911
+ text = data.text;
3911
3912
  callbacks.onTextDone?.(data.text);
3912
3913
  },
3913
3914
  "response.output_item.done": (raw) => {
@@ -3925,6 +3926,11 @@ async function streamSSE(response, callbacks = {}) {
3925
3926
  metadata = meta;
3926
3927
  callbacks.onMetadata?.(meta);
3927
3928
  }
3929
+ const finalText = data.response?.metadata?.content;
3930
+ if (finalText) {
3931
+ text = finalText;
3932
+ callbacks.onTextDone?.(finalText);
3933
+ }
3928
3934
  if (data.context) {
3929
3935
  context = data.context;
3930
3936
  }