zidane-ui/ git/ headless
import { … } from 'zidane-ui/git/headless'ui/src/git/headless/index.ts
Functions#
ageIsDurationFunction#
Whether an age reads as a duration (5m, takes "ago") rather than now or a date.
clockTimeFunction#
A clock time, 14:05.
compactCountFunction#
A diff size at a glance: 1234 → 1.2k.
createSwitcherCacheFunction#
Creates an empty SwitcherCache.
environmentBaseKindFunction#
The base of an environment kind (worktree@laptop → worktree).
environmentKindIconFunction#
The icon class of an environment kind; a machine's kind (worktree@laptop) takes its base kind's.
folderNameFunction#
The last segment of a path, for a folder's short name (/srv/app/ → app).
gitErrorTextFunction#
A host error in words: the host's own message, or DEFAULT_GIT_LABELS.gitUnavailable.
leavesWorktreeFunction#
The session runs in a worktree (worktree, worktree@<machine>): any move leaves it, and the move can remove it.
machinesOfFunction#
The machines the descriptors name, once each, enabled ones only, without the hidden names.
moveChoicesFunction#
The kinds a session can move to, this host's first, then each machine's. Disabled kinds never show; an offline machine's kinds and unavailable kinds show, not pickable, with the reason.
moveListingCwdFunction#
The folder query the kinds are listed for: the session's folder when it is this host's (a machine's folder would make every kind of this host unavailable).
moveSubjectFunction#
The subject of a move, from a session row (a sidebar row, the header's session).
prMatchesFunction#
What a pull request search matches: #12 or 12 (a number prefix), or the title, branch or
author (case-insensitive).
readPullRequestsFunction#
A pull request list as the menu holds it: the list (null when the host cannot reach pull
requests) and, when GitHub rate-limited it, when it resumes.
resolveDraftDescriptorFunction#
The descriptor a draft resolves to: the pick when still usable, else the default, else Local.
undefined when nothing is loaded yet.
resolveDraftEnvironmentFunction#
The environment a session is created with for a draft; undefined = Local.
resolveRemoteCloneFunction#
What a send would clone, from the local project's origin and the listing of the server's first root.
switcherCacheOfFunction#
The SwitcherCache of a host: one per host, kept as long as the host is.
switcherCreatesFunction#
A typed name no branch here or pull request carries, offered to start: as a branch, and as a worktree when one can be started.
switcherKeyFunction#
A row's stable key (and the busy marker of its action).
switcherSectionsFunction#
The sections in order for a query, each capped unless searching or expanded; empty ones left out. A branch with an open pull request (any known) is listed once, under the pull request.
syncActionFunction#
What a click does, or null when the chip only reports.
syncSummaryFunction#
The confirmation's one sentence: what will move, and where.
syncTooltipFunction#
The chip's tooltip (and accessible name): the counts, then what a click does.
withMachinesFunction#
A machine's kinds after this host's, grouped by machine; an offline machine's stay listed, unavailable with the reason.
Constants#
DEFAULT_GIT_LABELSConstant#
The default English strings of the git components.
SWITCHER_SECTIONSConstant#
The sections in order, and how many rows each shows until searched or expanded.
Interfaces#
DraftEnvironmentInterface#
What the user picked in a draft; null where it is used = the configured default.
DraftRemoteCloneInterface#
The local project's repository, as a new session on a server would clone it.
GitBranchInterface#
A local branch: when it last moved, and how it stands against the default branch.
GitBranchPullRequestInterface#
The current branch's open (or draft) pull request.
GitCloneInterface#
Importing a repository: parse what was pasted, pick where it lands, clone it.
GitCloneProgressInterface#
A clone's progress, as git reports it.
GitCreateFolderQueryInterface#
Where GitHost.createFolder creates a folder.
GitEnvironmentQueryInterface#
What GitHost.environments lists kinds for.
GitFolderAllowsInterface#
What a remote host lets clients do in its folders.
GitFolderEntryInterface#
One folder in a GitFolderListing.
GitFolderListingInterface#
The folders in one folder of a remote host.
GitFolderQueryInterface#
Where GitHost.listFolders lists.
GitFolderSearchQueryInterface#
What GitHost.searchFolders looks for.
GitHostInterface#
The git area's host. Leave a member out and what needs it is not shown.
GitMoveTargetInterface#
Where GitHost.moveSession moves a session.
GitPullRequestInterface#
An open pull request.
GitPullRequestQueryInterface#
What GitHost.pullRequests lists.
GitRepoInfoInterface#
What the import dialog shows about a GitHub repository before cloning it (GitClone.info).
GitRepoSpecInterface#
What a pasted repository is, as GitClone.parse reads it.
GitStatusInterface#
Where a checkout stands.
MoveChoiceInterface#
One kind a session can move to.
MoveSessionSubjectInterface#
The session being moved.
SwitcherCacheInterface#
The branch menu's last lists per folder, so a reopened menu shows them while it refreshes.
SwitcherSectionInterface#
A section as shown: every row it holds, the ones shown, and how many wait behind "more".
Types#
EnvironmentMachineType#
A machine shared with the draft's host, as an environment descriptor names it.
GitActionResultType#
What a call that only succeeds or fails answered.
GitCheckoutResultType#
What a switch answered. A branch another worktree holds says where, and the chats in that checkout.
GitCheckoutTargetType#
What to switch to: a local branch, or a pull request by number.
GitCloneResultType#
What a clone answered. existed: the folder already held that repository, so it was opened, not cloned.
GitCreateFolderResultType#
What GitHost.createFolder answered.
GitFolderResultType#
What GitHost.listFolders answered.
GitFolderSearchResultType#
What GitHost.searchFolders answered. truncated: the host's bounds cut the search short.
GitHostErrorType#
Why a host call failed, for the components to word through their labels.
GitLabelsType#
The shape of the git label dictionary.
GitMoveResultType#
What GitHost.moveSession answered. oldWorktree: what happened to the worktree it was asked to remove.
GitPullRequestListType#
The pull requests of a checkout, or why there are none to show.
GitSyncActionType#
What a click on the sync chip does.
GitSyncResultType#
What a sync (pull, merging, then push) or a publish answered.
SwitcherEntryType#
A row of the branch menu.
SwitcherSectionIdType#
A section of the branch menu.