Export DesktopInterface from desktop and add PlatformContext
This commit is contained in:
parent
923bf36593
commit
d531dff8d3
11 changed files with 71 additions and 20 deletions
|
|
@ -1 +0,0 @@
|
|||
import "@opencode-ai/desktop"
|
||||
21
packages/tauri/src/index.tsx
Normal file
21
packages/tauri/src/index.tsx
Normal file
|
|
@ -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!,
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue