diff options
| author | Israel Araújo de Oliveira <[email protected]> | 2026-02-09 06:00:35 -0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-02-09 17:00:35 +0800 |
| commit | 93a11ddedf697c9b673dd59628cee3db48ac67d0 (patch) | |
| tree | eaa37846d594604d49afb0333662df453103e88f /packages/app/src/context | |
| parent | 94feb811ca32f4e01a1bada9cfbc022e8d5ca9e3 (diff) | |
| download | opencode-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')
| -rw-r--r-- | packages/app/src/context/platform.tsx | 8 |
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 }) => { |
