-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat: Experiment: Show a bit of stats in Cloud tab to help users discover there's more in Cloud #8415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found some issues that need attention. See inline comments for concrete suggestions.
|
@roomote-agent implement the feedback I responded to. |
|
Acknowledged. I will implement the feedback you responded to: clear the 10s timeout when usagePreviewData arrives to prevent a stale error; and compute bar height as Math.round((cost / maxCost) * 100) with a minimum of 1. I will push changes to bb/experiment-stats shortly. |
…bar height calc; robust array transform
|
Implemented the feedback. Summary:
Local vitest suites for src and webview-ui passed. Changes pushed to bb/experiment-stats. CI checks are green. |
packages/cloud/src/CloudAPI.ts
Outdated
| import { AuthenticationError, CloudAPIError, NetworkError, TaskNotFoundError } from "./errors.js" | ||
|
|
||
| // Usage stats schemas | ||
| const usageStatsSchema = z.object({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should go in packages/types/src/cloud.ts? I think we could then share it with the cloud side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This usually ends up being easiest (arguably...) to sequence as
- Add the types to packages/types.
- Update @roo-code/types
- Update @roo-code/types in cloud + ship the cloud functionality.
- Finally actually use the cloud functionality back here.
Description
utm_source=extension&utm_medium=stats_preview&utm_campaign=stats_preview)Screenshots / Videos
Important
Adds a bar chart in
CloudViewto display usage stats, with API and UI updates for enhanced user interaction with the Cloud app.CloudViewto display usage stats when logged in./usagein the Cloud app.CloudView.utm_source=extension&utm_medium=stats_preview&utm_campaign=stats_preview.getUsagePreview()inCloudAPI.tsto fetch usage data.CloudAPI.ts.webviewMessageHandler.tsto handlegetUsagePreviewmessages.UsagePreviewcomponent inCloudView.tsx.ChatRow.tsxto handle cost click events.formatCost()informat.tsfor consistent cost formatting.This description was created by
for 35154ef. You can customize this summary. It will automatically update as commits are pushed.