Skip to content

Commit 25ad56c

Browse files
committed
fix(context): don't send empty diagnostic context
1 parent ac58e79 commit 25ad56c

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
@@ -407,7 +407,7 @@ function M.format_message(prompt, opts)
407407
table.insert(parts, format_file_part(context.current_file.path))
408408
end
409409

410-
if context.linter_errors then
410+
if context.linter_errors and #context.linter_errors > 0 then
411411
table.insert(parts, format_diagnostics_part(context.linter_errors))
412412
end
413413

0 commit comments

Comments
 (0)