mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-30 01:52:29 +00:00
- Add comprehensive Markdown kernel section covering Obsidian compatibility - Include detailed explanation of YAML front matter and wikilink formats - Document smart slicing mechanism using Markdown AST instead of fixed tokens - Explain graph indexing with bidirectional links and multiple backends - Restructure sections with proper numbering from 4 to 7 - Move Markdown kernel section to appear before self-evolution features - Add detailed explanations of auto-memory, auto-dream, and auto-link processes - Document three-way hybrid search with RRF fusion and progressive expansion - Include engineering value explanations for keyword indexing in Chinese context
22 lines
801 B
Python
22 lines
801 B
Python
"""Stat-only parser for attachment/binary files."""
|
|
|
|
from pathlib import Path
|
|
|
|
from .base_file_parser import BaseFileParser
|
|
from ..component_registry import R
|
|
from ...schema import FileChunk, FileNode
|
|
|
|
|
|
@R.register("default")
|
|
class DefaultFileParser(BaseFileParser):
|
|
"""Stat-only parser for attachment/binary files.
|
|
|
|
No content read, no chunking, no link extraction. The resulting FileNode
|
|
has empty links and chunk_ids; front_matter carries mime and size so
|
|
retrieval can filter by file type without reopening the file.
|
|
"""
|
|
|
|
async def parse(self, path: str | Path) -> tuple[FileNode, list[FileChunk]]:
|
|
file_path = Path(path)
|
|
stat = file_path.stat()
|
|
return FileNode(path=self.to_vault_relative(path), st_mtime=stat.st_mtime, links=[], chunk_ids=[]), []
|