MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / get_next_tui_request

Function get_next_tui_request

crates/opencode-server/src/routes.rs:3934–3943  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3932}
3933
3934async fn get_next_tui_request() -> Json<Option<TuiRequest>> {
3935 loop {
3936 let mut queue = TUI_REQUEST_QUEUE.lock().await;
3937 if let Some(next) = queue.pop_front() {
3938 return Json(Some(next));
3939 }
3940 drop(queue);
3941 TUI_REQUEST_NOTIFY.notified().await;
3942 }
3943}
3944
3945async fn submit_tui_response(Json(body): Json<serde_json::Value>) -> Json<bool> {
3946 let mut queue = TUI_RESPONSE_QUEUE.lock().await;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected