Commit a2313c8
committed
feat: Implement Clear All Conversations functionality
Adds a "Clear All Conversations" button to the Sidebar component.
Key changes:
- Sidebar: Adds UI button, confirmation dialog, and uses context
to check for active generation before allowing deletion. Navigates
to '/' on success. Updates useEffect dependency.
- Storage: Implements `clearAllConversations` method using Dexie
transaction. Modifies event system (CallbackConversationChanged, etc.)
to handle `string | null` for signalling "clear all" events.
Fixes `offConversationChanged` listener removal.
- AppContext: Updates event listener (`handleConversationChange`) to
accept `string | null` and refresh state correctly on `null`.
Fixes `exhaustive-deps` warning.1 parent c94085d commit a2313c8
File tree
6 files changed
+121
-18
lines changed- examples/server
- public
- webui
- src
- components
- utils
6 files changed
+121
-18
lines changedBinary file not shown.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
14 | 43 | | |
15 | 44 | | |
16 | 45 | | |
17 | 46 | | |
18 | 47 | | |
19 | 48 | | |
| 49 | + | |
20 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
21 | 62 | | |
22 | 63 | | |
23 | 64 | | |
24 | 65 | | |
25 | 66 | | |
26 | 67 | | |
27 | | - | |
| 68 | + | |
| 69 | + | |
28 | 70 | | |
29 | 71 | | |
30 | 72 | | |
| |||
41 | 83 | | |
42 | 84 | | |
43 | 85 | | |
44 | | - | |
| 86 | + | |
45 | 87 | | |
46 | 88 | | |
47 | 89 | | |
| |||
77 | 119 | | |
78 | 120 | | |
79 | 121 | | |
80 | | - | |
| 122 | + | |
| 123 | + | |
81 | 124 | | |
| 125 | + | |
| 126 | + | |
82 | 127 | | |
83 | 128 | | |
84 | 129 | | |
85 | 130 | | |
86 | 131 | | |
87 | 132 | | |
88 | 133 | | |
89 | | - | |
| 134 | + | |
90 | 135 | | |
91 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
92 | 158 | | |
93 | 159 | | |
94 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
94 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
95 | 101 | | |
96 | 102 | | |
97 | 103 | | |
98 | 104 | | |
99 | 105 | | |
100 | 106 | | |
101 | | - | |
| 107 | + | |
102 | 108 | | |
103 | 109 | | |
104 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
170 | 188 | | |
171 | 189 | | |
172 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
173 | 193 | | |
174 | 194 | | |
175 | 195 | | |
176 | 196 | | |
177 | | - | |
178 | | - | |
179 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
180 | 206 | | |
181 | | - | |
182 | 207 | | |
183 | 208 | | |
184 | 209 | | |
| |||
0 commit comments