diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx index a99076d..f590220 100644 --- a/src/components/Settings.tsx +++ b/src/components/Settings.tsx @@ -568,7 +568,7 @@ export default (props: { $ USD - {props.chatStore.cost.toFixed(4)} + {props.chatStore.cost?.toFixed(4)} diff --git a/src/components/StatusBar.tsx b/src/components/StatusBar.tsx index 30f52bd..f7ab2b1 100644 --- a/src/components/StatusBar.tsx +++ b/src/components/StatusBar.tsx @@ -59,7 +59,7 @@ const StatusBar = (props: {
  • - Cost: ${chatStore.cost.toFixed(4)} + Cost: ${chatStore.cost?.toFixed(4)}

  • @@ -122,7 +122,7 @@ const StatusBar = (props: {
    Cost
    - ${chatStore.cost.toFixed(4)} + ${chatStore.cost?.toFixed(4)}
    Accumulated: ${getTotalCost().toFixed(2)} diff --git a/src/pages/App.tsx b/src/pages/App.tsx index 6add87f..00519e8 100644 --- a/src/pages/App.tsx +++ b/src/pages/App.tsx @@ -338,7 +338,7 @@ export function App() { {chatStore.history.filter(({ hide }) => !hide).length}

    - Cost: ${chatStore.cost.toFixed(4)} / $ + Cost: ${chatStore.cost?.toFixed(4)} / $ {getTotalCost().toFixed(2)}

    @@ -351,7 +351,7 @@ export function App() { {" "} {chatStore.totalTokens} - {chatStore.cost.toFixed(4)} + {chatStore.cost?.toFixed(4)}