@umituz/react-native-ai-generation-content 1.25.19 → 1.25.20
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.25.
|
|
3
|
+
"version": "1.25.20",
|
|
4
4
|
"description": "Provider-agnostic AI generation orchestration for React Native with result preview components",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -308,21 +308,26 @@ export const useWizardGeneration = (
|
|
|
308
308
|
const input = lastInputRef.current;
|
|
309
309
|
if (!input) return;
|
|
310
310
|
|
|
311
|
-
const videoResult = result as { videoUrl?: string };
|
|
312
|
-
const imageResult = result as { imageUrl?: string };
|
|
313
|
-
|
|
314
311
|
// Both input types have prompt field
|
|
315
312
|
const prompt = 'prompt' in input ? input.prompt : '';
|
|
316
313
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
imageUrl: imageResult.imageUrl,
|
|
314
|
+
// Build creation object with only the relevant URL field
|
|
315
|
+
const creation: any = {
|
|
320
316
|
scenarioId: scenario.id,
|
|
321
317
|
scenarioTitle: scenario.title || scenario.id,
|
|
322
318
|
prompt,
|
|
323
319
|
createdAt: Date.now(),
|
|
324
320
|
};
|
|
325
321
|
|
|
322
|
+
// Add only the relevant URL based on output type
|
|
323
|
+
if (outputType === "image") {
|
|
324
|
+
const imageResult = result as { imageUrl?: string };
|
|
325
|
+
creation.imageUrl = imageResult.imageUrl;
|
|
326
|
+
} else {
|
|
327
|
+
const videoResult = result as { videoUrl?: string };
|
|
328
|
+
creation.videoUrl = videoResult.videoUrl;
|
|
329
|
+
}
|
|
330
|
+
|
|
326
331
|
await repository.create(uid, creation);
|
|
327
332
|
|
|
328
333
|
if (typeof __DEV__ !== "undefined" && __DEV__) {
|