@@ -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,17 @@ const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => {
2626 { t ( "history:viewAll" ) }
2727 </ Button >
2828 </ div >
29+ < div className = "flex items-center gap-2 mb-2" >
30+ < Checkbox
31+ id = "show-all-workspaces"
32+ checked = { showAllWorkspaces }
33+ onCheckedChange = { ( checked ) => setShowAllWorkspaces ( checked === true ) }
34+ variant = "description"
35+ />
36+ < label htmlFor = "show-all-workspaces" className = "text-xs text-vscode-foreground cursor-pointer" >
37+ { t ( "history:showAllWorkspaces" ) }
38+ </ label >
39+ </ div >
2940 { tasks . slice ( 0 , 3 ) . map ( ( item ) => (
3041 < div
3142 key = { item . id }
@@ -74,6 +85,12 @@ const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => {
7485 </ >
7586 ) }
7687 </ div >
88+ { showAllWorkspaces && item . workspace && (
89+ < div className = "flex flex-row gap-1 text-vscode-descriptionForeground text-xs mt-1" >
90+ < span className = "codicon codicon-folder scale-80" />
91+ < span > { item . workspace } </ span >
92+ </ div >
93+ ) }
7794 </ div >
7895 </ div >
7996 ) ) }
0 commit comments