pub struct MessageEmbeddedResourceAttachment {
pub label: String,
pub range: Option<TextRange>,
pub display_kind: Option<String>,
pub meta: Option<JsonObject>,
pub data: String,
pub content_type: String,
pub selection: Option<TextSelection>,
}Expand description
An attachment whose data is embedded inline as a base64 string.
Use this for small binary payloads (e.g. a pasted image) that should be delivered with the user message itself rather than fetched separately.
Fields§
§label: StringA human-readable label for the attachment (e.g. the filename of a file attachment). Used for display in UI.
range: Option<TextRange>If defined, the range in {@link Message.text} that references this attachment. This is a text range, not a byte range.
display_kind: Option<String>Advisory display hint for clients rendering this attachment. Recognized values include:
'image': the attachment is an image'document': the attachment is a textual document'symbol': the attachment is a code symbol (e.g. a function or class)'directory': the attachment is a folder'selection': the attachment is a selection within a document
Implementations MAY provide additional values; clients SHOULD fall back to a reasonable default when an unknown value is encountered.
meta: Option<JsonObject>Additional implementation-defined metadata for the attachment.
If the attachment was produced by the completions command, the client
MUST preserve every property of _meta originally returned by the agent
host when sending the user message containing the accepted completion.
data: StringBase64-encoded binary data
content_type: StringContent MIME type (e.g. "image/png", "application/pdf")
selection: Option<TextSelection>Optional selection within the attached textual resource.
Only meaningful for textual resources.
Trait Implementations§
Source§impl Clone for MessageEmbeddedResourceAttachment
impl Clone for MessageEmbeddedResourceAttachment
Source§fn clone(&self) -> MessageEmbeddedResourceAttachment
fn clone(&self) -> MessageEmbeddedResourceAttachment
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'de> Deserialize<'de> for MessageEmbeddedResourceAttachment
impl<'de> Deserialize<'de> for MessageEmbeddedResourceAttachment
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for MessageEmbeddedResourceAttachment
impl PartialEq for MessageEmbeddedResourceAttachment
Source§fn eq(&self, other: &MessageEmbeddedResourceAttachment) -> bool
fn eq(&self, other: &MessageEmbeddedResourceAttachment) -> bool
self and other values to be equal, and is used by ==.