refactor: remove KEEP_META_* environment variable parsing

Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-29 14:09:12 -03:00
parent 03916829b3
commit d32a460e38
3 changed files with 3 additions and 30 deletions

View File

@@ -23,17 +23,8 @@ pub fn mode_get(
cmd.error(clap::error::ErrorKind::InvalidValue, "More than one ID given, you must supply exactly one ID or at least one tag when using --get").exit();
}
let mut meta: std::collections::HashMap<String, String> = std::collections::HashMap::new();
// Collect metadata from environment variables
for (key, value) in std::env::vars() {
if key.starts_with("KEEP_META_") && key != "KEEP_META_PLUGINS" {
let meta_name = key.strip_prefix("KEEP_META_").unwrap();
meta.insert(meta_name.to_string(), value);
}
}
let item_service = ItemService::new(data_path.clone());
let item_with_meta = item_service.find_item(conn, ids, tags, &meta)
let item_with_meta = item_service.find_item(conn, ids, tags, &std::collections::HashMap::new())
.map_err(|e| anyhow!("Unable to find matching item in database: {}", e))?;
let item_id = item_with_meta.item.id.unwrap();