Skip to main content

parse_ccs_ref

Function parse_ccs_ref 

Source
pub fn parse_ccs_ref(agent_name: &str) -> Option<&str>
Expand description

Parse a CCS agent reference and extract the alias name.

Returns Some(alias) if the agent name matches ccs/alias pattern, or Some("") if it’s just ccs (for default profile). Returns None if the name doesn’t match the CCS pattern.

§Examples

assert_eq!(parse_ccs_ref("ccs/work"), Some("work"));
assert_eq!(parse_ccs_ref("ccs"), Some(""));
assert_eq!(parse_ccs_ref("claude"), None);