fix: tool_info is nil

This commit is contained in:
yetone
2025-07-21 11:50:14 +08:00
parent 0490927061
commit 75ebef9fbe
2 changed files with 3 additions and 0 deletions

View File

@@ -59,6 +59,8 @@ M.func = vim.schedule_wrap(function(input, opts)
if not provider then return false, "morph provider not found" end
if not provider.is_env_set() then return false, "morph provider not set" end
if not input.target_file then return false, "target_file not provided" end
local ok, lines = pcall(Utils.read_file_from_buf_or_disk, input.target_file)
if not ok then
local f = io.open(input.target_file, "r")