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

Function execute_tui_command

crates/opencode-server/src/routes.rs:3843–3858  ·  view source on GitHub ↗
(
    State(state): State<Arc<ServerState>>,
    Json(req): Json<TuiCommandRequest>,
)

Source from the content-addressed store, hash-verified

3841}
3842
3843async fn execute_tui_command(
3844 State(state): State<Arc<ServerState>>,
3845 Json(req): Json<TuiCommandRequest>,
3846) -> Result<Json<bool>> {
3847 let mapped = map_tui_command(&req.command);
3848 enqueue_tui_request(
3849 &state,
3850 "/tui/execute-command",
3851 serde_json::json!({
3852 "command": mapped,
3853 "arguments": req.arguments,
3854 }),
3855 )
3856 .await;
3857 Ok(Json(true))
3858}
3859
3860#[derive(Debug, Deserialize)]
3861pub struct ToastRequest {

Callers

nothing calls this directly

Calls 2

map_tui_commandFunction · 0.85
enqueue_tui_requestFunction · 0.85

Tested by

no test coverage detected