Render initial chat prompt and submitted messages
This commit is contained in:
committed by
Brandon McGinty
parent
21e0627509
commit
dc9dedb523
@@ -78,6 +78,10 @@ func (b *Barnard) UpdateInputStatus(status string) {
|
||||
}
|
||||
b.Ui.Post(func() {
|
||||
b.UiInputStatus.Text = status
|
||||
// The initial connection status arrives after Run's first layout. Relayout
|
||||
// so the prompt has cells to draw before focus is changed.
|
||||
width, height := termbox.Size()
|
||||
b.OnUiResize(b.Ui, width, height)
|
||||
b.RebuildUserChannelTreePreservingSelection()
|
||||
b.Ui.Refresh()
|
||||
})
|
||||
@@ -516,8 +520,9 @@ func (b *Barnard) OnUiInitialize(ui *uiterm.Ui) {
|
||||
ui.Add(uiViewInput, &b.UiInput)
|
||||
|
||||
b.UiInputStatus = uiterm.Label{
|
||||
Fg: uiterm.ColorBlack,
|
||||
Bg: uiterm.ColorWhite,
|
||||
Text: "[root]",
|
||||
Fg: uiterm.ColorBlack,
|
||||
Bg: uiterm.ColorWhite,
|
||||
}
|
||||
ui.Add(uiViewInputStatus, &b.UiInputStatus)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user