Uploaded image for project: 'VS Code Extension'
  1. VS Code Extension
  2. VSCODE-607

Read namespace from chat metadata

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

      When we're using the /query or /schema command handlers we need to get the namespace from the user. We do this currently by asking the model to parse it from the messages. We've found the model doesn't do a good job of looking into previous user messages for the namespace, it really prefers only the last message.

      Previously we would keep around a singleton state for tracking the namespace as it changed overtime and when it wasn't yet defined. This method didn't work well when a user would create a new conversation or jump into an old one as the state wouldn't then be up to date.

      This ticket involves adding a store that has information for every chat. We assign each chat a unique id, returning it in the metadata field of the first chat response. That unique id is then used in subsequent chat messages and can be used to look up namespace information in the store for that chat. When a user clicks on a database or collection name, or the ai finds a namespace in their message, we can then set that on the store. This is needed as we initiate the chat message for the user when they click on the database or collection name, and we can't add metadata into that chat message.

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

              Created:
              Updated:
              Resolved: