| 20 | })); |
| 21 | |
| 22 | class InMemoryStorage implements TokenStorage { |
| 23 | public token: TokenInfo | undefined; |
| 24 | |
| 25 | async load(): Promise<TokenInfo | undefined> { |
| 26 | return this.token; |
| 27 | } |
| 28 | |
| 29 | async save(_name: string, token: TokenInfo): Promise<void> { |
| 30 | this.token = token; |
| 31 | } |
| 32 | |
| 33 | async remove(): Promise<void> { |
| 34 | this.token = undefined; |
| 35 | } |
| 36 | |
| 37 | async list(): Promise<string[]> { |
| 38 | return this.token === undefined ? [] : ['kimi-code']; |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | const config: OAuthFlowConfig = { |
| 43 | name: 'kimi-code', |
nothing calls this directly
no outgoing calls
no test coverage detected