Mercurial
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 260:1f9877b637e9 | 261:b401627fc49e |
|---|---|
| 97 .type = type, | 97 .type = type, |
| 98 .request_id = Inference_JSON_String(object, "request_id"), | 98 .request_id = Inference_JSON_String(object, "request_id"), |
| 99 .conversation_id = Inference_JSON_String(object, "conversation_id"), | 99 .conversation_id = Inference_JSON_String(object, "conversation_id"), |
| 100 .delta = Inference_JSON_String(object, "delta"), | 100 .delta = Inference_JSON_String(object, "delta"), |
| 101 .content = Inference_JSON_String(object, "content"), | 101 .content = Inference_JSON_String(object, "content"), |
| 102 .raw_json = line, | |
| 103 .raw_json_length = length, | |
| 102 .failed = Inference_JSON_Boolean(object, "failed"), | 104 .failed = Inference_JSON_Boolean(object, "failed"), |
| 103 .aborted = Inference_JSON_Boolean(object, "aborted"), | 105 .aborted = Inference_JSON_Boolean(object, "aborted"), |
| 104 }; | 106 }; |
| 105 | 107 |
| 106 Dowa_JSON_Value *p_error = Dowa_JSON_Get(object, "error"); | 108 Dowa_JSON_Value *p_error = Dowa_JSON_Get(object, "error"); |
| 144 size_t length = (size_t)amount; | 146 size_t length = (size_t)amount; |
| 145 while (length > 0 && | 147 while (length > 0 && |
| 146 (line[length - 1] == '\n' || line[length - 1] == '\r')) | 148 (line[length - 1] == '\n' || line[length - 1] == '\r')) |
| 147 length--; | 149 length--; |
| 148 if (length > 0) | 150 if (length > 0) |
| 151 { | |
| 152 line[length] = '\0'; | |
| 149 Inference_Bridge_Handle_Line(p_bridge, line, length); | 153 Inference_Bridge_Handle_Line(p_bridge, line, length); |
| 154 } | |
| 150 } | 155 } |
| 151 free(line); | 156 free(line); |
| 152 atomic_store(&p_bridge->ready, FALSE); | 157 atomic_store(&p_bridge->ready, FALSE); |
| 153 atomic_store(&p_bridge->running, FALSE); | 158 atomic_store(&p_bridge->running, FALSE); |
| 154 if (p_bridge->handler) | 159 if (p_bridge->handler) |