( toolName: string, input: unknown, )
| 213 | * @returns The skill name if this is a Skill tool call, undefined otherwise |
| 214 | */ |
| 215 | export function extractSkillName( |
| 216 | toolName: string, |
| 217 | input: unknown, |
| 218 | ): AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS | undefined { |
| 219 | if (toolName !== 'Skill') { |
| 220 | return undefined |
| 221 | } |
| 222 | |
| 223 | if ( |
| 224 | typeof input === 'object' && |
| 225 | input !== null && |
| 226 | 'skill' in input && |
| 227 | typeof (input as { skill: unknown }).skill === 'string' |
| 228 | ) { |
| 229 | return (input as { skill: string }) |
| 230 | .skill as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS |
| 231 | } |
| 232 | |
| 233 | return undefined |
| 234 | } |
| 235 | |
| 236 | const TOOL_INPUT_STRING_TRUNCATE_AT = 512 |
| 237 | const TOOL_INPUT_STRING_TRUNCATE_TO = 128 |
no outgoing calls
no test coverage detected