mirror of
https://github.com/stablyai/orca.git
synced 2026-09-28 16:02:45 +00:00
* fix: route server project adds to selected runtime * fix: preserve selected runtime for nested project scans * fix: retain nested review runtime ownership * fix: preserve nested runtime owner through completion * fix: preserve captured add repo owners * refactor: isolate add repo nested review controller * test: cover selected runtime project adds * fix: preserve selected project host ownership * fix: pin SSH nested import completion * fix: fence missing SSH repo refreshes * test: cover selected runtime reconnect routing * test: register selected runtime project routing gate * fix: preserve selected host across all project adds * fix: isolate selected-host project catalogs * fix: preserve host-qualified workspace identity * test: expect local folder host identity * test: preserve host-qualified activation assertions * fix: fence folder refreshes by host identity * fix: preserve runtime owner across project refresh events * test: fence selected-runtime reconnect oracle * fix(runtime): preserve selected host during session activation * test(runtime): force same-id paired terminal activation * chore(reliability): register prior selected-runtime evidence * test(runtime): seed isolated Git identity --------- Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
47 lines
1.9 KiB
TypeScript
47 lines
1.9 KiB
TypeScript
import type { FolderWorkspace, Worktree } from './types'
|
|
import { folderWorkspaceKey } from './workspace-scope'
|
|
import { toSshExecutionHostId } from './execution-host'
|
|
|
|
export function folderWorkspaceToWorktree(folderWorkspace: FolderWorkspace): Worktree {
|
|
const linkedTask = folderWorkspace.linkedTask
|
|
return {
|
|
id: folderWorkspaceKey(folderWorkspace.id),
|
|
repoId: `folder-workspace:${folderWorkspace.projectGroupId}`,
|
|
displayName: folderWorkspace.name,
|
|
comment: folderWorkspace.comment,
|
|
linkedIssue:
|
|
linkedTask?.provider === 'github' && linkedTask.type === 'issue' ? linkedTask.number : null,
|
|
linkedPR: null,
|
|
linkedLinearIssue:
|
|
linkedTask?.provider === 'linear' ? (linkedTask.linearIdentifier ?? null) : null,
|
|
linkedGitLabMR: null,
|
|
linkedGitLabIssue:
|
|
linkedTask?.provider === 'gitlab' && linkedTask.type === 'issue' ? linkedTask.number : null,
|
|
linkedBitbucketPR: null,
|
|
linkedAzureDevOpsPR: null,
|
|
linkedGiteaPR: null,
|
|
linkedWorkItem: linkedTask,
|
|
linkedTaskSourceContext: folderWorkspace.linkedTaskSourceContext ?? null,
|
|
isArchived: folderWorkspace.isArchived,
|
|
isUnread: folderWorkspace.isUnread,
|
|
isPinned: folderWorkspace.isPinned,
|
|
sortOrder: folderWorkspace.sortOrder,
|
|
manualOrder: folderWorkspace.manualOrder,
|
|
lastActivityAt: folderWorkspace.lastActivityAt,
|
|
createdAt: folderWorkspace.createdAt,
|
|
createdWithAgent: folderWorkspace.createdWithAgent,
|
|
pendingFirstAgentMessageRename: folderWorkspace.pendingFirstAgentMessageRename,
|
|
firstAgentMessageRenameError: folderWorkspace.firstAgentMessageRenameError,
|
|
workspaceStatus: folderWorkspace.workspaceStatus,
|
|
path: folderWorkspace.folderPath,
|
|
head: '',
|
|
branch: '',
|
|
isBare: false,
|
|
isSparse: false,
|
|
isMainWorktree: false,
|
|
hostId:
|
|
folderWorkspace.executionHostId ??
|
|
(folderWorkspace.connectionId ? toSshExecutionHostId(folderWorkspace.connectionId) : 'local')
|
|
}
|
|
}
|