mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-10-01 02:04:21 +00:00
* feat: rename working_dir to vault_dir and update documentation - Rename working_dir to vault_dir across the application - Update documentation to reflect vault_dir instead of working_dir - Change FileFrontMatter title field to name field - Update .gitignore to include vault directory - Modify file path descriptions to reference vault instead of working_dir - Update related configuration and property names accordingly * refactor(steps): rename working_path to vault_path in CRUD operations - Rename parameter from `working_path` to `vault_path` in `resolve_path` function - Update all usages in append, edit, read, and write steps to use `self.vault_path` - Update documentation comments to reflect the new parameter name - Update docstring in read.py to mention `vault_dir` instead of `vault` test(chunked_file_parser): update frontmatter field from title to name - Change frontmatter field from `title` to `name` in test cases - Update comment in background steps test to reference `vault_path` instead of `working_path` * refactor(schema): remove unused ResourceEntry import * feat(file_graph): add link scope filtering to get_inlinks/get_outlinks * feat(file-store): add scope parameter to link methods
23 lines
707 B
Python
23 lines
707 B
Python
"""FileFrontMatter — parsed Markdown front matter."""
|
|
|
|
from typing import Any
|
|
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
|
|
class FileFrontMatter(BaseModel):
|
|
"""Markdown front matter; unknown keys are preserved as extras."""
|
|
|
|
model_config = ConfigDict(extra="allow")
|
|
|
|
name: str = Field(default="", description="Document name")
|
|
description: str = Field(default="", description="Document description")
|
|
|
|
@property
|
|
def model_extra(self) -> dict[str, Any] | None:
|
|
"""Get extra fields set during validation.
|
|
|
|
Returns:
|
|
A dictionary of extra fields, or `None` if `config.extra` is not set to `"allow"`.
|
|
"""
|
|
return self.__pydantic_extra__
|