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

  1. Install the module and open any AI assistant with the Mode selector.
  2. Look at the first option: it reads "All — let the assistant decide".
  3. Apply the Varbase AI Figma Base recipe, or create a mode with no sub-agents but a prompt directive.
  4. Go to Configuration > AI > AI Agent Modes. The Sub-agents column reads "None" for that mode.

Proposed resolution

  • Change the label in SelectionController to "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.

Command icon 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

rajab natshah created an issue. See original summary.

  • rajab natshah committed 69c725b2 on 1.0.x
    fix: #3613457 Remove the em dash from the mode selector label and show "...
rajab natshah’s picture

Assigned: Unassigned » josebc
Status: Active » Needs review
Issue tags: +ai_agent_modes-1.0.0-alpha2
rajab natshah’s picture

Assigned: josebc » mohammed j. razem
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.