import { createContext, ReactNode, useContext } from "react"; import { useOptionalConversationId } from "#/hooks/use-conversation-id"; import { openWorkspaceFile } from "#/services/canvas-ui"; import EventLogger from "#/utils/event-logger"; /** * When false, PathComponent renders a non-interactive span. EventGroup's * header wraps titles in a toggle ); } catch (e) { EventLogger.error(String(e)); return ( {path} ); } }; if (Array.isArray(children)) { const processedChildren = children.map((child, index) => typeof child === "string" ? ( {processPath(child)} ) : ( child ), ); return ( {processedChildren} ); } if (typeof children === "string") { return ( {processPath(children)} ); } return ( {children} ); } export { PathComponent, isLikelyDirectory };