Prevents the JS slice(0,N) and Python _TOOL_RESULT_SNIPPET_MAX from drifting apart again. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
12 lines
417 B
Python
12 lines
417 B
Python
"""Regression test: JS tool-result snippet limit matches the Python backend limit."""
|
|
from pathlib import Path
|
|
|
|
REPO = Path(__file__).resolve().parent.parent
|
|
|
|
|
|
def test_tool_snippet_limit_parity():
|
|
py = (REPO / "api" / "streaming.py").read_text(encoding="utf-8")
|
|
js = (REPO / "static" / "ui.js").read_text(encoding="utf-8")
|
|
assert "_TOOL_RESULT_SNIPPET_MAX = 4000" in py
|
|
assert ".slice(0,4000)" in js
|