MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / as_str

Method as_str

crates/chat-cli/src/cli/chat/tools/mod.rs:350–360  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

348
349impl InvokeOutput {
350 pub fn as_str(&self) -> Cow<'_, str> {
351 match &self.output {
352 OutputKind::Text(s) => s.as_str().into(),
353 OutputKind::Json(j) => serde_json::to_string(j)
354 .map_err(|err| error!(?err, "failed to serialize tool to json"))
355 .unwrap_or_default()
356 .into(),
357 OutputKind::Images(_) => "".into(),
358 OutputKind::Mixed { text, .. } => text.as_str().into(), // Return the text part
359 }
360 }
361}
362
363#[non_exhaustive]

Callers 15

executeMethod · 0.45
print_changelog_entryMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45
tool_use_executeMethod · 0.45
validate_toolsMethod · 0.45
read_lineMethod · 0.45
latest_summaryMethod · 0.45
latest_tool_use_idsMethod · 0.45

Calls

no outgoing calls