Skip to content

Commit 462af6d

Browse files
committed
fix(streaming_renderer): scroll on permissions
1 parent ff9a8a3 commit 462af6d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/opencode/ui/streaming_renderer.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ function M._scroll_to_bottom()
158158
end
159159

160160
if was_at_bottom or not is_focused then
161-
-- vim.notify('was_at_bottom: ' .. tostring(was_at_bottom) .. ' is_focused: ' .. tostring(is_focused))
162161
require('opencode.ui.ui').scroll_to_bottom()
163162
end
164163
end
@@ -523,6 +522,7 @@ function M.on_permission_updated(event)
523522
local part_id = M._find_part_by_call_id(permission.callID)
524523
if part_id then
525524
M._rerender_part(part_id)
525+
M._scroll_to_bottom()
526526
end
527527
end
528528

@@ -538,6 +538,7 @@ function M.on_permission_replied(event)
538538
local part_id = M._find_part_by_call_id(old_permission.callID)
539539
if part_id then
540540
M._rerender_part(part_id)
541+
M._scroll_to_bottom()
541542
end
542543
end
543544
end

0 commit comments

Comments
 (0)