claude-baseline-1752116746
This commit is contained in:
parent
20c8d2b71b
commit
afe56a33fc
16
LICENSE.md
16
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
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
Testing dynamic hooks after restart!
|
Fresh restart - testing stash browsing with updated recovery logic!
|
||||||
|
|
||||||
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!
|
|
||||||
|
|
|
@ -171,20 +171,21 @@ end
|
||||||
-- Open diffview for current review
|
-- Open diffview for current review
|
||||||
function M.open_diffview()
|
function M.open_diffview()
|
||||||
if not M.current_review then
|
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 utils = require('nvim-claude.utils')
|
||||||
local baseline_ref = utils.read_file('/tmp/claude-baseline-commit')
|
local baseline_ref = utils.read_file('/tmp/claude-baseline-commit')
|
||||||
if baseline_ref and baseline_ref ~= '' then
|
if baseline_ref and baseline_ref ~= '' then
|
||||||
baseline_ref = baseline_ref:gsub('%s+', '')
|
baseline_ref = baseline_ref:gsub('%s+', '')
|
||||||
local changed_files = M.get_changed_files_since_baseline(baseline_ref)
|
local claude_stashes = M.get_claude_stashes()
|
||||||
if changed_files and #changed_files > 0 then
|
if claude_stashes and #claude_stashes > 0 then
|
||||||
M.current_review = {
|
M.current_review = {
|
||||||
baseline_ref = baseline_ref,
|
baseline_ref = baseline_ref,
|
||||||
timestamp = os.time(),
|
timestamp = os.time(),
|
||||||
changed_files = changed_files,
|
claude_stashes = claude_stashes,
|
||||||
is_cumulative = true
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -194,7 +195,13 @@ function M.open_diffview()
|
||||||
end
|
end
|
||||||
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
|
if M.current_review.is_cumulative then
|
||||||
M.open_cumulative_diffview()
|
M.open_cumulative_diffview()
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue