MCPcopy
hub / github.com/di-sukharev/opencommit / getApiKey

Function getApiKey

out/cli.cjs:86511–86528  ·  view source on GitHub ↗
(provider)

Source from the content-addressed store, hash-verified

86509 }));
86510 return await ee({
86511 message: "Select provider:",
86512 options: otherOptions
86513 });
86514 }
86515 return selection;
86516}
86517async function getApiKey(provider) {
86518 const url2 = PROVIDER_API_KEY_URLS[provider];
86519 let message = `Enter your ${provider} API key:`;
86520 if (url2) {
86521 message = `Enter your API key:
86522${source_default.dim(` Get your key at: ${url2}`)}`;
86523 }
86524 return await J4({
86525 message,
86526 placeholder: "sk-...",
86527 validate: (value) => {
86528 if (!value || value.trim().length === 0) {
86529 return "API key is required";
86530 }
86531 return void 0;

Callers 2

runSetupFunction · 0.70
promptForMissingApiKeyFunction · 0.70

Calls 1

trimMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…