@umituz/react-native-ai-generation-content 1.17.194 → 1.17.195

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-ai-generation-content",
3
- "version": "1.17.194",
3
+ "version": "1.17.195",
4
4
  "description": "Provider-agnostic AI generation orchestration for React Native",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -29,6 +29,7 @@ export async function executeCoupleFuture(
29
29
  }
30
30
 
31
31
  const { onProgress, timeoutMs, imageSize } = config ?? {};
32
+ let lastStatus = "";
32
33
 
33
34
  if (typeof __DEV__ !== "undefined" && __DEV__) {
34
35
  console.log("[CoupleFuture] Starting generation");
@@ -59,9 +60,13 @@ export async function executeCoupleFuture(
59
60
  const result = await provider.subscribe(COUPLE_FUTURE_DEFAULTS.model, modelInput, {
60
61
  timeoutMs: timeoutMs || COUPLE_FUTURE_DEFAULTS.timeoutMs,
61
62
  onQueueUpdate: (status) => {
63
+ if (status.status === lastStatus) return;
64
+ lastStatus = status.status;
65
+
62
66
  if (typeof __DEV__ !== "undefined" && __DEV__) {
63
- console.log("[CoupleFuture] Queue:", status.status);
67
+ console.log("[CoupleFuture] Status:", status.status);
64
68
  }
69
+
65
70
  if (status.status === "IN_QUEUE") onProgress?.(20);
66
71
  else if (status.status === "IN_PROGRESS") onProgress?.(50);
67
72
  },
@@ -69,7 +74,7 @@ export async function executeCoupleFuture(
69
74
 
70
75
  onProgress?.(90);
71
76
 
72
- const data = (result as { images?: Array<{ url: string }> });
77
+ const data = result as { images?: Array<{ url: string }> };
73
78
  const imageUrl = data?.images?.[0]?.url;
74
79
 
75
80
  onProgress?.(100);