Commit c4e6a99
committed
refactor: centralize error message formatting
Created src/utils/errors/formatSendError.ts as single source of truth
for SendMessageError formatting. Both RetryBarrier and ChatInputToasts
now use formatSendMessageError() helper, eliminating duplicate logic
for provider commands and error messages.
- formatSendMessageError() returns message + optional providerCommand
- RetryBarrier combines them: "message. Configure with command"
- ChatInputToasts uses providerCommand in solution section
- All provider-related strings now defined in one place1 parent fca8976 commit c4e6a99
File tree
3 files changed
+68
-24
lines changed- src
- components
- Messages/ChatBarrier
- utils/errors
3 files changed
+68
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
149 | | - | |
| 150 | + | |
| 151 | + | |
150 | 152 | | |
151 | 153 | | |
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
155 | | - | |
| 157 | + | |
156 | 158 | | |
157 | 159 | | |
158 | | - | |
| 160 | + | |
159 | 161 | | |
160 | | - | |
| 162 | + | |
161 | 163 | | |
| 164 | + | |
162 | 165 | | |
163 | | - | |
| 166 | + | |
| 167 | + | |
164 | 168 | | |
165 | 169 | | |
166 | 170 | | |
167 | 171 | | |
168 | | - | |
| 172 | + | |
169 | 173 | | |
170 | 174 | | |
171 | 175 | | |
172 | 176 | | |
173 | 177 | | |
174 | 178 | | |
175 | 179 | | |
| 180 | + | |
176 | 181 | | |
177 | | - | |
| 182 | + | |
| 183 | + | |
178 | 184 | | |
179 | 185 | | |
180 | 186 | | |
181 | 187 | | |
182 | | - | |
| 188 | + | |
183 | 189 | | |
184 | 190 | | |
185 | 191 | | |
186 | 192 | | |
187 | 193 | | |
188 | 194 | | |
189 | 195 | | |
| 196 | + | |
190 | 197 | | |
191 | 198 | | |
192 | | - | |
| 199 | + | |
| 200 | + | |
193 | 201 | | |
194 | 202 | | |
195 | 203 | | |
196 | 204 | | |
197 | | - | |
| 205 | + | |
198 | 206 | | |
| 207 | + | |
199 | 208 | | |
200 | 209 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
128 | 123 | | |
129 | 124 | | |
130 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 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 | + | |
0 commit comments