Commit 79d66da
authored
Rework selection inclusion; new Send button UX (#905)
* remove include selection checkbox
* add new selection types to backend
* add new TooltippedButton component
* add `prompt` field to `HumanChatMessage`
This allows chat handlers to distinguish between the message prompt,
selection, and body (prompt + selection).
- The backend builds the message body from each `ChatRequest`, which
consists of a `prompt` and a `selection`.
- The body will be used by most chat handlers, and will be used to
render the messages in the UI.
- `/fix` uses `prompt` and `selection` separately as it does additional
processing on each component. `/fix` does not use `body`.
* add new include selection icon
* implement new send button
* pre-commit
* fix unit tests
* pre-commit
* edit cell selection tooltip to indicate output is not included
* allow Enter to open dropdown menu
* fix double-send bug when using keyboard
* re-enable auto focus for first item1 parent fb88723 commit 79d66da
File tree
14 files changed
+355
-112
lines changed- packages/jupyter-ai
- jupyter_ai
- chat_handlers
- tests
- src
- components
- chat-input
- mui-extras
- contexts
- style/icons
14 files changed
+355
-112
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
250 | 254 | | |
251 | 255 | | |
252 | 256 | | |
253 | 257 | | |
254 | 258 | | |
255 | | - | |
| 259 | + | |
| 260 | + | |
256 | 261 | | |
257 | 262 | | |
258 | 263 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
17 | 27 | | |
18 | 28 | | |
19 | 29 | | |
20 | 30 | | |
21 | 31 | | |
22 | 32 | | |
23 | | - | |
| 33 | + | |
24 | 34 | | |
25 | 35 | | |
26 | 36 | | |
27 | 37 | | |
28 | 38 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
| |||
88 | 94 | | |
89 | 95 | | |
90 | 96 | | |
91 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
92 | 101 | | |
| 102 | + | |
| 103 | + | |
93 | 104 | | |
94 | 105 | | |
95 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
93 | 99 | | |
94 | 100 | | |
95 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | 9 | | |
13 | 10 | | |
14 | 11 | | |
| |||
27 | 24 | | |
28 | 25 | | |
29 | 26 | | |
| 27 | + | |
30 | 28 | | |
31 | 29 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 30 | + | |
37 | 31 | | |
38 | | - | |
39 | 32 | | |
40 | 33 | | |
41 | 34 | | |
| |||
105 | 98 | | |
106 | 99 | | |
107 | 100 | | |
| 101 | + | |
108 | 102 | | |
109 | 103 | | |
110 | 104 | | |
| |||
159 | 153 | | |
160 | 154 | | |
161 | 155 | | |
162 | | - | |
| 156 | + | |
163 | 157 | | |
164 | 158 | | |
165 | 159 | | |
166 | 160 | | |
167 | | - | |
| 161 | + | |
168 | 162 | | |
169 | 163 | | |
170 | 164 | | |
171 | | - | |
| 165 | + | |
172 | 166 | | |
173 | 167 | | |
174 | 168 | | |
175 | 169 | | |
176 | 170 | | |
177 | | - | |
| 171 | + | |
178 | 172 | | |
179 | | - | |
| 173 | + | |
180 | 174 | | |
181 | 175 | | |
182 | 176 | | |
| |||
190 | 184 | | |
191 | 185 | | |
192 | 186 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
197 | 193 | | |
198 | 194 | | |
199 | 195 | | |
200 | 196 | | |
201 | 197 | | |
202 | 198 | | |
203 | | - | |
204 | | - | |
205 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
206 | 202 | | |
207 | 203 | | |
208 | 204 | | |
209 | 205 | | |
210 | | - | |
211 | | - | |
| 206 | + | |
| 207 | + | |
212 | 208 | | |
213 | 209 | | |
214 | 210 | | |
| |||
244 | 240 | | |
245 | 241 | | |
246 | 242 | | |
247 | | - | |
| 243 | + | |
248 | 244 | | |
249 | 245 | | |
250 | 246 | | |
| |||
258 | 254 | | |
259 | 255 | | |
260 | 256 | | |
261 | | - | |
| 257 | + | |
262 | 258 | | |
263 | | - | |
| 259 | + | |
264 | 260 | | |
265 | 261 | | |
266 | 262 | | |
| |||
322 | 318 | | |
323 | 319 | | |
324 | 320 | | |
325 | | - | |
| 321 | + | |
326 | 322 | | |
327 | 323 | | |
328 | 324 | | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | 325 | | |
343 | 326 | | |
344 | 327 | | |
0 commit comments