MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / suggestion

Method suggestion

atomic-agent/src/error.rs:337–359  ·  view source on GitHub ↗

Returns a user-facing suggestion for how to fix the error, if applicable.

(&self)

Source from the content-addressed store, hash-verified

335
336 /// Returns a user-facing suggestion for how to fix the error, if applicable.
337 pub fn suggestion(&self) -> Option<&'static str> {
338 match self {
339 AgentError::WatchmanNotRunning => {
340 Some("Install Watchman or the fallback file watcher will be used automatically.")
341 }
342 AgentError::AlreadyInstalled { .. } => {
343 Some("Use `atomic agent enable --force` to reinstall hooks.")
344 }
345 AgentError::NotARepository { .. } => {
346 Some("Run `atomic init` to initialize a repository first.")
347 }
348 AgentError::SessionIdInvalid { .. } => {
349 Some("Session IDs must be alphanumeric with hyphens and underscores only.")
350 }
351 AgentError::TurnAlreadyActive { .. } => Some(
352 "This may indicate the previous turn was interrupted. Continuing with recovery.",
353 ),
354 AgentError::AgentNotFound { .. } => {
355 Some("Use `atomic agent enable --help` to see available agents.")
356 }
357 _ => None,
358 }
359 }
360
361 /// Returns a suggested exit code for CLI usage.
362 pub fn exit_code(&self) -> i32 {

Calls

no outgoing calls