@umituz/react-native-ai-generation-content 1.26.20 → 1.26.22
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.26.
|
|
3
|
+
"version": "1.26.22",
|
|
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",
|
|
@@ -172,7 +172,18 @@ async function buildGenerationInput(
|
|
|
172
172
|
return null;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
// NO FALLBACK - scenario.aiPrompt is REQUIRED
|
|
176
|
+
if (!scenario.aiPrompt || scenario.aiPrompt.trim() === "") {
|
|
177
|
+
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
178
|
+
console.error("[WizardStrategy] CRITICAL: scenario.aiPrompt is missing or empty!", {
|
|
179
|
+
scenarioId: scenario.id,
|
|
180
|
+
aiPrompt: scenario.aiPrompt,
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
throw new Error(`Scenario "${scenario.id}" must have aiPrompt field`);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
const prompt = scenario.aiPrompt;
|
|
176
187
|
const outputType = scenario.outputType || "video";
|
|
177
188
|
|
|
178
189
|
// For image generation, enhance prompt with style selections
|
|
@@ -94,46 +94,49 @@ export const GenericWizardFlow: React.FC<GenericWizardFlowProps> = ({
|
|
|
94
94
|
[updateProgress],
|
|
95
95
|
);
|
|
96
96
|
|
|
97
|
-
//
|
|
97
|
+
// Validate scenario - NO FALLBACK, aiPrompt is REQUIRED
|
|
98
98
|
const validatedScenario = useMemo(() => {
|
|
99
99
|
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
100
100
|
console.log("[GenericWizardFlow] Validating scenario", {
|
|
101
101
|
hasScenario: !!scenario,
|
|
102
102
|
scenarioId: scenario?.id,
|
|
103
|
-
hasAiPrompt: scenario?.aiPrompt
|
|
103
|
+
hasAiPrompt: !!scenario?.aiPrompt,
|
|
104
|
+
aiPromptValue: scenario?.aiPrompt,
|
|
105
|
+
aiPromptLength: scenario?.aiPrompt?.length,
|
|
104
106
|
hasModel: !!scenario?.model,
|
|
105
107
|
scenarioModel: scenario?.model,
|
|
106
108
|
outputType: scenario?.outputType,
|
|
109
|
+
fullScenario: JSON.stringify(scenario, null, 2),
|
|
107
110
|
});
|
|
108
111
|
}
|
|
109
112
|
|
|
110
|
-
if (scenario
|
|
113
|
+
if (!scenario || !scenario.id) {
|
|
114
|
+
throw new Error("[GenericWizardFlow] Scenario is required");
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (!scenario.aiPrompt || scenario.aiPrompt.trim() === "") {
|
|
111
118
|
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
112
|
-
console.
|
|
119
|
+
console.error("[GenericWizardFlow] CRITICAL: Scenario missing aiPrompt!", {
|
|
113
120
|
scenarioId: scenario.id,
|
|
114
|
-
|
|
115
|
-
|
|
121
|
+
aiPrompt: scenario.aiPrompt,
|
|
122
|
+
fullScenario: scenario,
|
|
116
123
|
});
|
|
117
124
|
}
|
|
118
|
-
|
|
125
|
+
throw new Error(`[GenericWizardFlow] Scenario "${scenario.id}" must have aiPrompt field`);
|
|
119
126
|
}
|
|
120
127
|
|
|
121
|
-
// Fallback to feature config
|
|
122
128
|
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
123
|
-
console.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
129
|
+
console.log("[GenericWizardFlow] ✅ Scenario validation passed", {
|
|
130
|
+
scenarioId: scenario.id,
|
|
131
|
+
model: scenario.model,
|
|
132
|
+
outputType: scenario.outputType,
|
|
133
|
+
promptLength: scenario.aiPrompt.length,
|
|
134
|
+
promptPreview: scenario.aiPrompt.substring(0, 100),
|
|
127
135
|
});
|
|
128
136
|
}
|
|
129
137
|
|
|
130
|
-
return
|
|
131
|
-
|
|
132
|
-
aiPrompt: "",
|
|
133
|
-
outputType: "image" as const, // Default to image for safety
|
|
134
|
-
title: featureConfig.id,
|
|
135
|
-
};
|
|
136
|
-
}, [scenario, featureConfig.id]);
|
|
138
|
+
return scenario;
|
|
139
|
+
}, [scenario]);
|
|
137
140
|
|
|
138
141
|
// Generation hook - handles AI generation automatically
|
|
139
142
|
// Note: Hook is used for its side effects (automatic generation)
|