import { a as wrapExternalContent, i as truncateSanitizedExternalContent } from "./external-content-BfaGxaEC.js";
//#region src/agents/tool-search-control-result.ts
/** Shared by the source projector and final formatter; no terminal receipts are consumed here. */
function renderToolSearchControlText(text, networkContent) {
	if (!networkContent) return {
		text,
		truncated: false
	};
	const bounded = truncateSanitizedExternalContent(text, 2e4);
	return {
		text: wrapExternalContent(bounded.truncated ? `${truncateSanitizedExternalContent(text, 19988).text}\n[truncated]` : bounded.text, { source: "api" }),
		truncated: bounded.truncated
	};
}
//#endregion
export { renderToolSearchControlText as t };
