mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
feat(schedules): add workspace modes and worktree management
This commit is contained in:
1 parent
c06075651d
commit
6ec3f3bd91
90 files changed
+2084
-801
No files matched your search
@@ -87,8 +87,24 @@ export function getBranchNameError(name: string): string | null {
|
||||
return null
|
||||
}
|
||||
|
||||
export function isWorktreeSibling(sibling: { worktreeStrategy?: string }): boolean {
|
||||
return sibling.worktreeStrategy !== undefined
|
||||
/**
|
||||
* Who owns a repo worktree: OpenCode, a schedule, or nobody (a plain git worktree).
|
||||
*/
|
||||
export type RepoWorktreeSource = 'opencode' | 'schedule' | 'git'
|
||||
|
||||
/**
|
||||
* The schedule a worktree belongs to. `runId` is null for the schedule's shared worktree,
|
||||
* and `inUse` is true while a running run works in it.
|
||||
*/
|
||||
export interface RepoWorktreeSchedule {
|
||||
repoId: number
|
||||
jobId: number
|
||||
runId: number | null
|
||||
inUse: boolean
|
||||
}
|
||||
|
||||
export function isWorktreeSibling(sibling: { worktreeSource?: RepoWorktreeSource }): boolean {
|
||||
return sibling.worktreeSource !== undefined
|
||||
}
|
||||
|
||||
export function getRepoBaseDirectoryName(repo: { localPath: string; branch?: string; isWorktree?: boolean }): string {
|
||||
|
||||
Reference in new issue
Block a user