Build a short preview of tool input for debug logging.
(input: Record<string, unknown>)
| 297 | |
| 298 | /** Build a short preview of tool input for debug logging. */ |
| 299 | function inputPreview(input: Record<string, unknown>): string { |
| 300 | const parts: string[] = [] |
| 301 | for (const [key, val] of Object.entries(input)) { |
| 302 | if (typeof val === 'string') { |
| 303 | parts.push(`${key}="${val.slice(0, 100)}"`) |
| 304 | } |
| 305 | if (parts.length >= 3) break |
| 306 | } |
| 307 | return parts.join(' ') |
| 308 | } |
| 309 | |
| 310 | export function createSessionSpawner(deps: SessionSpawnerDeps): SessionSpawner { |
| 311 | return { |
no test coverage detected