From c5f43b56f21fc56735cf3594de308a0ef586e0f2 Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Wed, 10 Sep 2025 12:05:38 -0300 Subject: [PATCH] fix: Restore missing lines and refactor `setup_diff_paths_and_compression` Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) --- src/modes/diff.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/modes/diff.rs b/src/modes/diff.rs index 1b18181..cbc3aa9 100644 --- a/src/modes/diff.rs +++ b/src/modes/diff.rs @@ -23,10 +23,6 @@ fn validate_diff_args(cmd: &mut Command, ids: &Vec, tags: &Vec) -> /// * `cmd` - Command instance for error reporting /// * `ids` - Vector of item IDs /// * `tags` - Vector of tags (should be empty for diff mode) -/// -/// # Returns -/// -/// * `Result<()>` - Success if validation passes, error with validation message fn validate_diff_args(cmd: &mut Command, ids: &Vec, tags: &Vec) { if !tags.is_empty() { cmd.error( @@ -97,4 +93,9 @@ fn setup_diff_paths_and_compression( let item_b_id = item_b.item.id.ok_or_else(|| anyhow::anyhow!("Item B missing ID"))?; // Use the service's data path to construct proper file paths - let data_path = item_service.get_data \ No newline at end of file + let data_path = item_service.get_data_path(); + let item_a_path = data_path.join(item_a_id.to_string()); + let item_b_path = data_path.join(item_b_id.to_string()); + + Ok((item_a_path, item_b_path)) +}