Skip to content

Commit 1c95505

Browse files
committed
Fix buttons
1 parent 41e62f2 commit 1c95505

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/client/content/tools/tabs/split_embed.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,20 +484,27 @@ def _handle_vector_store_population(
484484
) -> None:
485485
"""Handle vector store population button and processing"""
486486
is_source_valid = source_data.is_valid()
487-
state.running = not (is_source_valid and embed_request.vector_store) or state.get("button_populate") is True
488487

489488
if not embed_request.alias and create_new_vs:
490489
st.info("Please provide a Vector Store Alias.")
491490

492491
refresh_clicked = False
493492
populate_clicked = False
494-
if source_data.file_source == "OCI" and not create_new_vs and state.running:
493+
if source_data.file_source == "OCI" and not create_new_vs:
494+
state.running = (
495+
not (is_source_valid and embed_request.vector_store) and state.get("button_refresh") is not True
496+
)
495497
refresh_clicked = st.button(
496498
"Refresh from OCI",
499+
type="primary",
497500
key="button_refresh",
501+
disabled=state.running,
498502
help="Refresh vector store with new/modified files from OCI bucket",
499503
)
500504
else:
505+
state.running = (
506+
not (is_source_valid and embed_request.vector_store) and state.get("button_populate") is not True
507+
)
501508
populate_clicked = st.button(
502509
"Populate Vector Store",
503510
type="primary",

0 commit comments

Comments
 (0)