gui/pkg/display/messages.go
Snider 590246b49a
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Wire GUI app mode into display state
2026-04-15 21:40:09 +01:00

26 lines
977 B
Go

// pkg/display/messages.go
package display
// ActionIDECommand is broadcast when a menu handler triggers an IDE command
// (save, run, build). Replaces direct s.app.Event().Emit("ide:*") calls.
// Listeners (e.g. editor windows) handle this via HandleIPCEvents.
type ActionIDECommand struct {
Command string `json:"command"` // "save", "run", "build"
}
// QueryStoreRoute resolves the `core://store` route through the Core query bus.
//
// result := c.QUERY(display.QueryStoreRoute{Query: "invoice"})
// // Returns the same storage search payload that backs `core://store?q=invoice`
type QueryStoreRoute struct {
Query string `json:"q,omitempty"`
}
// QueryAppMode reports the detected app mode for the current process.
//
// mode := c.QUERY(display.QueryAppMode{})
// // Returns "manager" or "worker" based on CLI flags, config, or env.
type QueryAppMode struct{}
// EventIDECommand is the WS event type for IDE commands.
const EventIDECommand EventType = "ide.command"