@@ -603,9 +603,9 @@ func (a *appModel) View() tea.View {
view.Layer = canvas
view.Cursor = cursor
view.ProgressBar = tea.NewProgressBar(tea.ProgressBarNone, 0)
- if a.app.CoderAgent.IsBusy() {- // use a random percentage to prevent the ghostty from hiding it after- // a timeout.
+ if a.app != nil && a.app.CoderAgent != nil && a.app.CoderAgent.IsBusy() {
+ // HACK: use a random percentage to prevent ghostty from hiding it
+ // after a timeout.
view.ProgressBar = tea.NewProgressBar(tea.ProgressBarIndeterminate, rand.Intn(100))
}
return view