Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

docs(attachments): document voice note staging markers

Steven Enamakel17cc0e75ae5e
diff --git a/crates/openhuman-core/src/agent/attachments/parts.rs b/crates/openhuman-core/src/agent/attachments/parts.rs
index dd97214fa2..77c59c0db9 100644
--- a/crates/openhuman-core/src/agent/attachments/parts.rs
+++ b/crates/openhuman-core/src/agent/attachments/parts.rs
@@ -92,7 +92,7 @@ fn source_of(media: &MediaReference, index: usize) -> Result<&str, AttachmentPar
/// Render `parts` after `text` as the staging markers, in order.
///
/// `Text` parts join the message text. Images become `[IMAGE:…]`; video,
-/// audio and files become `[FILE:…]`. Any other part kind is refused.
+/// audio, voice notes and files become `[FILE:…]`. Any other part kind is refused.
pub fn fold_into_message(text: &str, parts: &[ContentPart]) -> Result<String, AttachmentPartError> {
if parts.is_empty() {
return Ok(text.to_string());
@@ -110,6 +110,9 @@ pub fn fold_into_message(text: &str, parts: &[ContentPart]) -> Result<String, At
}
ContentPart::Video { media, .. }
| ContentPart::Audio { media, .. }
+ | ContentPart::VoiceNote {
+ voice_note: tinychannels_bus::VoiceNote { media, .. },
+ }
| ContentPart::File { media, .. } => {
markers.push(format!("[FILE:{}]", source_of(media, index)?));
}