@umituz/react-native-ai-generation-content 1.26.20 → 1.26.21

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.20",
3
+ "version": "1.26.21",
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",
@@ -107,30 +107,38 @@ export const GenericWizardFlow: React.FC<GenericWizardFlowProps> = ({
107
107
  });
108
108
  }
109
109
 
110
- if (scenario && scenario.id && scenario.aiPrompt !== undefined) {
110
+ if (scenario && scenario.id && scenario.aiPrompt && scenario.aiPrompt.trim() !== "") {
111
111
  if (typeof __DEV__ !== "undefined" && __DEV__) {
112
112
  console.log("[GenericWizardFlow] Scenario validation passed", {
113
113
  scenarioId: scenario.id,
114
114
  model: scenario.model,
115
115
  outputType: scenario.outputType,
116
+ promptLength: scenario.aiPrompt.length,
116
117
  });
117
118
  }
118
119
  return scenario;
119
120
  }
120
121
 
121
- // Fallback to feature config
122
+ // Fallback to feature config with generic prompt
122
123
  if (typeof __DEV__ !== "undefined" && __DEV__) {
123
- console.warn("[GenericWizardFlow] Scenario missing required fields, using fallback", {
124
+ console.error("[GenericWizardFlow] Scenario missing required fields - aiPrompt is required!", {
124
125
  hasScenario: !!scenario,
125
126
  scenarioId: scenario?.id,
127
+ hasAiPrompt: !!scenario?.aiPrompt,
128
+ aiPromptValue: scenario?.aiPrompt,
126
129
  featureConfigId: featureConfig.id,
127
130
  });
128
131
  }
129
132
 
133
+ // Generate a meaningful fallback prompt
134
+ const fallbackPrompt = scenario?.id
135
+ ? `A photorealistic couple portrait in ${scenario.id.replace(/_/g, ' ')} scene with romantic atmosphere`
136
+ : `A photorealistic couple portrait with romantic atmosphere`;
137
+
130
138
  return {
131
139
  id: featureConfig.id,
132
- aiPrompt: "",
133
- outputType: "image" as const, // Default to image for safety
140
+ aiPrompt: fallbackPrompt,
141
+ outputType: "image" as const,
134
142
  title: featureConfig.id,
135
143
  };
136
144
  }, [scenario, featureConfig.id]);