Skip to content

Commit 28e765e

Browse files
committed
fix dialog
1 parent bfbcb5f commit 28e765e

File tree

2 files changed

+11
-18
lines changed

2 files changed

+11
-18
lines changed

packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export function DialogSelect<T>(props: DialogSelectProps<T>) {
180180
focusedTextColor={theme.textMuted}
181181
ref={(r) => {
182182
input = r
183-
input.focus()
183+
setTimeout(() => input.focus(), 1)
184184
}}
185185
placeholder="Enter search term"
186186
/>

packages/opencode/src/cli/cmd/tui/ui/dialog.tsx

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
import { useKeyboard, useRenderer, useTerminalDimensions } from "@opentui/solid"
2-
import { batch, createContext, createEffect, Show, useContext, type JSX, type ParentProps } from "solid-js"
2+
import {
3+
batch,
4+
createContext,
5+
createEffect,
6+
Show,
7+
useContext,
8+
type JSX,
9+
type ParentProps,
10+
} from "solid-js"
311
import { useTheme } from "@tui/context/theme"
412
import { Renderable, RGBA } from "@opentui/core"
513
import { createStore } from "solid-js/store"
614
import { createEventBus } from "@solid-primitives/event-bus"
715

8-
const Border = {
9-
topLeft: "┃",
10-
topRight: "┃",
11-
bottomLeft: "┃",
12-
bottomRight: "┃",
13-
horizontal: "",
14-
vertical: "┃",
15-
topT: "+",
16-
bottomT: "+",
17-
leftT: "+",
18-
rightT: "+",
19-
cross: "+",
20-
}
2116
export function Dialog(
2217
props: ParentProps<{
2318
size?: "medium" | "large"
@@ -45,11 +40,9 @@ export function Dialog(
4540
onMouseUp={async (e) => {
4641
e.stopPropagation()
4742
}}
48-
customBorderChars={Border}
4943
width={props.size === "large" ? 80 : 60}
5044
maxWidth={dimensions().width - 2}
5145
backgroundColor={theme.backgroundPanel}
52-
borderColor={theme.border}
5346
paddingTop={1}
5447
>
5548
{props.children}
@@ -138,7 +131,7 @@ function init() {
138131
},
139132
get allClosedEvent() {
140133
return allClosedEvent
141-
}
134+
},
142135
}
143136
}
144137

0 commit comments

Comments
 (0)