refactor(repl): remove /list command and adopt per-domain list subcommands#2713
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 removes the
Confidence Score: 5/5Safe to merge — the refactoring is mechanical and well-tested, and the new overflow fallback path is covered by a dedicated test file. All No files require special attention beyond the minor PEP 8 blank-line nit in Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["User types /tools, /integrations, /mcp, /model"] --> B["dispatch_slash"]
B --> C{"Command match"}
C -->|"/tools"| D["make_list_root_handler\n(types.py)"]
C -->|"/integrations"| E["_cmd_integrations\n(integrations.py)"]
C -->|"/mcp"| F["_cmd_mcp\n(integrations.py)"]
D --> G{"sub in aliases?"}
G -->|"list / ls / tool / tools"| H["_list_tools → render_tools_table"]
G -->|"unknown"| I["print error\nsession.mark_latest(ok=False)"]
J["User natural language"] --> K["plan_actions_with_llm_result\n(planner.py)"]
K --> L["_call_llm"]
L -->|"PlannerLLMError"| M{"is_context_length_overflow?"}
M -->|"Yes"| N["_plan_prompt_overflow_fallback"]
M -->|"No"| O["re-raise"]
N --> P["map_actions_result\n(deterministic mapper)"]
P -->|"actions found"| Q["finalize_planner_result_with_trace"]
P -->|"no actions"| R["_fallback_handoff\n(assistant_handoff)"]
Q --> S["LlmActionPlanResult\npolicy_trace: fallback_prompt_too_long"]
R --> S
L -->|"success"| T["_parse_tool_plan → finalize"]
Reviews (7): Last reviewed commit: "refactor(planner): streamline context le..." | Re-trigger Greptile |
|
@greptile-apps review again |
|
@muddlebee Thanks for the review — agreed these list aliases were unnecessary. I’ve removed /agents list, /sessions list, /tasks list, and /watches list, so these commands now use the direct form only (/agents, /sessions, /tasks, /watches). I also updated the related tests accordingly. |
|
@greptile-apps review again |
|
great work @Devesh36 can you look in to this: the "prompt too long" fallback never runs. In Dead code: Stale comments: still reference Description mismatch: the PR says |
nice catch , i'll resolve this asap |
|
@greptile-apps review again |
…fy fallback logic
|
@greptile-apps review again |
…scription in documentation and tests
|
@greptile-apps review again |
…prove error classification
|
@greptile-apps review again |
…nd maintainability
|
looks good to me |
|
⚡ LGTM → Merged. @Devesh36, your work is in. Every commit counts — thank you for this one. 👋 Join us on Discord - OpenSRE : hang out, contribute, or hunt for features and issues. Everyone's welcome. |





This pull request refactors how tool listing is handled in the interactive shell and simplifies the slash command catalog. The
/listslash command and related logic have been removed, and a new/toolsslash command has been introduced to provide direct access to listing registered tools. The help, catalog, and command registry have been updated accordingly, and several code cleanups and improvements have been made.Slash Command Refactoring and Tool Listing:
/listslash command and all its related logic, including interactive menus and helpers, fromintegrations.py. Listing tools, integrations, models, and MCP servers is now handled by their dedicated commands. [1] [2] [3]/toolsslash command intools_cmds.pyfor listing registered tools, with support for subcommands likelistandls. This command is registered in the main command registry and included in help sections. [1] [2] [3] [4]Help, Catalog, and UI Updates:
/listand add/tools, including updating usage examples and anti-examples inslash_catalog.py. The help section now groups integrations, models, and tools together. [1] [2] [3] [4] [5]Code Cleanup and Minor Improvements:
/listcommand inintegrations.py. [1] [2] [3] [4]/sessions,/tasks) to provide better help and tab-completion support. [1] [2]These changes make the command structure clearer, improve the user experience for listing tools, and reduce unnecessary complexity in the codebase.