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

Method get_conversation_by_path

crates/chat-cli/src/database/mod.rs:385–396  ·  view source on GitHub ↗

Get a chat conversation given a path to the conversation.

(
        &mut self,
        path: impl AsRef<Path>,
    )

Source from the content-addressed store, hash-verified

383
384 /// Get a chat conversation given a path to the conversation.
385 pub fn get_conversation_by_path(
386 &mut self,
387 path: impl AsRef<Path>,
388 ) -> Result<Option<ConversationState>, DatabaseError> {
389 // We would need to encode this to support non utf8 paths.
390 let path = match path.as_ref().to_str() {
391 Some(path) => path,
392 None => return Ok(None),
393 };
394
395 self.get_json_entry(Table::Conversations, path)
396 }
397
398 /// Set a chat conversation given a path to the conversation.
399 pub fn set_conversation_by_path(

Callers 1

newMethod · 0.80

Calls 2

get_json_entryMethod · 0.80
as_refMethod · 0.45

Tested by

no test coverage detected