@umituz/react-native-ai-fal-provider 2.0.35 → 2.0.37
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-fal-provider",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.37",
|
|
4
4
|
"description": "FAL AI provider for React Native - implements IAIProvider interface for unified AI generation",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -54,6 +54,18 @@ export async function handleFalSubscription<T = unknown>(
|
|
|
54
54
|
});
|
|
55
55
|
if (jobStatus.status !== lastStatus) {
|
|
56
56
|
lastStatus = jobStatus.status;
|
|
57
|
+
|
|
58
|
+
// Emit status changes without fake progress percentages
|
|
59
|
+
if (options?.onProgress) {
|
|
60
|
+
if (jobStatus.status === "IN_QUEUE" || jobStatus.status === "IN_PROGRESS") {
|
|
61
|
+
// Indeterminate progress - let UI show spinner/loading
|
|
62
|
+
options.onProgress({ progress: -1, status: jobStatus.status });
|
|
63
|
+
} else if (jobStatus.status === "COMPLETED") {
|
|
64
|
+
options.onProgress({ progress: 100, status: "COMPLETED" });
|
|
65
|
+
} else if (jobStatus.status === "FAILED") {
|
|
66
|
+
options.onProgress({ progress: 0, status: "FAILED" });
|
|
67
|
+
}
|
|
68
|
+
}
|
|
57
69
|
}
|
|
58
70
|
options?.onQueueUpdate?.(jobStatus);
|
|
59
71
|
},
|
|
@@ -110,7 +122,8 @@ export async function handleFalRun<T = unknown>(
|
|
|
110
122
|
input: Record<string, unknown>,
|
|
111
123
|
options?: RunOptions
|
|
112
124
|
): Promise<T> {
|
|
113
|
-
|
|
125
|
+
// Indeterminate progress - no fake percentages
|
|
126
|
+
options?.onProgress?.({ progress: -1, status: "IN_PROGRESS" as const });
|
|
114
127
|
|
|
115
128
|
try {
|
|
116
129
|
const result = await fal.run(model, { input });
|