History

fix(mcp): pass configInput to toConfigSource for iconUrl override

MCP plugin now properly passes configInput to toConfigSource, enabling iconUrl override from user-provided configuration.

Saatvik Arya committed 7 months ago

Commit d39b74d1 parent f88a1791 file · +7 −2Browse files

Unified · Split

plugins/mcp/sdk/index.ts+7−2
@@ -730,11 +730,16 @@ export const mcpSdkPlugin = ( · 729 unmodified lines
730730 }),
731731 },
732732 scopeConfig: {
733− toConfigSource: ({ source, stored }) =>
733+ toConfigSource: ({ source, stored, configInput }) =>
734734 pluginScopeConfigSourceFromConfig({
735735 source,
736736 config: stored,
737− iconUrl: source.iconUrl ?? null,
737+ iconUrl:
738+ configInput && typeof configInput === "object" && "iconUrl" in configInput
739+ ? (typeof configInput.iconUrl === "string"
740+ ? configInput.iconUrl.trim() || null
741+ : null)
742+ : null,
738743 }),
739744 recoverStored: ({ config }) =>
740745 mcpStoredSourceDataFromLocalConfig(config),