a bunch of changes

This commit is contained in:
2026-04-17 15:49:58 +01:00
parent ca0708a8ee
commit a2d283a5c5
5 changed files with 16 additions and 27 deletions
+1
View File
@@ -1,5 +1,6 @@
return { return {
"HotThoughts/jjui.nvim", "HotThoughts/jjui.nvim",
enabled = false,
cmd = { cmd = {
"JJUI", "JJUI",
"JJUICurrentFile", "JJUICurrentFile",
+9 -25
View File
@@ -218,12 +218,12 @@ return {
}, },
-- git -- git
{ {
"<leader>gcb", "<leader>jc",
function() function()
local cwd = vim.fn.getcwd() local cwd = vim.fn.getcwd()
-- Helper to run git commands and capture both stdout and stderr -- Helper to run commands and capture both stdout and stderr
local function git_cmd(cmd) local function run_cmd(cmd)
local full_cmd = "cd " .. vim.fn.shellescape(cwd) .. " && " .. cmd .. " 2>&1" local full_cmd = "cd " .. vim.fn.shellescape(cwd) .. " && " .. cmd .. " 2>&1"
local handle = io.popen(full_cmd) local handle = io.popen(full_cmd)
local result = handle and handle:read("*a") or "" local result = handle and handle:read("*a") or ""
@@ -234,7 +234,7 @@ return {
end end
-- Check if in a git repo -- Check if in a git repo
local git_dir = git_cmd("git rev-parse --git-dir") local git_dir = run_cmd("git rev-parse --git-dir")
if git_dir == "" or git_dir:match("^fatal") then if git_dir == "" or git_dir:match("^fatal") then
vim.notify("Not in a git repository", vim.log.levels.WARN) vim.notify("Not in a git repository", vim.log.levels.WARN)
return return
@@ -242,7 +242,7 @@ return {
-- Get the default branch -- Get the default branch
local function branch_exists(branch) local function branch_exists(branch)
local result = git_cmd("git rev-parse --verify refs/remotes/origin/" .. branch) local result = run_cmd("git rev-parse --verify refs/remotes/origin/" .. branch)
-- If branch exists, rev-parse returns a hash; if not, it returns fatal error -- If branch exists, rev-parse returns a hash; if not, it returns fatal error
return not result:match("^fatal") return not result:match("^fatal")
end end
@@ -259,19 +259,10 @@ return {
return return
end end
-- Get current branch
local current_branch = git_cmd("git branch --show-current")
if current_branch == "" then
current_branch = "HEAD"
end
local compare_target = "origin/" .. default_branch
-- Get files that differ from origin/main (includes committed + uncommitted changes) -- Get files that differ from origin/main (includes committed + uncommitted changes)
local result = git_cmd("git diff --name-only " .. compare_target) local result = run_cmd("jj diff --from " .. default_branch .. "@origin --to @ --summary | awk '{print $2}'")
vim.notify(result)
-- Also get untracked files
local untracked = git_cmd("git ls-files --others --exclude-standard")
-- Combine results -- Combine results
local all_files = {} local all_files = {}
@@ -284,20 +275,13 @@ return {
end end
end end
for line in untracked:gmatch("[^\r\n]+") do
if line ~= "" and not seen[line] then
seen[line] = true
table.insert(all_files, { text = line .. " [untracked]", file = line })
end
end
if #all_files == 0 then if #all_files == 0 then
vim.notify("No modified files (vs " .. compare_target .. ")", vim.log.levels.INFO) vim.notify("No modified files", vim.log.levels.INFO)
return return
end end
Snacks.picker({ Snacks.picker({
title = "Modified Files (vs " .. compare_target .. ")", title = "Modified Files",
items = all_files, items = all_files,
layout = { preset = "default" }, layout = { preset = "default" },
confirm = function(picker, item) confirm = function(picker, item)
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"activePack": "solid_snake", "activePack": "solid_snake",
"volume": 1.5, "volume": 1.5,
"muted": false, "muted": true,
"enabledCategories": { "enabledCategories": {
"session.start": true, "session.start": true,
"task.acknowledge": true, "task.acknowledge": true,
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
"lastChangelogVersion": "0.67.5", "lastChangelogVersion": "0.67.68",
"defaultProvider": "anthropic", "defaultProvider": "anthropic",
"defaultModel": "claude-opus-4-7", "defaultModel": "claude-opus-4-7",
"defaultThinkingLevel": "off", "defaultThinkingLevel": "off",
+4
View File
@@ -1,3 +1,7 @@
# Tool usage
FUCKING ALWAYS use timeout on tool usage because sometimes you're stupid, and hang on things because you assume its non interactive. And by that I don't mean appending `timeout` to bash or something, but you have a way to add a timeout to tool calling somehow. I don't know the inner workings of the harness.
# Validations # Validations
Sometimes some repositories (stupidly) ask you to run validations after changes or some shit. Thing is, you're smart. Your edit tools already contain formatting and LSP hooks. So, you may ask the user if they want you to run said "required" validations, but they're not really required. Sometimes some repositories (stupidly) ask you to run validations after changes or some shit. Thing is, you're smart. Your edit tools already contain formatting and LSP hooks. So, you may ask the user if they want you to run said "required" validations, but they're not really required.