Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

📌 fix: Exclude Pinned Keys from Cleanup and Fix MCP Pin State (#9867)

Danny Avila712f0b3ca205
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}`;