Skip to content

Commit c7ae945

Browse files
committed
fix(ui): warn when message for part is missing
Add a warning notification when a part update references a message that cannot be found in the render state. This helps with debugging and improves visibility into potential state inconsistencies.
1 parent 1961cec commit c7ae945

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lua/opencode/ui/renderer.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,7 @@ function M.on_part_updated(properties, revert_index)
731731

732732
local rendered_message = M._render_state:get_message(part.messageID)
733733
if not rendered_message or not rendered_message.message then
734+
vim.notify('Could not find message for part: ' .. vim.inspect(part), vim.log.levels.WARN)
734735
return
735736
end
736737

0 commit comments

Comments
 (0)