MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / enqueue_tui_request

Function enqueue_tui_request

crates/opencode-server/src/routes.rs:3715–3732  ·  view source on GitHub ↗
(state: &Arc<ServerState>, path: &str, body: serde_json::Value)

Source from the content-addressed store, hash-verified

3713static TUI_RESPONSE_NOTIFY: Lazy<Notify> = Lazy::new(Notify::new);
3714
3715async fn enqueue_tui_request(state: &Arc<ServerState>, path: &str, body: serde_json::Value) {
3716 let mut queue = TUI_REQUEST_QUEUE.lock().await;
3717 queue.push_back(TuiRequest {
3718 path: path.to_string(),
3719 body: body.clone(),
3720 });
3721 drop(queue);
3722 TUI_REQUEST_NOTIFY.notify_one();
3723
3724 state.broadcast(
3725 &serde_json::json!({
3726 "type": "tui.request",
3727 "path": path,
3728 "body": body,
3729 })
3730 .to_string(),
3731 );
3732}
3733
3734async fn append_prompt(
3735 State(state): State<Arc<ServerState>>,

Callers 12

append_promptFunction · 0.85
set_promptFunction · 0.85
submit_promptFunction · 0.85
clear_promptFunction · 0.85
open_helpFunction · 0.85
open_sessionsFunction · 0.85
open_themesFunction · 0.85
open_modelsFunction · 0.85
execute_tui_commandFunction · 0.85
show_toastFunction · 0.85
publish_tui_eventFunction · 0.85
select_sessionFunction · 0.85

Calls 2

broadcastMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected