MCPcopy Index your code
hub / github.com/google-gemini/gemini-cli / writeOnNewLine

Method writeOnNewLine

packages/cli/src/ui/utils/textOutput.ts:43–48  ·  view source on GitHub ↗

* Writes a string to stdout, ensuring it starts on a new line. * If the previous output did not end with a newline, one will be added. * This prevents adding extra blank lines if a newline already exists. * @param str The string to write.

(str: string)

Source from the content-addressed store, hash-verified

41 * @param str The string to write.
42 */
43 writeOnNewLine(str: string): void {
44 if (!this.atStartOfLine) {
45 this.write('\n');
46 }
47 this.write(str);
48 }
49
50 /**
51 * Ensures that the output ends with a newline. If the last character

Callers 1

textOutput.test.tsFile · 0.80

Calls 1

writeMethod · 0.95

Tested by

no test coverage detected