Skip to content

Commit c9dfff3

Browse files
Merge pull request #123 from fiddlecube/vk/fix
fix: take correct strategies
2 parents 256ed68 + 0789acc commit c9dfff3

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

ui/dashboard.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,8 @@ def create_app_ui():
380380
if submit_button:
381381
# Save form values to session state
382382
st.session_state.test_prompt = prompt
383-
st.session_state.test_strategies = selected_strategies
383+
current_strategies = set(selected_strategies)
384+
st.session_state.test_strategies = list(current_strategies)
384385

385386
if not prompt.strip():
386387
st.error("🚫 Please enter a prompt!")
@@ -389,16 +390,8 @@ def create_app_ui():
389390
st.error("🚫 Please select at least one testing strategy!")
390391
st.stop()
391392

392-
if submit_button:
393-
if not prompt.strip():
394-
st.error("🚫 Please enter a prompt!")
395-
st.stop()
396-
if not selected_strategies:
397-
st.error("🚫 Please select at least one testing strategy!")
398-
st.stop()
399-
400393
with st.spinner("🔍 Running tests..."):
401-
output = adapter.run_test(provider_config["id"], prompt, selected_strategies)
394+
output = adapter.run_test(provider_config["id"], prompt, st.session_state.test_strategies)
402395
reports = get_reports()
403396

404397
st.subheader("✅ Test Results")

0 commit comments

Comments
 (0)