File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
packages/opencode/src/cli/cmd/tui/ui Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 11import { createContext , useContext , type ParentProps , Show } from "solid-js"
22import { createStore } from "solid-js/store"
33import { useTheme } from "@tui/context/theme"
4+ import { useTerminalDimensions } from "@opentui/solid"
45import { SplitBorder } from "../component/border"
56import { TextAttributes } from "@opentui/core"
67import z from "zod"
@@ -11,6 +12,7 @@ export type ToastOptions = z.infer<typeof TuiEvent.ToastShow.properties>
1112export function Toast ( ) {
1213 const toast = useToast ( )
1314 const { theme } = useTheme ( )
15+ const dimensions = useTerminalDimensions ( )
1416
1517 return (
1618 < Show when = { toast . currentToast } >
@@ -21,6 +23,8 @@ export function Toast() {
2123 alignItems = "flex-start"
2224 top = { 2 }
2325 right = { 2 }
26+ width = { Math . min ( 60 , dimensions ( ) . width - 6 ) }
27+ maxWidth = { Math . min ( 60 , dimensions ( ) . width - 6 ) }
2428 paddingLeft = { 2 }
2529 paddingRight = { 2 }
2630 paddingTop = { 1 }
You can’t perform that action at this time.
0 commit comments