Skip to content
Merged
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
7 changes: 2 additions & 5 deletions lua/opencode/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ function M.open(opts)

if are_windows_closed then
-- Check if whether prompting will be allowed
local context_module = require('opencode.context')
local mentioned_files = context_module.context.mentioned_files or {}
local mentioned_files = context.context.mentioned_files or {}
local allowed, err_msg = util.check_prompt_allowed(config.prompt_guard, mentioned_files)
if not allowed then
vim.notify(err_msg or 'Prompts will be denied by prompt_guard', vim.log.levels.WARN)
Expand Down Expand Up @@ -92,8 +91,7 @@ end
--- @param opts? SendMessageOpts
function M.send_message(prompt, opts)
-- Check if prompt is allowed
local context_module = require('opencode.context')
local mentioned_files = context_module.context.mentioned_files or {}
local mentioned_files = context.context.mentioned_files or {}
local allowed, err_msg = util.check_prompt_allowed(config.prompt_guard, mentioned_files)

if not allowed then
Expand Down Expand Up @@ -295,7 +293,6 @@ function M.switch_to_mode(mode)
end

state.current_mode = mode
ui.render_output()
return true
end

Expand Down