fix: improve code prompts to output only raw code

Add explicit instruction to all code generation prompts to return
only raw code without explanations, markdown, or code fences.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-11 19:48:17 -05:00
parent 9d52b9364f
commit 29f321995d
8 changed files with 172 additions and 19 deletions

View File

@@ -17,7 +17,8 @@ function M.get_project_root()
end
found = vim.fn.finddir(marker, current .. ";")
if found ~= "" then
return vim.fn.fnamemodify(found, ":p:h")
-- For directories, :p:h gives the dir itself, so we need :p:h:h to get parent
return vim.fn.fnamemodify(found, ":p:h:h")
end
end