@danhachuel/thunderbolt 0.3.22 → 0.3.23
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/app/main.py +4 -13
- package/package.json +1 -1
package/app/main.py
CHANGED
|
@@ -2166,20 +2166,9 @@ def render_scripts():
|
|
|
2166
2166
|
st.warning("Sem Blueprint seleccionado: o documento pode ser criado, mas não terá contexto editorial de Blueprint.")
|
|
2167
2167
|
|
|
2168
2168
|
document_type = st.radio("Tipo de documento", ["Roteiro de vídeo", "Letra de música"], horizontal=True, key="script_document_type")
|
|
2169
|
-
title = st.text_input("Título", key="script_title", placeholder="Ex.: A verdade esquecida sobre…")
|
|
2170
|
-
brief = st.text_area(
|
|
2171
|
-
"Tema ou briefing",
|
|
2172
|
-
key="script_brief",
|
|
2173
|
-
height=120,
|
|
2174
|
-
placeholder="Descreva o tema, a mensagem, o conflito ou a ideia musical que o Blueprint deve orientar.",
|
|
2175
|
-
)
|
|
2176
|
-
legacy_script_language = str(st.session_state.get("script_language") or "")
|
|
2177
|
-
script_subject_key = "pipeline_scripts_video_subject"
|
|
2178
|
-
if script_subject_key not in st.session_state:
|
|
2179
|
-
st.session_state[script_subject_key] = str(brief or title or "")
|
|
2180
2169
|
script_settings = render_video_generation_settings(
|
|
2181
2170
|
"pipeline_scripts",
|
|
2182
|
-
current_language=
|
|
2171
|
+
current_language=str(st.session_state.get("script_language") or read_json("settings.json", {}).get("video_language") or "pt"),
|
|
2183
2172
|
channel=selected_channel,
|
|
2184
2173
|
generate_content_callback=lambda: _generate_video_content_callback(
|
|
2185
2174
|
"pipeline_scripts",
|
|
@@ -2200,6 +2189,8 @@ def render_scripts():
|
|
|
2200
2189
|
)
|
|
2201
2190
|
language = script_settings["script_language"]
|
|
2202
2191
|
structure_notes = script_settings["script_structure_notes"]
|
|
2192
|
+
title = str(script_settings.get("video_subject") or "").strip()
|
|
2193
|
+
brief = str(script_settings.get("video_script") or "").strip() or title
|
|
2203
2194
|
generate_col, clear_col = st.columns([1.4, 1])
|
|
2204
2195
|
with generate_col:
|
|
2205
2196
|
generate_clicked = st.button("Gerar com IA a partir do Blueprint", type="primary", use_container_width=True, key="generate_script_document")
|
|
@@ -2279,7 +2270,7 @@ def render_scripts():
|
|
|
2279
2270
|
except (OSError, ValueError) as exc:
|
|
2280
2271
|
st.error(f"Não foi possível guardar o documento: {exc}")
|
|
2281
2272
|
else:
|
|
2282
|
-
st.caption("Gere um rascunho com IA para o editar aqui, ou seleccione um Blueprint e preencha
|
|
2273
|
+
st.caption("Gere um rascunho com IA para o editar aqui, ou seleccione um Blueprint e preencha as configurações do tema para começar.")
|
|
2283
2274
|
|
|
2284
2275
|
with history_tab:
|
|
2285
2276
|
st.caption(f"Histórico persistente: `{script_dir}` · índice em `{STORAGE / 'state' / 'scripts.json'}`")
|
package/package.json
CHANGED