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

Method prompt

crates/chat-cli/src/cli/chat/message.rs:253–259  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

251 }
252
253 pub fn prompt(&self) -> Option<&str> {
254 match self.content() {
255 UserMessageContent::Prompt { prompt } => Some(prompt.as_str()),
256 UserMessageContent::CancelledToolUses { prompt, .. } => prompt.as_ref().map(|s| s.as_str()),
257 UserMessageContent::ToolUseResults { .. } => None,
258 }
259 }
260
261 /// Truncates the content contained in this user message to a maximum length of `max_bytes`.
262 pub fn truncate_safe(&mut self, max_bytes: usize) {

Callers 4

create_skim_optionsFunction · 0.45
content_with_contextMethod · 0.45

Calls 4

mapMethod · 0.80
contentMethod · 0.45
as_strMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected