(config: ServerConfig, fields: ToolLogFields)
| 273 | } |
| 274 | |
| 275 | function logToolCall(config: ServerConfig, fields: ToolLogFields): void { |
| 276 | if (!config.logging.toolCalls) return; |
| 277 | |
| 278 | const { command, ...safeFields } = fields; |
| 279 | logEvent(config.logging, fields.success ? "info" : "warn", "tool_call", { |
| 280 | ...safeFields, |
| 281 | commandPreview: config.logging.shellCommands && command ? commandPreview(command) : undefined, |
| 282 | }); |
| 283 | } |
| 284 | |
| 285 | function contentText(content: ToolContent[]): string { |
| 286 | return content |
no test coverage detected