-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstate_entry.go
More file actions
25 lines (23 loc) · 1.08 KB
/
state_entry.go
File metadata and controls
25 lines (23 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package devtui
// StateEntry is the JSON wire format for a single handler registered in the daemon TUI.
// Produced by app.HeadlessTUI, consumed by DevTUI client mode.
// JSON tags are the published contract — any producer must match them exactly.
type StateEntry struct {
TabTitle string `json:"tab_title"`
HandlerName string `json:"handler_name"`
HandlerColor string `json:"handler_color"`
HandlerType int `json:"handler_type"` // HandlerType* constant below
Label string `json:"label"`
Value string `json:"value"`
Shortcut string `json:"shortcut"` // primary key = handler Name()
Shortcuts []map[string]string `json:"shortcuts"` // from ShortcutProvider
}
// HandlerType constants — mirror the private handlerType iota in anyHandler.go.
// These values are part of the published wire protocol. Do not reorder.
const (
HandlerTypeDisplay = 0
HandlerTypeEdit = 1
HandlerTypeExecution = 2
HandlerTypeInteractive = 3
HandlerTypeLoggable = 4
)