From 26fb2780b56a88d1d79746856aa2cb702c5bde2c Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Sat, 17 Aug 2024 11:07:31 -0400 Subject: [PATCH] Fix TypeError --- package.json | 2 +- webview-ui/src/components/ChatRow.tsx | 2 +- webview-ui/src/components/HistoryPreview.tsx | 2 +- webview-ui/src/components/HistoryView.tsx | 2 +- webview-ui/src/components/TaskHeader.tsx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 2ac29d8..b9621f7 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "claude-dev", "displayName": "Claude Dev", "description": "Autonomous coding agent right in your IDE, capable of creating/editing files, executing commands, and more with your permission every step of the way.", - "version": "1.3.1", + "version": "1.3.2", "icon": "icon.png", "engines": { "vscode": "^1.84.0" diff --git a/webview-ui/src/components/ChatRow.tsx b/webview-ui/src/components/ChatRow.tsx index b3ae2f2..7ac8474 100644 --- a/webview-ui/src/components/ChatRow.tsx +++ b/webview-ui/src/components/ChatRow.tsx @@ -263,7 +263,7 @@ const ChatRow: React.FC = ({
{icon} {title} - {cost && ${Number(cost).toFixed(4)}} + {cost && ${Number(cost)?.toFixed(4)}}
)} - API Cost: ${item.totalCost.toFixed(4)} + API Cost: ${item.totalCost?.toFixed(4)} diff --git a/webview-ui/src/components/HistoryView.tsx b/webview-ui/src/components/HistoryView.tsx index 24cbb75..f2b8134 100644 --- a/webview-ui/src/components/HistoryView.tsx +++ b/webview-ui/src/components/HistoryView.tsx @@ -268,7 +268,7 @@ const HistoryView = ({ taskHistory, onDone }: HistoryViewProps) => { API Cost: - ${item.totalCost.toFixed(4)} + ${item.totalCost?.toFixed(4)} = ({ }}>
API Cost: - ${totalCost.toFixed(4)} + ${totalCost?.toFixed(4)}