(&self, cg: Arc<TraceDecay>, agent: HookAgent)
| 2085 | } |
| 2086 | |
| 2087 | async fn run_hook_incremental_sync(&self, cg: Arc<TraceDecay>, agent: HookAgent) { |
| 2088 | let marker = hook_events::sync_marker_path(&cg.store_layout().data_root, agent); |
| 2089 | let now = crate::tracedecay::current_timestamp(); |
| 2090 | if !hook_events::should_run_sync(&marker, now, 3) { |
| 2091 | return; |
| 2092 | } |
| 2093 | match cg.sync().await { |
| 2094 | Ok(_) | Err(TraceDecayError::SyncLock { .. }) => { |
| 2095 | hook_events::write_sync_marker(&marker, now); |
| 2096 | self.refresh_file_token_map().await; |
| 2097 | } |
| 2098 | Err(e) => eprintln!("[tracedecay] hook incremental sync failed: {e}"), |
| 2099 | } |
| 2100 | } |
| 2101 | |
| 2102 | /// Handles the `initialize` method, returning server capabilities. |
| 2103 | fn handle_initialize(id: Value) -> JsonRpcResponse { |
no test coverage detected