Commit ce08ddf
committed
fix(tui): cap inline image height and preserve multiplexer scrollback
Inline images (screenshots from puppeteer, assistant images) rendered at
unbounded height — a 1280x800 screenshot consumed ~32 terminal rows,
causing excessive scrolling. In multiplexers (tmux, screen, zellij),
this was compounded by fullRender clearing scrollback on every resize.
Image height cap:
- New setting tui.maxInlineImageRows (default 20)
- Effective cap: min(setting, floor(viewport * 0.6))
- Shared resolveImageOptions() replaces per-site settings reads
- Existing calculateImageFit() already handles maxHeightCells
Multiplexer scrollback preservation:
- Skip CSI 3J (clear scrollback) in tmux/screen/zellij
- Skip fullRender(true) on height change in multiplexers
- Cached isMultiplexer constant (TMUX, STY, ZELLIJ env vars)1 parent bf22368 commit ce08ddf
File tree
5 files changed
+36
-6
lines changed- packages
- coding-agent/src
- config
- modes/components
- tools
- tui/src
5 files changed
+36
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
375 | 381 | | |
376 | 382 | | |
377 | 383 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
79 | | - | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | | - | |
| 33 | + | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
531 | 530 | | |
532 | 531 | | |
533 | 532 | | |
534 | | - | |
| 533 | + | |
535 | 534 | | |
536 | 535 | | |
537 | 536 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
22 | 42 | | |
23 | 43 | | |
24 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
115 | 118 | | |
116 | 119 | | |
117 | 120 | | |
| |||
1007 | 1010 | | |
1008 | 1011 | | |
1009 | 1012 | | |
1010 | | - | |
| 1013 | + | |
| 1014 | + | |
1011 | 1015 | | |
1012 | 1016 | | |
1013 | 1017 | | |
| |||
1056 | 1060 | | |
1057 | 1061 | | |
1058 | 1062 | | |
1059 | | - | |
| 1063 | + | |
1060 | 1064 | | |
1061 | 1065 | | |
1062 | 1066 | | |
| |||
0 commit comments