()
| 139 | * and custom agents are always mapped to the literal "user-defined". |
| 140 | */ |
| 141 | export function getSubagentLogName(): |
| 142 | | AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS |
| 143 | | undefined { |
| 144 | const context = getAgentContext() |
| 145 | if (!isSubagentContext(context) || !context.subagentName) { |
| 146 | return undefined |
| 147 | } |
| 148 | return ( |
| 149 | context.isBuiltIn ? context.subagentName : 'user-defined' |
| 150 | ) as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS |
| 151 | } |
| 152 | |
| 153 | /** |
| 154 | * Get the invoking request_id for the current agent context — once per |
no test coverage detected