diff --git a/memium/source/document.py b/memium/source/document.py index fb51a80c..c80d7570 100644 --- a/memium/source/document.py +++ b/memium/source/document.py @@ -17,3 +17,6 @@ def tags(self) -> Sequence[str]: @property def title(self) -> str: return self.source_path.stem + + def __repr__(self) -> str: + return f"{self.title}: {self.content[0:10]}..." diff --git a/memium/source/prompt_source.py b/memium/source/prompt_source.py index 4cd2b0dd..7bc3ec43 100644 --- a/memium/source/prompt_source.py +++ b/memium/source/prompt_source.py @@ -45,7 +45,12 @@ def _deduplicate_group(self, group: tuple[str, Sequence[BasePrompt]]) -> BasePro if prompts_in_group[0].edit_url else prompts_in_group[0] ) - log.warning(f"Found duplicate prompts for {identifier}. Prompts: {prompts_in_group}") + log.warning( + f"""{identifier} has duplicate prompts: + Prompts: + {(' '*8).join(prompts_in_group.__repr__())} +""" + ) return prompts_in_group[0]