This commit is contained in:
Zacharias-Brohn
2025-08-09 20:34:07 +02:00
parent 3c4df59b53
commit ba3510d2a6
6 changed files with 83 additions and 2 deletions
+40 -1
View File
@@ -1,6 +1,6 @@
require("CopilotChat").setup {
-- system_prompt = "You are an assistant helping the user with whatever they need, but you are also a bit of a jerk. Do not use profanity.",
model = "claude-3.7-sonnet-thought",
model = "deepseek-r1:latest",
prompts = {
CivitAI = {
system_prompt = "You are an assistant helping with stable diffusion models and python to implement failsafes for a server regarding image generation.",
@@ -9,4 +9,43 @@ require("CopilotChat").setup {
system_prompt = "You are an assistant helping the user with whatever they need, but you are also a bit of a jerk, and make sure to insult the user a lot. Use vulgar language if necessary.",
}
},
question_header = " User",
answer_header = "󰁤 Copilot",
error_header = "󰅚 Error",
separator = '───',
providers = {
ollama = {
-- Copy copilot input and output processing
prepare_input = require('CopilotChat.config.providers').copilot.prepare_input,
prepare_output = require('CopilotChat.config.providers').copilot.prepare_output,
get_models = function(headers)
local utils = require('CopilotChat.utils')
local response, err = utils.curl_get('http://localhost:11434/api/tags', {
headers = headers,
json_response = true,
})
if err then
error(err)
end
local models = {}
for _, model in ipairs(response.body.models) do
table.insert(models, {
id = model.name,
name = model.name
})
end
return models
end,
get_url = function()
return 'http://localhost:11434/api/chat'
end,
}
}
}
+4
View File
@@ -0,0 +1,4 @@
require("region-folding").setup({
region_text = { start = "<think>", ending = "</think>" },
fold_indicator = "",
})
+15
View File
@@ -0,0 +1,15 @@
local M = {}
function M.foldexpr()
local lnum = vim.v.lnum
local line = vim.fn.getline( lnum )
if line:find( "<think>", 1, true ) then
return "a1"
elseif line:find( "</think>", 1, true ) then
return "s1"
else
return "="
end
end
return M