Skip to content

Commit 88edc4e

Browse files
feat: prompt_guard: Let the buffer open and warn if prompt_guard will
deny prompts
1 parent 34c3b9f commit 88edc4e

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
@@ -48,12 +48,10 @@ function M.open(opts)
4848
local are_windows_closed = state.windows == nil
4949

5050
if are_windows_closed then
51-
-- Check if opening buffer is allowed
51+
-- Check if whether prompting will be allowed
5252
local allowed, err_msg = util.check_prompt_allowed(config.prompt_guard)
53-
5453
if not allowed then
55-
vim.notify(err_msg or 'Opening opencode buffer denied by prompt_guard', vim.log.levels.WARN)
56-
return
54+
vim.notify(err_msg or 'Prompts will be denied by prompt_guard', vim.log.levels.WARN)
5755
end
5856

5957
state.windows = ui.create_windows()

0 commit comments

Comments
 (0)