MCPcopy Create free account
hub / github.com/experdot/pointer / Explorer

Function Explorer

src/renderer/src/components/panels/Explorer.tsx:31–386  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29import './Explorer.css'
30
31export function Explorer(): React.JSX.Element {
32 const {
33 pages,
34 folders,
35 batchUpdateItemsOrder,
36 batchUpdateItemsOrderWithRename,
37 checkBatchMoveConflicts,
38 createPage,
39 deletePage,
40 deletePages,
41 updatePage,
42 createFolder,
43 deleteFolder,
44 deleteFolders,
45 clearFolder,
46 updateFolder,
47 toggleFolderExpanded,
48 openPage
49 } = usePages()
50
51 const { tabs, activeTabId } = useTabsStore()
52 const activePageId = tabs.find((t) => t.id === activeTabId)?.dataId
53 const { showDeleteConfirm } = useConfirmDialog()
54 const { setActivePanel } = useLayoutStore()
55 const { setOptions: setSearchOptions } = useGlobalSearchStore()
56
57 const [selectedKey, setSelectedKey] = useState<string | null>(null)
58 const [multiSelect, setMultiSelect] = useState(false)
59 const [checkedKeys, setCheckedKeys] = useState<string[]>([])
60 const [moveTarget, setMoveTarget] = useState<{
61 type: 'page' | 'folder'
62 id: string
63 parentFolderId?: string
64 } | null>(null)
65 const [moveConflict, setMoveConflict] = useState<MoveConflictInfo | null>(null)
66 const [pendingDragOperation, setPendingDragOperation] = useState<{
67 items: (ChatPage | PageFolder)[]
68 parentFolderId: string | undefined
69 conflictNames: string[]
70 } | null>(null)
71
72 const messagesCache = useMessagesStore((state) => state.cache)
73
74 useEffect(() => {
75 if (activePageId) {
76 setSelectedKey(activePageId)
77 }
78 }, [activePageId])
79
80 const handleSelect = (id: string | null): void => {
81 setSelectedKey(id)
82 if (id) {
83 const page = pages.find((p) => p.id === id)
84 if (page) {
85 openPage(id, true)
86 }
87 }
88 }

Callers

nothing calls this directly

Calls 9

usePagesFunction · 0.90
useConfirmDialogFunction · 0.90
getSwitchGenerationFunction · 0.90
getStandardDropdownPropsFunction · 0.90
isPageFunction · 0.90
updatePageFunction · 0.85
updateFolderFunction · 0.85
getAllKeysFunction · 0.70

Tested by

no test coverage detected