Using Saagie Code Search

You can use the Saagie Code Search user-friendly interface to find the code snippets you need quickly and easily.

Before you begin:

Verify that the Saagie Code Search app is enabled in your project settings. If not, modify them.

Saagie Code Search is available in the Saagie Community repository.
  1. Create the Saagie Code Search app in your project. Click The "Projects" module icon is a folder. Projects  Your Project  The Apps page icon is a PC screen with a star in the middle. Apps  Install an app.
    Your app appears in the project’s app library and is ready to go!

  2. Click Open open external on your app card.
    The Saagie Code Search app opens in a new tab.

  3. You can search the default code base or a specific GitHub repository.

    • Search in the Default Code Base

    • Search in a GitHub Repository

    1. Enter your query in the corresponding field, specifying the function name, or the keywords related to the code you are looking for.

      add on saagie code search default codebase

    2. Press Enter to launch the search.

    3. Browse the results to find the code snippet(s) you need.
      Each result provides the function name, a code snippet, and relevant metadata to facilitate code exploration.

    Before you begin:

    Saagie Code Search offers integration with GitHub repositories. For this to work, you must provide a GitHub access token to enable the app to fetch the necessary information from the specified GitHub repositories.

    • In Saagie, create the $COPILOT_GITHUB_API_KEY project environment variable. Click The "Projects" module icon is a folder. Projects  Your Project  settings env vars a Environment variables  Create project variable. The value is your GitHub API key.

    add on saagie code search git repository

    1. Enter the link to the repository in the corresponding field.

      If it has already been exported, you can select your repository directly from the list and skip step b (*).
    2. Press Enter to launch the code base extraction.
      All Python functions are extracted from the repository. A separate code base is created in the app to search the repository.

      Extracting and retrieving the code base may take some time.
    3. Enter your query in the corresponding field, specifying the function name, or the keywords related to the code you are looking for.

    4. Press Enter to launch the search.

    5. Browse the results to find the code snippet(s) you need.
      Each result provides the function name, a code snippet, and relevant metadata to facilitate code exploration.