You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ui/output): add max_messages option to limit rendered messages (#354)
* feat(ui/output): add max_messages option to limit rendered messages
Add support for ui.output.max_messages to cap how many messages are kept
rendered in the output buffer. When the configured limit is exceeded the
oldest messages for the active session are evicted and a hidden-messages
notice is inserted/updated to indicate how many older messages are
not displayed.
This should fix#320
* feat(output): add toggle for maximum rendered messages
Add a workflow action and command to toggle ui.output.max_messages between a finite
number and nil (no limit). Wire the action into the API, keymaps (<leader>otm),
types, and UI so users can enable/disable the message limit from the output
notice or via command. The toggle notifies the user of the current state. Also
ensure render_output returns its promise/value so callers can await rendering when
requested.
* fix: re-render ui when toggling max messages
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -243,6 +243,7 @@ require('opencode').setup({
243
243
markdown_debounce_ms=250, -- Debounce time for markdown rendering on new data (default: 250ms)
244
244
on_data_rendered=nil, -- Called when new data is rendered; set to false to disable default RenderMarkdown/Markview behavior
245
245
},
246
+
max_messages=nil, -- Max number of messages to keep in the output buffer; older messages will be removed as new ones arrive (default: nil, which means no limit)
246
247
},
247
248
input= {
248
249
min_height=0.10, -- min height of prompt input as percentage of window height
---@fieldtype'diff_revert_all'|'diff_revert_selected_file'|'diff_open'|'diff_restore_snapshot_file'|'diff_restore_snapshot_all'|'select_child_session'Type of action
0 commit comments