mirror of
https://github.com/earendil-works/pi.git
synced 2026-06-18 15:54:04 +08:00
Use XML tags for file operations in branch summary
<read-files> and <modified-files> with one path per line
This commit is contained in:
@@ -251,17 +251,17 @@ function formatFileOperations(fileOps: FileOperations): string {
|
||||
const sections: string[] = [];
|
||||
|
||||
if (readOnly.length > 0) {
|
||||
sections.push(`**Read:** ${readOnly.join(", ")}`);
|
||||
sections.push(`<read-files>\n${readOnly.join("\n")}\n</read-files>`);
|
||||
}
|
||||
|
||||
if (modified.size > 0) {
|
||||
const files = [...modified].sort();
|
||||
sections.push(`**Modified:** ${files.join(", ")}`);
|
||||
sections.push(`<modified-files>\n${files.join("\n")}\n</modified-files>`);
|
||||
}
|
||||
|
||||
if (sections.length === 0) return "";
|
||||
|
||||
return `\n\n---\n**Files:**\n${sections.join("\n")}`;
|
||||
return `\n\n${sections.join("\n\n")}`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user