feat(04-02): add matrix context management commands
- add save/load/reset/context handlers and matrix interception flows - persist current session and last token usage in prototype state
This commit is contained in:
parent
da0b76882e
commit
b52fdc4670
7 changed files with 638 additions and 21 deletions
|
|
@ -132,3 +132,14 @@ async def test_set_last_tokens_used_persists_value():
|
|||
await store.set_last_tokens_used("usr-matrix-@alice:example.org", 321)
|
||||
|
||||
assert await store.get_last_tokens_used("usr-matrix-@alice:example.org") == 321
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_current_session_roundtrip():
|
||||
store = PrototypeStateStore()
|
||||
|
||||
assert await store.get_current_session("usr-matrix-@alice:example.org") is None
|
||||
|
||||
await store.set_current_session("usr-matrix-@alice:example.org", "session-1")
|
||||
|
||||
assert await store.get_current_session("usr-matrix-@alice:example.org") == "session-1"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue