Skip to content

Commit 66b57e6

Browse files
author
phernandez
committed
chore: re-add sync status console on watch
1 parent 6da1438 commit 66b57e6

File tree

1 file changed

+6
-3
lines changed
  • src/basic_memory/cli/commands

1 file changed

+6
-3
lines changed

src/basic_memory/cli/commands/sync.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def display_detailed_sync_results(knowledge: SyncReport):
151151
console.print(knowledge_tree)
152152

153153

154-
async def run_sync(verbose: bool = False, watch: bool = False):
154+
async def run_sync(verbose: bool = False, watch: bool = False, console_status: bool = False):
155155
"""Run sync operation."""
156156

157157
sync_service = await get_sync_service()
@@ -164,7 +164,7 @@ async def run_sync(verbose: bool = False, watch: bool = False):
164164
config=config,
165165
)
166166
await watch_service.handle_changes(config.home)
167-
await watch_service.run() # pragma: no cover
167+
await watch_service.run(console_status=console_status) # pragma: no cover
168168
else:
169169
# one time sync
170170
knowledge_changes = await sync_service.sync(config.home)
@@ -189,11 +189,14 @@ def sync(
189189
"-w",
190190
help="Start watching for changes after sync.",
191191
),
192+
console_status: bool = typer.Option(
193+
False, "--console-status", "-c", help="Show live console status"
194+
),
192195
) -> None:
193196
"""Sync knowledge files with the database."""
194197
try:
195198
# Run sync
196-
asyncio.run(run_sync(verbose=verbose, watch=watch))
199+
asyncio.run(run_sync(verbose=verbose, watch=watch, console_status=console_status))
197200

198201
except Exception as e: # pragma: no cover
199202
if not isinstance(e, typer.Exit):

0 commit comments

Comments
 (0)