@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/index.cjs CHANGED
@@ -4321,6 +4321,7 @@ async function streamSSE(response, callbacks = {}) {
4321
4321
  },
4322
4322
  "response.output_text.done": (raw) => {
4323
4323
  const data = JSON.parse(raw);
4324
+ text = data.text;
4324
4325
  callbacks.onTextDone?.(data.text);
4325
4326
  },
4326
4327
  "response.output_item.done": (raw) => {
@@ -4338,6 +4339,11 @@ async function streamSSE(response, callbacks = {}) {
4338
4339
  metadata = meta;
4339
4340
  callbacks.onMetadata?.(meta);
4340
4341
  }
4342
+ const finalText = data.response?.metadata?.content;
4343
+ if (finalText) {
4344
+ text = finalText;
4345
+ callbacks.onTextDone?.(finalText);
4346
+ }
4341
4347
  if (data.context) {
4342
4348
  context = data.context;
4343
4349
  }