Mercurial
diff mrjunejune/inference_bridge.c @ 280:49e9e591c9bb
Add persistent dictation, prewarmed WebRTC speech input, Copilot SDK routing, animated conversation lifecycle controls, parking, and architecture coverage.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Tue, 18 Aug 2026 19:14:53 -0700 |
| parents | 056790c4fb0d |
| children |
line wrap: on
line diff
--- a/mrjunejune/inference_bridge.c Mon Aug 17 22:22:36 2026 -0700 +++ b/mrjunejune/inference_bridge.c Tue Aug 18 19:14:53 2026 -0700 @@ -198,6 +198,8 @@ return "invited_friend"; case INFERENCE_PROMPT_PROFILE_JUNE_ADMIN: return "june_admin"; + case INFERENCE_PROMPT_PROFILE_CANVAS_ORCHESTRATOR: + return "canvas_orchestrator"; } return NULL; } @@ -210,7 +212,9 @@ const char *prompt, const char *prompt_profile, uint32 prompt_version, - uint32 knowledge_version) + uint32 knowledge_version, + boolean include_resume_existing, + boolean resume_existing) { if (!command || !request_id) return FALSE; @@ -269,6 +273,27 @@ prompt_version, knowledge_version); } + else if (escaped_profile) + { + snprintf( + payload, + capacity, + "{\"command\":\"%s\",\"request_id\":\"%s\"," + "\"conversation_id\":\"%s\"," + "\"prompt_profile\":\"%s\",\"prompt_version\":%u," + "\"knowledge_version\":%u%s}", + escaped_command, + escaped_request, + escaped_conversation, + escaped_profile, + prompt_version, + knowledge_version, + include_resume_existing + ? (resume_existing + ? ",\"resume_existing\":true" + : ",\"resume_existing\":false") + : ""); + } else { snprintf( @@ -333,7 +358,8 @@ return; if (atomic_load(&p_bridge->running) && p_bridge->p_commands) Inference_Bridge_Command( - p_bridge, "shutdown", "server-shutdown", "", NULL, NULL, 0, 0); + p_bridge, "shutdown", "server-shutdown", "", NULL, NULL, 0, 0, + FALSE, FALSE); if (p_bridge->p_commands) { fclose(p_bridge->p_commands); @@ -642,13 +668,40 @@ return success; } +boolean Inference_Bridge_Warm_Conversation( + Inference_Bridge *p_bridge, + const char *request_id, + const char *conversation_id, + Inference_Prompt_Profile prompt_profile, + uint32 prompt_version, + uint32 knowledge_version, + boolean resume_existing) +{ + const char *profile = Inference_Bridge_Profile_Name(prompt_profile); + if (!p_bridge || !request_id || !request_id[0] || + !conversation_id || !conversation_id[0] || !profile) + return FALSE; + return Inference_Bridge_Command( + p_bridge, + "conversation.warm", + request_id, + conversation_id, + NULL, + profile, + prompt_version, + knowledge_version, + TRUE, + resume_existing); +} + boolean Inference_Bridge_Abort_Turn( Inference_Bridge *p_bridge, const char *request_id, const char *conversation_id) { return Inference_Bridge_Command( - p_bridge, "turn.abort", request_id, conversation_id, NULL, NULL, 0, 0); + p_bridge, "turn.abort", request_id, conversation_id, NULL, NULL, 0, 0, + FALSE, FALSE); } boolean Inference_Bridge_Delete_Conversation( @@ -664,7 +717,9 @@ NULL, NULL, 0, - 0); + 0, + FALSE, + FALSE); } void Inference_Bridge_Destroy(Inference_Bridge *p_bridge)