Merge #550: keep Respawn and Ralph visible in Session Options for Claude sessions

This commit is contained in:
Codeman maintainer
2026-10-09 04:46:45 +02:00
6 changed files with 64 additions and 5 deletions
+6
View File
@@ -3226,12 +3226,18 @@ Object.assign(CodemanApp.prototype, {
/** Keep the launch surfaces in sync with Settings mutations without a reload. */
_syncCliLaunchCatalog() {
if (!Array.isArray(this._cliList) || this._cliList.length === 0) return;
// /api/clis rows carry no capabilities, so keep the served catalog's `external`
// (isExternalCliSession() reads it). A new custom CLI has none and falls back to `kind`.
const previous = new Map(
(Array.isArray(window.__codemanCliCatalog) ? window.__codemanCliCatalog : []).map((cli) => [cli.id, cli])
);
window.__codemanCliCatalog = this._cliList.map((cli) => ({
id: cli.id,
label: cli.label,
shortBadge: cli.shortBadge,
order: cli.order,
kind: cli.kind,
external: previous.get(cli.id)?.external,
enabled: cli.enabled,
available: cli.kind === 'shell' || (cli.enabled && cli.installed),
}));