mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
fix(test): read back history after SetHistory to account for CreatedAt normalization
This commit is contained in:
@@ -1062,6 +1062,8 @@ func TestProcessMessage_BtwCommandRunsWithoutPersistingHistory(t *testing.T) {
|
||||
defaultAgent.Sessions.SetHistory(sessionKey, initialHistory)
|
||||
defaultAgent.Sessions.SetSummary(sessionKey, "The team decided to keep state request-scoped.")
|
||||
|
||||
initialHistory = defaultAgent.Sessions.GetHistory(sessionKey)
|
||||
|
||||
response, err := al.processMessage(context.Background(), msg)
|
||||
if err != nil {
|
||||
t.Fatalf("processMessage() error = %v", err)
|
||||
@@ -1180,6 +1182,8 @@ func TestProcessMessage_BtwCommandUsesIsolatedProvider(t *testing.T) {
|
||||
}
|
||||
defaultAgent.Sessions.SetHistory(mainSessionKey, initialHistory)
|
||||
|
||||
initialHistory = defaultAgent.Sessions.GetHistory(mainSessionKey)
|
||||
|
||||
// Process a /btw command
|
||||
response, err := al.processMessage(context.Background(), bus.InboundMessage{
|
||||
Channel: "telegram",
|
||||
|
||||
Reference in New Issue
Block a user