Improve AI Context Management with Structured Data Storage #2740
jezweb
started this conversation in
Feature Requests
Replies: 1 comment
-
The problem is that there are so many ways to store data, from graphs of task/function relationships, to just abusing RAG to oblivion. Memory banks are kinda non-trivial |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
If there was some kind of build in simple database available, doesnt have to be a RAG, but like SQLite that could have an inbuilt mcp, that we knew would be there and be functional without installing anything that could be a big performance improvement for doing something like ingesting context of a framework for modes to interact with?
I don't know enough about how this would work technical so I had a discussion with gemini and this is where we arrived:
Proposal:
Currently, Roo Code appears to manage AI context and information potentially through mechanisms like reading various project files or using simple text files. While functional, this approach can become inefficient as projects grow or the complexity of the required context increases. We propose enhancing how Roo Code stores and retrieves this context by implementing a more structured data storage solution, such as storing structured data files (e.g., JSON) in a dedicated directory managed by VS Code, or potentially leveraging a lightweight embedded database like SQLite.
Problem:
Proposed Solution:
Utilize VS Code's built-in storage APIs to create a dedicated location for structured context data.
Primary Recommendation (Lower Complexity): Use
ExtensionContext.storageUri
to obtain a workspace-specific directory path. Store the AI's context and relevant information in structured file formats within this directory, such as:Alternative/Future Enhancement (Higher Complexity, More Power): Integrate a lightweight, embedded database engine like SQLite. The SQLite database file (
.db
) would also be stored within the directory provided byExtensionContext.storageUri
.Benefits:
ExtensionContext.storageUri
ensures the context is stored in a stable, VS Code-managed location, tied to the specific workspace.Technical Considerations:
JSON.stringify
/JSON.parse
). Retrieval would involve loading the file and querying the in-memory data structure or implementing basic indexing.sqlite3
orbetter-sqlite3
) as a dependency. Note thatsqlite3
has native components which can add complexity to the build process for cross-platform compatibility, although tools exist to help manage this (electron-rebuild
,vsce
packaging).better-sqlite3
is often cited as simpler and faster but is synchronous. This option offers full SQL query capabilities.Conclusion:
Implementing a structured data storage approach using
ExtensionContext.storageUri
and either structured files (like JSON) or an embedded database (like SQLite) would be a significant improvement for Roo Code's context management. It directly addresses performance bottlenecks and lays the groundwork for handling more complex AI interactions and larger projects efficiently. We believe this feature would greatly enhance the user experience and the capabilities of the Roo Code AI.Beta Was this translation helpful? Give feedback.
All reactions