Commit 6da9e18
fix: Align InMemorySessionService listSessions with Python implementation
The Java implementation of listSessions now mirrors the Python implementation: it returns session copies that include merged app-level and user-level state, and it clears the events list before returning the sessions.
This ensures behavioral consistency between the Java and Python in-memory session services. Tests have been updated to reflect this change.
PiperOrigin-RevId: 8479757691 parent 9611f89 commit 6da9e18
2 files changed
Lines changed: 23 additions & 23 deletions
File tree
- core/src
- main/java/com/google/adk/sessions
- test/java/com/google/adk/sessions
Lines changed: 3 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | 38 | | |
41 | 39 | | |
42 | 40 | | |
| |||
50 | 48 | | |
51 | 49 | | |
52 | 50 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 51 | | |
57 | 52 | | |
58 | 53 | | |
| |||
179 | 174 | | |
180 | 175 | | |
181 | 176 | | |
182 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
183 | 180 | | |
184 | 181 | | |
185 | 182 | | |
| |||
298 | 295 | | |
299 | 296 | | |
300 | 297 | | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | 298 | | |
317 | 299 | | |
318 | 300 | | |
| |||
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
86 | 99 | | |
87 | 100 | | |
88 | 101 | | |
| 102 | + | |
89 | 103 | | |
90 | 104 | | |
91 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
92 | 110 | | |
93 | 111 | | |
94 | 112 | | |
| |||
0 commit comments