MCPcopy Index your code
hub / github.com/simstudioai/sim / normalizeUrl

Function normalizeUrl

apps/sim/lib/copilot/server/agent-url.ts:28–31  ·  view source on GitHub ↗
(url: string | undefined)

Source from the content-addressed store, hash-verified

26const SOURCE_ENVIRONMENTS = new Set<MothershipSourceEnvironment>(['dev', 'staging', 'prod'])
27
28function normalizeUrl(url: string | undefined): string | null {
29 if (!url) return null
30 return url.startsWith('http://') || url.startsWith('https://') ? url : null
31}
32
33function getConfiguredEnvironmentUrl(environment: MothershipEnvironment): string | null {
34 if (environment === 'default') return null

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected