Skip to content

Commit e5d5de3

Browse files
committed
feat: "Show/Hide all files" now persist the state across the tasks per project
1 parent a32bef7 commit e5d5de3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- added support for MiniMax provider
66
- added maxResults parameter to grep tool with default 50
77
- files are now correctly sent to the UI
8+
- "Show/Hide all files" now persist the state across the tasks per project
89

910
## [0.39.0]
1011

src/renderer/src/components/ContextFiles/ContextFiles.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { BiCollapseVertical, BiExpandVertical } from 'react-icons/bi';
77
import { LuFolderTree } from 'react-icons/lu';
88
import { TbPencilOff } from 'react-icons/tb';
99
import { useTranslation } from 'react-i18next';
10-
import { usePrevious } from '@reactuses/core';
10+
import { useLocalStorage, usePrevious } from '@reactuses/core';
1111

1212
import { StyledTooltip } from '../common/StyledTooltip';
1313

@@ -100,7 +100,7 @@ export const ContextFiles = ({ baseDir, taskId, allFiles, contextFiles, showFile
100100
const prevContextFiles = usePrevious(contextFiles);
101101

102102
const [newlyAddedFiles, setNewlyAddedFiles] = useState<string[]>([]);
103-
const [showAllFiles, setShowAllFiles] = useState(false);
103+
const [showAllFiles, setShowAllFiles] = useLocalStorage(`context-files-show-all-${baseDir}`, false);
104104
const [expandedItems, setExpandedItems] = useState<string[]>([]);
105105
const [isDragging, setIsDragging] = useState(false);
106106

0 commit comments

Comments
 (0)