remove cost from main pages (#1900)

This commit is contained in:
Shuchang Zheng 2025-03-07 12:31:33 -08:00 committed by GitHub
parent fd934dcfe6
commit 7365220a25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 19 deletions

View file

@ -111,15 +111,12 @@ function ScrollableActionList({
return ( return (
<div className="h-[40rem] w-1/3 rounded border bg-slate-elevation1"> <div className="h-[40rem] w-1/3 rounded border bg-slate-elevation1">
<div className="grid grid-cols-3 gap-2 p-4"> <div className="grid grid-cols-2 gap-2 p-4">
<div className="flex h-8 items-center justify-center rounded-sm bg-slate-700 px-3 text-xs text-gray-50">
Steps: {taskDetails.steps}
</div>
<div className="flex h-8 items-center justify-center rounded-sm bg-slate-700 px-3 text-xs text-gray-50"> <div className="flex h-8 items-center justify-center rounded-sm bg-slate-700 px-3 text-xs text-gray-50">
Actions: {taskDetails.actions} Actions: {taskDetails.actions}
</div> </div>
<div className="flex h-8 items-center justify-center rounded-sm bg-slate-700 px-3 text-xs text-gray-50"> <div className="flex h-8 items-center justify-center rounded-sm bg-slate-700 px-3 text-xs text-gray-50">
Cost: {taskDetails.cost} Steps: {taskDetails.steps}
</div> </div>
</div> </div>
<Separator /> <Separator />

View file

@ -1,4 +1,8 @@
import { ScrollArea, ScrollAreaViewport } from "@/components/ui/scroll-area";
import { Skeleton } from "@/components/ui/skeleton"; import { Skeleton } from "@/components/ui/skeleton";
import { statusIsFinalized, statusIsNotFinalized } from "@/routes/tasks/types";
import { cn } from "@/util/utils";
import { DotFilledIcon } from "@radix-ui/react-icons";
import { useWorkflowRunQuery } from "../hooks/useWorkflowRunQuery"; import { useWorkflowRunQuery } from "../hooks/useWorkflowRunQuery";
import { useWorkflowRunTimelineQuery } from "../hooks/useWorkflowRunTimelineQuery"; import { useWorkflowRunTimelineQuery } from "../hooks/useWorkflowRunTimelineQuery";
import { import {
@ -9,21 +13,12 @@ import {
ObserverThought, ObserverThought,
WorkflowRunBlock, WorkflowRunBlock,
} from "../types/workflowRunTypes"; } from "../types/workflowRunTypes";
import { ThoughtCard } from "./ThoughtCard";
import { import {
ActionItem, ActionItem,
WorkflowRunOverviewActiveElement, WorkflowRunOverviewActiveElement,
} from "./WorkflowRunOverview"; } from "./WorkflowRunOverview";
import { ScrollArea, ScrollAreaViewport } from "@/components/ui/scroll-area";
import { statusIsFinalized, statusIsNotFinalized } from "@/routes/tasks/types";
import { cn } from "@/util/utils";
import { ThoughtCard } from "./ThoughtCard";
import { WorkflowRunTimelineBlockItem } from "./WorkflowRunTimelineBlockItem"; import { WorkflowRunTimelineBlockItem } from "./WorkflowRunTimelineBlockItem";
import { DotFilledIcon } from "@radix-ui/react-icons";
const formatter = Intl.NumberFormat("en-US", {
style: "currency",
currency: "USD",
});
type Props = { type Props = {
activeItem: WorkflowRunOverviewActiveElement; activeItem: WorkflowRunOverviewActiveElement;
@ -67,16 +62,13 @@ function WorkflowRunTimeline({
return ( return (
<div className="min-w-0 space-y-4 rounded bg-slate-elevation1 p-4"> <div className="min-w-0 space-y-4 rounded bg-slate-elevation1 p-4">
<div className="grid grid-cols-3 gap-2"> <div className="grid grid-cols-2 gap-2">
<div className="flex items-center justify-center rounded bg-slate-elevation3 px-4 py-3 text-xs"> <div className="flex items-center justify-center rounded bg-slate-elevation3 px-4 py-3 text-xs">
Actions: {numberOfActions} Actions: {numberOfActions}
</div> </div>
<div className="flex items-center justify-center rounded bg-slate-elevation3 px-4 py-3 text-xs"> <div className="flex items-center justify-center rounded bg-slate-elevation3 px-4 py-3 text-xs">
Steps: {workflowRun.total_steps ?? 0} Steps: {workflowRun.total_steps ?? 0}
</div> </div>
<div className="flex items-center justify-center rounded bg-slate-elevation3 px-4 py-3 text-xs">
Cost: {formatter.format(workflowRun.total_cost ?? 0)}
</div>
</div> </div>
<ScrollArea> <ScrollArea>
<ScrollAreaViewport className="h-[37rem] max-h-[37rem]"> <ScrollAreaViewport className="h-[37rem] max-h-[37rem]">