Commit 2b54aa4
Create chat message attachments via drag-and-drop from files, notebook cells (#248)
* dragndrop cells, files into chat as attachments
* use JSON comparison to detect duplicates
* use updated types INotebookAttachment, INotebookAttachmentCell
* use PathExt for filepaths manipulation
* add a notebook to attachmet opener registry
* ensure that attachment keys are unique
* replace Array.from().find() with direct iterator loop
* Fix attachment chips / pills component layout with padding and horizontal scroll
* update navigation top icon snapshot (1px differnece)
* merge cells from same notebook added via multiple drags into the same attachment
* fix input container drag hover effect during attachment addition
* fix input container and attachemtns vertical spacing and centering
* Implement nit suggestions
* update snapshot
* use @lumino/dragdrop Drag.Event instead of depreciated IDragEvent
* Update packages/jupyter-chat/src/widgets/chat-widget.tsx
Co-authored-by: David L. Qiu <[email protected]>
* remove unneeded type casting
* use DirListing.IContentsThunk type for file drop instead of any
* Update packages/jupyter-chat/src/widgets/chat-widget.tsx
Co-authored-by: David L. Qiu <[email protected]>
* Update packages/jupyter-chat/src/widgets/chat-widget.tsx
Co-authored-by: David L. Qiu <[email protected]>
* use JupyterLab interfaces for file and cell drag data instead of `any`
* use JupyterLab type guards and early returns in _findNotebookPath
* calculate `notebookPath` once, trust that all cells are from the same notebook
---------
Co-authored-by: David L. Qiu <[email protected]>1 parent f24e62f commit 2b54aa4
File tree
10 files changed
+421
-23
lines changed- packages
- jupyter-chat
- src
- components
- widgets
- style
- jupyterlab-chat-extension/src
- jupyterlab-chat/src
- ui-tests/tests
- unread.spec.ts-snapshots
10 files changed
+421
-23
lines changed| 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 | 13 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
| 22 | + | |
22 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
23 | 50 | | |
24 | 51 | | |
25 | 52 | | |
| |||
32 | 59 | | |
33 | 60 | | |
34 | 61 | | |
35 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
36 | 67 | | |
37 | 68 | | |
38 | 69 | | |
| |||
66 | 97 | | |
67 | 98 | | |
68 | 99 | | |
69 | | - | |
| 100 | + | |
70 | 101 | | |
71 | 102 | | |
72 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
| 322 | + | |
321 | 323 | | |
322 | | - | |
| 324 | + | |
323 | 325 | | |
324 | 326 | | |
325 | 327 | | |
326 | 328 | | |
327 | 329 | | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
328 | 361 | | |
329 | 362 | | |
330 | 363 | | |
| |||
333 | 366 | | |
334 | 367 | | |
335 | 368 | | |
| 369 | + | |
| 370 | + | |
336 | 371 | | |
337 | | - | |
| 372 | + | |
338 | 373 | | |
339 | 374 | | |
340 | 375 | | |
| |||
0 commit comments