diff options
| author | Brendan Allan <[email protected]> | 2025-12-08 13:43:36 +0800 |
|---|---|---|
| committer | Brendan Allan <[email protected]> | 2025-12-08 13:43:36 +0800 |
| commit | d531dff8d3f5c60df2e5c08e8bd04bf9a234dbc3 (patch) | |
| tree | 7c38fd75c3e6f04307b78abe7a93c8321e041143 /packages/tauri/src | |
| parent | 923bf36593e517196a332ddce2ffe5f2fd216f5e (diff) | |
| download | opencode-d531dff8d3f5c60df2e5c08e8bd04bf9a234dbc3.tar.gz opencode-d531dff8d3f5c60df2e5c08e8bd04bf9a234dbc3.zip | |
Export DesktopInterface from desktop and add PlatformContext
Diffstat (limited to 'packages/tauri/src')
| -rw-r--r-- | packages/tauri/src/index.ts | 1 | ||||
| -rw-r--r-- | packages/tauri/src/index.tsx | 21 |
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!, +) |
