e4dcfc49aa
Tests / Import Check (Python 3.13) (push) Has been cancelled
Tests / Import Check (Python 3.14) (push) Has been cancelled
Tests / Python Tests (Python 3.11) (push) Has been cancelled
Tests / Python Tests (Python 3.12) (push) Has been cancelled
Tests / Python Tests (Python 3.14) (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
Tests / Lint and Format (push) Has been cancelled
Tests / Web Node Tests (push) Has been cancelled
Tests / Import Check (Python 3.11) (push) Has been cancelled
Tests / Import Check (Python 3.12) (push) Has been cancelled
Tests / Python Tests (Python 3.13) (push) Has been cancelled
16 lines
507 B
Python
16 lines
507 B
Python
from __future__ import annotations
|
|
|
|
from deeptutor.services.session.turn_runtime import _sanitize_session_title
|
|
|
|
|
|
def test_sanitize_session_title_removes_reasoning_block() -> None:
|
|
raw = "<think>\nNeed a concise title.\n</think>\n标题:AgenticRAG 定义"
|
|
|
|
assert _sanitize_session_title(raw) == "AgenticRAG 定义"
|
|
|
|
|
|
def test_sanitize_session_title_falls_back_when_only_reasoning_remains() -> None:
|
|
raw = "<think>\nStill deciding on the title."
|
|
|
|
assert _sanitize_session_title(raw) == ""
|