-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
What problem does this proposed feature solve?
Benefits
Analytics
This proposed feature can provide detailed analytics, insights, and breakdown of how users use Roo-Code in the form of aesthetic graphs, comprehensive summaries, and raw data ready to be exported to tools like Excel. This will assist users by allowing them to see how they use Roo-Code on a larger scale then the stats shown in a singular chat. The goal is to allow users to optimize cost, performance, and time with these analytics.
Traffic
The launch of .roostats can also be used as a social engagement tool for users to share their use of Roo-Code, akin to how users of streaming services such as Spotify share their “Spotify Wrapped”, which displays the user’s app experience. Spotify saw a 20% increase in U.S app downloads after the release of Spotify Wrapped, as more and more people saw friends, family, etc. sharing their year of music, personalized insights/breakdowns, and exclusive messages from their favorite artists.
Describe the proposed solution in detail
File
The premise of this feature is that when a directory/repository is interacted with by Roo-Code, it creates a file in the root that keeps track of different Roo-Code statistics (all statistics can be toggled whether or not they are tracked in settings) these consist of (but are not limited to):
- Input/output tokens
- Cost
- Actions (files/lines read, files/lines edited, commands executed, most frequent commands, etc.)
- Session count
All of the aforementioned statistics will be tracked with a myriad of identifiers, such as date/time, provider/model, modes, action, session, etc.
Dashboard
Users will be able to view their .roostats in a dashboard (located alongside the top bar that consists of New Task, Prompts, MCP, etc.). This will be comprised of filters (model, time period, action, mode), sorting (cost, time, actions), and search. Data can be displayed in the user's preferred way, if multiple forms of graphs are available to the user, there will be a dropdown to choose (for example if its cost by model, the user could choose either a pie chart or a bar graph.
Technical considerations or implementation details (optional)
Settings
I believe that this feature has enough potential to warrant its own section in settings. Within this section it will consist of the following settings:
General
- .roostats
This settings toggles whether or not Roo-Code will create, edit, or otherwise interact with a .roostats file in any way. - Create .roostats
This setting, when toggled, will automatically create a .roostats file in the root of the working folder. - Update .roostats
This setting is different from the above, as this setting when enabled will automatically update .roostats files, but will not create them if they do not already exist in the project.
Stats
All the following will be tracked meticulously on a variety of different attributes, such as provider/model, action (for example cost will be tracked by reading files, writing files, executing commands, etc.), mode (Ask, Code, Debug, user created modes, etc.), etc.
Users will be able to toggle under the Stats subsection in roostats settings which of the following they want tracked:
- Input/Output Tokens
- Cost
- Sessions
- Actions Executed (times files were read, commands were executed, browser was scrolled, etc.)
- Lines edited
Dashboard
This will be the primary way users will view their .roostats files. It will offer a variety of ways to display statistics:
Cost
- Pie Chart or Bar Graph for cost breakdown by model, actions, or mode
- Line Graph for cost per session over time
Actions
- Pie Chart or Bar Graph for action breakdown by model, actions, or mode
Sessions
- Users could view a "Session Graph" (Synonymous to a github contribution graph) that shows their sessions over X amount of time or for year X.
Export
Users should be able to export their data in a variety of ways:
- Saving individual graphs as .png/.jpg
- Exporting .roostats or a section of it as a .csv
- Saving a "Summary" image that contains a quick recap of the user's graph (Sessions, Cost, Cost Pie Chart, etc.)
Technical
Charts
I personally advocate for using shadcn/ui (styled component library based off of recharts) for the graphs, as they provide aesthetic, customizable, charts for our dashboard. On top of that it easily integrates with the current frontend stack (react + tailwind).
Downsides/Considerations/Misc
- Users may edit values manually for social status (Back to the Spotify analogy, it would be like if a user changed their minutes listened from 60,000 to 100000)
- An additional feature I conceived would be "Gamification". For example achievements for tokens or money spent, however due to the above point it could easily be cheated.
Describe alternatives considered (if any)
Local Storage Vs. Project Storage
The only other alternative I have been able to conceive would be storing the .roostats file locally whether then in the project directory (similar to how Roo-Code chats are stored on the user's computer). This may be beneficial for providing overall summaries of use whether then project by project summaries, however if the user is using Roo-Code on multiple computers, as far as I am aware this would not transfer over. This is why I believe that the proposed solution is better, however a mix between the 2 may work better (users can toggle if they want it stored on their computer or in their projects).
Additional Context & Mockups
No response
Proposal Checklist
- I have searched existing Issues and Discussions to ensure this proposal is not a duplicate.
- This proposal is for a specific, actionable change intended for implementation (not a general idea).
- I understand that this proposal requires review and approval before any development work begins.
Are you interested in implementing this feature if approved?
- Yes, I would like to contribute to implementing this feature.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status