mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-03 03:08:43 +02:00
[eric] help: cap the help agent's changelog block at 30 fixes so the knowledge prompt stays inside its token budget
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user