Skip to content

Commit b35037e

Browse files
committed
fix broken merge
Signed-off-by: phernandez <paul@basicmachines.co>
2 parents b667bca + 78f234b commit b35037e

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

src/basic_memory/cli/commands/project.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ def set_default_project(
107107
from basic_memory import config as config_module
108108

109109
reload(config_module)
110-
111110
console.print(f"[green]Project '{name}' set as default and activated[/green]")
112111
except ValueError as e: # pragma: no cover
113112
console.print(f"[red]Error: {e}[/red]")

src/basic_memory/mcp/tools/write_note.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
# Define TagType as a Union that can accept either a string or a list of strings or None
1515
TagType = Union[List[str], str, None]
1616

17+
# Define TagType as a Union that can accept either a string or a list of strings or None
18+
TagType = Union[List[str], str, None]
19+
1720

1821
@mcp.tool(
1922
description="Create or update a markdown note. Returns a markdown formatted summary of the semantic content.",
@@ -65,7 +68,6 @@ async def write_note(
6568

6669
# Process tags using the helper function
6770
tag_list = parse_tags(tags)
68-
6971
# Create the entity request
7072
metadata = {"tags": [f"#{tag}" for tag in tag_list]} if tag_list else None
7173
entity = Entity(

src/basic_memory/services/entity_service.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@ async def update_entity(self, entity: EntityModel, schema: EntitySchema) -> Enti
153153
# Create a new post with merged metadata
154154
merged_post = frontmatter.Post(post.content, **existing_markdown.frontmatter.metadata)
155155

156+
# Merge new metadata with existing metadata
157+
existing_markdown.frontmatter.metadata.update(post.metadata)
158+
159+
# Create a new post with merged metadata
160+
merged_post = frontmatter.Post(post.content, **existing_markdown.frontmatter.metadata)
161+
156162
# write file
157163
final_content = frontmatter.dumps(merged_post, sort_keys=False)
158164
checksum = await self.file_service.write_file(file_path, final_content)

0 commit comments

Comments
 (0)