mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
feat: SPEC-20 Simplified Project-Scoped Rclone Sync (#405)
Signed-off-by: phernandez <paul@basicmachines.co> Signed-off-by: Claude <noreply@anthropic.com> Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -16,13 +16,21 @@ from basic_memory.schemas import ProjectInfoResponse
|
||||
console = Console()
|
||||
|
||||
|
||||
async def run_sync(project: Optional[str] = None):
|
||||
"""Run sync operation via API endpoint."""
|
||||
async def run_sync(project: Optional[str] = None, force_full: bool = False):
|
||||
"""Run sync operation via API endpoint.
|
||||
|
||||
Args:
|
||||
project: Optional project name
|
||||
force_full: If True, force a full scan bypassing watermark optimization
|
||||
"""
|
||||
|
||||
try:
|
||||
async with get_client() as client:
|
||||
project_item = await get_active_project(client, project, None)
|
||||
response = await call_post(client, f"{project_item.project_url}/project/sync")
|
||||
url = f"{project_item.project_url}/project/sync"
|
||||
if force_full:
|
||||
url += "?force_full=true"
|
||||
response = await call_post(client, url)
|
||||
data = response.json()
|
||||
console.print(f"[green]✓ {data['message']}[/green]")
|
||||
except (ToolError, ValueError) as e:
|
||||
|
||||
Reference in New Issue
Block a user