diff --git a/.gitignore b/.gitignore index d3fdee6b5..97036af72 100644 --- a/.gitignore +++ b/.gitignore @@ -71,3 +71,4 @@ USER.md # local tooling .serena/ +package-lock.json diff --git a/src/config/types.plugins.ts b/src/config/types.plugins.ts index 85737aa67..c2518e892 100644 --- a/src/config/types.plugins.ts +++ b/src/config/types.plugins.ts @@ -4,7 +4,7 @@ export type PluginEntryConfig = { }; export type PluginSlotsConfig = { - /** + /** * Select which plugin(s) own the memory slot. * - Single string: "memory-lancedb" - one plugin active * - Array: ["memory-core", "memory-lancedb"] - multiple plugins active (stackable) diff --git a/src/plugins/slots.ts b/src/plugins/slots.ts index bae1c1fe1..3ea639633 100644 --- a/src/plugins/slots.ts +++ b/src/plugins/slots.ts @@ -52,9 +52,15 @@ export function applyExclusiveSlotSelection(params: { }; const inferredPrevSlot = prevSlot ?? defaultSlotIdForKey(slotKey); + // Format slot value for display (handles both string and array) + const formatSlotValue = (v: string | string[] | null | undefined): string => { + if (v === null || v === undefined) return "none"; + if (Array.isArray(v)) return `[${v.join(", ")}]`; + return v; + }; if (inferredPrevSlot && inferredPrevSlot !== params.selectedId) { warnings.push( - `Exclusive slot "${slotKey}" switched from "${inferredPrevSlot}" to "${params.selectedId}".`, + `Exclusive slot "${slotKey}" switched from "${formatSlotValue(inferredPrevSlot)}" to "${params.selectedId}".`, ); }