Repository navigation
Commit 1916507
committed
fix(sdk): preserve compaction and avoid double-persist on the error path
When committing the errored turn's state to the accumulator, append only the
new tail's model messages (errored user message and/or recovered partial)
instead of reconverting the whole UI history, so a prior turn's model-only
compaction survives an errored turn. Skip re-adding the partial once the
response was already committed (a later compaction may have folded it into a
summary), and roll the event/snapshot views back if the model conversion
fails so they never advertise a partial the accumulator didn't take.1 parent ecfede6 commit 1916507
1 file changed
Lines changed: 14 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7956 | 7956 | | |
7957 | 7957 | | |
7958 | 7958 | | |
7959 | | - | |
| 7959 | + | |
| 7960 | + | |
7960 | 7961 | | |
7961 | 7962 | | |
7962 | 7963 | | |
7963 | 7964 | | |
7964 | 7965 | | |
7965 | 7966 | | |
7966 | 7967 | | |
7967 | | - | |
7968 | | - | |
7969 | | - | |
7970 | | - | |
7971 | | - | |
| 7968 | + | |
| 7969 | + | |
| 7970 | + | |
7972 | 7971 | | |
7973 | 7972 | | |
7974 | 7973 | | |
| |||
7984 | 7983 | | |
7985 | 7984 | | |
7986 | 7985 | | |
7987 | | - | |
7988 | | - | |
7989 | | - | |
7990 | | - | |
7991 | 7986 | | |
7992 | | - | |
| 7987 | + | |
7993 | 7988 | | |
7994 | | - | |
| 7989 | + | |
7995 | 7990 | | |
7996 | 7991 | | |
7997 | | - | |
7998 | | - | |
| 7992 | + | |
| 7993 | + | |
| 7994 | + | |
| 7995 | + | |
| 7996 | + | |
7999 | 7997 | | |
8000 | 7998 | | |
8001 | 7999 | | |
| |||
8004 | 8002 | | |
8005 | 8003 | | |
8006 | 8004 | | |
| 8005 | + | |
| 8006 | + | |
8007 | 8007 | | |
8008 | 8008 | | |
8009 | 8009 | | |
| |||
0 commit comments