Skip to content

Commit 0370e7f

Browse files
committed
fix(context): don't send empty diagnostic context
1 parent b4d30ec commit 0370e7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/opencode/context.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ function M.format_message(prompt, opts)
422422
table.insert(parts, format_file_part(context.current_file.path))
423423
end
424424

425-
if context.linter_errors then
425+
if context.linter_errors and #context.linter_errors > 0 then
426426
table.insert(parts, format_diagnostics_part(context.linter_errors))
427427
end
428428

0 commit comments

Comments
 (0)