11import { memo , useCallback , useMemo } from "react" ;
22
3+ import { commands as miscCommands } from "@hypr/plugin-misc" ;
34import { Spinner } from "@hypr/ui/components/ui/spinner" ;
45import {
56 Tooltip ,
@@ -12,6 +13,7 @@ import { useListener } from "../../../../contexts/listener";
1213import { useIsSessionEnhancing } from "../../../../hooks/useEnhancedNotes" ;
1314import { deleteSessionCascade } from "../../../../store/tinybase/store/deleteSession" ;
1415import * as main from "../../../../store/tinybase/store/main" ;
16+ import { save } from "../../../../store/tinybase/store/save" ;
1517import { getOrCreateSessionForEventId } from "../../../../store/tinybase/store/sessions" ;
1618import { type TabInput , useTabs } from "../../../../store/zustand/tabs" ;
1719import {
@@ -245,9 +247,21 @@ const SessionItem = memo(
245247 void deleteSessionCascade ( store , indexes , sessionId ) ;
246248 } , [ store , indexes , sessionId , invalidateResource ] ) ;
247249
250+ const handleRevealInFinder = useCallback ( async ( ) => {
251+ await save ( ) ;
252+ await miscCommands . revealSessionInFinder ( sessionId ) ;
253+ } , [ sessionId ] ) ;
254+
248255 const contextMenu = useMemo (
249- ( ) => [ { id : "delete" , text : "Delete Completely" , action : handleDelete } ] ,
250- [ handleCmdClick , handleDelete ] ,
256+ ( ) => [
257+ {
258+ id : "reveal" ,
259+ text : "Reveal in Finder" ,
260+ action : handleRevealInFinder ,
261+ } ,
262+ { id : "delete" , text : "Delete Completely" , action : handleDelete } ,
263+ ] ,
264+ [ handleRevealInFinder , handleDelete ] ,
251265 ) ;
252266
253267 return (
0 commit comments