From 5031ed127f5e267ff503759130ddb36699710efa Mon Sep 17 00:00:00 2001 From: Cameron Ring Date: Fri, 31 Oct 2025 15:49:04 -0700 Subject: [PATCH 1/2] fix(core): no forced full re-render on mode switch --- lua/opencode/core.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/opencode/core.lua b/lua/opencode/core.lua index 043b7d55..e591dc19 100644 --- a/lua/opencode/core.lua +++ b/lua/opencode/core.lua @@ -295,7 +295,6 @@ function M.switch_to_mode(mode) end state.current_mode = mode - ui.render_output() return true end From 4e05f0ab2b01f2e69a8028ece6ec85314d6f126f Mon Sep 17 00:00:00 2001 From: Cameron Ring Date: Fri, 31 Oct 2025 15:57:34 -0700 Subject: [PATCH 2/2] fix(core): context has already been required --- lua/opencode/core.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/opencode/core.lua b/lua/opencode/core.lua index e591dc19..6f08a818 100644 --- a/lua/opencode/core.lua +++ b/lua/opencode/core.lua @@ -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) @@ -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