@@ -2,7 +2,7 @@ import { memo } from "react"
22
33import { vscode } from "@/utils/vscode"
44import { formatLargeNumber , formatDate } from "@/utils/format"
5- import { Button , Checkbox } from "@/components/ui"
5+ import { Button } from "@/components/ui"
66
77import { useAppTranslation } from "../../i18n/TranslationContext"
88import { CopyButton } from "./CopyButton"
@@ -12,38 +12,17 @@ type HistoryPreviewProps = {
1212 showHistoryView : ( ) => void
1313}
1414const HistoryPreview = ( { showHistoryView } : HistoryPreviewProps ) => {
15- const { tasks, showAllWorkspaces , setShowAllWorkspaces } = useTaskSearch ( )
15+ const { tasks } = useTaskSearch ( )
1616 const { t } = useAppTranslation ( )
1717
1818 return (
1919 < div className = "flex flex-col gap-3 shrink-0 mx-5" >
2020 < div className = "flex items-center justify-between text-vscode-descriptionForeground" >
21- < div className = "flex items-center gap-4" >
22- < div className = "flex items-center gap-1" >
23- < span className = "codicon codicon-comment-discussion scale-90 mr-1" />
24- < span className = "font-medium text-xs uppercase" > { t ( "history:recentTasks" ) } </ span >
25- </ div >
26- < div className = "flex items-center gap-1 text-xs opacity-80 hover:opacity-100" >
27- < div className = "flex items-center space-x-2" >
28- < Checkbox
29- id = "show-all-workspaces"
30- checked = { showAllWorkspaces }
31- onCheckedChange = { ( checked ) => setShowAllWorkspaces ( checked === true ) }
32- variant = "description"
33- />
34- < label
35- htmlFor = "show-all-workspaces"
36- className = "text-vscode-descriptionForeground select-none cursor-pointer text-sm" >
37- { t ( "history:showAllWorkspaces" ) }
38- </ label >
39- </ div >
40- </ div >
21+ < div className = "flex items-center gap-1" >
22+ < span className = "codicon codicon-comment-discussion scale-90 mr-1" />
23+ < span className = "font-medium text-xs uppercase" > { t ( "history:recentTasks" ) } </ span >
4124 </ div >
42- < Button
43- variant = "ghost"
44- size = "sm"
45- onClick = { ( ) => showHistoryView ( ) }
46- className = "uppercase text-xs hover:bg-vscode-toolbar-hoverBackground/50 transition-colors" >
25+ < Button variant = "ghost" size = "sm" onClick = { ( ) => showHistoryView ( ) } className = "uppercase" >
4726 { t ( "history:viewAll" ) }
4827 </ Button >
4928 </ div >
@@ -54,19 +33,9 @@ const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => {
5433 onClick = { ( ) => vscode . postMessage ( { type : "showTaskWithId" , text : item . id } ) } >
5534 < div className = "flex flex-col gap-2 p-3 pt-1" >
5635 < div className = "flex justify-between items-center" >
57- < div className = "flex items-center gap-4" >
58- < span className = "text-xs font-medium text-vscode-descriptionForeground uppercase" >
59- { formatDate ( item . ts ) }
60- </ span >
61- { item . workspace && (
62- < span className = "text-xs text-vscode-descriptionForeground flex items-center gap-1" >
63- < span className = "codicon codicon-folder" />
64- < span className = "truncate max-w-[300px]" >
65- { item . workspace . split ( "/" ) . slice ( - 2 ) . join ( "/" ) || item . workspace }
66- </ span >
67- </ span >
68- ) }
69- </ div >
36+ < span className = "text-xs font-medium text-vscode-descriptionForeground uppercase" >
37+ { formatDate ( item . ts ) }
38+ </ span >
7039 < CopyButton itemTask = { item . task } />
7140 </ div >
7241 < div
0 commit comments