Skip to content

Improve Commands dialog#1877

Open
dgageot wants to merge 2 commits intodocker:mainfrom
dgageot:commands-dialog
Open

Improve Commands dialog#1877
dgageot wants to merge 2 commits intodocker:mainfrom
dgageot:commands-dialog

Conversation

@dgageot
Copy link
Member

@dgageot dgageot commented Feb 27, 2026

  • Better grouping
  • Sort by name

The speak command (macOS-only) was appended after the Settings commands, causing the category sequence Session → Settings → Session. This made buildLines render a second Session header.

Extract Settings into its own builtInSettingsCommands function and reorder categories in BuildCommandCategories so that Settings appears before Feedback, which is always last.

Assisted-By: cagent
Reorder all built-in command groups (Session, Settings, Feedback) so items
appear alphabetically by label. Dynamic groups (Agent Commands, MCP Prompts,
Skills) are now sorted at runtime via a sortByLabel helper.

Assisted-By: cagent
@dgageot dgageot requested a review from a team as a code owner February 27, 2026 20:09
Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Looks good! The code refactoring improves organization by splitting session and settings commands into separate functions and adds proper alphabetical sorting. No functional issues found in the changed code.

✅ The new sortByLabel function correctly sorts commands alphabetically.
✅ The builtInSettingsCommands and builtInFeedbackCommands separation improves code organization.
✅ The ParseSlashCommand function properly iterates through both session and settings commands.
✅ Category ordering (Session, Agent Commands, MCP Prompts, Skills, Settings, Feedback) is logical and well-structured.

The refactoring maintains backward compatibility while improving maintainability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants