feat(request-help): add BSK_REQUEST_HELP=off to disable blocking help requests (#53)

* feat(request-help): add BSK_REQUEST_HELP=off to disable blocking help requests

* style(extension): format HelpOutcome union per biome

* docs(skill): condense BSK_REQUEST_HELP section
This commit is contained in:
BB-fat
2026-07-31 23:54:30 +08:00
committed by GitHub
parent 3f091318d0
commit 71255ae142
7 changed files with 101 additions and 3 deletions
@@ -95,6 +95,9 @@ pub enum HelpOutcome {
/// The page navigated while waiting (full reload or SPA URL change).
/// Deprecated: navigation alone should not end a help request.
Navigated,
/// request-help is disabled by configuration (`BSK_REQUEST_HELP=off`):
/// the call returns immediately without ever showing the overlay.
Disabled,
}
impl HelpOutcome {
@@ -105,6 +108,7 @@ impl HelpOutcome {
Self::TimedOut => "timed_out",
Self::Completed => "completed",
Self::Navigated => "navigated",
Self::Disabled => "disabled",
}
}
}
@@ -202,6 +206,10 @@ mod tests {
serde_json::to_value(HelpOutcome::Navigated).unwrap(),
json!("navigated")
);
assert_eq!(
serde_json::to_value(HelpOutcome::Disabled).unwrap(),
json!("disabled")
);
}
#[test]