MCPcopy Index your code
hub / github.com/garrytan/gstack / describeApiKeySource

Function describeApiKeySource

design/src/auth.ts:102–106  ·  view source on GitHub ↗
(resolution: ApiKeyResolution)

Source from the content-addressed store, hash-verified

100}
101
102export function describeApiKeySource(resolution: ApiKeyResolution): string {
103 if (resolution.source === "config") return "~/.gstack/openai.json";
104 if (resolution.envFile) return `OPENAI_API_KEY environment variable (matches ${resolution.envFile} in current directory)`;
105 return "OPENAI_API_KEY environment variable";
106}
107
108/**
109 * Save an API key to ~/.gstack/openai.json with 0600 permissions.

Callers 2

auth.test.tsFile · 0.90
requireApiKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected