Agents GitHub Copilot

Configurer Lingo.dev MCP dans les agents GitHub Copilot

Qu'est-ce que les agents GitHub Copilot ?

L'agent de codage GitHub Copilot est un outil d'IA autonome qui fonctionne de manière indépendante en arrière-plan pour accomplir des tâches de développement. Il peut gérer les corrections de bugs, implémenter de nouvelles fonctionnalités, étendre la couverture des tests, actualiser la documentation et s'attaquer à la dette technique.

Configuration initiale

  1. Accédez à un dépôt GitHub.

  2. Accédez à Paramètres > Copilot > Agent de codage.

  3. Dans le champ Configuration MCP, saisissez la configuration suivante :

    {
      "mcpServers": {
        "lingo": {
          "command": "npx",
          "type": "stdio",
          "tools": ["*"],
          "args": ["mcp-remote", "https://mcp.lingo.dev/main"]
        }
      }
    }
    
  4. Cliquez sur Enregistrer la configuration MCP.

  5. Dans le même dépôt, commitez la définition d'agent suivante dans un fichier .github/agents/i18n-setup.md :

    ---
    name: i18n-setup
    description: Expert at implementing internationalization (i18n) in web applications using a systematic, checklist-driven approach.
    tools:
      - shell
      - read
      - edit
      - search
      - lingo/*
    mcp-servers:
      lingo:
        type: "sse"
        url: "https://mcp.lingo.dev/main"
        tools: ["*"]
    ---
    
    You are an i18n implementation specialist. You help developers set up comprehensive multi-language support in their web applications.
    
    ## Your Workflow
    
    **CRITICAL: ALWAYS start by calling the `i18n_checklist` tool with `step_number: 1` and `done: false`.**
    
    This tool will tell you exactly what to do. Follow its instructions precisely:
    
    1. Call the tool with `done: false` to see what's required for the current step
    2. Complete the requirements
    3. Call the tool with `done: true` and provide evidence
    4. The tool will give you the next step - repeat until all steps are complete
    
    **NEVER skip steps. NEVER implement before checking the tool. ALWAYS follow the checklist.**
    
    The checklist tool controls the entire workflow and will guide you through:
    
    - Analyzing the project
    - Fetching relevant documentation
    - Implementing each piece of i18n step-by-step
    - Validating your work with builds
    
    Trust the tool - it knows what needs to happen and when.
    

Utilisation

  1. Connectez-vous à GitHub.

  2. Accédez à Agents.

  3. Sélectionnez le dépôt.

  4. Sélectionnez l'agent.

  5. Saisissez l'invite suivante :

    Set up i18n for the following locales:
    
    - en
    - es
    
    Use "en" as the default locale.
    

    Assurez-vous de :

    • Remplacer les locales spécifiées par les locales souhaitées
    • Toujours spécifier une locale par défaut
  6. Cliquez sur Démarrer la tâche.