@@ -47,8 +47,10 @@ type Model struct {
4747 // Swarm broadcast history
4848 swarmMessages []SwarmMessage
4949
50- spinner spinner.Model
51- loadingSet map[string]bool // mysisIDs currently loading
50+ spinner spinner.Model
51+ loadingSet map[string]bool // mysisIDs currently loading
52+ sending bool
53+ sendingMode InputMode
5254
5355 // Conversation viewport
5456 viewport viewport.Model
@@ -58,9 +60,13 @@ type Model struct {
5860 // Network activity indicator
5961 netIndicator NetIndicator
6062
63+ providerErrorTimes []time.Time
64+
6165 err error
6266 }
6367
68+const providerErrorWindow = 10 * time.Minute
69+
6470 // SwarmMessage represents a broadcast message for display.
6571 type SwarmMessage struct {
6672 SenderID string
@@ -116,6 +122,8 @@ func (m Model) Init() tea.Cmd {
116122 func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
117123 var cmds []tea.Cmd
118124
125+ m.pruneProviderErrors(time.Now())
126+
119127 switch msg := msg.(type) {
120128 case tea.WindowSizeMsg:
121129 m.width = msg.Width
@@ -197,6 +205,8 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
197205 // Check if any loading is still active
198206 if len(m.loadingSet) == 0 {
199207 m.netIndicator.SetActivity(NetActivityIdle)
208+ m.sending = false
209+ m.sendingMode = InputModeNone
200210 }
201211 if m.view == ViewFocus && msg.mysisID == m.focusID {
202212 m.loadMysisLogs()
@@ -206,6 +216,8 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
206216 // Broadcast finished - clear all loading states
207217 m.loadingSet = make(map[string]bool)
208218 m.netIndicator.SetActivity(NetActivityIdle)
219+ m.sending = false
220+ m.sendingMode = InputModeNone
209221 if msg.err != nil {
210222 m.err = msg.err
211223 }
@@ -256,7 +268,18 @@ func (m Model) View() string {
256268 }
257269
258270 // Always show message bar
259- content += "\n" + m.input.ViewAlways(m.width)
271+ sendingLabel := ""
272+ if m.sending {
273+ switch m.sendingMode {
274+ case InputModeBroadcast:
275+ sendingLabel = "Broadcasting..."
276+ case InputModeMessage:
277+ sendingLabel = "Sending message..."
278+ default:
279+ sendingLabel = "Sending..."
280+ }
281+ }
282+ content += "\n" + m.input.ViewAlways(m.width, m.sending, sendingLabel, m.spinner.View())
260283
261284 // Add error if present
262285 if m.err != nil {
@@ -296,11 +319,22 @@ func (m Model) renderStatusBar() string {
296319 }
297320 }
298321 mysisStatus := fmt.Sprintf("Myses: %d/%d running", running, len(m.myses))
322+ providerErrors := len(m.providerErrorTimes)
323+
324+ viewStyle := lipgloss.NewStyle().Foreground(colorMuted)
325+ mysisStyle := lipgloss.NewStyle().Foreground(colorSecondary)
299326
300327 // Calculate spacing
301328 leftWidth := lipgloss.Width(netStatus)
302- rightWidth := lipgloss.Width(mysisStatus)
303329 middleWidth := lipgloss.Width(viewName)
330+
331+ rightParts := []string{mysisStyle.Render(mysisStatus)}
332+ if providerErrors > 0 {
333+ errorText := fmt.Sprintf("LLM errs(10m): %d", providerErrors)
334+ rightParts = append(rightParts, stateErroredStyle.Render(errorText))
335+ }
336+ rightSegment := strings.Join(rightParts, dimmedStyle.Render(" · "))
337+ rightWidth := lipgloss.Width(rightSegment)
304338 totalUsed := leftWidth + rightWidth + middleWidth
305339 spacing := m.width - totalUsed - 4 // -4 for some padding
306340
@@ -317,14 +351,11 @@ func (m Model) renderStatusBar() string {
317351 Foreground(colorPrimary).
318352 Width(m.width)
319353
320- viewStyle := lipgloss.NewStyle().Foreground(colorMuted)
321- mysisStyle := lipgloss.NewStyle().Foreground(colorSecondary)
322-
323354 bar := netStatus +
324355 strings.Repeat(" ", leftPad) +
325356 viewStyle.Render(viewName) +
326357 strings.Repeat(" ", rightPad) +
327- mysisStyle.Render(mysisStatus)
358+ rightSegment
328359
329360 return barStyle.Render(bar)
330361 }
@@ -474,6 +505,8 @@ func (m Model) handleInputKey(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
474505 }
475506 }
476507 m.netIndicator.SetActivity(NetActivityLLM)
508+ m.sending = true
509+ m.sendingMode = InputModeBroadcast
477510 // Use Broadcast to properly set source='broadcast'
478511 cmd = m.broadcastAsync(value)
479512
@@ -483,6 +516,8 @@ func (m Model) handleInputKey(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
483516 targetID := m.input.TargetID()
484517 m.loadingSet[targetID] = true
485518 m.netIndicator.SetActivity(NetActivityLLM)
519+ m.sending = true
520+ m.sendingMode = InputModeMessage
486521 cmd = m.sendMessageAsync(targetID, value)
487522 if m.view == ViewFocus {
488523 m.loadMysisLogs()
@@ -571,12 +606,38 @@ func (m *Model) handleEvent(event core.Event) {
571606 if len(m.loadingSet) == 0 {
572607 m.netIndicator.SetActivity(NetActivityIdle)
573608 }
609+
610+ case core.EventMysisError:
611+ if data, ok := event.Data.(core.ErrorData); ok {
612+ if strings.Contains(strings.ToLower(data.Error), "provider chat") {
613+ m.recordProviderError(event.Timestamp)
614+ }
615+ }
574616 }
575617
576618 // Clear error on successful events
577619 m.err = nil
578620 }
579621
622+func (m *Model) recordProviderError(ts time.Time) {
623+ if ts.IsZero() {
624+ ts = time.Now()
625+ }
626+ m.pruneProviderErrors(ts)
627+ m.providerErrorTimes = append(m.providerErrorTimes, ts)
628+}
629+
630+func (m *Model) pruneProviderErrors(now time.Time) {
631+ cutoff := now.Add(-providerErrorWindow)
632+ filtered := m.providerErrorTimes[:0]
633+ for _, t := range m.providerErrorTimes {
634+ if t.After(cutoff) {
635+ filtered = append(filtered, t)
636+ }
637+ }
638+ m.providerErrorTimes = filtered
639+}
640+
580641 func (m *Model) refreshMysisList() {
581642 myses := m.commander.ListMyses()
582643 m.myses = make([]MysisInfo, len(myses))