From 8fef52bedb0f6f0f0e5a9ac9673d7c9372abe366 Mon Sep 17 00:00:00 2001 From: Irina Rueegg Date: Thu, 9 Apr 2026 17:18:40 +0200 Subject: [PATCH] Navigation chanche --- frontend/app.py | 18 ++++++++++++------ frontend/sidebar.py | 20 ++++++++++++-------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/frontend/app.py b/frontend/app.py index bc1456b..ead9ab9 100644 --- a/frontend/app.py +++ b/frontend/app.py @@ -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() diff --git a/frontend/sidebar.py b/frontend/sidebar.py index b5482e9..73003ae 100644 --- a/frontend/sidebar.py +++ b/frontend/sidebar.py @@ -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__":