Skip to content

Give the Expert a tool to toggle plan mode #8512

Description

@andypalmi

Part of #8364. Sibling of #8510.

Plan mode is user-driven today: the toggle in the Expert chat input (ff-toggle-switch, ExpertChatInput.vue) flips planMode in product-expert.js via setPlanMode(), and context.js sends it to the agent each turn. The Expert cannot enter plan mode itself.

Add a frontend ui_ tool ui_set_plan_mode (like ui_set_onboarding_phase), audience expert, whose handler calls setPlanMode(enabled) with a required enabled boolean argument, the same action the toggle uses. The switch visibly moves and the next turn's context.js reports the new planMode. This is a general Expert improvement, and it gives onboarding its two-phase sequence: provision with plan mode off, then turn it on to build.

Older platforms without the tool: the Expert discovers tools via search and will not call what is not advertised, so it degrades gracefully and the user can still toggle by hand.

Done when

  • A frontend audience: expert ui_ tool sets plan mode by calling setPlanMode() with an enabled boolean.
  • Enabling or disabling it moves the visible toggle, and the next turn's context reflects it.
  • When the tool is not advertised (older platform), the Expert proceeds without it rather than erroring.

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions