Remote config - add info banner for mcp marketplace lockdown state (#7278)

* filter mcp marketplace results based on remote config

* add info ui banner for mcp marketplace remote config state

---------

Co-authored-by: Sarah Fortune <sarah.fortune@gmail.com>
This commit is contained in:
celestial-vaultandSarah Fortune authored and GitHub committed 2025-11-04 13:57:59 -08:00
1 parent 64dcc3fc89
commit e697c12e94
2 files changed
+13 -3

No files matched your search

+2 -2
View File
@@ -1,7 +1,7 @@
// type that represents json data that is sent from extension to webview, called ExtensionMessage and has 'type' enum which can be 'plusButtonClicked' or 'settingsButtonClicked' or 'hello'
import { WorkspaceRoot } from "@shared/multi-root/types"
import { GlobalStateAndSettings } from "@shared/storage/state-keys"
import { RemoteConfigFields } from "@shared/storage/state-keys"
import type { Environment } from "../config"
import { AutoApprovalSettings } from "./AutoApprovalSettings"
import { ApiConfiguration } from "./api"
@@ -95,7 +95,7 @@ export interface ExtensionState {
lastDismissedModelBannerVersion: number
lastDismissedCliBannerVersion: number
hooksEnabled?: ClineFeatureSetting
remoteConfigSettings?: Partial<GlobalStateAndSettings> & { remoteConfiguredProviders?: string[] }
remoteConfigSettings?: Partial<RemoteConfigFields>
subagentsEnabled?: boolean
nativeToolCallSetting?: ClineFeatureSetting
}
@@ -15,7 +15,8 @@ import McpMarketplaceCard from "./McpMarketplaceCard"
import McpSubmitCard from "./McpSubmitCard"
const McpMarketplaceView = () => {
const { mcpServers, mcpMarketplaceCatalog, setMcpMarketplaceCatalog, mcpMarketplaceEnabled } = useExtensionState()
const { mcpServers, mcpMarketplaceCatalog, setMcpMarketplaceCatalog, mcpMarketplaceEnabled, remoteConfigSettings } =
useExtensionState()
const [isLoading, setIsLoading] = useState(true)
const [error, setError] = useState<string | null>(null)
const [isRefreshing, setIsRefreshing] = useState(false)
@@ -258,6 +259,15 @@ const McpMarketplaceView = () => {
}
`}
</style>
{/* Remote config banner */}
{remoteConfigSettings?.allowedMCPServers && (
<div className="flex items-center gap-2 px-5 py-3 mx-5 mb-4 bg-vscode-textBlockQuote-background border-l-[3px] border-vscode-textLink-foreground">
<i className="codicon codicon-lock text-sm" />
<span className="text-[13px]">Your organization has pre-configured the available MCP servers</span>
</div>
)}
<div style={{ display: "flex", flexDirection: "column" }}>
{filteredItems.length === 0 ? (
<div