mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
Fix vscode returning invalid array object for history state on certain devices
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -447,7 +447,7 @@ export class ClaudeDevProvider implements vscode.WebviewViewProvider {
|
||||
customInstructions,
|
||||
themeName: vscode.workspace.getConfiguration("workbench").get<string>("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,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -69,8 +69,14 @@ const HistoryPreview = ({ taskHistory, showHistoryView }: HistoryPreviewProps) =
|
||||
</div>
|
||||
|
||||
<div style={{ padding: "0px 20px 0 20px" }}>
|
||||
{taskHistory.slice(0, 3).map((item) => (
|
||||
<div key={item.id} className="history-preview-item" onClick={() => handleHistorySelect(item.id)}>
|
||||
{taskHistory
|
||||
.filter((item) => item.ts && item.task && item.totalCost)
|
||||
.slice(0, 3)
|
||||
.map((item) => (
|
||||
<div
|
||||
key={item.id}
|
||||
className="history-preview-item"
|
||||
onClick={() => handleHistorySelect(item.id)}>
|
||||
<div style={{ padding: "12px" }}>
|
||||
<div style={{ marginBottom: "8px" }}>
|
||||
<span
|
||||
|
||||
@@ -98,14 +98,18 @@ const HistoryView = ({ taskHistory, onDone }: HistoryViewProps) => {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{taskHistory.map((item, index) => (
|
||||
{taskHistory
|
||||
.filter((item) => item.ts && item.task && item.totalCost)
|
||||
.map((item, index) => (
|
||||
<div
|
||||
key={item.id}
|
||||
className="history-item"
|
||||
style={{
|
||||
cursor: "pointer",
|
||||
borderBottom:
|
||||
index < taskHistory.length - 1 ? "1px solid var(--vscode-panel-border)" : "none",
|
||||
index < taskHistory.length - 1
|
||||
? "1px solid var(--vscode-panel-border)"
|
||||
: "none",
|
||||
}}
|
||||
onClick={() => handleHistorySelect(item.id)}>
|
||||
<div
|
||||
@@ -246,7 +250,11 @@ const HistoryView = ({ taskHistory, onDone }: HistoryViewProps) => {
|
||||
}}>
|
||||
<i
|
||||
className="codicon codicon-arrow-right"
|
||||
style={{ fontSize: "12px", fontWeight: "bold", marginBottom: 0 }}
|
||||
style={{
|
||||
fontSize: "12px",
|
||||
fontWeight: "bold",
|
||||
marginBottom: 0,
|
||||
}}
|
||||
/>
|
||||
{item.cacheReads?.toLocaleString()}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user