Skip to content

Commit 69b8d96

Browse files
authored
fix(library/run): Replace credits to cents (#9845)
Replacing credits with cents (100 credits = 1$). I haven’t touched anything internally, just changed the UI. Everything is working great. On the frontend, there’s no other place where we use credits instead of dollars. ![Screenshot 2025-04-19 at 11 36 00 AM](https://github.com/user-attachments/assets/de799b5c-094e-4c96-a7da-273ce60b2125) <img width="1503" alt="Screenshot 2025-04-19 at 11 33 24 AM" src="https://github.com/user-attachments/assets/87d7e218-f8f5-4e2e-92ef-70c81735db6b" />
1 parent 67af77e commit 69b8d96

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

autogpt_platform/frontend/src/components/agents/agent-run-details-view.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
AgentRunStatus,
2424
agentRunStatusMap,
2525
} from "@/components/agents/agent-run-status-chip";
26+
import useCredits from "@/hooks/useCredits";
2627

2728
export default function AgentRunDetailsView({
2829
agent,
@@ -40,6 +41,7 @@ export default function AgentRunDetailsView({
4041
deleteRun: () => void;
4142
}): React.ReactNode {
4243
const api = useBackendAPI();
44+
const { formatCredits } = useCredits();
4345

4446
const runStatus: AgentRunStatus = useMemo(
4547
() => agentRunStatusMap[run.status],
@@ -66,11 +68,11 @@ export default function AgentRunDetailsView({
6668
value: moment.duration(run.stats.duration, "seconds").humanize(),
6769
},
6870
{ label: "Steps", value: run.stats.node_exec_count },
69-
{ label: "Cost", value: `${run.stats.cost} credits` },
71+
{ label: "Cost", value: formatCredits(run.stats.cost) },
7072
]
7173
: []),
7274
];
73-
}, [run, runStatus]);
75+
}, [run, runStatus, formatCredits]);
7476

7577
const agentRunInputs:
7678
| Record<

0 commit comments

Comments
 (0)