From e51799f34db5948a92ef95c21bf20102d8a96395 Mon Sep 17 00:00:00 2001 From: Aaron Weisberg Date: Mon, 26 Jan 2026 20:07:57 -0800 Subject: [PATCH] fix(context): simplify file addition logic - remove redundant checks for file readability and directory status --- lua/opencode/context/chat_context.lua | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lua/opencode/context/chat_context.lua b/lua/opencode/context/chat_context.lua index eba286d6..fc547641 100644 --- a/lua/opencode/context/chat_context.lua +++ b/lua/opencode/context/chat_context.lua @@ -193,16 +193,6 @@ end function M.add_file(file) local is_file = vim.fn.filereadable(file) == 1 local is_dir = vim.fn.isdirectory(file) == 1 - if not is_file and not is_dir then - vim.notify('File not added to context. Could not read.') - return - end - - if not util.is_path_in_cwd(file) and not util.is_temp_path(file, 'pasted_image') then - vim.notify('File not added to context. Must be inside current working directory.') - return - end - file = vim.fn.fnamemodify(file, ':p') if not M.context.mentioned_files then