MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / dispatch_text

Function dispatch_text

src/sessions/cursor.rs:997–1011  ·  view source on GitHub ↗
(item: &Value)

Source from the content-addressed store, hash-verified

995}
996
997fn dispatch_text(item: &Value) -> Option<String> {
998 let input = item.get("input").unwrap_or(item);
999 let mut parts = Vec::new();
1000 for key in ["description", "prompt", "subagent_type"] {
1001 if let Some(value) = input
1002 .get(key)
1003 .or_else(|| item.get(key))
1004 .and_then(Value::as_str)
1005 .filter(|value| !value.trim().is_empty())
1006 {
1007 parts.push(value.to_string());
1008 }
1009 }
1010 (!parts.is_empty()).then(|| parts.join("\n\n"))
1011}
1012
1013fn content_kind(content: &Value) -> Option<&'static str> {
1014 if content.is_array() {

Callers 1

event_dispatch_messagesFunction · 0.85

Calls 2

pushMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected