import { buildToolFollowUpSystemPrompt, stripRequiredToolSystemPrompt, } from "../../prompt/runtime-prompts.js";
export function buildProviderToolFollowUpDecisionSystemPrompt(input) {
    return mergeSystemPrompts(stripRequiredToolSystemPrompt(input.context.systemPrompt, input.context.requiredToolConstraint), buildToolFollowUpSystemPrompt(input.completedToolCalls), input.pendingToolHookContextPrompt);
}
function mergeSystemPrompts(...parts) {
    const content = parts
        .map((value) => value?.trim())
        .filter((value) => Boolean(value && value.length > 0));
    if (content.length === 0) {
        return undefined;
    }
    return content.join("\n\n");
}
//# sourceMappingURL=provider-tool-follow-up-prompt.js.map