From 156a43e29b8249c292716f5af49b1999622a9611 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 18 Jan 2026 18:40:26 +0000 Subject: [PATCH] fix: auto-select plugin slots on enable/install (#1181) (thanks @sebslight) --- CHANGELOG.md | 3 +++ src/plugins/slots.ts | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2ec22245..922f8cdb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ Docs: https://docs.clawd.bot ### Changes - Dependencies: update core + plugin deps (grammy, vitest, openai, Microsoft agents hosting, etc.). +### Fixes +- Plugins: auto-select exclusive slots when enabling/installing plugins. (#1181) — thanks @sebslight. + ## 2026.1.18-4 ### Changes diff --git a/src/plugins/slots.ts b/src/plugins/slots.ts index 7762b5ccd..05e06dc5c 100644 --- a/src/plugins/slots.ts +++ b/src/plugins/slots.ts @@ -47,7 +47,7 @@ export function applyExclusiveSlotSelection(params: { const pluginsConfig = params.config.plugins ?? {}; const prevSlot = pluginsConfig.slots?.[slotKey]; const slots = { - ...(pluginsConfig.slots ?? {}), + ...pluginsConfig.slots, [slotKey]: params.selectedId, }; @@ -58,7 +58,7 @@ export function applyExclusiveSlotSelection(params: { ); } - const entries = { ...(pluginsConfig.entries ?? {}) }; + const entries = { ...pluginsConfig.entries }; const disabledIds: string[] = []; if (params.registry) { for (const plugin of params.registry.plugins) { @@ -67,7 +67,7 @@ export function applyExclusiveSlotSelection(params: { const entry = entries[plugin.id]; if (!entry || entry.enabled !== false) { entries[plugin.id] = { - ...(entry ?? {}), + ...entry, enabled: false, }; disabledIds.push(plugin.id);