增加全局侧边栏的显示开关
Implemented a function to handle and validate user input in the main application module. This improves input reliability and prepares the codebase for future enhancements.