Files
codex/codex-rs
Benjamin Carlsson 949cdb56ef Rank TUI slash commands by recent usage (#65034)
## Why

The slash menu uses a fixed order within each match tier, so frequently used commands can stay buried among equally good matches.

## What changed

Rank commands within each match tier by frequency over the last 50 dispatches, keeping the existing order for ties. Count `/quit` toward `/exit` and `/btw` toward `/side`. Store slash command usage locally in `slash_command_usage.json`, separate from `$` picker history, when history persistence is enabled.

If `/exit`, `/quit`, or `/logout` ranks first, require its full name or explicit menu navigation before Enter can run it.

## Testing

Cover ranking after queued and disconnected dispatches, exact-match priority, persistence after widget handoff, and explicit selection of shutdown commands.

GitOrigin-RevId: 152f2b642dcac1ece9c3347eb4541d03fc3a425c
2026-12-01 16:52:56 +00:00
..
…
…
…
…
…