(data: string)
| 316 | }; |
| 317 | |
| 318 | const handleOutputLogging = (data: string): void => { |
| 319 | let nextPauseState: boolean | undefined; |
| 320 | if (args.marker) { |
| 321 | const pauseMarker: string = getPauseLogMarker(args.marker); |
| 322 | const pauseIdx: number = data.lastIndexOf(pauseMarker); |
| 323 | if (pauseIdx >= 0) { |
| 324 | data = data.substring(0, pauseIdx + pauseMarker.length); |
| 325 | nextPauseState = true; |
| 326 | } |
| 327 | |
| 328 | const resumeIdx: number = data.lastIndexOf(getResumeLogMarker(args.marker)); |
| 329 | if (resumeIdx >= 0) { |
| 330 | data = data.substring(resumeIdx); |
| 331 | nextPauseState = false; |
| 332 | } |
| 333 | } |
| 334 | |
| 335 | // Log the chunk of data that includes the pause/resume markers, |
| 336 | // so unpause first and pause after logging |
| 337 | if (!logIsPaused) { |
| 338 | logReceivedData(data, nickname); |
| 339 | } |
| 340 | |
| 341 | if (typeof nextPauseState === 'boolean') { |
| 342 | logIsPaused = nextPauseState; |
| 343 | } |
| 344 | }; |
| 345 | |
| 346 | const handleTerminalOutput = async (dataWrite: vscode.TerminalDataWriteEvent): Promise<void> => { |
| 347 | if (loggingLevel > 0) { |
no test coverage detected