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

Function moveInstallPromptSelection

apps/kimi-code/src/cli/update/prompt.ts:50–59  ·  view source on GitHub ↗
(
  currentIndex: number,
  direction: 'up' | 'down',
  choiceCount: number,
)

Source from the content-addressed store, hash-verified

48}
49
50export function moveInstallPromptSelection(
51 currentIndex: number,
52 direction: 'up' | 'down',
53 choiceCount: number,
54): number {
55 if (direction === 'up') {
56 return Math.max(0, currentIndex - 1);
57 }
58 return Math.min(choiceCount - 1, currentIndex + 1);
59}
60
61function renderInstallPrompt(
62 options: InstallPromptOptions,

Callers 2

prompt.test.tsFile · 0.90
onKeypressFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected