Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: topcheer/ggcode
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.3.61
Choose a base ref
...
head repository: topcheer/ggcode
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.3.62
Choose a head ref
  • 3 commits
  • 14 files changed
  • 2 contributors

Commits on Jun 7, 2026

  1. fix: batch sub-agent stream text/reasoning to prevent TUI message flood

    Sub-agent NotifyStreamText/NotifyReasoning were called on every LLM
    streaming token (~50-100/s per agent) with no batching, sending each
    token as a separate Bubble Tea message. With 2-3 concurrent sub-agents
    this produced 300-600 messages/second that overwhelmed the serial
    Update() loop, causing severe TUI stuttering.
    
    Changes:
    - Add per-agent text/reasoning buffers to subagent.Manager with an 80ms
      ticker that flushes accumulated chunks in batches (~12.5 Hz vs ~100 Hz)
    - Add StartStreamBatcher() called after TUI callbacks are wired
    - Flush remaining buffers on Shutdown()
    - Remove safego.Go wrapper from sendProgramMsgs — program.Send is already
      thread-safe (buffered channel), the goroutine only added scheduling
      overhead and message reordering risk
    - Update tests to use FlushStreamBatch() and non-blocking mock sends
    
    Result: ~85% reduction in message volume with 3 concurrent sub-agents
    (600+/s → ~80/s), eliminating TUI freeze during sub-agent work.
    
    Co-Authored-By: ggcode <noreply@ggcode.dev>
    Junjun Zhang and ggcode committed Jun 7, 2026
    Configuration menu
    Copy the full SHA
    a8794c9 View commit details
    Browse the repository at this point in the history
  2. fix: batch swarm teammate text/reasoning to prevent TUI message flood

    Same issue as sub-agents: teammate_text/teammate_reasoning events were
    emitted on every LLM streaming token (~50-100/s per teammate) through
    the Manager.emit() → SetOnUpdate callback → sendProgramMsgs path. With
    4+ teammates working concurrently this produced 400-800 messages/second.
    
    Changes:
    - Add per-teammate text/reasoning buffers to swarm.Manager with an 80ms
      ticker (same interval as sub-agent batching)
    - teammate_text and teammate_reasoning events are buffered in emit();
      all other event types (tool_call, idle, shutdown, etc.) pass through
      immediately
    - StartStreamBatcher() called after TUI SetOnUpdate wiring
    - Flush remaining buffers on Shutdown()
    - Export FlushStreamBatch() for test use
    
    Combined with the sub-agent batching fix, total message volume with
    3 sub-agents + 4 teammates drops from ~1400/s to ~90/s.
    
    Co-Authored-By: ggcode <noreply@ggcode.dev>
    Junjun Zhang and ggcode committed Jun 7, 2026
    Configuration menu
    Copy the full SHA
    d910c2d View commit details
    Browse the repository at this point in the history
  3. release: v1.3.62

    Co-Authored-By: ggcode <noreply@ggcode.dev>
    Junjun Zhang and ggcode committed Jun 7, 2026
    Configuration menu
    Copy the full SHA
    c4e24d4 View commit details
    Browse the repository at this point in the history
Loading