mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
feat: add navigation link to history tab in HistoryPreview
- Add subtle 'View all history →' link at bottom of HistoryPreview component - Link navigates to history tab using existing switchTab message system - Styled with VSCode theme variables for consistent appearance - Improves accessibility to history tab now that it's behind overflow menu
This commit is contained in:
parent
5bffebde58
commit
4dbf6d4d0a
1 changed files with 12 additions and 0 deletions
|
|
@ -1,11 +1,16 @@
|
|||
import { memo } from "react"
|
||||
|
||||
import { vscode } from "@/utils/vscode"
|
||||
import { useTaskSearch } from "./useTaskSearch"
|
||||
import TaskItem from "./TaskItem"
|
||||
|
||||
const HistoryPreview = () => {
|
||||
const { tasks } = useTaskSearch()
|
||||
|
||||
const handleViewAllHistory = () => {
|
||||
vscode.postMessage({ type: "switchTab", tab: "history" })
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-3">
|
||||
{tasks.length !== 0 && (
|
||||
|
|
@ -13,6 +18,13 @@ const HistoryPreview = () => {
|
|||
{tasks.slice(0, 3).map((item) => (
|
||||
<TaskItem key={item.id} item={item} variant="compact" />
|
||||
))}
|
||||
<div className="flex justify-center mt-2">
|
||||
<button
|
||||
onClick={handleViewAllHistory}
|
||||
className="text-vscode-descriptionForeground hover:text-vscode-foreground text-sm cursor-pointer transition-colors duration-200 flex items-center gap-1">
|
||||
View all history →
|
||||
</button>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue