Issue #1055: Add minimal frontmatter parser for memory files#1119
Issue #1055: Add minimal frontmatter parser for memory files#1119Meh10t wants to merge 12 commits intooraios:mainfrom
Conversation
|
This is a draft, right? |
Yes, this is a draft. This PR only introduces the minimal frontmatter parser as the first step for issue #1055. |
|
Pls keep in mind our specification. In particular, any kind of frontmatter is allowed. So
Is not correct |
Thanks for the clarification! I updated the parser so it now accepts any frontmatter key/value pairs instead of restricting it to "summary". Let me know if this aligns better with the specification. |
| from typing import Tuple, Dict | ||
|
|
||
|
|
||
| def parse_frontmatter(content: str) -> Tuple[Dict[str, str], str]: |
There was a problem hiding this comment.
Serena is an object-oriented codebase. Please consistently use OOP principles.
There was a problem hiding this comment.
Serena is an object-oriented codebase. Please consistently use OOP principles.
Thanks for the feedback! I refactored the frontmatter parsing into an OOP-style FrontmatterParser while keeping parse_frontmatter as a backward-compatible wrapper.
634715b to
1c3ac4f
Compare
fee8b1c to
d165272
Compare
|
Hi, I saw that the issue was closed recently, so I just wanted to check. Is this PR still relevant, or has the work already been covered elsewhere? Let me know if I should continue (I can also fix the remaining Windows test), or if I need to adapt something. Thanks! |
|
Ah, I misread and thought we had a separate issue on that. Still relevant, let's keep the PR open, no need to track with an issue. We had higher priority topics in the last weeks but we'll be able to get back to this soon |
Hi, thanks for the update! I'll continue working on the PR and fix the remaining Windows issue. Let me know if you’d prefer me to adjust anything to match the current direction. |
This PR starts work on issue #1055.
It introduces a minimal frontmatter parser for memory files, supporting arbitrary YAML-like fields.
Currently supported:
Example supported format:
summary: Some short description
This is the memory content...
This is the first step towards supporting opt-in frontmatter tools (MemoryAddFrontmatterTool and MemoryGetFrontmatterTool).
Next steps: