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

Function writePromptFrame

apps/kimi-code/src/cli/update/prompt.ts:102–121  ·  view source on GitHub ↗
(
  output: NodeJS.WriteStream,
  lines: readonly string[],
  previousLineCount: number,
)

Source from the content-addressed store, hash-verified

100}
101
102function writePromptFrame(
103 output: NodeJS.WriteStream,
104 lines: readonly string[],
105 previousLineCount: number,
106): number {
107 if (previousLineCount > 0) {
108 moveCursor(output, 0, -(previousLineCount - 1));
109 }
110
111 for (let i = 0; i < lines.length; i++) {
112 clearLine(output, 0);
113 cursorTo(output, 0);
114 output.write(lines[i] ?? '');
115 if (i < lines.length - 1) {
116 output.write('\n');
117 }
118 }
119
120 return lines.length;
121}
122
123export async function promptForInstallChoice(
124 options: InstallPromptOptions,

Callers 1

renderFunction · 0.85

Calls 1

writeMethod · 0.65

Tested by

no test coverage detected