Fix bd-47f1: bd import now flushes JSONL immediately for daemon visibility
- Changed bd import to call flushToJSONL() instead of markDirtyAndScheduleFlush() - Ensures daemon FileWatcher detects changes within ~500ms instead of up to 30s - Fixes race condition where MCP daemon served stale data after CLI import
This commit is contained in:
@@ -176,8 +176,9 @@ Behavior:
|
||||
fmt.Fprintf(os.Stderr, "\nAll text and dependency references have been updated.\n")
|
||||
}
|
||||
|
||||
// Schedule auto-flush after import completes
|
||||
markDirtyAndScheduleFlush()
|
||||
// Flush immediately after import (no debounce) to ensure daemon sees changes
|
||||
// Without this, daemon FileWatcher won't detect the import for up to 30s
|
||||
flushToJSONL()
|
||||
|
||||
// Print summary
|
||||
fmt.Fprintf(os.Stderr, "Import complete: %d created, %d updated", result.Created, result.Updated)
|
||||
|
||||
Reference in New Issue
Block a user