MCPcopy Index your code
hub / github.com/microsoft/vscode-cpptools / logReceivedData

Function logReceivedData

Extension/src/SSH/sshCommandRunner.ts:501–513  ·  view source on GitHub ↗
(data: string, nickname: string)

Source from the content-addressed store, hash-verified

499}
500
501function logReceivedData(data: string, nickname: string): void {
502 const logData: string = data.replace(/\r?\n$/, ''); // Trim single trailing newline for nicer log
503 if (logData === ' ') {
504 // From the sleep command that must periodically echo ' '
505 return;
506 }
507 const markedLines: string = logData
508 .split(/\n/)
509 .map(line => `${nickname}> ${line}`)
510 .join('\n');
511
512 getSshChannel().appendLine(markedLines);
513}
514
515function lastNonemptyLine(str: string): string | undefined {
516 const lines: string[] = splitLines(str);

Callers 1

handleOutputLoggingFunction · 0.85

Calls 2

getSshChannelFunction · 0.90
appendLineMethod · 0.80

Tested by

no test coverage detected