diff --git a/webview-ui/src/components/history/HistoryPreview.tsx b/webview-ui/src/components/history/HistoryPreview.tsx index e7e998cd6c..0bc4fb69a5 100644 --- a/webview-ui/src/components/history/HistoryPreview.tsx +++ b/webview-ui/src/components/history/HistoryPreview.tsx @@ -2,7 +2,7 @@ import { memo } from "react" import { vscode } from "@/utils/vscode" import { formatLargeNumber, formatDate } from "@/utils/format" -import { Button } from "@/components/ui" +import { Button, Checkbox } from "@/components/ui" import { useAppTranslation } from "../../i18n/TranslationContext" import { CopyButton } from "./CopyButton" @@ -12,7 +12,7 @@ type HistoryPreviewProps = { showHistoryView: () => void } const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => { - const { tasks } = useTaskSearch() + const { tasks, showAllWorkspaces, setShowAllWorkspaces } = useTaskSearch() const { t } = useAppTranslation() return ( @@ -26,6 +26,17 @@ const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => { {t("history:viewAll")} +
+ setShowAllWorkspaces(checked === true)} + variant="description" + /> + +
{tasks.slice(0, 3).map((item) => (
{ )}
+ {showAllWorkspaces && item.workspace && ( +
+ + {item.workspace} +
+ )} ))} diff --git a/webview-ui/src/components/history/HistoryView.tsx b/webview-ui/src/components/history/HistoryView.tsx index 064d9d2ef8..2c244e21cd 100644 --- a/webview-ui/src/components/history/HistoryView.tsx +++ b/webview-ui/src/components/history/HistoryView.tsx @@ -156,13 +156,16 @@ const HistoryView = ({ onDone }: HistoryViewProps) => { -
setShowAllWorkspaces(!showAllWorkspaces)}> +
setShowAllWorkspaces(checked === true)} variant="description" /> - {t("history:showAllWorkspaces")} +
{/* Select all control in selection mode */}