add: ai agent harnesses
currently copilot and opencode for starters, might be more
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
local function toggle_floating_tui(cmd)
|
local function toggle_tui(cmd, direction, size)
|
||||||
local terminal
|
local terminal
|
||||||
|
local dir = direction or "float"
|
||||||
|
local term_size = size
|
||||||
|
|
||||||
return function()
|
return function()
|
||||||
if not terminal then
|
if not terminal then
|
||||||
@@ -8,17 +10,19 @@ local function toggle_floating_tui(cmd)
|
|||||||
cmd = cmd,
|
cmd = cmd,
|
||||||
hidden = true,
|
hidden = true,
|
||||||
close_on_exit = true,
|
close_on_exit = true,
|
||||||
direction = "float",
|
direction = dir,
|
||||||
on_open = function() vim.cmd "startinsert!" end,
|
on_open = function() vim.cmd "startinsert!" end,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
terminal:toggle()
|
terminal:toggle(term_size, dir)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local toggle_k9s = toggle_floating_tui "k9s"
|
local toggle_k9s = toggle_tui "k9s"
|
||||||
local toggle_ghdash = toggle_floating_tui "gh-dash"
|
local toggle_ghdash = toggle_tui "gh-dash"
|
||||||
|
local toggle_ai_opencode = toggle_tui("opencode", "vertical", 80)
|
||||||
|
local toggle_ai_copilot = toggle_tui("copilot", "vertical", 80)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
@@ -36,6 +40,15 @@ return {
|
|||||||
toggle_ghdash,
|
toggle_ghdash,
|
||||||
desc = "GitHub dashboard",
|
desc = "GitHub dashboard",
|
||||||
},
|
},
|
||||||
|
["<Leader>a"] = { desc = "AI" },
|
||||||
|
["<Leader>ao"] = {
|
||||||
|
toggle_ai_opencode,
|
||||||
|
desc = "opencode",
|
||||||
|
},
|
||||||
|
["<Leader>ag"] = {
|
||||||
|
toggle_ai_copilot,
|
||||||
|
desc = "GH Copilot",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user