feat: add google maps mcp source (#125)

This commit is contained in:
2026-06-13 01:59:54 +01:00
committed by GitHub
parent ef7301ab18
commit 38b21a1aa4
14 changed files with 492 additions and 1 deletions

View File

@@ -66,11 +66,17 @@ export function SourceConfigPanel({ source, onUpdate }: SourceConfigPanelProps)
return creds
}
function hasUserConfigFields(): boolean {
return Object.values(source.fields).some((field) => !isCredentialField(field))
}
function buildReplaceBody(enabledValue: boolean): Parameters<typeof replaceSource>[1] {
const body: Parameters<typeof replaceSource>[1] = { enabled: enabledValue }
if (Object.keys(source.fields).length > 0) {
if (hasUserConfigFields()) {
body.config = getUserConfig()
}
return body
}