#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Language Selector Component This module provides the UI component for selecting programming languages to analyze. """ import gradio as gr import logging logger = logging.getLogger(__name__) # List of supported programming languages SUPPORTED_LANGUAGES = [ "Python", "JavaScript", "TypeScript", "Java", "Go", "Rust", "C++", "C#", "PHP", "Ruby", "Swift", "Kotlin", "Scala", "R", "Shell" ] def create_language_selector(): """ Create the language selector component. Returns: gr.CheckboxGroup: The language selector component. """ with gr.Group(): gr.Markdown("### 🔤 Languages (Optional)") language_selector = gr.CheckboxGroup( choices=SUPPORTED_LANGUAGES, label="Select languages to analyze", info="Leave empty to auto-detect languages", value=[], ) gr.Markdown( "*Note: If no languages are selected, the agent will automatically detect languages in the repository.*", elem_classes=["small-text"] ) return language_selector