mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 01:10:14 +01:00
📌 fix: Exclude Pinned Keys from Cleanup and Fix MCP Pin State (#9867)
* fix: Prevent MCPSelect from rendering when not pinned and no values are available * fix: Exclude 'pinned' keys from timestamped storage cleanup logic * fix: Safeguard MCPSelect rendering by adding optional chaining for mcpValues
This commit is contained in:
parent
062d813b21
commit
712f0b3ca2
2 changed files with 8 additions and 1 deletions
|
|
@ -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}`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue