@danhachuel/thunderbolt 0.5.76 → 0.5.78

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.
Files changed (2) hide show
  1. package/app/main.py +12 -2
  2. package/package.json +1 -1
package/app/main.py CHANGED
@@ -4798,6 +4798,14 @@ def _render_video_task_state(task: dict[str, Any]) -> None:
4798
4798
  st.caption(f"Manifesto: {task.get('video_result')}")
4799
4799
 
4800
4800
 
4801
+ def _start_pipeline_task(task_id: str, state: str) -> None:
4802
+ """Start or retry a video task from any platform automation card."""
4803
+ if state in {"blocked", "failed"}:
4804
+ retry_task_with_current_settings(task_id)
4805
+ else:
4806
+ transition_task(task_id, "doing")
4807
+
4808
+
4801
4809
  def render_videos():
4802
4810
  st.subheader("Backlog Videos")
4803
4811
  st.caption("Acompanhamento dos vídeos criados, estados da pipeline e controlos de execução.")
@@ -4854,7 +4862,7 @@ def render_videos():
4854
4862
  start_col, stop_col = st.columns(2)
4855
4863
  with start_col:
4856
4864
  if st.button("Start", key=f"automation_start_{task['id']}", use_container_width=True, disabled=state not in {"to_do", "blocked", "failed"}):
4857
- transition_task(task["id"], "doing")
4865
+ _start_pipeline_task(str(task["id"]), state)
4858
4866
  st.rerun()
4859
4867
  with stop_col:
4860
4868
  if st.button("Stop", key=f"automation_stop_{task['id']}", use_container_width=True, disabled=state != "doing"):
@@ -5153,6 +5161,7 @@ def render_thumbnails():
5153
5161
  st.error(str(exc))
5154
5162
 
5155
5163
 
5164
+ @st.fragment(run_every=5.0)
5156
5165
  def render_tiktok_automation():
5157
5166
  st.title("Automação Tiktok")
5158
5167
  st.caption("Agendamento diário da geração por canal. A fila TikTok usa Prompt Master e mantém exclusivamente o formato Portrait 9:16.")
@@ -5236,13 +5245,14 @@ def render_tiktok_automation():
5236
5245
  with cols[3]:
5237
5246
  state = str(task.get("state") or "")
5238
5247
  if st.button("Start", key=f"tiktok_automation_start_{task_id}", disabled=state not in {"to_do", "blocked", "failed"}, use_container_width=True):
5239
- retry_task_with_current_settings(task_id) if state in {"blocked", "failed"} else transition_task(task_id, "doing")
5248
+ _start_pipeline_task(task_id, state)
5240
5249
  st.rerun()
5241
5250
  if st.button("Stop", key=f"tiktok_automation_stop_{task_id}", disabled=state != "doing", use_container_width=True):
5242
5251
  stop_task_by_user(task_id)
5243
5252
  st.rerun()
5244
5253
 
5245
5254
 
5255
+ @st.fragment(run_every=5.0)
5246
5256
  def render_automation():
5247
5257
  st.title("Automação Youtube")
5248
5258
  st.caption("Agendamento diário da geração por canal. O worker verifica o relógio local do computador e coloca os lotes agendados na fila.")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danhachuel/thunderbolt",
3
- "version": "0.5.76",
3
+ "version": "0.5.78",
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",