Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-8464

Update the atlas ai service's ai access to behave as a singleton

    • Type: Icon: Task Task
    • Resolution: Won't Do
    • Priority: Icon: Minor - P4 Minor - P4
    • No version
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed
    • Developer Tools

      Currently whenever the atlas ai service is created we perform a request to the backend to see if there's access to the ai feature (/hello endpoint). 
      https://github.com/mongodb-js/compass/blob/3e48138745a0aaaa9398f394150057b4a14ac833/packages/compass-generative-ai/src/atlas-ai-service.ts#L203 

      We want the ai service to be flexible in its usage, and although unlikely, we may move it around in the provider tree down the line to somewhere that it may re-render, we don't want it to be performing this check every time. Let's update the init feature enablement to be a singleton that can only happen once.

            Assignee:
            Unassigned Unassigned
            Reporter:
            rhys.howell@mongodb.com Rhys Howell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: