Skip to content

Commit 4e05f0a

Browse files
committed
fix(core): context has already been required
1 parent 5031ed1 commit 4e05f0a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lua/opencode/core.lua

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ function M.open(opts)
5151

5252
if are_windows_closed then
5353
-- Check if whether prompting will be allowed
54-
local context_module = require('opencode.context')
55-
local mentioned_files = context_module.context.mentioned_files or {}
54+
local mentioned_files = context.context.mentioned_files or {}
5655
local allowed, err_msg = util.check_prompt_allowed(config.prompt_guard, mentioned_files)
5756
if not allowed then
5857
vim.notify(err_msg or 'Prompts will be denied by prompt_guard', vim.log.levels.WARN)
@@ -92,8 +91,7 @@ end
9291
--- @param opts? SendMessageOpts
9392
function M.send_message(prompt, opts)
9493
-- Check if prompt is allowed
95-
local context_module = require('opencode.context')
96-
local mentioned_files = context_module.context.mentioned_files or {}
94+
local mentioned_files = context.context.mentioned_files or {}
9795
local allowed, err_msg = util.check_prompt_allowed(config.prompt_guard, mentioned_files)
9896

9997
if not allowed then

0 commit comments

Comments
 (0)