import { generateToolCallId } from '../../utils/tool-call-id.js';
/**
 * Converts AI SDK tool call format to our ToolCall format
 */
export function convertAISDKToolCall(toolCall) {
    return {
        id: toolCall.toolCallId || generateToolCallId(),
        function: {
            name: toolCall.toolName,
            arguments: toolCall.input,
        },
    };
}
/**
 * Converts multiple AI SDK tool calls to our ToolCall format
 */
export function convertAISDKToolCalls(toolCalls) {
    return toolCalls.map(convertAISDKToolCall);
}
/**
 * Gets the tool result output as a string
 */
export function getToolResultOutput(output) {
    return typeof output === 'string' ? output : JSON.stringify(output);
}
//# sourceMappingURL=tool-converter.js.map