@danhachuel/thunderbolt 0.6.83 → 0.6.84

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.
@@ -445,7 +445,7 @@ def render_motion_control(settings: dict[str, Any]) -> None:
445
445
  def render_ugc_products(settings: dict[str, Any]) -> None:
446
446
  """Create portrait UGC photos or videos from a product and a saved character."""
447
447
  st.title("UGC Products")
448
- st.caption("Crie fotos ou vídeos UGC em formato vertical 9:16 para TikTok e Instagram usando um produto e um personagem cadastrados.")
448
+ st.caption("Crie fotos ou vídeos UGC em formato vertical 9:16 para TikTok e Instagram usando um produto e um personagem cadastrado.")
449
449
  repository = _repository(settings)
450
450
  if repository is None:
451
451
  return
@@ -457,15 +457,21 @@ def render_ugc_products(settings: dict[str, Any]) -> None:
457
457
 
458
458
  with media_tab:
459
459
  if not influencers:
460
- influencers = [{"id": "", "name": "Sem personagem", "bio": ""}]
460
+ influencers = [{"id": "", "name": "", "bio": ""}]
461
461
  influencer_options = _influencer_options(influencers)
462
+ if not influencer_options:
463
+ influencer_options = [""]
462
464
  selected_influencer = st.selectbox(
463
- "Personagem (opcional)",
465
+ "Personagem",
464
466
  influencer_options,
465
467
  format_func=lambda value: _influencer_label(influencers, value),
466
468
  key="ugc_products_character",
467
469
  )
468
- selected_character = next(item for item in influencers if str(item.get("id")) == selected_influencer)
470
+ selected_character = next(
471
+ (item for item in influencers if str(item.get("id") or "") == str(selected_influencer or "")),
472
+ influencers[0],
473
+ )
474
+ selected_influencer = str(selected_character.get("id") or "")
469
475
  try:
470
476
  character_assets = repository.list_assets(selected_influencer)
471
477
  except Exception:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danhachuel/thunderbolt",
3
- "version": "0.6.83",
3
+ "version": "0.6.84",
4
4
  "description": "Thunderbolt — interface local para operação de canais faceless e motor MoneyPrinterTurbo",
5
5
  "license": "MIT",
6
6
  "main": "scripts/cli.mjs",