workspace

package
v0.31.2 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: GPL-3.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package workspace provides workspace management functionality for CM.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Worktree errors.
	ErrWorktreeExists      = errors.New("worktree already exists")
	ErrWorktreeNotInStatus = errors.New("worktree not found in status")
	ErrRepositoryNotClean  = errors.New("repository is not clean")
	ErrDirectoryExists     = errors.New("directory already exists")

	// User interaction errors.
	ErrDeletionCancelled = errors.New("deletion cancelled by user")
)

Error definitions for workspace package.

Functions

func BuildWorkspaceFilePath added in v0.31.0

func BuildWorkspaceFilePath(workspacesDir, workspaceName, branchName string) string

BuildWorkspaceFilePath constructs the workspace file path for a given workspace name and branch. This is a shared utility function used by create, delete, and open operations. The workspace file is named: {workspaceName}/{sanitizedBranchName}.code-workspace.

Types

type Config

type Config = interfaces.Config

Config represents the configuration of a workspace.

type CreateWorktreeOpts added in v0.21.0

type CreateWorktreeOpts = interfaces.CreateWorktreeOpts

CreateWorktreeOpts contains optional parameters for worktree creation in workspace mode.

type Folder

type Folder = interfaces.Folder

Folder represents a folder in a workspace.

type NewWorkspaceParams

type NewWorkspaceParams = interfaces.NewWorkspaceParams

NewWorkspaceParams contains parameters for creating a new Workspace instance.

type Workspace

type Workspace = interfaces.Workspace

Workspace interface provides workspace management capabilities. This interface is now defined in pkg/mode/workspace/interfaces to avoid circular imports.

func NewWorkspace

func NewWorkspace(params NewWorkspaceParams) Workspace

NewWorkspace creates a new Workspace instance.

Directories

Path Synopsis
Package interfaces defines the workspace interface for dependency injection.
Package interfaces defines the workspace interface for dependency injection.
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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