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
6 changes: 5 additions & 1 deletion packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ export function Session() {
if (sidebar() === "auto" && wide()) return true
return false
})
const contentWidth = createMemo(() => dimensions().width - (sidebarVisible() ? 42 : 0) - 4)
const sidebarOverlay = createMemo(() => {
if (sync.data.config.tui?.sidebar_overlay === false) return false
return sidebarVisible() && !wide()
})
const contentWidth = createMemo(() => dimensions().width - (sidebarVisible() && !sidebarOverlay() ? 42 : 0) - 4)

const scrollAcceleration = createMemo(() => {
const tui = sync.data.config.tui
Expand Down
6 changes: 6 additions & 0 deletions packages/opencode/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,12 @@ export namespace Config {
.enum(["auto", "stacked"])
.optional()
.describe("Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column"),
sidebar_overlay: z
.boolean()
.optional()
.describe(
"Enable sidebar overlay mode on narrow screens (default: true). Set to false to always show sidebar side-by-side with content",
),
})

export const Server = z
Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/src/provider/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { createPerplexity } from "@ai-sdk/perplexity"
export namespace Provider {
const log = Log.create({ service: "provider" })

const BUNDLED_PROVIDERS: Record<string, (options: any) => SDK> = {
const BUNDLED_PROVIDERS: Record<string, (options: any) => any> = {
"@ai-sdk/amazon-bedrock": createAmazonBedrock,
"@ai-sdk/anthropic": createAnthropic,
"@ai-sdk/azure": createAzure,
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 @@ -1433,6 +1433,10 @@ export type Config = {
* Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column
*/
diff_style?: "auto" | "stacked"
/**
* Enable sidebar overlay mode on narrow screens (default: true). Set to false to always show sidebar side-by-side with content
*/
sidebar_overlay?: boolean
}
server?: ServerConfig
/**
Expand Down
4 changes: 4 additions & 0 deletions packages/sdk/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -8233,6 +8233,10 @@
"description": "Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column",
"type": "string",
"enum": ["auto", "stacked"]
},
"sidebar_overlay": {
"description": "Enable sidebar overlay mode on narrow screens (default: true). Set to false to always show sidebar side-by-side with content",
"type": "boolean"
}
}
},
Expand Down