Skip to content
7 changes: 6 additions & 1 deletion packages/opencode/src/cli/cmd/tui/ui/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { createStore } from "solid-js/store"
import { useToast } from "./toast"
import { Flag } from "@/flag/flag"
import { Selection } from "@tui/util/selection"
import { useSync } from "@tui/context/sync"

export function Dialog(
props: ParentProps<{
Expand All @@ -16,6 +17,10 @@ export function Dialog(
const dimensions = useTerminalDimensions()
const { theme } = useTheme()
const renderer = useRenderer()
const sync = useSync()

const overlayMode = () => sync.data.config.experimental?.dialog_background_overlay ?? "full"
const showOverlay = () => overlayMode() === "full"

let dismiss = false
const width = () => {
Expand Down Expand Up @@ -44,7 +49,7 @@ export function Dialog(
paddingTop={dimensions().height / 4}
left={0}
top={0}
backgroundColor={RGBA.fromInts(0, 0, 0, 150)}
backgroundColor={showOverlay() ? RGBA.fromInts(0, 0, 0, 150) : undefined}
>
<box
onMouseUp={(e) => {
Expand Down
4 changes: 4 additions & 0 deletions packages/opencode/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,10 @@ export namespace Config {
.positive()
.optional()
.describe("Timeout in milliseconds for model context protocol (MCP) requests"),
dialog_background_overlay: z
.enum(["full", "limited", "none"])
.optional()
.describe("Control dialog background overlay: 'full' = semi-transparent overlay (default), 'limited' = overlay only within dialog bounds, 'none' = no overlay"),
})
.optional(),
})
Expand Down
4 changes: 4 additions & 0 deletions packages/sdk/js/src/v2/gen/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1616,6 +1616,10 @@ export type Config = {
* Timeout in milliseconds for model context protocol (MCP) requests
*/
mcp_timeout?: number
/**
* Control dialog background overlay: 'full' = semi-transparent overlay (default), 'limited' = overlay only within dialog bounds, 'none' = no overlay
*/
dialog_background_overlay?: 'full' | 'limited' | 'none'
}
}

Expand Down