diff --git a/LICENSE.md b/LICENSE.md index 0291d029..75e5e5e6 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -18,18 +18,4 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Testing dynamic hooks after restart! - -Dynamic hooks are now working properly! - -Testing cumulative changes - this should accumulate with previous edits. - -Now using stash-based tracking to exclude manual edits! - -Starting Claude stash history - this should be the first stash entry. - -Second edit after manually creating baseline - this should create a stash! - -Third edit - testing if modules are reloaded properly. - -Fresh Neovim session - this should create the first Claude stash! +Fresh restart - testing stash browsing with updated recovery logic! diff --git a/lua/nvim-claude/diff-review.lua b/lua/nvim-claude/diff-review.lua index 48ab327b..02c4c2f9 100644 --- a/lua/nvim-claude/diff-review.lua +++ b/lua/nvim-claude/diff-review.lua @@ -171,20 +171,21 @@ end -- Open diffview for current review function M.open_diffview() if not M.current_review then - -- Try to recover cumulative session from baseline + -- Try to recover stash-based session from baseline local utils = require('nvim-claude.utils') local baseline_ref = utils.read_file('/tmp/claude-baseline-commit') if baseline_ref and baseline_ref ~= '' then baseline_ref = baseline_ref:gsub('%s+', '') - local changed_files = M.get_changed_files_since_baseline(baseline_ref) - if changed_files and #changed_files > 0 then + local claude_stashes = M.get_claude_stashes() + if claude_stashes and #claude_stashes > 0 then M.current_review = { baseline_ref = baseline_ref, timestamp = os.time(), - changed_files = changed_files, - is_cumulative = true + claude_stashes = claude_stashes, + current_stash_index = 0, -- Show cumulative view by default + is_stash_based = true } - vim.notify('Recovered cumulative review session from baseline', vim.log.levels.INFO) + vim.notify('Recovered Claude stash session from baseline', vim.log.levels.INFO) end end @@ -194,7 +195,13 @@ function M.open_diffview() end end - -- Use cumulative diff if available + -- Use stash-based diff if available + if M.current_review.is_stash_based then + M.open_cumulative_stash_view() + return + end + + -- Legacy: Use cumulative diff if available if M.current_review.is_cumulative then M.open_cumulative_diffview() return diff --git a/testfile b/testfile new file mode 100644 index 00000000..623d98c3 --- /dev/null +++ b/testfile @@ -0,0 +1 @@ +hihi