@umituz/react-native-ai-pruna-provider 1.0.31 → 1.0.33

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-pruna-provider",
3
- "version": "1.0.31",
3
+ "version": "1.0.33",
4
4
  "description": "Pruna AI provider for React Native - implements IAIProvider interface for unified AI generation",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -135,7 +135,6 @@ async function buildImageEditInput(
135
135
  images: imageUrls,
136
136
  prompt,
137
137
  aspect_ratio: aspectRatio,
138
- reference_image: "1", // Required by Pruna API per documentation
139
138
  };
140
139
 
141
140
  if (input.seed !== undefined) payload.seed = input.seed;
@@ -67,6 +67,17 @@ async function singleSubscribeAttempt<T = unknown>(
67
67
  const response = await submitPrediction(model, modelInput, apiKey, sessionId, signal);
68
68
  let uri = extractUri(response);
69
69
 
70
+ // __DEV__ log extracted URI
71
+ if (typeof __DEV__ !== 'undefined' && __DEV__) {
72
+ console.log(`[DEV] [${TAG}] Extracted URI:`, {
73
+ hasUri: !!uri,
74
+ uri: uri?.substring(0, 100) + '...',
75
+ uriFull: uri,
76
+ responseKeys: Object.keys(response),
77
+ status: response.status,
78
+ });
79
+ }
80
+
70
81
  // If no immediate result, poll for async result
71
82
  if (!uri && (response.get_url || response.status_url)) {
72
83
  const pollUrl = (response.get_url || response.status_url)!;
@@ -91,7 +102,18 @@ async function singleSubscribeAttempt<T = unknown>(
91
102
  throw new Error("Empty result from Pruna AI. Please try again.");
92
103
  }
93
104
 
94
- return resolveUri(uri);
105
+ const resolvedUri = resolveUri(uri);
106
+
107
+ // __DEV__ log final result
108
+ if (typeof __DEV__ !== 'undefined' && __DEV__) {
109
+ console.log(`[DEV] [${TAG}] Returning URI:`, {
110
+ originalUri: uri,
111
+ resolvedUri,
112
+ resolvedUriPrefix: resolvedUri.substring(0, 100) + '...',
113
+ });
114
+ }
115
+
116
+ return resolvedUri;
95
117
  })();
96
118
 
97
119
  const timeoutPromise = new Promise<never>((_, reject) => {