mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-04 09:13:08 +00:00
feat: enhance summary extraction to support <summary> tags
- Updated the extractSummary function to capture content between <summary> and </summary> tags for improved log parsing. - Retained fallback logic to extract summaries from traditional ## Summary sections, ensuring backward compatibility.
This commit is contained in:
@@ -130,9 +130,16 @@ function getCurrentPhase(content: string): "planning" | "action" | "verification
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Extracts a summary from completed feature context
|
* Extracts a summary from completed feature context
|
||||||
|
* Looks for content between <summary> and </summary> tags
|
||||||
*/
|
*/
|
||||||
function extractSummary(content: string): string | undefined {
|
function extractSummary(content: string): string | undefined {
|
||||||
// Look for summary sections - capture everything including subsections (###)
|
// Look for <summary> tags - capture everything between opening and closing tags
|
||||||
|
const summaryTagMatch = content.match(/<summary>([\s\S]*?)<\/summary>/i);
|
||||||
|
if (summaryTagMatch) {
|
||||||
|
return summaryTagMatch[1].trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fallback: Look for summary sections - capture everything including subsections (###)
|
||||||
// Stop at same-level ## sections (but not ###), or tool markers, or end
|
// Stop at same-level ## sections (but not ###), or tool markers, or end
|
||||||
const summaryMatch = content.match(/## Summary[^\n]*\n([\s\S]*?)(?=\n## [^#]|\n🔧|$)/i);
|
const summaryMatch = content.match(/## Summary[^\n]*\n([\s\S]*?)(?=\n## [^#]|\n🔧|$)/i);
|
||||||
if (summaryMatch) {
|
if (summaryMatch) {
|
||||||
|
|||||||
Reference in New Issue
Block a user