Build a short preview of tool input for debug logging.
(input: Record<string, unknown>)
| 235 | |
| 236 | /** Build a short preview of tool input for debug logging. */ |
| 237 | function inputPreview(input: Record<string, unknown>): string { |
| 238 | const parts: string[] = [] |
| 239 | for (const [key, val] of Object.entries(input)) { |
| 240 | if (typeof val === 'string') { |
| 241 | parts.push(`${key}="${val.slice(0, 100)}"`) |
| 242 | } |
| 243 | if (parts.length >= 3) break |
| 244 | } |
| 245 | return parts.join(' ') |
| 246 | } |
| 247 | |
| 248 | export function createSessionSpawner(deps: SessionSpawnerDeps): SessionSpawner { |
| 249 | return { |
no test coverage detected