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

Function display_purpose

crates/chat-cli/src/cli/chat/tools/mod.rs:454–469  ·  view source on GitHub ↗

Helper function to display a purpose if available (for execute commands)

(purpose: Option<&String>, updates: &mut impl Write)

Source from the content-addressed store, hash-verified

452
453/// Helper function to display a purpose if available (for execute commands)
454pub fn display_purpose(purpose: Option<&String>, updates: &mut impl Write) -> Result<()> {
455 if let Some(purpose) = purpose {
456 queue!(
457 updates,
458 style::Print(super::CONTINUATION_LINE),
459 style::Print("\n"),
460 style::Print(super::PURPOSE_ARROW),
461 StyledText::info_fg(),
462 style::Print("Purpose: "),
463 StyledText::reset(),
464 style::Print(purpose),
465 style::Print("\n"),
466 )?;
467 }
468 Ok(())
469}
470
471/// Helper function to format function results with consistent styling
472///

Callers 3

queue_descriptionMethod · 0.85
queue_descriptionMethod · 0.85
queue_descriptionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected