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

Method remove_by_path

crates/chat-cli/src/util/knowledge_store.rs:470–479  ·  view source on GitHub ↗

Remove context by path

(&mut self, path: &str)

Source from the content-addressed store, hash-verified

468
469 /// Remove context by path
470 pub async fn remove_by_path(&mut self, path: &str) -> Result<(), String> {
471 if let Some(context) = self.agent_client.get_context_by_path(path).await {
472 self.agent_client
473 .remove_context_by_id(&context.id)
474 .await
475 .map_err(|e| e.to_string())
476 } else {
477 Err(format!("No context found with path '{}'", path))
478 }
479 }
480
481 /// Remove context by name
482 pub async fn remove_by_name(&mut self, name: &str) -> Result<(), String> {

Callers 2

invokeMethod · 0.80
handle_removeMethod · 0.80

Calls 3

to_stringMethod · 0.80
get_context_by_pathMethod · 0.45
remove_context_by_idMethod · 0.45

Tested by

no test coverage detected