Skip to content

Commit df00727

Browse files
authored
fix: unable to hide popular shortcuts when greeting screen is turned off (#1396)
1 parent 28e3ec8 commit df00727

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

crates/q_chat/src/lib.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -796,13 +796,6 @@ impl ChatContext {
796796
self.draw_tip_box(tip)?;
797797
}
798798

799-
// update the current tip index
800-
let next_tip_index = (current_tip_index + 1) % ROTATING_TIPS.len();
801-
self.state
802-
.set_value("chat.greeting.rotating_tips_current_index", next_tip_index)?;
803-
}
804-
805-
if self.interactive {
806799
execute!(
807800
self.output,
808801
style::Print(if is_small_screen {
@@ -817,7 +810,13 @@ impl ChatContext {
817810
)
818811
)?;
819812
execute!(self.output, style::Print("\n"), style::SetForegroundColor(Color::Reset))?;
813+
814+
// update the current tip index
815+
let next_tip_index = (current_tip_index + 1) % ROTATING_TIPS.len();
816+
self.state
817+
.set_value("chat.greeting.rotating_tips_current_index", next_tip_index)?;
820818
}
819+
821820
if self.interactive && self.all_tools_trusted() {
822821
queue!(
823822
self.output,

0 commit comments

Comments
 (0)