From 4069999b782cc00d4e707f5eca32082bdfad45bc Mon Sep 17 00:00:00 2001
From: Adam <2363879+adamdotdevin@users.noreply.github.com>
Date: Fri, 14 Nov 2025 12:38:52 -0600
Subject: wip(desktop): new layout work

---
 packages/desktop/src/context/sdk.tsx | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

(limited to 'packages/desktop/src/context/sdk.tsx')

diff --git a/packages/desktop/src/context/sdk.tsx b/packages/desktop/src/context/sdk.tsx
index 8d0cace65..b7b753dbc 100644
--- a/packages/desktop/src/context/sdk.tsx
+++ b/packages/desktop/src/context/sdk.tsx
@@ -5,12 +5,15 @@ import { onCleanup } from "solid-js"
 
 export const { use: useSDK, provider: SDKProvider } = createSimpleContext({
   name: "SDK",
-  init: (props: { url: string }) => {
+  init: (props: { url: string; directory?: string }) => {
     const abort = new AbortController()
-    const sdk = createOpencodeClient({
-      baseUrl: props.url,
-      signal: abort.signal,
-    })
+    const sdk = createOpencodeClient(
+      {
+        baseUrl: props.url,
+        signal: abort.signal,
+      },
+      { directory: props.directory },
+    )
 
     const emitter = createGlobalEmitter<{
       [key in Event["type"]]: Extract<Event, { type: key }>
@@ -27,6 +30,6 @@ export const { use: useSDK, provider: SDKProvider } = createSimpleContext({
       abort.abort()
     })
 
-    return { client: sdk, event: emitter }
+    return { url: props.url, directory: props.directory, client: sdk, event: emitter }
   },
 })
-- 
cgit v1.2.3

