Skip to content

Conversation

@alexec
Copy link
Contributor

@alexec alexec commented Nov 1, 2025

Track memory names from frontmatter and exclude subsequent files that share the same name. Print a message when a file is skipped.

Track memory names from frontmatter and exclude subsequent files that
share the same name. Print a message when a file is skipped.
@alexec alexec requested a review from Copilot November 1, 2025 22:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements memory deduplication based on frontmatter name attributes to prevent duplicate memories from being included in the generated context. When multiple memory files have the same name in their frontmatter, only the first one encountered is included.

  • Adds name-based deduplication logic to track and exclude memories with duplicate names
  • Includes a test to verify that only one memory file is included when multiple files share the same name
  • Documents the new deduplication feature with examples and naming conventions

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
main.go Implements deduplication by tracking memory names in a map and excluding subsequent files with the same name
memory_name_test.go Adds test coverage for the memory name deduplication feature
README.md Documents the new deduplication feature with examples and naming conventions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

alexec and others added 2 commits November 1, 2025 15:49
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@alexec
Copy link
Contributor Author

alexec commented Nov 1, 2025

@copilot we don't need to de-dupe based on "name:". Instead use the basename of the memory file.

Copy link
Contributor

Copilot AI commented Nov 1, 2025

@alexec I've opened a new pull request, #45, to work on those changes. Once the pull request is ready, I'll request review from you.

#45)

* Initial plan

* Change deduplication from frontmatter name to basename

Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
@alexec alexec marked this pull request as ready for review November 1, 2025 23:06
@alexec alexec merged commit 68264b8 into main Nov 1, 2025
1 check passed
@alexec alexec deleted the names branch November 1, 2025 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants