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

Function codex_workspace_status

src/hooks/codex.rs:415–424  ·  view source on GitHub ↗
(root: Option<&Path>, cwd: Option<&Path>)

Source from the content-addressed store, hash-verified

413}
414
415fn codex_workspace_status(root: Option<&Path>, cwd: Option<&Path>) -> HookWorkspaceStatus {
416 if root.is_some() {
417 return HookWorkspaceStatus::Initialized;
418 }
419 if cwd.is_some_and(is_project_like_workspace) {
420 HookWorkspaceStatus::UnindexedProject
421 } else {
422 HookWorkspaceStatus::Generic
423 }
424}
425
426pub fn codex_workspace_status_from_event(event_json: &str) -> HookWorkspaceStatus {
427 let parsed = serde_json::from_str::<Value>(event_json).unwrap_or(Value::Null);

Calls

no outgoing calls

Tested by

no test coverage detected