(clean?: boolean)
| 17 | } |
| 18 | |
| 19 | export async function getApiKey(clean?: boolean): Promise<string> { |
| 20 | let apiKey = getConfig<string | undefined>("apiKey"); |
| 21 | |
| 22 | if (clean) { |
| 23 | apiKey = undefined; |
| 24 | } |
| 25 | |
| 26 | if (!apiKey) { |
| 27 | apiKey = await promptToken(); |
| 28 | setGlobalConfig("apiKey", apiKey); |
| 29 | } |
| 30 | |
| 31 | return apiKey; |
| 32 | } |
| 33 | |
| 34 | export async function getPromptOptions(): Promise<{ |
| 35 | model: string; |
no test coverage detected