mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 18:01:22 +00:00
fix(widgets): add max line limit and document multi-hook behavior
- Limit total widget lines to 10 to prevent viewport overflow/flicker - Show '... (widget truncated)' when limit exceeded - Document that multiple hooks stack widgets vertically - Add caution about keeping widgets small
This commit is contained in:
parent
f6b728a6e5
commit
9b53b89bd5
2 changed files with 14 additions and 2 deletions
|
|
@ -445,9 +445,10 @@ const currentText = ctx.ui.getEditorText();
|
|||
|
||||
**Widget notes:**
|
||||
- Widgets are multi-line displays shown above the editor (below "Working..." indicator)
|
||||
- Multiple hooks can set widgets using unique keys
|
||||
- Multiple hooks can set widgets using unique keys (all widgets are displayed, stacked vertically)
|
||||
- Use for progress lists, todo tracking, or any multi-line status
|
||||
- Supports ANSI styling via `ctx.ui.theme` (including `strikethrough`)
|
||||
- **Caution:** Keep widgets small (a few lines). Large widgets from multiple hooks can cause viewport overflow and TUI flicker.
|
||||
|
||||
**Styling with theme colors:**
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue