Navigation chanche
This commit is contained in:
parent
8de091eb1f
commit
8fef52bedb
@ -23,14 +23,20 @@ def main():
|
|||||||
init_state()
|
init_state()
|
||||||
|
|
||||||
render_sidebar()
|
render_sidebar()
|
||||||
|
|
||||||
show_editor = st.session_state.get("show_Editor", False)
|
if st.session_state.get("radio_interface_options") == "Code Editor":
|
||||||
show_chat = st.session_state.get("show_Chat", False)
|
|
||||||
|
|
||||||
if show_editor:
|
|
||||||
render_editor()
|
render_editor()
|
||||||
if show_chat:
|
elif st.session_state.get("radio_interface_options") == "Chat with AI Assistant":
|
||||||
render_chat()
|
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__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|||||||
@ -67,8 +67,19 @@ def render_filetree_arborist(tree):
|
|||||||
def render_sidebar():
|
def render_sidebar():
|
||||||
st.sidebar.title("Navigation")
|
st.sidebar.title("Navigation")
|
||||||
|
|
||||||
file_explorer_section = st.sidebar.container()
|
|
||||||
navigation_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:
|
with file_explorer_section:
|
||||||
st.subheader("File Explorer")
|
st.subheader("File Explorer")
|
||||||
@ -162,13 +173,6 @@ def render_sidebar():
|
|||||||
st.success(f"{action} created!")
|
st.success(f"{action} created!")
|
||||||
st.rerun()
|
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
|
return
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user