From 65ef39fdf8d5945915ecde2f5823544b97893912 Mon Sep 17 00:00:00 2001 From: zolinthecow Date: Wed, 9 Jul 2025 17:32:17 -0700 Subject: [PATCH] claude-pre-edit-1752107537 --- lua/nvim-claude/diff-review.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lua/nvim-claude/diff-review.lua b/lua/nvim-claude/diff-review.lua index b647315a..7deda7d4 100644 --- a/lua/nvim-claude/diff-review.lua +++ b/lua/nvim-claude/diff-review.lua @@ -188,6 +188,26 @@ function M.open_diffview() end end +-- Open cumulative diffview (always against baseline) +function M.open_cumulative_diffview() + if not M.current_review then + vim.notify('No active review session', vim.log.levels.INFO) + return + end + + -- Check if diffview is available + local ok, diffview = pcall(require, 'diffview') + if not ok then + vim.notify('diffview.nvim not available', vim.log.levels.WARN) + return + end + + -- Open diffview comparing baseline with current working directory + local cmd = 'DiffviewOpen ' .. M.current_review.baseline_ref + vim.notify('Opening cumulative diffview: ' .. cmd, vim.log.levels.INFO) + vim.cmd(cmd) +end + -- Open fugitive diff (fallback) function M.open_fugitive() if not M.current_review then