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

Function on_done

src/cli/progress_sink.c:155–168  ·  view source on GitHub ↗

Handle pipeline.done event. */

Source from the content-addressed store, hash-verified

153
154/* Handle pipeline.done event. */
155static void on_done(const char *line) {
156 flush_carriage();
157 char ms[CBM_SZ_32] = {0};
158 const char *elapsed = extract_kv(line, "elapsed_ms", ms, (int)sizeof(ms));
159 if (s_gbuf_nodes >= 0 && s_gbuf_edges >= 0 && elapsed) {
160 (void)fprintf(s_out, "Done: %d nodes, %d edges (%s ms)\n", s_gbuf_nodes, s_gbuf_edges,
161 elapsed);
162 } else if (s_gbuf_nodes >= 0 && s_gbuf_edges >= 0) {
163 (void)fprintf(s_out, "Done: %d nodes, %d edges\n", s_gbuf_nodes, s_gbuf_edges);
164 } else {
165 (void)fprintf(s_out, "Done.\n");
166 }
167 (void)fflush(s_out);
168}
169
170/* Handle parallel.extract.progress event — in-place counter. */
171static 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