MCPcopy Index your code
hub / github.com/CopilotKit/CopilotKit / resolveLicense

Function resolveLicense

packages/angular/src/lib/config.ts:74–96  ·  view source on GitHub ↗
(config: CopilotKitConfig)

Source from the content-addressed store, hash-verified

72}
73
74function resolveLicense(config: CopilotKitConfig): ResolvedLicense {
75 const headerKey = config.headers?.[COPILOT_CLOUD_PUBLIC_API_KEY_HEADER];
76 const key = config.licenseKey ?? headerKey;
77
78 if (!key) {
79 return {
80 valid: false,
81 warning:
82 "No CopilotCloud license key was found. A watermark will be shown until one is added.",
83 };
84 }
85
86 if (!COPILOT_CLOUD_PUBLIC_API_KEY_REGEX.test(key)) {
87 return {
88 key,
89 valid: false,
90 warning:
91 "Your CopilotCloud license key appears invalid. A watermark will be shown until a valid key is added.",
92 };
93 }
94
95 return { key, valid: true };
96}
97
98export const COPILOT_KIT_CONFIG = new InjectionToken<CopilotKitConfig>(
99 "COPILOT_KIT_CONFIG",

Callers 1

provideCopilotKitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…