Problem/Motivation
Two small user interface problems, both visible to site builders on a stock install.
1. The default option in the Mode selector uses an em dash: "All — let the assistant decide". Vardot house style is to avoid em dashes in user facing strings, and the character reads poorly in narrow selects and in screenshots.
2. The Modes listing shows "None" in the Sub-agents column for a mode that has no sub-agents. That reads as if the mode does nothing, but a mode with an empty sub_agents list and a non-empty system_prompt_addition is still restrictive and does steer the assistant. Drupal\ai_agent_modes\ScopePayload::isRestrictive() returns TRUE when either a sub-agent or a prompt directive is present.
Three of the modes shipped for Drupal Canvas on Varbase are exactly this shape (Build a page from Figma, Connect pages to the site, Review and improve a page), so on a real site three of eight rows currently look broken.
Steps to reproduce
- Install the module and open any AI assistant with the Mode selector.
- Look at the first option: it reads "All — let the assistant decide".
- Apply the Varbase AI Figma Base recipe, or create a mode with no sub-agents but a prompt directive.
- Go to Configuration > AI > AI Agent Modes. The Sub-agents column reads "None" for that mode.
Proposed resolution
- Change the label in
SelectionControllerto "All, let the assistant decide". - In
AiAgentModeListBuilder, render "Prompt only" when a mode has no sub-agents but does carry a prompt directive, and keep "None" only when it has neither. - Remove the remaining em dashes from code comments, the README and the test files, so the codebase is consistent.
Remaining tasks
- ✅ File an issue
- ✅ Addition, change, update or fix
- ❌ Reviewed by a human
- ❌ Code review by maintainers
User interface changes
Yes. The default selector option is renamed, and the Sub-agents column shows "Prompt only" instead of "None" for prompt-only modes.
API changes
None.
Data model changes
None. No configuration schema or stored data changes.
Release notes snippet
The Mode selector no longer uses an em dash in its default option, and the Modes listing now shows "Prompt only" for modes that steer through a prompt directive rather than a sub-agent.
Issue fork ai_agent_modes-3613457
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
rajab natshah✅ Released ai_agent_modes-1.0.0-alpha2
Comment #5
rajab natshahComment #6
rajab natshah