agent_ui: Fix project rule pluralization in context usage popover (#61184)

The agent panel's context usage popover showed "1 project rules" when
exactly one project rule (e.g. `.rules`) was loaded, because the
project-rules button used an unconditional `format!("{} project rules",
...)`.

Reuse the existing `pluralize` helper (already used for diagnostics
labels in the same crate) so a single rule renders as "1 project rule"
and multiple rules render as "N project rules". The sibling "1 global
rule" label is intentionally left unchanged, since there is only ever
one global rule.

Closes #57759

Release Notes:

- Fixed the agent panel context usage popover showing "1 project rules"
instead of "1 project rule" when a single project rule is loaded.
df9321ec81Ibrahim Khan committed on 7/17/2026, 11:36:37 AM· committed by GitHubparentfd013f7
2 files changedLine totals unavailable