@umituz/react-native-ai-generation-content 1.26.21 → 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,54 +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
|
-
|
|
116
|
-
promptLength: scenario.aiPrompt.length,
|
|
121
|
+
aiPrompt: scenario.aiPrompt,
|
|
122
|
+
fullScenario: scenario,
|
|
117
123
|
});
|
|
118
124
|
}
|
|
119
|
-
|
|
125
|
+
throw new Error(`[GenericWizardFlow] Scenario "${scenario.id}" must have aiPrompt field`);
|
|
120
126
|
}
|
|
121
127
|
|
|
122
|
-
// Fallback to feature config with generic prompt
|
|
123
128
|
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
124
|
-
console.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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),
|
|
130
135
|
});
|
|
131
136
|
}
|
|
132
137
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
? `A photorealistic couple portrait in ${scenario.id.replace(/_/g, ' ')} scene with romantic atmosphere`
|
|
136
|
-
: `A photorealistic couple portrait with romantic atmosphere`;
|
|
137
|
-
|
|
138
|
-
return {
|
|
139
|
-
id: featureConfig.id,
|
|
140
|
-
aiPrompt: fallbackPrompt,
|
|
141
|
-
outputType: "image" as const,
|
|
142
|
-
title: featureConfig.id,
|
|
143
|
-
};
|
|
144
|
-
}, [scenario, featureConfig.id]);
|
|
138
|
+
return scenario;
|
|
139
|
+
}, [scenario]);
|
|
145
140
|
|
|
146
141
|
// Generation hook - handles AI generation automatically
|
|
147
142
|
// Note: Hook is used for its side effects (automatic generation)
|