(record *AgentSpawnRecord)
| 150 | } |
| 151 | |
| 152 | func agentSpawnBundle(record *AgentSpawnRecord) outputBundle { |
| 153 | if record == nil { |
| 154 | record = &AgentSpawnRecord{} |
| 155 | } |
| 156 | return outputBundle{ |
| 157 | jsonValue: record, |
| 158 | human: func() (string, error) { |
| 159 | return renderHumanBlocks( |
| 160 | renderHumanSection("Spawn", []keyValue{ |
| 161 | {Label: spawnSessionValue, Value: stringOrDash(record.Session.ID)}, |
| 162 | {Label: spawnAgentValue, Value: stringOrDash(record.Session.AgentName)}, |
| 163 | {Label: spawnProviderValue, Value: stringOrDash(record.Session.Provider)}, |
| 164 | {Label: spawnWorkspaceValue, Value: stringOrDash(record.Session.WorkspaceID)}, |
| 165 | {Label: spawnParentValue, Value: stringOrDash(record.Lineage.ParentSessionID)}, |
| 166 | {Label: spawnRootValue, Value: stringOrDash(record.Lineage.RootSessionID)}, |
| 167 | {Label: "Depth", Value: fmt.Sprintf("%d", record.Lineage.SpawnDepth)}, |
| 168 | {Label: "Role", Value: stringOrDash(record.Lineage.SpawnRole)}, |
| 169 | {Label: "TTL Expires", Value: stringOrDash(formatTimePtr(record.Lineage.TTLExpiresAt))}, |
| 170 | }), |
| 171 | ), nil |
| 172 | }, |
| 173 | toon: func() (string, error) { |
| 174 | return renderJSONPreview(record) |
| 175 | }, |
| 176 | } |
| 177 | } |
no test coverage detected