Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permit configuration of options, e.g. opts.window = "split" #36

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lua/ollama/actions/factory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local factory = {}
---@field window "float" | "split" | "vsplit" | nil type of window to display the response in (default: "float") (NOT YET IMPLEMENTED)

---@type Ollama.ActionFactoryBuildOpts
local default_opts = {
factory.default_opts = {
display = true,
insert = false,
replace = false,
Expand All @@ -21,7 +21,7 @@ function factory.create_action(opts)
-- prepare for the ugliest most deeply nested if statements you've ever seen
-- I'm so sorry

opts = vim.tbl_extend("force", default_opts, opts or {})
opts = vim.tbl_extend("force", factory.default_opts, opts or {})
---@type Ollama.PromptAction
local action = {
fn = function(prompt)
Expand Down