MCPcopy Create free account
hub / github.com/ccusage/ccusage / parse_basic_agent_command

Function parse_basic_agent_command

rust/crates/ccusage-cli/src/parser.rs:440–452  ·  view source on GitHub ↗
(
    parser: &mut ArgParser,
    mut shared: SharedArgs,
    agent: &str,
    reports: &[(&str, AgentReportKind)],
    command: fn(AgentCommandArgs) -> Command,
)

Source from the content-addressed store, hash-verified

438}
439
440fn parse_basic_agent_command(
441 parser: &mut ArgParser,
442 mut shared: SharedArgs,
443 agent: &str,
444 reports: &[(&str, AgentReportKind)],
445 command: fn(AgentCommandArgs) -> Command,
446) -> Result<Command, String> {
447 let kind = parse_agent_report_kind(parser, agent, reports)?;
448 while parser.peek().is_some() {
449 parse_shared_arg(parser, &mut shared)?;
450 }
451 Ok(command(agent_command_args(shared, kind)))
452}
453
454fn parse_codex_command(
455 parser: &mut ArgParser,

Callers 1

parse_commandFunction · 0.85

Calls 4

parse_agent_report_kindFunction · 0.85
parse_shared_argFunction · 0.85
agent_command_argsFunction · 0.85
peekMethod · 0.80

Tested by

no test coverage detected