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

Function set_prompt

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

Source from the content-addressed store, hash-verified

3745}
3746
3747async fn set_prompt(
3748 State(state): State<Arc<ServerState>>,
3749 Json(req): Json<PromptRequest>,
3750) -> Result<Json<bool>> {
3751 enqueue_tui_request(
3752 &state,
3753 "/tui/set-prompt",
3754 serde_json::json!({ "text": req.text }),
3755 )
3756 .await;
3757 Ok(Json(true))
3758}
3759
3760async fn submit_prompt(
3761 State(state): State<Arc<ServerState>>,

Callers

nothing calls this directly

Calls 1

enqueue_tui_requestFunction · 0.85

Tested by

no test coverage detected