From 8cc55a0a9964458ed920f89ac59f2640a40a6fa9 Mon Sep 17 00:00:00 2001 From: ciregenz Date: Sun, 16 Aug 2026 19:18:09 -0700 Subject: [PATCH] [eric] help: cap the help agent's changelog block at 30 fixes so the knowledge prompt stays inside its token budget --- backend/apps/help/changelog.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/apps/help/changelog.py b/backend/apps/help/changelog.py index ae3b8bdd..4e21277c 100644 --- a/backend/apps/help/changelog.py +++ b/backend/apps/help/changelog.py @@ -196,7 +196,11 @@ def help_context_block(app_version: str) -> str: shown = app_version if release_notes(app_version) is note and app_version else note.version body = [f"Version {shown}: {note.headline}"] body += [f"- new: {h}" for h in note.highlights] - body += [f"- fixed: {f}" for f in note.fixes] + # The Help agent's context rides a token budget; the full list stays in the changelog UI. + p_shown_fixes = note.fixes[:30] + body += [f"- fixed: {f}" for f in p_shown_fixes] + if len(note.fixes) > len(p_shown_fixes): + body.append(f"- ...plus {len(note.fixes) - len(p_shown_fixes)} more fixes in this release.") return "\n".join(body)