[feat] reduce bottom padding to 1 line (#2704)
This commit is contained in:
@@ -72,7 +72,7 @@ pub(crate) struct BottomPaneParams {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl BottomPane {
|
impl BottomPane {
|
||||||
const BOTTOM_PAD_LINES: u16 = 2;
|
const BOTTOM_PAD_LINES: u16 = 1;
|
||||||
pub fn new(params: BottomPaneParams) -> Self {
|
pub fn new(params: BottomPaneParams) -> Self {
|
||||||
let enhanced_keys_supported = params.enhanced_keys_supported;
|
let enhanced_keys_supported = params.enhanced_keys_supported;
|
||||||
Self {
|
Self {
|
||||||
@@ -648,28 +648,15 @@ mod tests {
|
|||||||
"expected Working header on top row: {top:?}"
|
"expected Working header on top row: {top:?}"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Next row (spacer) is blank, and bottom two rows are blank padding
|
// Last row should be blank padding; the row above should generally contain composer content.
|
||||||
let mut spacer = String::new();
|
|
||||||
let mut r_last = String::new();
|
let mut r_last = String::new();
|
||||||
let mut r_last2 = String::new();
|
|
||||||
for x in 0..area.width {
|
for x in 0..area.width {
|
||||||
// Spacer row immediately below the status header lives at y=2.
|
|
||||||
spacer.push(buf[(x, 2)].symbol().chars().next().unwrap_or(' '));
|
|
||||||
r_last.push(buf[(x, height - 1)].symbol().chars().next().unwrap_or(' '));
|
r_last.push(buf[(x, height - 1)].symbol().chars().next().unwrap_or(' '));
|
||||||
r_last2.push(buf[(x, height - 2)].symbol().chars().next().unwrap_or(' '));
|
|
||||||
}
|
}
|
||||||
assert!(
|
|
||||||
spacer.trim().is_empty(),
|
|
||||||
"expected spacer line blank: {spacer:?}"
|
|
||||||
);
|
|
||||||
assert!(
|
assert!(
|
||||||
r_last.trim().is_empty(),
|
r_last.trim().is_empty(),
|
||||||
"expected last row blank: {r_last:?}"
|
"expected last row blank: {r_last:?}"
|
||||||
);
|
);
|
||||||
assert!(
|
|
||||||
r_last2.trim().is_empty(),
|
|
||||||
"expected second-to-last row blank: {r_last2:?}"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
source: tui/src/chatwidget/tests.rs
|
source: tui/src/chatwidget/tests.rs
|
||||||
|
assertion_line: 728
|
||||||
expression: terminal.backend()
|
expression: terminal.backend()
|
||||||
---
|
---
|
||||||
"? Codex wants to run echo hello world "
|
"? Codex wants to run echo hello world "
|
||||||
@@ -10,4 +11,3 @@ expression: terminal.backend()
|
|||||||
"▌ Yes Always No No, provide feedback "
|
"▌ Yes Always No No, provide feedback "
|
||||||
"▌ Approve and run the command "
|
"▌ Approve and run the command "
|
||||||
" "
|
" "
|
||||||
" "
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
source: tui/src/chatwidget/tests.rs
|
source: tui/src/chatwidget/tests.rs
|
||||||
assertion_line: 690
|
assertion_line: 763
|
||||||
expression: terminal.backend()
|
expression: terminal.backend()
|
||||||
---
|
---
|
||||||
"The model wants to apply changes "
|
"The model wants to apply changes "
|
||||||
@@ -11,4 +11,3 @@ expression: terminal.backend()
|
|||||||
"▌ Yes No No, provide feedback "
|
"▌ Yes No No, provide feedback "
|
||||||
"▌ Approve and apply the changes "
|
"▌ Approve and apply the changes "
|
||||||
" "
|
" "
|
||||||
" "
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
source: tui/src/chatwidget/tests.rs
|
source: tui/src/chatwidget/tests.rs
|
||||||
|
assertion_line: 779
|
||||||
expression: terminal.backend()
|
expression: terminal.backend()
|
||||||
---
|
---
|
||||||
"▌ Ask Codex to do anything "
|
"▌ Ask Codex to do anything "
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
---
|
---
|
||||||
source: tui/src/chatwidget/tests.rs
|
source: tui/src/chatwidget/tests.rs
|
||||||
|
assertion_line: 779
|
||||||
expression: terminal.backend()
|
expression: terminal.backend()
|
||||||
---
|
---
|
||||||
|
" "
|
||||||
"▌ Ask Codex to do anything "
|
"▌ Ask Codex to do anything "
|
||||||
" "
|
" "
|
||||||
" "
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
source: tui/src/chatwidget/tests.rs
|
source: tui/src/chatwidget/tests.rs
|
||||||
|
assertion_line: 807
|
||||||
expression: terminal.backend()
|
expression: terminal.backend()
|
||||||
---
|
---
|
||||||
"▌ Ask Codex to do anything "
|
"▌ Ask Codex to do anything "
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
source: tui/src/chatwidget/tests.rs
|
source: tui/src/chatwidget/tests.rs
|
||||||
|
assertion_line: 807
|
||||||
expression: terminal.backend()
|
expression: terminal.backend()
|
||||||
---
|
---
|
||||||
" "
|
" "
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
source: tui/src/chatwidget/tests.rs
|
source: tui/src/chatwidget/tests.rs
|
||||||
assertion_line: 806
|
assertion_line: 878
|
||||||
expression: terminal.backend()
|
expression: terminal.backend()
|
||||||
---
|
---
|
||||||
" "
|
" "
|
||||||
@@ -9,4 +9,3 @@ expression: terminal.backend()
|
|||||||
"▌ Ask Codex to do anything "
|
"▌ Ask Codex to do anything "
|
||||||
" ⏎ send Ctrl+J newline Ctrl+T transcript Ctrl+C quit "
|
" ⏎ send Ctrl+J newline Ctrl+T transcript Ctrl+C quit "
|
||||||
" "
|
" "
|
||||||
" "
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
source: tui/src/chatwidget/tests.rs
|
source: tui/src/chatwidget/tests.rs
|
||||||
|
assertion_line: 851
|
||||||
expression: terminal.backend()
|
expression: terminal.backend()
|
||||||
---
|
---
|
||||||
"? Codex wants to run echo 'hello world' "
|
"? Codex wants to run echo 'hello world' "
|
||||||
@@ -10,4 +11,3 @@ expression: terminal.backend()
|
|||||||
"▌ Yes Always No No, provide feedback "
|
"▌ Yes Always No No, provide feedback "
|
||||||
"▌ Approve and run the command "
|
"▌ Approve and run the command "
|
||||||
" "
|
" "
|
||||||
" "
|
|
||||||
|
|||||||
Reference in New Issue
Block a user