Skip to main content

handle_code_watch

Function handle_code_watch 

Source
pub fn handle_code_watch(args: Option<&Value>) -> Result<Value>
Expand description

Start watching a project directory for file changes and re-index on modification. Spawns a background thread that monitors the directory tree with a debounced file-watcher. The initial index runs synchronously before returning.

The background thread holds the project’s Arc<GraphHandle> (resolved from crate::code_registry) for its lifetime, pinning the canonical instance so re-index calls share one entity cache.