Files
odysseus/tests/test_tool_phase_ttft_static.py
T

14 lines
458 B
Python

from pathlib import Path
CHAT_JS = Path(__file__).parents[1] / "static" / "js" / "chat.js"
def test_tool_start_stops_initial_ttft_before_tool_execution():
source = CHAT_JS.read_text()
branch = source.index("} else if (json.type === 'tool_start') {")
mark_output = source.index("markFirstVisibleOutput();", branch)
close_thinking = source.index("_closeOpenThinkingMarkup(_isBg);", branch)
assert branch < mark_output < close_thinking