Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Expand All @@ -38,7 +43,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 @@ -1225,6 +1225,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 @@ -1503,6 +1503,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