MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / combineStartupNotice

Function combineStartupNotice

apps/kimi-code/src/tui/utils/startup.ts:3–11  ·  view source on GitHub ↗
(
  existing: string | undefined,
  next: string | undefined,
)

Source from the content-addressed store, hash-verified

1import { OAUTH_LOGIN_REQUIRED_CODE } from '../constant/kimi-tui';
2
3export 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
13export function isOAuthLoginRequiredError(error: unknown): boolean {
14 return (error as { readonly code?: unknown }).code === OAUTH_LOGIN_REQUIRED_CODE;

Callers 3

initMethod · 0.90
appendStartupNoticeMethod · 0.90
runShellFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected