mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
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.  <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" />
This commit is contained in:
@@ -23,6 +23,7 @@ import {
|
||||
AgentRunStatus,
|
||||
agentRunStatusMap,
|
||||
} from "@/components/agents/agent-run-status-chip";
|
||||
import useCredits from "@/hooks/useCredits";
|
||||
|
||||
export default function AgentRunDetailsView({
|
||||
agent,
|
||||
@@ -40,6 +41,7 @@ export default function AgentRunDetailsView({
|
||||
deleteRun: () => void;
|
||||
}): React.ReactNode {
|
||||
const api = useBackendAPI();
|
||||
const { formatCredits } = useCredits();
|
||||
|
||||
const runStatus: AgentRunStatus = useMemo(
|
||||
() => agentRunStatusMap[run.status],
|
||||
@@ -66,11 +68,11 @@ export default function AgentRunDetailsView({
|
||||
value: moment.duration(run.stats.duration, "seconds").humanize(),
|
||||
},
|
||||
{ label: "Steps", value: run.stats.node_exec_count },
|
||||
{ label: "Cost", value: `${run.stats.cost} credits` },
|
||||
{ label: "Cost", value: formatCredits(run.stats.cost) },
|
||||
]
|
||||
: []),
|
||||
];
|
||||
}, [run, runStatus]);
|
||||
}, [run, runStatus, formatCredits]);
|
||||
|
||||
const agentRunInputs:
|
||||
| Record<
|
||||
|
||||
Reference in New Issue
Block a user