fix(webui): render local CLI image artifacts
This commit is contained in:
@@ -42,6 +42,19 @@ def test_replay_delta_and_turn_end(tmp_path, monkeypatch) -> None:
|
||||
assert msgs[1]["latencyMs"] == 42
|
||||
|
||||
|
||||
def test_replay_augments_assistant_text() -> None:
|
||||
msgs = replay_transcript_to_ui_messages(
|
||||
[
|
||||
{"event": "user", "chat_id": "t-img", "text": "draw"},
|
||||
{"event": "delta", "chat_id": "t-img", "text": ""},
|
||||
{"event": "stream_end", "chat_id": "t-img"},
|
||||
],
|
||||
augment_assistant_text=lambda text: text.replace("diagram.png", "/api/media/sig/payload"),
|
||||
)
|
||||
|
||||
assert msgs[1]["content"] == ""
|
||||
|
||||
|
||||
def test_replay_file_edit_event_creates_file_activity(tmp_path, monkeypatch) -> None:
|
||||
monkeypatch.setattr("nanobot.config.paths.get_data_dir", lambda: tmp_path)
|
||||
key = "websocket:t-file"
|
||||
|
||||
Reference in New Issue
Block a user