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

Class AddPartRequest

crates/opencode-server/src/routes.rs:1130–1139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1128
1129#[derive(Debug, Deserialize)]
1130pub struct AddPartRequest {
1131 #[serde(rename = "type")]
1132 pub part_type: String,
1133 pub text: Option<String>,
1134 pub tool_call_id: Option<String>,
1135 pub tool_name: Option<String>,
1136 pub tool_input: Option<serde_json::Value>,
1137 pub content: Option<String>,
1138 pub is_error: Option<bool>,
1139}
1140
1141fn build_message_part(req: AddPartRequest, msg_id: &str) -> Result<opencode_session::MessagePart> {
1142 let part_type = match req.part_type.as_str() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected