(explicit_project: Option<String>, tool_name: &str)
| 172 | } |
| 173 | |
| 174 | fn project_scoped(explicit_project: Option<String>, tool_name: &str) -> Self { |
| 175 | // Same resolution as `tracedecay sync`/`status`/`serve`: an explicit |
| 176 | // --project wins; otherwise walk up from cwd to the nearest initialised |
| 177 | // project so the command works from subdirectories. |
| 178 | let explicitly_targeted = explicit_project.is_some(); |
| 179 | let project_path = tracedecay::config::resolve_path_with_discovery(explicit_project); |
| 180 | let allow_init = explicitly_targeted && FIRST_TOUCH_STORE_TOOLS.contains(&tool_name); |
| 181 | |
| 182 | Self { |
| 183 | project_path: Some(project_path), |
| 184 | allow_init, |
| 185 | allow_profile_scoped_fallback: false, |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | fn handshake(&self) -> Result<DaemonHandshake> { |
| 190 | DaemonHandshake::for_current_client(self.project_path.clone(), None, false, self.allow_init) |
nothing calls this directly
no test coverage detected