Add debug logging and reference filename display for Nano Banana edit chain
This commit is contained in:
parent
71be6f99df
commit
048d9a0c84
1 changed files with 15 additions and 3 deletions
|
|
@ -145,13 +145,23 @@ export default function ImageGeneratePage() {
|
|||
setJobId(null); // Reset job ID
|
||||
|
||||
try {
|
||||
const response = await modulesApi.generateImage({
|
||||
const payload = {
|
||||
prompt: effectivePrompt,
|
||||
provider: editingImage ? 'nano-banana' : provider,
|
||||
model: editingImage ? 'gemini-2.5-flash-image' : model,
|
||||
provider_options: editingImage ? undefined : providerOptions,
|
||||
reference_asset_id: editingImage?.id || undefined,
|
||||
});
|
||||
};
|
||||
|
||||
// Debug logging
|
||||
if (editingImage) {
|
||||
console.log('🎨 Nano Banana Edit Mode:');
|
||||
console.log(' Reference Asset ID:', editingImage.id);
|
||||
console.log(' Edit Instructions:', effectivePrompt);
|
||||
console.log(' Full Payload:', payload);
|
||||
}
|
||||
|
||||
const response = await modulesApi.generateImage(payload);
|
||||
|
||||
const job = response.data;
|
||||
setJobId(job.id);
|
||||
|
|
@ -294,7 +304,9 @@ export default function ImageGeneratePage() {
|
|||
</div>
|
||||
</div>
|
||||
<p className="text-xs text-gray-500">
|
||||
Using Nano Banana (Gemini) for iterative image editing
|
||||
Using Nano Banana (Gemini) for iterative editing
|
||||
<br />
|
||||
Reference: {editingImage.original_filename || editingImage.id.substring(0, 8)}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue