summaryrefslogtreecommitdiffhomepage
path: root/packages/tauri/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/tauri/src')
-rw-r--r--packages/tauri/src/index.ts1
-rw-r--r--packages/tauri/src/index.tsx21
2 files changed, 21 insertions, 1 deletions
diff --git a/packages/tauri/src/index.ts b/packages/tauri/src/index.ts
deleted file mode 100644
index b9060d628..000000000
--- a/packages/tauri/src/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-import "@opencode-ai/desktop"
diff --git a/packages/tauri/src/index.tsx b/packages/tauri/src/index.tsx
new file mode 100644
index 000000000..9371b4826
--- /dev/null
+++ b/packages/tauri/src/index.tsx
@@ -0,0 +1,21 @@
+// @refresh reload
+import { render } from "solid-js/web"
+import { DesktopInterface, PlatformProvider, Platform } from "@opencode-ai/desktop"
+
+const root = document.getElementById("root")
+if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
+ throw new Error(
+ "Root element not found. Did you forget to add it to your index.html? Or maybe the id attribute got misspelled?",
+ )
+}
+
+const platform: Platform = {}
+
+render(
+ () => (
+ <PlatformProvider value={platform}>
+ <DesktopInterface />
+ </PlatformProvider>
+ ),
+ root!,
+)