diff --git a/client/src/components/Chat/Input/MCPSelect.tsx b/client/src/components/Chat/Input/MCPSelect.tsx index bd76ebbc42..9482581802 100644 --- a/client/src/components/Chat/Input/MCPSelect.tsx +++ b/client/src/components/Chat/Input/MCPSelect.tsx @@ -8,6 +8,7 @@ function MCPSelectContent() { const { conversationId, mcpServerManager } = useBadgeRowContext(); const { localize, + isPinned, mcpValues, isInitializing, placeholderText, @@ -68,6 +69,10 @@ function MCPSelectContent() { [getServerStatusIconProps, isInitializing], ); + if (!isPinned && mcpValues?.length === 0) { + return null; + } + const configDialogProps = getConfigDialogProps(); return ( diff --git a/client/src/utils/timestamps.ts b/client/src/utils/timestamps.ts index 1fdb6923da..db114263f8 100644 --- a/client/src/utils/timestamps.ts +++ b/client/src/utils/timestamps.ts @@ -84,7 +84,9 @@ export function cleanupTimestampedStorage(): void { } // Check if this key should be timestamped - const isTimestampedKey = TIMESTAMPED_KEYS.some((prefix) => key.startsWith(prefix)); + const isTimestampedKey = TIMESTAMPED_KEYS.some( + (prefix) => key.startsWith(prefix) && !key.includes('pinned'), + ); if (isTimestampedKey && !key.endsWith(TIMESTAMP_SUFFIX)) { const timestampKey = `${key}${TIMESTAMP_SUFFIX}`;