Skip to content

Code mode: three self-hosted usability bugs (i18n hint, Test button, codeMode write path) #1444

Closed

Description

@helpcodeai

Found while enabling code mode on a self-hosted instance. All three affect self-hosted usability; none is a schema change.

1. Tool editor shows the raw key toolEditor.codeUsesHint.
The message in packages/frontend/messages/{en,de,it}.json contained a literal JSON example with { } braces (and <id> angle brackets). next-intl/ICU reads { as a placeholder and <id> as a tag, so formatting throws and falls back to the key. Fix: reword the hint without braces/angle-brackets.

2. The dashboard "Test" button on a saved code tool does not run the program.
POST /api/connectors/:id/tools/:toolId/test called connectorsService.executeConnectorCall, the plain static/REST engine, which has no method: 'code' branch — so a code tool tried to HTTP-call the connector's base URL and failed, never reaching the runner. Fix: route method === 'code' to the out-of-process code path with the same governance a real call uses.

3. The per-server codeMode setting cannot be set through the API, only in the DB.
codeMode was absent from CreateMcpServerDto/UpdateMcpServerDto and had no frontend control, so a self-hosted admin could not turn code mode on without raw SQL. Fix: add codeMode to the update DTO (@IsIn(['off','tools','inline'])), persist it, and add a select on the MCP server settings page.

Behaviour unchanged on Cloud and self-hosted until an operator runs the code-runner and a workspace turns codeMode on; off by default everywhere.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions