Create the Compass Assistant plugin

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • 1.46.8
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed
    • Developer Tools

      We’ll add a new package @mongodb-js/compass-assistant which will be a Compass Plugin.

      It will consist of an Assistant react component that can be rendered inside a leafygreen drawer and an activateAssistantPlugin() function for use with registerCompassPlugin() that will return the store and store context along with a cleanup function for when the plugin is deactivated.

      It will also export an AssistantProvider that we can wrap high up in the UI around all the components that will have to trigger the assistant via an AssistantContext that can be accessed through the hook useAssistantContext(). On this returned object we can add methods that can be called from various parts of the app to trigger the assistant. For example you can explain an error or explain-plan or performance insight.

       
      This will also tie in the AI Assistant logic to the Compass Drawer component, ensuring:

      Users will only have one chat session at a time. 

        1. As a user navigates from one tab to another, they will be able to view their existing chat conversation.
        2. If a user closes & reopens the drawer (but doesn't quit the app or leave DE), the chat session will persist.
        3. If a user would like to start a new chat conversation, they can manually clear chat history and start a new chat that way.

            Assignee:
            Gagik Amaryan
            Reporter:
            Gagik Amaryan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: