ui-setup #8

Merged
meulilivio merged 3 commits from ui-setup into main 2026-04-10 00:06:04 +02:00
2 changed files with 24 additions and 14 deletions
Showing only changes of commit 8fef52bedb - Show all commits

View File

@ -23,14 +23,20 @@ def main():
init_state()
render_sidebar()
show_editor = st.session_state.get("show_Editor", False)
show_chat = st.session_state.get("show_Chat", False)
if show_editor:
if st.session_state.get("radio_interface_options") == "Code Editor":
render_editor()
if show_chat:
elif st.session_state.get("radio_interface_options") == "Chat with AI Assistant":
render_chat()
#show_editor = st.session_state.get("show_Editor", False)
#show_chat = st.session_state.get("show_Chat", False)
#
#if show_editor:
# render_editor()
#if show_chat:
# render_chat()
if __name__ == "__main__":
main()

View File

@ -67,8 +67,19 @@ def render_filetree_arborist(tree):
def render_sidebar():
st.sidebar.title("Navigation")
file_explorer_section = st.sidebar.container()
navigation_section = st.sidebar.container()
file_explorer_section = st.sidebar.container()
with navigation_section:
st.subheader("Options")
#st.checkbox("Code Editor", key="show_Editor")
#st.checkbox("Chat with AI Assistant", key="show_Chat")
st.radio(
"Action",
["Code Editor", "Chat with AI Assistant"],
key=f"radio_interface_options")
st.markdown("---")
with file_explorer_section:
st.subheader("File Explorer")
@ -162,13 +173,6 @@ def render_sidebar():
st.success(f"{action} created!")
st.rerun()
st.sidebar.markdown("---")
with navigation_section:
st.sidebar.subheader("Options")
st.sidebar.checkbox("Code Editor", key="show_Editor")
st.sidebar.checkbox("Chat with AI Assistant", key="show_Chat")
return
if __name__ == "__main__":