feat(ollama): enforce JSON logits & add nvim_buffer edit action

- Added format parameter to Ollama generate for JSON logit enforcement.

- Implemented safe edit action in nvim_buffer MCP tool to replace raw Lua.
This commit is contained in:
Riz Ashraf committed 2026-10-08 23:41:57 +01:00
1 parent 003b3cb2bf
commit 410b0c42ca
6 files changed
+56 -8

No files matched your search

+2 -2
View File
@@ -33,7 +33,7 @@ impl McpTool for LogErrorFixHandler {
);
if let Ok(summary) = state
.ollama
.generate(&prompt, Some(&state.ollama.reasoning_model), None)
.generate(&prompt, Some(&state.ollama.reasoning_model), None, None)
.await
{
let clean = summary.trim();
@@ -207,7 +207,7 @@ impl McpTool for LogCodeChangeHandler {
"Summarize in 1 concise sentence the architectural impact of changing file '{}': {}",
req.file_path, description
);
if let Ok(summary) = state.ollama.generate(&prompt, None, None).await {
if let Ok(summary) = state.ollama.generate(&prompt, None, None, None).await {
let clean = summary.trim();
if !clean.is_empty() {
description = format!("{} (AI Summary: {})", description, clean);