wcore

package
v0.4.79 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

wave core application coordinator

Index

Constants

View Source
const (
	LayoutActionDataType_Insert          = "insert"
	LayoutActionDataType_InsertAtIndex   = "insertatindex"
	LayoutActionDataType_Remove          = "delete"
	LayoutActionDataType_ClearTree       = "clear"
	LayoutActionDataType_Replace         = "replace"
	LayoutActionDataType_SplitHorizontal = "splithorizontal"
	LayoutActionDataType_SplitVertical   = "splitvertical"
	LayoutActionDataType_CleanupOrphaned = "cleanuporphaned"
)

Variables

View Source
var WorkspaceColors = [...]string{
	"#2997ff",
	"#00FFDB",
	"#30D158",
	"#BF55EC",
	"#FF453A",
	"#FF9500",
	"#FFE900",
}
View Source
var WorkspaceIcons = [...]string{
	"square-terminal",
	"triangle",
	"star",
	"heart",
	"bolt",
	"solid@cloud",
	"moon",
	"layer-group",
	"rocket",
	"flask",
	"paperclip",
	"chart-line",
	"graduation-cap",
	"mug-hot",
}

Functions

func ApplyPortableLayout

func ApplyPortableLayout(ctx context.Context, tabId string, layout PortableLayout, recordTelemetry bool) error

func BootstrapStarterLayout

func BootstrapStarterLayout(ctx context.Context) error

func CheckAndFixWindow

func CheckAndFixWindow(ctx context.Context, windowId string) *waveobj.Window

func CloseWindow

func CloseWindow(ctx context.Context, windowId string, fromElectron bool) error

CloseWindow closes a window and deletes its workspace if it is empty and not named. If fromElectron is true, it does not send an event to Electron.

func CreateBlock

func CreateBlock(ctx context.Context, tabId string, blockDef *waveobj.BlockDef, rtOpts *waveobj.RuntimeOpts) (rtnBlock *waveobj.Block, rtnErr error)

func CreateBlockWithTelemetry

func CreateBlockWithTelemetry(ctx context.Context, tabId string, blockDef *waveobj.BlockDef, rtOpts *waveobj.RuntimeOpts, recordTelemetry bool) (rtnBlock *waveobj.Block, rtnErr error)

func CreateClient

func CreateClient(ctx context.Context) (*waveobj.Client, error)

func CreateSubBlock

func CreateSubBlock(ctx context.Context, blockId string, blockDef *waveobj.BlockDef) (*waveobj.Block, error)

func CreateTab

func CreateTab(ctx context.Context, workspaceId string, tabName string, activateTab bool, isInitialLaunch bool) (string, error)

returns tabid

func CreateWindow

func CreateWindow(ctx context.Context, winSize *waveobj.WinSize, workspaceId string) (*waveobj.Window, error)

func CreateWorkspace

func CreateWorkspace(ctx context.Context, name string, icon string, color string, applyDefaults bool, isInitialLaunch bool) (*waveobj.Workspace, error)

func DeleteBlock

func DeleteBlock(ctx context.Context, blockId string, recursive bool) error

Must delete all blocks individually first. Also deletes LayoutState. recursive: if true, will recursively close parent tab, window, workspace, if they are empty. Returns new active tab id, error.

func DeleteTab

func DeleteTab(ctx context.Context, workspaceId string, tabId string, recursive bool) (string, error)

Must delete all blocks individually first. Also deletes LayoutState. recursive: if true, will recursively close parent window, workspace, if they are empty. Returns new active tab id, error.

func DeleteWorkspace

func DeleteWorkspace(ctx context.Context, workspaceId string, force bool) (bool, string, error)

If force is true, it will delete even if workspace is named. If workspace is empty, it will be deleted, even if it is named. Returns true if workspace was deleted, false if it was not deleted.

func EnsureInitialData

func EnsureInitialData() (bool, error)

Ensures that the initial data is present in the store, creates an initial window if needed

func FocusWindow

func FocusWindow(ctx context.Context, windowId string) error

func GetAllBadges

func GetAllBadges() []baseds.BadgeEvent

GetAllBadges returns a snapshot of all currently active badges.

func GetClientData

func GetClientData(ctx context.Context) (*waveobj.Client, error)

func GetLayoutIdForTab

func GetLayoutIdForTab(ctx context.Context, tabId string) (string, error)

func GetWindow

func GetWindow(ctx context.Context, windowId string) (*waveobj.Window, error)

func GetWorkspace

func GetWorkspace(ctx context.Context, wsID string) (*waveobj.Workspace, error)

func GoSendNoTelemetryUpdate

func GoSendNoTelemetryUpdate(telemetryEnabled bool)

func InitBadgeStore

func InitBadgeStore() error

InitBadgeStore subscribes to incoming badge events.

func InitMainServer

func InitMainServer() error

func ListWorkspaces

func ListWorkspaces(ctx context.Context) (waveobj.WorkspaceList, error)

func QueueLayoutAction

func QueueLayoutAction(ctx context.Context, layoutStateId string, actions ...waveobj.LayoutActionData) error

func QueueLayoutActionForTab

func QueueLayoutActionForTab(ctx context.Context, tabId string, actions ...waveobj.LayoutActionData) error

func ResolveBlockIdFromPrefix

func ResolveBlockIdFromPrefix(ctx context.Context, tabId string, blockIdPrefix string) (string, error)

func SendActiveTabUpdate

func SendActiveTabUpdate(ctx context.Context, workspaceId string, newActiveTabId string)

func SendWaveObjUpdate

func SendWaveObjUpdate(oref waveobj.ORef)

func SetActiveTab

func SetActiveTab(ctx context.Context, workspaceId string, tabId string) error

func SetColor

func SetColor(workspaceId string, color string) error

func SetIcon

func SetIcon(workspaceId string, icon string) error

func SetName

func SetName(workspaceId string, name string) error

func SwitchWorkspace

func SwitchWorkspace(ctx context.Context, windowId string, workspaceId string) (*waveobj.Workspace, error)

func UpdateWorkspace

func UpdateWorkspace(ctx context.Context, workspaceId string, name string, icon string, color string, applyDefaults bool) (*waveobj.Workspace, bool, error)

Returns updated workspace, whether it was updated, error.

func UpdateWorkspaceTabIds

func UpdateWorkspaceTabIds(ctx context.Context, workspaceId string, tabIds []string) error

Types

type BadgeStore

type BadgeStore struct {
	// contains filtered or unexported fields
}

BadgeStore is an in-memory store for transient badges. Badges are not persisted and are cleared on restart. Values are stored by value (not pointer) to prevent external mutation.

type PortableLayout

type PortableLayout []struct {
	IndexArr []int             `json:"indexarr"`
	Size     *uint             `json:"size,omitempty"`
	BlockDef *waveobj.BlockDef `json:"blockdef"`
	Focused  bool              `json:"focused"`
}

func GetNewTabLayout

func GetNewTabLayout() PortableLayout

func GetStarterLayout

func GetStarterLayout() PortableLayout

First-run layout is a single focused shell — GenieTerm is terminal-first, so the first impression is a terminal, not a tiled widget workspace. Other views (sysinfo/web/preview) remain one keystroke away via the new-block flow.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL