import streamlit as st import sys from pathlib import Path # Add project root to Python path for imports sys.path.insert(0, str(Path(__file__).parent.parent)) from frontend.sidebar import render_sidebar from frontend.editor import render_editor from frontend.chat import render_chat from frontend.state import init_state init_state() def main(): st.set_page_config( page_title="Lightweight code editor", layout="wide") st.title("Lightweight code editor") init_state() left, right = st.columns([1, 3]) with left: choice = render_sidebar() with right: if "Chat with AI Assistant" in choice: render_chat() if "Code Editor" in choice: render_editor() #elif choice == "File Explorer": # st.subheader("File Explorer") # st.info("File Explorer functionality is not implemented yet.") if __name__ == "__main__": main()