@@ -2,7 +2,7 @@ import { memo } from "react"
22
33import { vscode } from "@/utils/vscode"
44import { formatLargeNumber , formatDate } from "@/utils/format"
5- import { Button } from "@/components/ui"
5+ import { Button , Checkbox } from "@/components/ui"
66
77import { useAppTranslation } from "../../i18n/TranslationContext"
88import { CopyButton } from "./CopyButton"
@@ -12,7 +12,7 @@ type HistoryPreviewProps = {
1212 showHistoryView : ( ) => void
1313}
1414const HistoryPreview = ( { showHistoryView } : HistoryPreviewProps ) => {
15- const { tasks } = useTaskSearch ( )
15+ const { tasks, showAllWorkspaces , setShowAllWorkspaces } = useTaskSearch ( )
1616 const { t } = useAppTranslation ( )
1717
1818 return (
@@ -26,6 +26,14 @@ const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => {
2626 { t ( "history:viewAll" ) }
2727 </ Button >
2828 </ div >
29+ < div className = "flex items-center gap-2 mb-2" onClick = { ( ) => setShowAllWorkspaces ( ! showAllWorkspaces ) } >
30+ < Checkbox
31+ checked = { showAllWorkspaces }
32+ onCheckedChange = { ( checked ) => setShowAllWorkspaces ( checked === true ) }
33+ variant = "description"
34+ />
35+ < span className = "text-xs text-vscode-foreground" > { t ( "history:showAllWorkspaces" ) } </ span >
36+ </ div >
2937 { tasks . slice ( 0 , 3 ) . map ( ( item ) => (
3038 < div
3139 key = { item . id }
@@ -74,6 +82,12 @@ const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => {
7482 </ >
7583 ) }
7684 </ div >
85+ { showAllWorkspaces && item . workspace && (
86+ < div className = "flex flex-row gap-1 text-vscode-descriptionForeground text-xs mt-1" >
87+ < span className = "codicon codicon-folder scale-80" />
88+ < span > { item . workspace } </ span >
89+ </ div >
90+ ) }
7791 </ div >
7892 </ div >
7993 ) ) }
0 commit comments