MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / on_done

Function on_done

src/cli/progress_sink.c:370–383  ·  view source on GitHub ↗

Handle pipeline.done event. */

Source from the content-addressed store, hash-verified

368
369/* Handle pipeline.done event. */
370static void on_done(const char *line) {
371 flush_carriage();
372 char ms[CBM_SZ_32] = {0};
373 const char *elapsed = extract_kv(line, "elapsed_ms", ms, (int)sizeof(ms));
374 if (s_gbuf_nodes >= 0 && s_gbuf_edges >= 0 && elapsed) {
375 (void)fprintf(s_out, "Done: %d nodes, %d edges (%s ms)\n", s_gbuf_nodes, s_gbuf_edges,
376 elapsed);
377 } else if (s_gbuf_nodes >= 0 && s_gbuf_edges >= 0) {
378 (void)fprintf(s_out, "Done: %d nodes, %d edges\n", s_gbuf_nodes, s_gbuf_edges);
379 } else {
380 (void)fprintf(s_out, "Done.\n");
381 }
382 (void)fflush(s_out);
383}
384
385/* Handle parallel.extract.progress event — in-place counter. */
386static void on_extract_progress(const char *line) {

Callers

nothing calls this directly

Calls 2

flush_carriageFunction · 0.85
extract_kvFunction · 0.85

Tested by

no test coverage detected