-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Revert "feat: Experiment: Show a bit of stats in Cloud tab to help users discover there's more in Cloud" #8559
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3,15 +3,15 @@ import { useTranslation } from "react-i18next" | |||||
| import { useCloudUpsell } from "@src/hooks/useCloudUpsell" | ||||||
| import { CloudUpsellDialog } from "@src/components/cloud/CloudUpsellDialog" | ||||||
| import DismissibleUpsell from "@src/components/common/DismissibleUpsell" | ||||||
| import { FoldVertical, ChevronUp, ChevronDown, ChartColumn } from "lucide-react" | ||||||
| import { FoldVertical, ChevronUp, ChevronDown } from "lucide-react" | ||||||
| import prettyBytes from "pretty-bytes" | ||||||
|
|
||||||
| import type { ClineMessage } from "@roo-code/types" | ||||||
|
|
||||||
| import { getModelMaxOutputTokens } from "@roo/api" | ||||||
| import { findLastIndex } from "@roo/array" | ||||||
|
|
||||||
| import { formatCost, formatLargeNumber } from "@src/utils/format" | ||||||
| import { formatLargeNumber } from "@src/utils/format" | ||||||
| import { cn } from "@src/lib/utils" | ||||||
| import { StandardTooltip } from "@src/components/ui" | ||||||
| import { useExtensionState } from "@src/context/ExtensionStateContext" | ||||||
|
|
@@ -24,8 +24,6 @@ import { ContextWindowProgress } from "./ContextWindowProgress" | |||||
| import { Mention } from "./Mention" | ||||||
| import { TodoListDisplay } from "./TodoListDisplay" | ||||||
|
|
||||||
| import { vscode } from "@src/utils/vscode" | ||||||
|
|
||||||
| export interface TaskHeaderProps { | ||||||
| task: ClineMessage | ||||||
| tokensIn: number | ||||||
|
|
@@ -303,19 +301,7 @@ const TaskHeader = ({ | |||||
| {t("chat:task.apiCost")} | ||||||
| </th> | ||||||
| <td className="align-top"> | ||||||
| <span>{formatCost(totalCost)}</span> | ||||||
| <StandardTooltip content={t("chat:apiRequest.viewTokenUsage")}> | ||||||
| <ChartColumn | ||||||
| className="inline size-3.5 -mt-0.5 ml-2 text-vscode-textLink-foreground cursor-pointer hover:text-vscode-textLink-activeForeground transition-colors" | ||||||
| onClick={(e) => { | ||||||
| e.stopPropagation() | ||||||
| vscode.postMessage({ | ||||||
| type: "switchTab", | ||||||
| tab: "cloud", | ||||||
| }) | ||||||
| }} | ||||||
| /> | ||||||
| </StandardTooltip> | ||||||
| <span>${totalCost?.toFixed(2)}</span> | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo/lexical note: The { This change would ensure that the value is properly computed and displayed.
Suggested change
|
||||||
| </td> | ||||||
| </tr> | ||||||
| )} | ||||||
|
|
||||||
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.
P1: Fallback from response.json() to response.text() can fail because the body stream is single-use. After json() throws due to invalid JSON, the stream is consumed and text() may throw ("body used already"). To robustly capture error bodies, read text once and JSON-parse it, or clone() before consuming. The previous implementation used response.text() then JSON.parse fallback which avoids this pitfall.