import { formatToolsForPrompt } from './tool-prompt-formatter.js';
import { formatToolsForJSONPrompt } from './tool-prompt-formatter-json.js';
/**
 * Conditionally appends tool definitions to a system prompt. When native tool
 * calling is active, the SDK injects definitions via the provider's native
 * protocol so this returns the prompt untouched. When native is off, tool
 * definitions are embedded in the prompt text in either XML or JSON format
 * depending on the active fallback.
 */
export function appendToolDefinitionsToPrompt(basePrompt, toolsDisabled, fallbackFormat, tools) {
    if (!toolsDisabled)
        return basePrompt;
    const toolPrompt = fallbackFormat === 'json'
        ? formatToolsForJSONPrompt(tools)
        : formatToolsForPrompt(tools);
    return toolPrompt ? basePrompt + toolPrompt : basePrompt;
}
//# sourceMappingURL=system-prompt-assembler.js.map