summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src/context/platform.tsx
diff options
context:
space:
mode:
authorIsrael Araújo de Oliveira <[email protected]>2026-02-09 06:00:35 -0300
committerGitHub <[email protected]>2026-02-09 17:00:35 +0800
commit93a11ddedf697c9b673dd59628cee3db48ac67d0 (patch)
treeeaa37846d594604d49afb0333662df453103e88f /packages/app/src/context/platform.tsx
parent94feb811ca32f4e01a1bada9cfbc022e8d5ca9e3 (diff)
downloadopencode-93a11ddedf697c9b673dd59628cee3db48ac67d0.tar.gz
opencode-93a11ddedf697c9b673dd59628cee3db48ac67d0.zip
feat(desktop): add native Wayland toggle on Linux (#11971)
Co-authored-by: Brendan Allan <[email protected]>
Diffstat (limited to 'packages/app/src/context/platform.tsx')
-rw-r--r--packages/app/src/context/platform.tsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/app/src/context/platform.tsx b/packages/app/src/context/platform.tsx
index 3fca502ba..7aa6c6554 100644
--- a/packages/app/src/context/platform.tsx
+++ b/packages/app/src/context/platform.tsx
@@ -57,6 +57,12 @@ export type Platform = {
/** Set the default server URL to use on app startup (platform-specific) */
setDefaultServerUrl?(url: string | null): Promise<void> | void
+ /** Get the preferred display backend (desktop only) */
+ getDisplayBackend?(): Promise<DisplayBackend | null> | DisplayBackend | null
+
+ /** Set the preferred display backend (desktop only) */
+ setDisplayBackend?(backend: DisplayBackend): Promise<void>
+
/** Parse markdown to HTML using native parser (desktop only, returns unprocessed code blocks) */
parseMarkdown?(markdown: string): Promise<string>
@@ -70,6 +76,8 @@ export type Platform = {
readClipboardImage?(): Promise<File | null>
}
+export type DisplayBackend = "auto" | "wayland"
+
export const { use: usePlatform, provider: PlatformProvider } = createSimpleContext({
name: "Platform",
init: (props: { value: Platform }) => {