( existing: string | undefined, next: string | undefined, )
| 1 | import { OAUTH_LOGIN_REQUIRED_CODE } from '../constant/kimi-tui'; |
| 2 | |
| 3 | export function combineStartupNotice( |
| 4 | existing: string | undefined, |
| 5 | next: string | undefined, |
| 6 | ): string | undefined { |
| 7 | if (existing !== undefined && next !== undefined) { |
| 8 | return `${existing}\n${next}`; |
| 9 | } |
| 10 | return existing ?? next; |
| 11 | } |
| 12 | |
| 13 | export function isOAuthLoginRequiredError(error: unknown): boolean { |
| 14 | return (error as { readonly code?: unknown }).code === OAUTH_LOGIN_REQUIRED_CODE; |
no outgoing calls
no test coverage detected