workspace

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BranchMetaPath

func BranchMetaPath(root, branch string) string

func BranchNameFromDir

func BranchNameFromDir(name string) string

func EnsureSessionState added in v0.2.0

func EnsureSessionState(state *State)

func FindRoot

func FindRoot(start string) (string, error)

func LogsPath

func LogsPath(root string) string

func ReadBranchMeta

func ReadBranchMeta(dir string) (string, bool, error)

func RepoWorktreePath

func RepoWorktreePath(root, branch, repoDir string) string

func SaveState added in v0.2.0

func SaveState(root string, state State) error

func StatePath

func StatePath(root string) string

func UseBranchDirs

func UseBranchDirs(root string) bool

func WorksetFile

func WorksetFile(root string) string

func WorktreeBranchPath

func WorktreeBranchPath(root, branch string) string

func WorktreeDirName

func WorktreeDirName(branch string) string

func WorktreeName

func WorktreeName(branch string) string

func WorktreesPath

func WorktreesPath(root string) string

func WriteBranchMeta

func WriteBranchMeta(root, branch string) error

Types

type SessionState added in v0.2.0

type SessionState struct {
	Backend      string   `json:"backend,omitempty"`
	Name         string   `json:"name,omitempty"`
	Command      []string `json:"command,omitempty"`
	StartedAt    string   `json:"started_at,omitempty"`
	LastAttached string   `json:"last_attached,omitempty"`
}

type State

type State struct {
	CurrentBranch string                  `json:"current_branch"`
	Sessions      map[string]SessionState `json:"sessions,omitempty"`
}

func LoadState added in v0.2.0

func LoadState(root string) (State, error)

type Workspace

type Workspace struct {
	Root   string
	Config config.WorkspaceConfig
	State  State
}

func Init

func Init(root, name string, defaults config.Defaults) (Workspace, error)

func Load

func Load(root string, defaults config.Defaults) (Workspace, error)

Jump to

Keyboard shortcuts

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