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

Function on_done

src/cli/progress_sink.c:293–306  ·  view source on GitHub ↗

Handle pipeline.done event. */

Source from the content-addressed store, hash-verified

291
292/* Handle pipeline.done event. */
293static void on_done(const char *line) {
294 flush_carriage();
295 char ms[CBM_SZ_32] = {0};
296 const char *elapsed = extract_kv(line, "elapsed_ms", ms, (int)sizeof(ms));
297 if (s_gbuf_nodes >= 0 && s_gbuf_edges >= 0 && elapsed) {
298 (void)fprintf(s_out, "Done: %d nodes, %d edges (%s ms)\n", s_gbuf_nodes, s_gbuf_edges,
299 elapsed);
300 } else if (s_gbuf_nodes >= 0 && s_gbuf_edges >= 0) {
301 (void)fprintf(s_out, "Done: %d nodes, %d edges\n", s_gbuf_nodes, s_gbuf_edges);
302 } else {
303 (void)fprintf(s_out, "Done.\n");
304 }
305 (void)fflush(s_out);
306}
307
308/* Handle parallel.extract.progress event — in-place counter. */
309static 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