Skip to content

Use the chat engine list for bot and schedule engine names - #462

Open
officialasishkumar wants to merge 1 commit into
useagenthq:mainfrom
officialasishkumar:feature/one-engine-label-map
Open

officialasishkumar wants to merge 1 commit into
useagenthq:mainfrom
officialasishkumar:feature/one-engine-label-map

Conversation

@officialasishkumar

@officialasishkumar officialasishkumar commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

By opening this pull request you agree to the Contributor License Agreement. On your first pull request a bot asks you to sign it with a one-line comment.

Fixes #258

Bots kept their own copy of the engine names. Automations kept a second engineLabel that added the retired ids on top of the chat catalog. So a bot on a retired engine id showed the raw id ("claude-sdk") while its automation showed "Claude SDK", and the chat surfaces showed the raw id as well.

What changed

  • components/chat/types.ts: engineLabel is now the only engine-name lookup in the frontend. It checks, in order:

    1. the ENGINES catalog
    2. the display names for retired ids (claude-sdk "Claude SDK", daytona "Cloud", mock "Mock", acp "ACP"), which now sit next to ENGINES
    3. the id as stored

    The retired names are display only. They are not in ENGINES, so they never become a picker option. They live in a Map, so an id such as constructor cannot pick up an inherited object key.

  • Copies removed: the ENGINE_LABELS map and engineLabel in components/bots/types.ts, and the LEGACY_ENGINE_LABEL map and engineLabel in app/agent/schedules/schedules-data.ts.

  • Callers: these now import engineLabel from @/components/chat/types:

    • the bots panel
    • the bot preset, details, import and new-bot dialog
    • the automation card and history drawer

Tests

  • components/chat/engine-label.test.ts (new):
    • every catalog id gets its catalog label
    • every retired id gets its legacy label and is not in the catalog
    • an unknown id, including constructor, is shown as stored
  • automation-data.test.ts: keeps its legacy-label checks, now against the shared lookup.

Checks run locally with Bun 1.3.14:

  • cd frontend && bun run test: 2061 pass, 0 fail
  • tsc --noEmit in frontend: passes
  • biome lint on the changed files: no findings

Get evidence
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Bots kept their own copy of the engine names, and automations kept a
second engineLabel with the legacy names on top of the chat catalog. A bot
on a retired engine id showed the raw id ("claude-sdk") while its
automation showed "Claude SDK", and chat surfaces showed the raw id too.

engineLabel in components/chat/types.ts is now the only engine-name lookup:
the ENGINES catalog first, then the display names for retired ids
(claude-sdk, daytona, mock, acp), which now sit next to ENGINES, then the id
as stored. The retired names stay display only: they are not in ENGINES, so
they never become a picker option. They live in a Map, so an id such as
"constructor" can never pick up an inherited object key.

The bots page, the bots panel, the bot preset, details, import and new-bot
dialog, and the automation card and history drawer import engineLabel from
chat/types. The bots types and schedules-data copies are gone.

A new test checks every catalog id and every retired id against the one
lookup, and that no retired id is in the catalog.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use the chat engine list for bot and schedule engine names

1 participant