feat: make save_item return only item ID for CLI usage

Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-25 15:52:55 -03:00
parent 9d99273ff7
commit 7d7b2d74fe
2 changed files with 2 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ pub fn mode_save(
writer: stdout.lock(), writer: stdout.lock(),
}; };
item_service.save_item(tee_reader, cmd, settings, tags, conn)?; let _item_id = item_service.save_item(tee_reader, cmd, settings, tags, conn)?;
Ok(()) Ok(())
} }

View File

@@ -146,7 +146,7 @@ impl ItemService {
settings: &Settings, settings: &Settings,
tags: &mut Vec<String>, tags: &mut Vec<String>,
conn: &mut Connection, conn: &mut Connection,
) -> Result<ItemWithMeta, CoreError> { ) -> Result<i64, CoreError> {
debug!("ITEM_SERVICE: Starting save_item with tags: {:?}", tags); debug!("ITEM_SERVICE: Starting save_item with tags: {:?}", tags);
if tags.is_empty() { if tags.is_empty() {
tags.push("none".to_string()); tags.push("none".to_string());