MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / project_scoped

Method project_scoped

src/tool_command.rs:174–187  ·  view source on GitHub ↗
(explicit_project: Option<String>, tool_name: &str)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 2

containsMethod · 0.45

Tested by

no test coverage detected