mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-07-12 18:50:35 +00:00
#4932 added a second 'const resultsByTid={}' (in _collectToolResultSnippetsByTid) EARLIER in ui.js than the renderMessages derived rebuild, so the #4927 test's UI_JS.index('const resultsByTid={};') sliced the wrong region and 4 assertions failed. Re-anchor on 'const fallbackToolSources=[];' which is unique to the derived-rebuild block. Pure test fix, no behavior change.
This commit is contained in:
@@ -24,11 +24,16 @@ SESSIONS_JS = (Path(__file__).parent.parent / "static" / "sessions.js").read_tex
|
||||
|
||||
|
||||
def _slice_derived_rebuild() -> str:
|
||||
"""Return the renderMessages fallback-rebuild region (resultsByTid block)."""
|
||||
start = UI_JS.index("const resultsByTid={};")
|
||||
"""Return the renderMessages fallback-rebuild region (resultsByTid block).
|
||||
|
||||
Anchored on `const fallbackToolSources=[];` which is unique to the
|
||||
renderMessages derived-rebuild block — `const resultsByTid={};` alone is no
|
||||
longer unique (the transparent-stream ordered path added its own at #4932).
|
||||
"""
|
||||
start = UI_JS.index("const fallbackToolSources=[];")
|
||||
# The region runs through the _partial_tool_calls derived push; bound it
|
||||
# generously so both derived-push sites are included.
|
||||
return UI_JS[start:start + 6000]
|
||||
# generously so all derived-push sites are included.
|
||||
return UI_JS[start:start + 7000]
|
||||
|
||||
|
||||
def test_persisted_snippet_lookup_is_built_from_session_tool_calls():
|
||||
|
||||
Reference in New Issue
Block a user