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

Method is_text_mime

crates/opencode-session/src/prompt.rs:665–676  ·  view source on GitHub ↗
(mime: &str)

Source from the content-addressed store, hash-verified

663 }
664
665 fn is_text_mime(mime: &str) -> bool {
666 mime.starts_with("text/")
667 || matches!(
668 mime,
669 "application/json"
670 | "application/xml"
671 | "application/javascript"
672 | "application/typescript"
673 | "application/x-sh"
674 | "application/x-shellscript"
675 )
676 }
677
678 fn is_binary_asset_mime(mime: &str) -> bool {
679 mime.starts_with("image/") || mime == "application/pdf"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected