chore: rename autoFixer for better understanding

This commit is contained in:
Simon
2026-01-13 14:20:52 +08:00
parent 526cb4dbb3
commit 67f6bd619e
2 changed files with 3 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
import chalk from 'chalk' import chalk from 'chalk'
/** /**
* Normalize LLM response to fix common format issues. * Normalize LLM response and fix common format issues.
* *
* Handles: * Handles:
* - No tool_calls but JSON in message.content (fallback) * - No tool_calls but JSON in message.content (fallback)
@@ -65,7 +65,7 @@ export function normalizeResponse(response: any): any {
resolvedArguments = { action: safeJsonParse(resolvedArguments) } resolvedArguments = { action: safeJsonParse(resolvedArguments) }
} }
} else { } else {
throw new Error('No tool_call and message content does not contain valid JSON') throw new Error('No tool_call and the message content does not contain valid JSON')
} }
} else { } else {
throw new Error('No tool_call nor message content is present') throw new Error('No tool_call nor message content is present')

View File

@@ -1,4 +1,4 @@
export { normalizeResponse } from './normalize' export { normalizeResponse } from './autoFixer'
/** /**
* Wait until condition becomes true * Wait until condition becomes true