Files
dotfiles-public/private_dot_config/nvim/lua/plugins/ai_assist.lua
T
bcherb2 0aaaf51421 feat: nvim config tracks the live tree
Port the live ~/.config/nvim working tree (bcherb2/nvim master plus its
uncommitted git.lua and minimap.lua edits): adds claudecode, eslint, lsp,
typescript, meow-yarn and refactoring-fix specs, drops the files the live
repo deleted, and takes live for everything else.

Kept from public: lazy.lua with luarocks disabled, the ai_assist cond
guard (nvim-ai-assist is not anonymously clonable, so a fresh box only
gets it from the private clone list), and the scrubbed endpoint comment
in place of live's LAN address.
2026-11-18 01:32:57 -05:00

39 lines
1.6 KiB
Lua

return {
dir = vim.fn.expand("~/code/nvim-ai-assist"),
name = "nvim_ai_assist",
-- A local checkout that only some machines have. Without the cond, every
-- fresh box reports "Local plugin does not exist" on first sync.
cond = vim.fn.isdirectory(vim.fn.expand("~/code/nvim-ai-assist")) == 1,
lazy = false,
cmd = { "AI", "AIHealth", "AIRefreshContext" },
keys = {
{ "<leader>ai", ":AI<CR>", desc = "AI command (prompt)", mode = "n" },
{ "<leader>aA", ":AI!<CR>", desc = "AI command (auto-execute)", mode = "n" },
{ "<leader>ah", ":AIHealth<CR>", desc = "AI health + context stats", mode = "n" },
},
config = function()
require("nvim_ai_assist").setup({
-- Active: Z.AI Coding Plan (uses ZAI_API_KEY from env)
provider = "zai-coding",
model = "glm-5-turbo",
max_tokens = 300,
temperature = 0.05,
debug = true, -- writes request/response to ~/.cache/nvim/nvim_ai_assist.log; :AILog to view
context = {
enabled = true,
max_chars = 1500,
refresh_seconds = 60,
},
-- Local LM Studio fallback — uncomment to use, and comment out the
-- provider/model lines above.
-- The host is deliberately not written down here: this repo is public,
-- and a LAN address is one of the things the tier split exists to keep
-- out of it. Put yours in and do not commit it back.
-- endpoint = "http://<lm-studio-host>:1234/v1/chat/completions",
-- api_key = "lm-studio",
-- model = "qwen3-almost-human-y1-7b",
})
end,
}