diff --git a/package.json b/package.json index b9621f7..ff1fab1 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.2", + "version": "1.3.3", "icon": "icon.png", "engines": { "vscode": "^1.84.0" diff --git a/src/providers/ClaudeDevProvider.ts b/src/providers/ClaudeDevProvider.ts index 089eaf0..77d06f2 100644 --- a/src/providers/ClaudeDevProvider.ts +++ b/src/providers/ClaudeDevProvider.ts @@ -447,7 +447,7 @@ export class ClaudeDevProvider implements vscode.WebviewViewProvider { customInstructions, themeName: vscode.workspace.getConfiguration("workbench").get("colorTheme"), claudeMessages: this.claudeDev?.claudeMessages || [], - taskHistory: (taskHistory || []).sort((a, b) => b.ts - a.ts), + taskHistory: (taskHistory || []).filter((item) => item.ts && item.task).sort((a, b) => b.ts - a.ts), shouldShowAnnouncement: lastShownAnnouncementId !== this.latestAnnouncementId, }, }) diff --git a/webview-ui/src/components/HistoryPreview.tsx b/webview-ui/src/components/HistoryPreview.tsx index 821b11f..8822d86 100644 --- a/webview-ui/src/components/HistoryPreview.tsx +++ b/webview-ui/src/components/HistoryPreview.tsx @@ -69,54 +69,60 @@ const HistoryPreview = ({ taskHistory, showHistoryView }: HistoryPreviewProps) =
- {taskHistory.slice(0, 3).map((item) => ( -
handleHistorySelect(item.id)}> -
-
- item.ts && item.task && item.totalCost) + .slice(0, 3) + .map((item) => ( +
handleHistorySelect(item.id)}> +
+
+ + {formatDate(item.ts)} + +
+
- {formatDate(item.ts)} - -
-
- {item.task} -
-
- - Tokens: ↑{item.tokensIn?.toLocaleString()} ↓{item.tokensOut?.toLocaleString()} - - {" • "} - {item.cacheWrites && item.cacheReads && ( - <> - - Cache: +{item.cacheWrites?.toLocaleString()} →{" "} - {item.cacheReads?.toLocaleString()} - - {" • "} - - )} - API Cost: ${item.totalCost?.toFixed(4)} + {item.task} +
+
+ + Tokens: ↑{item.tokensIn?.toLocaleString()} ↓{item.tokensOut?.toLocaleString()} + + {" • "} + {item.cacheWrites && item.cacheReads && ( + <> + + Cache: +{item.cacheWrites?.toLocaleString()} →{" "} + {item.cacheReads?.toLocaleString()} + + {" • "} + + )} + API Cost: ${item.totalCost?.toFixed(4)} +
-
- ))} + ))}
{
)} - {taskHistory.map((item, index) => ( -
handleHistorySelect(item.id)}> + {taskHistory + .filter((item) => item.ts && item.task && item.totalCost) + .map((item, index) => (
+ cursor: "pointer", + borderBottom: + index < taskHistory.length - 1 + ? "1px solid var(--vscode-panel-border)" + : "none", + }} + onClick={() => handleHistorySelect(item.id)}>
- - {formatDate(item.ts)} - - { - e.stopPropagation() - handleDeleteHistoryItem(item.id) - }} - className="delete-button"> - - -
-
- {item.task} -
-
- Tokens: - - - - {item.tokensIn?.toLocaleString()} - - - - {item.tokensOut?.toLocaleString()} + {formatDate(item.ts)} + { + e.stopPropagation() + handleDeleteHistoryItem(item.id) + }} + className="delete-button"> + +
- {item.cacheWrites && item.cacheReads && ( +
+ {item.task} +
+
{ fontWeight: 500, color: "var(--vscode-descriptionForeground)", }}> - Cache: + Tokens: { color: "var(--vscode-descriptionForeground)", }}> - +{item.cacheWrites?.toLocaleString()} + {item.tokensIn?.toLocaleString()} { color: "var(--vscode-descriptionForeground)", }}> - {item.cacheReads?.toLocaleString()} + {item.tokensOut?.toLocaleString()}
- )} -
-
- - API Cost: - - - ${item.totalCost?.toFixed(4)} - -
- { - e.stopPropagation() - handleExportMd(item.id) - }}> -
- EXPORT .MD + + Cache: + + + + +{item.cacheWrites?.toLocaleString()} + + + + {item.cacheReads?.toLocaleString()} +
-
+ )} +
+
+ + API Cost: + + + ${item.totalCost?.toFixed(4)} + +
+ { + e.stopPropagation() + handleExportMd(item.id) + }}> +
+ EXPORT .MD +
+
+
-
- ))} + ))}