feat(markdown): integrate Markdown component for enhanced text rendering

- Added a reusable Markdown component to render markdown content with styled typography for dark mode.
- Updated KanbanCard to utilize the new Markdown component for displaying feature summaries, improving readability and presentation.
- Included the `react-markdown` library as a dependency for markdown parsing.

Modified: package.json, package-lock.json, markdown.tsx, kanban-card.tsx
This commit is contained in:
Kacper
2025-12-09 23:49:19 +01:00
parent ef0519adf9
commit 6f9d90b199
5 changed files with 1228 additions and 23 deletions

View File

@@ -132,20 +132,21 @@ function getCurrentPhase(content: string): "planning" | "action" | "verification
* Extracts a summary from completed feature context
*/
function extractSummary(content: string): string | undefined {
// Look for summary sections - capture everything including subsections (###)
// Stop at same-level ## sections (but not ###), or tool markers, or end
const summaryMatch = content.match(/## Summary[^\n]*\n([\s\S]*?)(?=\n## [^#]|\n🔧|$)/i);
if (summaryMatch) {
return summaryMatch[1].trim();
}
// Look for completion markers and extract surrounding text
const completionMatch = content.match(/✓ (?:Feature|Verification|Task) (?:successfully|completed|verified)[^\n]*(?:\n[^\n]{1,200})?/i);
if (completionMatch) {
return completionMatch[0].trim();
}
// Look for summary sections
const summaryMatch = content.match(/## Summary[^\n]*\n([\s\S]{1,500}?)(?=\n##|\n🔧|$)/i);
if (summaryMatch) {
return summaryMatch[1].trim();
}
// Look for "What was done" type sections
const whatWasDoneMatch = content.match(/(?:What was done|Changes made|Implemented)[^\n]*\n([\s\S]{1,500}?)(?=\n##|\n🔧|$)/i);
const whatWasDoneMatch = content.match(/(?:What was done|Changes made|Implemented)[^\n]*\n([\s\S]*?)(?=\n## [^#]|\n🔧|$)/i);
if (whatWasDoneMatch) {
return whatWasDoneMatch[1].trim();
}