Commit d008d1e
authored
fix: clear attachments when switching chat profiles (Chainlit#2858)
Clear attachments when confirming a profile switch to prevent confusing
behavior where attachments appear but aren't sent (their serverId was
tied to the old session).
Fixes Chainlit#2853
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Clear attachments when confirming a chat profile switch to avoid showing
files from the previous session that wouldn’t send. On confirm, reset
`attachmentsState` via `recoil` and clear the chat session. Fixes Chainlit#2853.
<sup>Written for commit a886879.
Summary will update on new commits.</sup>
<!-- End of auto-generated description by cubic. -->1 parent fa7bc09 commit d008d1e
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| |||
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| |||
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
| 77 | + | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
| |||
0 commit comments