发布

  • Fix update-available notice: goroutine ordering, body limit, UX

    frostbyte_neo 发布于 2026-02-28 02:17:45 +00:00

    Three bugs prevented the update notice from appearing:

    • checkForUpdate goroutine launched after blocking sessionOnce.Do,
      so it never ran before tool calls arrived
    • 4KB body limit truncated the ~15KB GitHub API response
    • Notice was a JSON map key with no guaranteed ordering

    Fixes:

    • Move go checkForUpdate() before sessionOnce.Do in all handlers
    • Increase body read limit to 64KB
    • Prepend notice as separate MCP TextContent block (appears first)
    • Link to GitHub releases page instead of go install command
    下载附件