Skip to content

Commit

Permalink
fix(slash_commands): prompt library now works with blink.cmp
Browse files Browse the repository at this point in the history
  • Loading branch information
olimorris committed Dec 10, 2024
1 parent 39488dc commit 1027f47
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/codecompanion/providers/completion/blink/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ function M:get_completions(ctx, callback)
return {
label = item.label:sub(2),
ctx = ctx,
from_prompt_library = item.from_prompt_library,
config = item.config,
type = "slash_command",
kind = vim.lsp.protocol.CompletionItemKind.Function,
Expand Down Expand Up @@ -100,7 +101,7 @@ function M:execute(ctx, item)
{ "" }
)

local chat = require("codecompanion").buf_get_chat(ctx.bufnr)
local chat = require("codecompanion").buf_get_chat(item.ctx.bufnr)
completion.slash_commands_execute(item, chat)

vim.bo[item.ctx.bufnr].buflisted = false
Expand Down

0 comments on commit 1027f47

Please sign in to comment.