(wire: WireBackgroundTask)
| 365 | // --------------------------------------------------------------------------- |
| 366 | |
| 367 | export function toAppTask(wire: WireBackgroundTask): AppTask { |
| 368 | return { |
| 369 | id: wire.id, |
| 370 | sessionId: wire.session_id, |
| 371 | kind: wire.kind, |
| 372 | description: wire.description, |
| 373 | status: wire.status as AppTaskStatus, |
| 374 | command: wire.command, |
| 375 | createdAt: wire.created_at, |
| 376 | startedAt: wire.started_at, |
| 377 | completedAt: wire.completed_at, |
| 378 | outputPreview: wire.output_preview, |
| 379 | outputBytes: wire.output_bytes, |
| 380 | subagentPhase: wire.subagent_phase, |
| 381 | subagentType: wire.subagent_type, |
| 382 | parentToolCallId: wire.parent_tool_call_id, |
| 383 | suspendedReason: wire.suspended_reason, |
| 384 | swarmIndex: wire.swarm_index, |
| 385 | // The background task store only holds detached tasks, so any subagent it |
| 386 | // returns is a background subagent (foreground ones never persist here). |
| 387 | runInBackground: wire.kind === 'subagent' ? true : undefined, |
| 388 | // outputLines starts undefined; populated by eventReducer via task.progress events |
| 389 | }; |
| 390 | } |
| 391 | |
| 392 | // --------------------------------------------------------------------------- |
| 393 | // FsEntry mapper |
no outgoing calls
no test coverage detected