refactor(packages): extract agents-md-core package
This commit is contained in:
@@ -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}`;
|
||||
}
|
||||
Reference in New Issue
Block a user