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:
@@ -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(())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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());
|
||||||
|
|||||||
Reference in New Issue
Block a user