import type { LocationRef } from "@opencode-ai/sdk/v2" import { createContext, useContext, type Accessor, type ParentProps } from "solid-js" const context = createContext>() export function LocationProvider(props: ParentProps<{ location?: LocationRef }>) { return props.location}>{props.children} } export function useLocation() { const value = useContext(context) if (!value) throw new Error("Location context must be used within a LocationProvider") return value }