mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-21 00:22:45 +00:00
- Remove abstract methods from base component start/close - Update BaseJob to remove name parameter and simplify initialization - Change file modification time field from mtime_ms to modified_time in seconds - Add type checking imports and improve typing annotations - Implement LocalFileStore with JSONL persistence for file chunks - Add MdFileParser with markdown and frontmatter support - Simplify HttpClient call method with proper kwargs handling - Remove unused ReMe class methods and create backup version - Update StreamJob to use step_components instead of steps attribute
21 lines
536 B
Python
21 lines
536 B
Python
from pydantic import Field
|
|
|
|
from .base_node import BaseNode
|
|
|
|
|
|
class FileChunk(BaseNode):
|
|
"""File content chunk with positional and scoring metadata."""
|
|
|
|
path: str = Field(...)
|
|
start_line: int = Field(...)
|
|
end_line: int = Field(...)
|
|
hash: str = Field(...)
|
|
scores: dict[str, float] = Field(default_factory=dict)
|
|
|
|
@property
|
|
def score(self) -> float:
|
|
return self.scores.get("score", 0.0)
|
|
|
|
@property
|
|
def unique_key(self) -> str:
|
|
return f"{self.path}:{self.start_line}:{self.end_line}"
|