diff mrjunejune/inference_bridge.c @ 261:b401627fc49e

Add JRPG mock flows and interactive previews Add scripted mock SSE commands, custom event forwarding, animated chat turns, full-height message navigation, and a cyberpunk resume dossier. Co-authored-by: Copilot <[email protected]>
author MrJuneJune <mrjunejune@users.noreply.github.com>
date Wed, 05 Aug 2026 20:38:32 -0700
parents 1f9877b637e9
children 056790c4fb0d
line wrap: on
line diff
--- a/mrjunejune/inference_bridge.c	Wed Aug 05 09:19:41 2026 -0700
+++ b/mrjunejune/inference_bridge.c	Wed Aug 05 20:38:32 2026 -0700
@@ -99,6 +99,8 @@
     .conversation_id = Inference_JSON_String(object, "conversation_id"),
     .delta = Inference_JSON_String(object, "delta"),
     .content = Inference_JSON_String(object, "content"),
+    .raw_json = line,
+    .raw_json_length = length,
     .failed = Inference_JSON_Boolean(object, "failed"),
     .aborted = Inference_JSON_Boolean(object, "aborted"),
   };
@@ -146,7 +148,10 @@
            (line[length - 1] == '\n' || line[length - 1] == '\r'))
       length--;
     if (length > 0)
+    {
+      line[length] = '\0';
       Inference_Bridge_Handle_Line(p_bridge, line, length);
+    }
   }
   free(line);
   atomic_store(&p_bridge->ready, FALSE);