Documentation
¶
Overview ¶
Package workspace provides utilities for workspace management.
Index ¶
- func Base36Encode(data []byte) string
- func GenerateIssueID(prefix, title string) string
- func GenerateName(dirPath string) (string, error)
- func GeneratePrefix(dirPath string) (string, error)
- func GeneratePrefixFromName(name string) string
- func GenerateWorkspaceID(prefix, name string) string
- func SanitizeBasename(name string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base36Encode ¶
Base36Encode converts bytes to a base36 string.
func GenerateIssueID ¶
GenerateIssueID creates an issue ID from content. Format: prefix.{6-char-base36-hash} Uses period separator to distinguish from workspace prefixes which use hyphens.
func GenerateName ¶
GenerateName creates a workspace name from a directory path. Format: {sanitized-basename}-{6-char-hex-hash} The hash is derived from the full absolute path, making it deterministic.
func GeneratePrefix ¶
GeneratePrefix creates an issue prefix from a directory path. Format: {alphanumeric-basename-truncated}-{4-char-base36-hash} The hash is derived from the full absolute path, making it deterministic. Example: /home/user/projects/my-api -> "myapi-a3f2"
func GeneratePrefixFromName ¶
GeneratePrefixFromName creates an issue prefix from a workspace name (without path). Format: {alphanumeric-name-truncated}-{4-char-base36-hash} Used when creating a workspace without an associated directory path. Includes timestamp for uniqueness when same name is used multiple times.
func GenerateWorkspaceID ¶
GenerateWorkspaceID creates a workspace ID from content. Format: prefix-{6-char-base36-hash} Uses hyphen separator consistent with workspace naming conventions.
func SanitizeBasename ¶
SanitizeBasename normalizes a directory name for use in workspace names.
Types ¶
This section is empty.