mirror of
https://github.com/sst/opencode.git
synced 2025-08-24 23:14:10 +00:00
18 lines
433 B
Go
18 lines
433 B
Go
package input
|
|
|
|
import "github.com/charmbracelet/x/ansi"
|
|
|
|
// PrimaryDeviceAttributesEvent is an event that represents the terminal
|
|
// primary device attributes.
|
|
type PrimaryDeviceAttributesEvent []int
|
|
|
|
func parsePrimaryDevAttrs(params ansi.Params) Event {
|
|
// Primary Device Attributes
|
|
da1 := make(PrimaryDeviceAttributesEvent, len(params))
|
|
for i, p := range params {
|
|
if !p.HasMore() {
|
|
da1[i] = p.Param(0)
|
|
}
|
|
}
|
|
return da1
|
|
}
|