mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-17 12:56:41 +02:00
12 lines
347 B
TypeScript
12 lines
347 B
TypeScript
import { createSimpleContext } from "@opencode-ai/ui/context"
|
|
import { useGlobalSDK } from "./global-sdk"
|
|
|
|
export const { use: useSDK, provider: SDKProvider } = createSimpleContext({
|
|
name: "SDK",
|
|
init: (props: { directory: string }) => {
|
|
const globalSDK = useGlobalSDK()
|
|
|
|
return globalSDK.createDirSyncContext(props.directory)
|
|
},
|
|
})
|