feat: US-010 - Add RecordLastChannel to AgentLoop with atomic state save

- Add state *state.Manager field to AgentLoop struct
- Initialize stateManager in NewAgentLoop using state.NewManager
- Implement RecordLastChannel method that calls state.SetLastChannel
- Implement RecordLastChatID method for chat ID tracking
- Add comprehensive tests for state persistence
- Verify state survives across AgentLoop instances

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
yinwm
2026-02-12 19:49:36 +08:00
parent b94941da4a
commit feba44ecf0
4 changed files with 195 additions and 3 deletions

View File

@@ -151,7 +151,7 @@
"go test ./pkg/agent -run TestRecordLastChannel passes"
],
"priority": 10,
"passes": false,
"passes": true,
"notes": ""
},
{