turn: simplify run_turn match arms
This commit is contained in:
parent
799804e3d1
commit
76533b0c20
1 changed files with 3 additions and 3 deletions
|
|
@ -491,9 +491,9 @@ pub async fn wait_for_login(
|
|||
/// doesn't stall mid-turn — hyperhive owns compaction.
|
||||
pub async fn run_turn(prompt: &str, files: &TurnFiles, bus: &Bus) -> TurnOutcome {
|
||||
match run_claude(prompt, files, bus).await {
|
||||
Ok((too_long, _, _)) if too_long => TurnOutcome::PromptTooLong,
|
||||
Ok((_, rate_limited, _)) if rate_limited => TurnOutcome::RateLimited,
|
||||
Ok((_, _, auth_failed)) if auth_failed => TurnOutcome::AuthFailed,
|
||||
Ok((true, _, _)) => TurnOutcome::PromptTooLong,
|
||||
Ok((_, true, _)) => TurnOutcome::RateLimited,
|
||||
Ok((_, _, true)) => TurnOutcome::AuthFailed,
|
||||
Ok(_) => TurnOutcome::Ok,
|
||||
Err(e) => TurnOutcome::Failed(e),
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue