Skip to content

Commit

Permalink
Add select all commands (Josh-XT#713)
Browse files Browse the repository at this point in the history
Signed-off-by: Green Gecko <[email protected]>
Co-authored-by: Josh XT <[email protected]>
  • Loading branch information
birdup000 and Josh-XT authored Jun 15, 2023
1 parent b2c5fe3 commit 2e47a97
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions streamlit/pages/0-Agent_Settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

verify_backend()


st.set_page_config(
page_title="Agent Settings",
page_icon=":hammer_and_wrench:",
Expand Down Expand Up @@ -195,13 +194,18 @@ def render_extension_settings(extension_settings, agent_settings):
for command_name, command_status in available_commands.items()
}

all_commands_selected = st.checkbox("Select All Commands")

for command_name, command_status in available_commands.items():
toggle_status = st.checkbox(
command_name,
value=command_status,
key=command_name,
)
available_commands[command_name] = toggle_status
if all_commands_selected:
available_commands[command_name] = True
else:
toggle_status = st.checkbox(
command_name,
value=command_status,
key=command_name,
)
available_commands[command_name] = toggle_status
if st.form_submit_button("Update Agent Commands"):
ApiClient.update_agent_commands(
agent_name=agent_name, commands=available_commands
Expand Down

0 comments on commit 2e47a97

Please sign in to comment.