diff --git a/src/memory/common/db/models/source_items.py b/src/memory/common/db/models/source_items.py index e3ff57a..5ac4bc5 100644 --- a/src/memory/common/db/models/source_items.py +++ b/src/memory/common/db/models/source_items.py @@ -894,6 +894,13 @@ class GithubItem(SourceItem): merged_at=cast(datetime | None, self.merged_at), ) + def _chunk_contents(self) -> Sequence[extract.DataChunk]: + """Override to use 'github' modality instead of default 'text'.""" + content = cast(str | None, self.content) + if content: + return extract.extract_text(content, modality="github") + return [] + class NotePayload(SourceItemPayload): note_type: Annotated[str | None, "Category of the note"] diff --git a/src/memory/workers/tasks/github.py b/src/memory/workers/tasks/github.py index c61785f..2c69064 100644 --- a/src/memory/workers/tasks/github.py +++ b/src/memory/workers/tasks/github.py @@ -58,7 +58,7 @@ def _create_github_item( repo_tags = cast(list[str], repo.tags) or [] return GithubItem( - modality="text", + modality="github", sha256=create_content_hash(content), content=content, kind=issue_data["kind"],