workspace

package
v0.17.5 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Message string
}

func (*Error) Error

func (e *Error) Error() string

type File

type File struct {
	Path      string `json:"path"`
	MediaType string `json:"media_type"`
	Kind      string `json:"kind"`
	Text      string `json:"text,omitempty"`
	DataURL   string `json:"data_url,omitempty"`
	Size      int64  `json:"size"`
}

func ReadFile

func ReadFile(workspace, path string) (File, error)

type GitDiff

type GitDiff struct {
	Path string `json:"path"`
	Diff string `json:"diff"`
}

func GitDiffFor

func GitDiffFor(ctx context.Context, workspace, path string) (GitDiff, error)

type GitFile

type GitFile struct {
	Path         string `json:"path"`
	OriginalPath string `json:"original_path,omitempty"`
	Status       string `json:"status"`
}

type GitStatus

type GitStatus struct {
	Available bool      `json:"available"`
	Branch    string    `json:"branch,omitempty"`
	Files     []GitFile `json:"files"`
	Truncated bool      `json:"truncated,omitempty"`
}

func GitStatusFor

func GitStatusFor(ctx context.Context, workspace string) (GitStatus, error)

type Tree

type Tree struct {
	Root      string      `json:"root"`
	Entries   []TreeEntry `json:"entries"`
	Truncated bool        `json:"truncated,omitempty"`
}

func TreeFor

func TreeFor(workspace string) (Tree, error)

type TreeEntry

type TreeEntry struct {
	Path string `json:"path"`
	Name string `json:"name"`
	Kind string `json:"kind"`
	Size int64  `json:"size,omitempty"`
}

Jump to

Keyboard shortcuts

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