initial impl
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from agentci.adapters.codex import _session_id
|
||||
|
||||
|
||||
def test_extracts_thread_id_from_jsonl() -> None:
|
||||
output = '\n'.join(
|
||||
[
|
||||
'{"type":"turn.started"}',
|
||||
'{"type":"thread.started","thread_id":"abc-123"}',
|
||||
"not json",
|
||||
]
|
||||
)
|
||||
assert _session_id(output) == "abc-123"
|
||||
|
||||
|
||||
def test_missing_thread_id_returns_none() -> None:
|
||||
assert _session_id('{"type":"turn.completed"}') is None
|
||||
|
||||
Reference in New Issue
Block a user