refactor(packages): extract agents-md-core package

This commit is contained in:
YeonGyu-Kim
2026-05-21 02:45:20 +09:00
parent 2748009ff2
commit 7c7aa28160
18 changed files with 276 additions and 101 deletions
+15
View File
@@ -0,0 +1,15 @@
import {
TRUNCATION_NOTICE_PREFIX,
TRUNCATION_NOTICE_SUFFIX,
} from "./constants";
export function formatAgentsMdContextBlock(input: {
readonly agentsPath: string;
readonly content: string;
readonly truncated: boolean;
}): string {
const truncationNotice = input.truncated
? `${TRUNCATION_NOTICE_PREFIX}${input.agentsPath}${TRUNCATION_NOTICE_SUFFIX}`
: "";
return `\n\n[Directory Context: ${input.agentsPath}]\n${input.content}${truncationNotice}`;
}