feat(cli): add quick access commands to interactive shell help#2659
feat(cli): add quick access commands to interactive shell help#2659Devesh36 wants to merge 2 commits into
Conversation
Greptile code reviewThis repo uses Greptile for automated review. Before merge, aim for Confidence Score: 5/5 with zero unresolved review threads — see CONTRIBUTING.md. Run a review — add a PR comment with: Give it ~5-10 minutes (sometimes longer) for results, then fix feedback and re-trigger until you reach Confidence Score: 5/5. Optional: automate with the greploop skill. |
Greptile SummaryThis PR adds a "Quick Access" section to the interactive shell's help output and tab-completion, surfacing the seven most-used slash commands (
Confidence Score: 5/5Safe to merge — changes are additive UI/UX improvements to help display and tab-completion with no mutations to command execution logic. The dedup concern raised in the previous review thread has been correctly addressed: Quick Access is now exempted from the seen set, so canonical sections retain their full command lists. The bare-/ completion arithmetic is correct, the frozenset is precomputed once at import time, and all missing-command cases are handled gracefully. No execution paths, routing logic, or data persistence are touched. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["User types in shell"] --> B{Starts with /? }
B -- No --> C["Bare-alias completion\n(sorted BARE_COMMAND_ALIASES)"]
B -- Yes --> D{parts == 1 &\nno trailing space?}
D -- No --> E["Subcommand / path completion"]
D -- Yes --> F{needle == '/' exactly?}
F -- Yes --> G["Yield QUICK_ACCESS_COMMANDS\n(in order, start_position=-1)"]
G --> H["Yield remaining SLASH_COMMANDS\n(not in _QUICK_ACCESS_SET)"]
F -- No --> I["Prefix-match all SLASH_COMMANDS\n(start_position=-len needle)"]
Reviews (2): Last reviewed commit: "enhance help sections by preserving "Qui..." | Re-trigger Greptile |
|
@greptile-apps review again |
|
well done ,this is good |
This pull request adds a "Quick Access" feature to the interactive shell's help and tab-completion system, making the most important slash commands more visible and accessible to users. It introduces a prioritized list of commands that are shown first when the user types
/and updates the help output to include a dedicated "Quick Access" section.Enhancements to command discoverability and completion:
Quick Access commands and help display
QUICK_ACCESS_COMMANDSlist to define the most important slash commands for quick access, and exposed it in the module's public API. [1] [2]_quick_access_section()function and updated the help sections to include a new "Quick Access" section at the top of the help output, highlighting these commands. [1] [2]Tab-completion improvements
/, the quick access commands are shown first in the completion list, followed by the rest of the available slash commands. This uses a precomputedfrozensetfor efficiency. [1] [2] [3]_slash_completionfor consistency and maintainability. [1] [2]