mirror of
https://github.com/sst/opencode.git
synced 2025-07-12 18:44:59 +00:00
32 lines
473 B
Go
32 lines
473 B
Go
package layout
|
|
|
|
import (
|
|
tea "github.com/charmbracelet/bubbletea/v2"
|
|
)
|
|
|
|
var Current *LayoutInfo
|
|
|
|
func init() {
|
|
Current = &LayoutInfo{
|
|
Viewport: Dimensions{Width: 80, Height: 25},
|
|
Container: Dimensions{Width: 80, Height: 25},
|
|
}
|
|
}
|
|
|
|
type LayoutSize string
|
|
|
|
type Dimensions struct {
|
|
Width int
|
|
Height int
|
|
}
|
|
|
|
type LayoutInfo struct {
|
|
Viewport Dimensions
|
|
Container Dimensions
|
|
}
|
|
|
|
type Modal interface {
|
|
tea.Model
|
|
Render(background string) string
|
|
Close() tea.Cmd
|
|
}
|