feat(editor): File menu row to connect an external AI agent (Claude/Codex)

Declares the project.connectAgent command id and a File-menu row for it.
The row is optional+pro: only the velxio-prod overlay registers a handler
(it owns accounts, the MCP endpoint and the token flow), so bare OSS hides
the row instead of greying it out — same seam as the account.* commands.
This commit is contained in:
David Montero Crespo 2026-08-26 06:19:52 +02:00
parent 3989f28eb1
commit 98e58f145a
2 changed files with 14 additions and 0 deletions

View File

@ -142,6 +142,15 @@ export const EditorMenuBar: React.FC = () => {
// pills, one button fewer in the strip.
{ kind: 'command', id: 'project.share', label: t('editor.toolbar.shareLabel', 'Share / Embed') },
{ kind: 'command', id: 'project.githubSync', label: t('editor.toolbar.githubSyncLabel', 'Sync to GitHub'), pro: true },
{
kind: 'command',
id: 'project.connectAgent',
label: t('editor.toolbar.connectAgentLabel', 'Connect AI agent (Claude/Codex)'),
pro: true,
// Only the pro overlay registers a handler; hide (not grey out) the
// row in builds where connecting an external agent cannot exist.
optional: true,
},
{ kind: 'command', id: 'firmware.upload', label: t('editor.toolbar.uploadFirmwareLabel', 'Upload firmware') },
{ kind: 'command', id: 'sim.record', label: t('editor.toolbar.recordLabel', 'Record simulation'), pro: true },
];

View File

@ -37,6 +37,11 @@ export type EditorCommandId =
| 'help.whatsNew'
| 'project.share'
| 'project.githubSync'
// Connect an external AI agent (Claude Code / Codex) to the saved
// project over MCP. Registered ONLY by the pro overlay (the OSS build
// has no accounts, tokens or MCP endpoint), so the menu row hides
// itself here — same pattern as the account.* commands.
| 'project.connectAgent'
| 'firmware.upload'
| 'sim.record'
| 'sim.compile'