Skip to content

Add /charts to slash-command menu now that chartsMode exists #80

@vahid-ahmadi

Description

@vahid-ahmadi

Background

PR #73 (slash-command menu) shipped with a deliberate gap — the /charts command was omitted because chartsMode state didn't yet exist on main when that PR was drafted. There's a stale comment in frontend/src/app/ChatPage.tsx:66 recording that decision:

// v1 slash commands. /charts intentionally omitted — no chartsMode state on main yet.

PR #68 (Charts toggle chip) has since landed (or is about to), adding chartsMode / setChartsMode. The gap can now be closed.

Change

Two lines in frontend/src/app/ChatPage.tsx:

  1. Add a /charts entry to SLASH_COMMANDS (around line 67), mirroring the existing /plan entry:

    { name: "charts", description: "Toggle Charts mode on/off", kind: "action" },
  2. Add a handler branch in selectSlashCommand (around line 920, where /plan is handled):

    } else if (cmd.name === "charts") {
      setChartsMode((v) => !v);
      closeSlash();
    }
  3. Update the stale comment on line 66 — or just delete it.

Verification

  • Type /charts in the input → menu shows the entry → Enter → Charts chip flips on/off.
  • Existing /plan, /new, /clear, /help still work.

Constraints

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions