(id: string)
| 11 | * Replaces any invalid character with underscore. |
| 12 | */ |
| 13 | export function sanitizeToolUseId(id: string): string { |
| 14 | return id.replace(/[^a-zA-Z0-9_-]/g, "_") |
| 15 | } |
| 16 | |
| 17 | /** |
| 18 | * Truncate a call_id to fit within OpenAI's 64-character limit. |