AI Assistant Documentation

Is any documentation for AI Assistant? How can I learn how it works?

please Bump

I'm sure documentation will come once it is finalized in final release.

You can always just create a local test project and play around with it safely. :slight_smile:

You could of course, always ask Copilot as in

image

GitHub Copilot Tips and Tricks
GitHub Copilot is an AI-powered code assistant that can dramatically improve your productivity. Here are some effective ways to get the most out of it:

Basic Usage Tips

  1. Be specific with your comments: The more detailed your comments, the better Copilot can understand what you're trying to achieve.

    // Create a function that filters employees by department and sorts by last name

  2. Use natural language prompts: You can write out what you're trying to accomplish in plain language.

    // Find all active employees and calculate their average years of service
    
  3. Let Copilot complete your code: Start typing a function or method declaration and pause to let Copilot suggest the implementation.

    function calculateModuleCompletionPercentage(moduleId) {
        // Copilot will suggest the implementation
    }
    
  4. Use keyboard shortcuts:

    • Tab: Accept the current suggestion
    • Ctrl+Enter (or Cmd+Enter on Mac): See all suggestions in a separate panel
    • Alt+[ or Alt+]: Cycle through multiple suggestions
    • Esc: Dismiss the current suggestion

Advanced Techniques

  1. Write test cases first: Describe your expected inputs and outputs in tests, and Copilot will suggest function implementations that satisfy those tests.

    // Test: getCompletedModules should return modules with status="Completed"
    
  2. Provide examples: Show Copilot examples of how you want your code to work.

    // Example: formatDate('2023-05-15') should return 'May 15, 2023'
    
  3. Use function signatures as prompts: Start by defining the function name and parameters, and let Copilot fill in the implementation.

    // Define a function to filter employees by status
    function filterEmployeesByStatus(employees, status) {
        // Copilot will suggest implementation
    }
    
  4. Guide Copilot with comments: Add comments inside functions to guide Copilot's suggestions.

    function processEmployeeData(employee) {
        // First validate the employee object
        
        // Then normalize the data
        
        // Finally return the processed data
    }
    
  5. Refactor existing code: Ask Copilot to improve or refactor your code.

    // Refactor this function to be more efficient
    

Working on Specific File Types

Working with HTML/EJS like your current file

  1. Generate entire components: Describe the component you need.

    <!-- Create a modal dialog for editing employee skills -->
    
  2. Ask for specific UI elements:

    <!-- Create a Bootstrap 5 form group for email validation with floating labels -->
    
  3. Fix accessibility issues:

    <!-- Make this table more accessible -->
    
  4. Get App Connect patterns:

    <!-- Create a dmx-data-view filter for active employees in the current department -->
    

API Integration

  1. Generate server connect actions:

    // Create a Server Connect action to fetch employee module progress
    
  2. Create form submission handlers:

    <!-- Add form submission logic for the employee onboarding module with validation -->
    

Tips Specific to Your Project

Looking at your current file (employees.ejs), here are some Copilot prompts that would be helpful:

javascript
// Create a function to search and filter employees by name and department
// Generate a Bootstrap toast notification system for form actions

// Implement a confirmation dialog before deleting employee records

// Create a dashboard summary of employee onboarding progress

// Write a function to export employee data to CSV

Best Practices

  1. Review suggestions carefully: Copilot is a tool, not a replacement for understanding your code.

  2. Be iterative: If the first suggestion isn't quite right, refine your comments and try again.

  3. Use code comments to give context: The more context you provide, the better the suggestions.

  4. Learn from Copilot: Look at how it solves problems to improve your own coding skills.

  5. Keep security in mind: Always review generated code for security issues, especially for authentication, data access, or user input handling.

  6. Use placeholder prompts: If you're not sure about implementation details, use placeholders and let Copilot fill in the specifics:

    // TODO: Implement search functionality for employees
    

GitHub Copilot excels at helping you write boilerplate code, understand new APIs, and implement common patterns—allowing you to focus on the unique aspects of your application.

Edit: I your case I would get the documentation in Spanish as in:

image

Tips y Trucos para usar GitHub Copilot

Conceptos Básicos

GitHub Copilot es una herramienta de inteligencia artificial que ayuda a los >desarrolladores a escribir código más rápidamente mediante sugerencias >contextuales. Aquí hay algunos consejos para aprovecharla al máximo:

Consejos Generales

1 Like

Well we’ve discussed the AI integration in the following topic:

There are useful examples and comments there, so check it.