feat: add single-call action protocol and Android stage interfaces

This commit is contained in:
zenord
2026-10-13 00:41:55 +08:00
parent dfd1372ba2
commit e91354c9e8
41 changed files with 1438 additions and 70 deletions
+7
View File
@@ -38,3 +38,10 @@ class ServerClockTests(unittest.TestCase):
LLMProvider({'LAN_LLM_TIME_ZONE': 'invalid/zone'})
with self.assertRaises(ValueError):
ServerClock(now=lambda: datetime(2026, 1, 1)).messages([])
def test_rebuilt_messages_replace_only_gateway_reference(self):
clock=ServerClock(now=lambda: datetime(2026, 1, 1, tzinfo=timezone.utc))
messages=clock.messages([{'role':'system','content':'persona'},{'role':'user','content':'public'}])
again=clock.messages(messages)
self.assertEqual(again[0]['content'].count('当前服务器时间:'),1)
self.assertIn('persona',again[0]['content'])