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",
|
"name": "claude-dev",
|
||||||
"displayName": "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.",
|
"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",
|
"icon": "icon.png",
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.84.0"
|
"vscode": "^1.84.0"
|
||||||
|
|||||||
@@ -447,7 +447,7 @@ export class ClaudeDevProvider implements vscode.WebviewViewProvider {
|
|||||||
customInstructions,
|
customInstructions,
|
||||||
themeName: vscode.workspace.getConfiguration("workbench").get<string>("colorTheme"),
|
themeName: vscode.workspace.getConfiguration("workbench").get<string>("colorTheme"),
|
||||||
claudeMessages: this.claudeDev?.claudeMessages || [],
|
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,
|
shouldShowAnnouncement: lastShownAnnouncementId !== this.latestAnnouncementId,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -69,8 +69,14 @@ const HistoryPreview = ({ taskHistory, showHistoryView }: HistoryPreviewProps) =
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style={{ padding: "0px 20px 0 20px" }}>
|
<div style={{ padding: "0px 20px 0 20px" }}>
|
||||||
{taskHistory.slice(0, 3).map((item) => (
|
{taskHistory
|
||||||
<div key={item.id} className="history-preview-item" onClick={() => handleHistorySelect(item.id)}>
|
.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={{ padding: "12px" }}>
|
||||||
<div style={{ marginBottom: "8px" }}>
|
<div style={{ marginBottom: "8px" }}>
|
||||||
<span
|
<span
|
||||||
|
|||||||
@@ -98,14 +98,18 @@ const HistoryView = ({ taskHistory, onDone }: HistoryViewProps) => {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{taskHistory.map((item, index) => (
|
{taskHistory
|
||||||
|
.filter((item) => item.ts && item.task && item.totalCost)
|
||||||
|
.map((item, index) => (
|
||||||
<div
|
<div
|
||||||
key={item.id}
|
key={item.id}
|
||||||
className="history-item"
|
className="history-item"
|
||||||
style={{
|
style={{
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
borderBottom:
|
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)}>
|
onClick={() => handleHistorySelect(item.id)}>
|
||||||
<div
|
<div
|
||||||
@@ -246,7 +250,11 @@ const HistoryView = ({ taskHistory, onDone }: HistoryViewProps) => {
|
|||||||
}}>
|
}}>
|
||||||
<i
|
<i
|
||||||
className="codicon codicon-arrow-right"
|
className="codicon codicon-arrow-right"
|
||||||
style={{ fontSize: "12px", fontWeight: "bold", marginBottom: 0 }}
|
style={{
|
||||||
|
fontSize: "12px",
|
||||||
|
fontWeight: "bold",
|
||||||
|
marginBottom: 0,
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
{item.cacheReads?.toLocaleString()}
|
{item.cacheReads?.toLocaleString()}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user