mirror of
https://github.com/stablyai/orca.git
synced 2026-11-05 19:47:27 +00:00
The phone's worktree list now shows the running subagents the desktop sidebar shows, under their parent agent with their own ages, read from the host's existing child records. Tapping one opens its parent's existing chat or terminal. The feature was reviewed in #26423 and merged into this branch. Links from the phone to native chats whose saved tab ID differs from the session-derived one (restored, reserved and headless chats) now resolve to the chat's real tab instead of missing it.
21 lines
935 B
TypeScript
21 lines
935 B
TypeScript
import { decodeAgentChildWorkViews } from '../../../src/shared/agent-status-child-work-view-wire'
|
|
import { decodeAgentSubagentsField } from '../../../src/shared/agent-status-subagent-snapshot'
|
|
import { buildRunningAgentChildRowModels } from '../../../src/shared/running-agent-child-rows'
|
|
import type { RuntimeWorktreeAgentRow } from '../../../src/shared/runtime-types'
|
|
|
|
/** Read the optional catalog fields permissively, including hosts with no child roster. */
|
|
export function worktreeAgentChildRows(agent: RuntimeWorktreeAgentRow, live: boolean) {
|
|
return buildRunningAgentChildRowModels(
|
|
{
|
|
children: decodeAgentChildWorkViews(agent.children),
|
|
subagents: decodeAgentSubagentsField(agent.subagents)
|
|
},
|
|
{
|
|
parentEvidenceFresh: agent.subagentObservation === 'live',
|
|
transportObservation: live ? 'live' : 'unverifiable',
|
|
parentObservedAt: agent.updatedAt,
|
|
hostClockOffsetMs: 0
|
|
}
|
|
)
|
|
}
|