MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / missingWebKeysGuidance

Function missingWebKeysGuidance

src/setup/key-guidance.ts:60–70  ·  view source on GitHub ↗
(env: Record<string, string | undefined>)

Source from the content-addressed store, hash-verified

58 * the keyless engine) while content-grade backends sit unused for lack of a key. PURE.
59 */
60export function missingWebKeysGuidance(env: Record<string, string | undefined>): string | null {
61 const { set, missing } = webKeyStatus(env);
62 if (set.length > 0 || missing.length === 0) return null; // at least one content-grade backend works
63 const lines = [
64 'Web search/extract is limited right now: no search API key is set, so only the keyless fallback is available.',
65 'To unlock a content-grade backend (pick ONE — all have free tiers):',
66 ...missing.map(k => ` • ${k.service}: ${k.url} → ${k.env} (${k.unlocks})`),
67 'You can paste a key here in chat and I will store it safely (~/.qodex/.env) and retry — or add it to ~/.qodex/.env yourself.',
68 ];
69 return lines.join('\n');
70}

Callers 2

executeMethod · 0.85

Calls 1

webKeyStatusFunction · 0.85

Tested by

no test coverage detected