MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / printPhaseDone

Function printPhaseDone

src/ui/shimmer-progress.ts:51–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49 // thread is guaranteed alive here: phase changes arrive via its own
50 // progress callback.
51 const printPhaseDone = (): void => {
52 if (!lastPhaseName) return;
53 let detail = '';
54 if (lastPercent >= 0) detail = ` ${G.dash} done`;
55 else if (lastCount > 0) detail = ` ${G.dash} ${lastCount.toLocaleString()} found`;
56 // Leading \r + erase clears the worker's in-flight animation line; one
57 // atomic write so a worker frame can't interleave mid-line.
58 process.stdout.write(
59 `\r\x1b[K${DM}${G.rail}${RST} ${GRN}${G.phaseDone}${RST} ${lastPhaseName}${detail}\n`
60 );
61 lastPhaseName = '';
62 lastPercent = -1;
63 lastCount = 0;
64 };
65
66 const workerPath = path.join(__dirname, 'shimmer-worker.js');
67 const worker = new Worker(workerPath, {

Callers 2

onProgressFunction · 0.85
finishFunction · 0.85

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected