import { isSessionId } from "../timeline/agent-identity"; import type { MachineInputMember } from "../timeline/types"; import { useOpenGeniText } from "../messages/runtime"; /** * Source IDs are routing coordinates only for typed agent updates (child * lifecycle notices, agent messages, and agent directions), never parsed from * prose. */ export function ChildSessionLink({ kind, sourceId, onOpenSession, }: Pick & { onOpenSession?: ((sessionId: string) => void) | undefined; }) { const t = useOpenGeniText(); if ( !onOpenSession || !( kind.startsWith("child_") || kind === "agent_message" || kind === "agent_steer_instruction" ) || !isSessionId(sourceId) ) { return null; } return ( ); }