Commit Graph

60 Commits

Author SHA1 Message Date
Matt Bierner
f272e51947 Convert esbuild scripts to modules
Planning to convert to typescript but want to do it in a few smaller steps
2025-08-07 20:04:44 -07:00
eleanorjboyd
12df889920 add right click menu support 2025-03-24 11:00:49 -07:00
Benjamin Pasero
d70596e87b Chat-related commands should not be available on web (without backend) (fix #241873) (#242954)
* Chat-related commands should not be available on web (without backend) (fix #241873)

* Remove notebook.cellOutput.addToChat from command palette

* Only show "Toggle agent mode" when chat enabled

* Show notebook.cellOutput.addToChat only when chat enabled

---------

Co-authored-by: Rob Lourens <roblourens@gmail.com>
2025-03-08 18:58:26 +01:00
Peng Lyu
a2e99f9b09 Include send output to chat in context menu (#240850) 2025-02-14 16:43:17 -08:00
Don Jayamanne
f4244472c7 Enable Serialize ipynb in worker (#239453) 2025-02-03 15:00:49 -08:00
Matt Bierner
4daea74ba9 Finalize paste api and drop api tweaks
Fixes #30066

This finalizes the documentPaste api. This api allows extensions to attach metadata on text copy and change how content is pasted. Some examples:

- Updating imports for pasted code
- Inserting an image as an attachment in notebooks
- Pasting files converts them to relative text paths
2025-01-07 14:57:16 -08:00
Don Jayamanne
0ca72abae2 Exprimental ipynb serialization setting (#230669) 2024-10-06 20:10:10 -07:00
Don Jayamanne
c4645ea0ec Restore changes to ipynb extension to serialize notebook in node worker for desktop (#228319)
* Revert usage of node worker due to failing web compilation

* Revert "Revert usage of node worker due to failing web compilation"

This reverts commit 3190f58c7e.

* Ensure node worker is used only in desktop bundle of ipynb extension

---------

Co-authored-by: Aaron Munger <aamunger@microsoft.com>
2024-09-12 23:56:34 +02:00
Don Jayamanne
102ff8db3f Revert usage of node worker due to failing web compilation (#228318)
* Revert usage of node worker due to failing web compilation

* fix linter error
2024-09-12 17:44:02 +09:00
Don Jayamanne
692656799a Safer way to determine whether node or browser 2024-09-09 12:07:43 +10:00
nojaf
366df5a69d Put worker behind setting 2024-09-04 09:15:29 +02:00
Peng Lyu
1b883b238e Fix #209158. Add Copy Output and Open Output in Text Editor to Scrollable text output context menu. (#216920)
* Fix #209158. Add Copy Output and Open Output in Text Editor to Scrollable text output context menu.

* Context menu should be triggered on container

* fix naming
2024-06-24 10:31:17 -07:00
Aaron Munger
608fe4f38c REPL/IW editor only using a notebook text model (#214356)
* registered editor with notebook model

* migrated some stuff from Interactive Editor

* display notebook and input box

* dont always filter kernels by view

* fix restore

* implement some commands

* working copy recovery/discarding

* fix tear down

* do not show last cell

* simplify notebookOptions creation

* reset text model on execute

* fix run button

* set tab name

* use differentiated notebooktype to determine kernel

* allow registering notebooks as other priorities

* conditionally register actions

* move registerAction back to top level

* fix input box message

* naming

* dont register extra repl commands for now

* use jupyter-notebook notebook type

* set scratchpad on backup recovery

* remove unused method
2024-06-14 15:12:29 -07:00
Matt Bierner
8c363b460b Merge and cleanup drop and paste proposal (#209591)
These two proposals overlap a lot and will be finalized together
2024-04-05 13:03:10 -07:00
Aaron Munger
472af59e08 more copy SVG fixes (#203937)
* re-add check for image for context menu, add selector for jupyter rendered SVGs

* consisent command name
2024-02-01 00:58:00 +01:00
Aaron Munger
7a56623b82 enable copying svg cell output (#203843)
* find the correct svg element and write it to the clipboard

* add context to allow context menu

* simplify selection

* better logs for error states
2024-01-31 06:18:37 -08:00
Aaron Munger
ed35abb942 fix copy output command without context (#203582)
* fix copy output without context

* better title

* clear output focus
2024-01-29 14:50:21 -08:00
Don Jayamanne
46cd720f83 Drop uuid pkg used to to generate notebook cell id (#198647) 2023-11-20 06:12:55 +01:00
易良
f6790fc1a0 feat: Add the logo of the built-in extension (#192999)
* feat: Add the logo of the built-in extension

* chore(extension): add compressed icon

---------

Co-authored-by: Martin Aeschlimann <martinae@microsoft.com>
2023-10-05 10:40:24 -07:00
Aaron Munger
e2d858ecb0 changed command title and name 2023-08-30 09:32:45 -07:00
Aaron Munger
7ebfc44283 removed formatting changes 2023-08-18 11:04:43 -07:00
Aaron Munger
bd60cc529c allow copying cell output images from context menu 2023-08-18 10:43:43 -07:00
Aaron Munger
c5d02335e1 json formatting 2023-06-20 15:02:32 -07:00
aamunger
e8b63b2f59 undo package format changes 2023-06-20 09:39:10 -07:00
aamunger
76c8654a95 use the builtin extension activation, temp disable failing tests 2023-06-16 11:55:07 -07:00
aamunger
71a4ab0f49 delegate editorInput ownership to EditorService. Activate ipynb extension for IW 2023-06-16 11:55:05 -07:00
Matt Bierner
2f07466dfc Allow dropping images into notebook cells to create attachments (#180256)
* Allow dropping images into notebook to create attachments

Fixes #157577

This allows you to drag and drop image files or image data into a notebook cell to create an attachment

As part of this work, I also updated the paste attachment logic so that we can:

- Create multiple attachments in a single operation
- Create attachments of other mime types besides `image/png`
- Create attachments for images that have spaces in the filename

* Also allow pasting uri lists to create attachments

* Fix indent

* Add id
2023-04-19 09:39:04 -07:00
Don Jayamanne
5efc2a498a Localize ipynb extension commands (#172272)
* Localize ipynb extension commands

* More updates
2023-01-26 22:24:22 +01:00
Matt Bierner
1ccc8d438b Enable pasting of image attachments by default for ipynb (#166058)
Fixes https://github.com/microsoft/vscode-jupyter/issues/11987
2022-11-10 16:46:31 -08:00
Joyce Er
7666d7acd4 Avoid * activating ipynb extension (#163325) 2022-10-11 10:53:07 -07:00
Peng Lyu
6e8bc02be4 Cell attachment cleanup tool improvement in diff editor (#161132)
* Move attachment out of custom metadata, prep for attachment clean up in diff editor

* recover attachments from dirty notebook document

* Allow metadata to be restored when content changed/reverted in nb diff editor
2022-09-16 14:12:53 -07:00
Michael Lively
42238bdaab notebook image cleaning automation (#159212)
* cache and cleaner complete, needs debounce

* minor renaming and reformatting

* bugfix for paste into new cell

* cleaning functionality complete

* refer to metadata as copy of current cell's

* check undef before reading from cache

* working state, pending cache restructure

* dots -> brackets

* pre-class refactor

* massive cleaner refactor

* cache typing, closed nb check, workspaceEdit only if metadata is changed

* undefined access fix

* proper debouncer

* get it up to work again

* no need to loop

* cell metadata uri parsing regression

* diagnostic

* Show diagnostics on document open

* transfer cache before file renames

* disable word wrap in notebook diff editor

* Avoid early notebook cell metadata deep clone

* No special case empty cell

* rename

* better naming

* Quick fix for invalid image attachment

* cleanup

* Add code action metadata

Co-authored-by: rebornix <penn.lv@gmail.com>
2022-09-09 11:32:10 -07:00
Matt Bierner
1895178d00 Finalize notebookWorkspaceEdit api (#159613)
Fixes #155245
2022-08-30 15:36:40 -07:00
Michael Lively
9225503c85 Support for pasting images into markdown notebook cells (#156847)
* dataflow support for updated metadata

* update cellAttachmentRenderer.ts to reflect metadata being a getter() inside MarkupCell

* document paste additions

* update condition to re-render cells, now includes metadata changes

* paste API working, debugging command added

* paste working with metadata. needs numbering, and cleaning upon delete

* paste screenshot works fully

* remove debugging command. Cleaning.

* notebook cells now re-render upon metadata changes

* changed name validity checking, remove unneeded function

* use _document for cell data, use snippet choice, dto fix

* return subscription, for loop, uri fix, alter metadata in-place, better snippet

* metadata fix, object.equals, fix cellAttRenderer metadata call

* added comment with source of encodeBase64

* gate mkdn image paste behind experimental setting
2022-08-08 13:57:49 -07:00
Michael Lively
2077ae5120 fix package.json/esbuild.js for files in publish 2022-07-26 12:19:27 -07:00
Peng Lyu
e6ad5f0a6f Update ipynb yarn lock (#156004) 2022-07-22 23:26:14 +02:00
Michael Lively
63142212a1 remove md-it dependency, added undefined check to attachments 2022-07-20 16:10:54 -07:00
Michael Lively
ff31f6b577 Update package.json 2022-07-20 15:01:40 -07:00
Michael Lively
3981a5804c added build stuff 2022-07-20 12:23:37 -07:00
Michael Lively
0fa857c9a1 okay now things are actually fresh and working 2022-07-20 12:23:24 -07:00
Matt Bierner
45304da73d Finalize NotebookEditor api proposal (#149767)
* Finalize NotebookEditor api proposal

Fixes #149271

This finalizes most parts of the NotebookEditor api proposal. I haven't removed the proposal entirely as there are still a few parts being left behind:

- The deprecated properties/functions
- A few contribution points such as `notebook/cell/executePrimary`

* remove extra quote
2022-05-23 23:27:17 +00:00
Matt Bierner
ff975bc211 Update list of enabled APIs (#149838)
We use `notebookWorkspaceEdit` even though it's not enforced
2022-05-18 10:39:40 -07:00
Matt Bierner
c9c5990e38 Adopt notebookWorkspaceEdit proposal internally (#149778)
This switches us to use the new `notebookWorkspaceEdit` proposal instead of `notebookEditorEdit`
2022-05-17 18:51:25 -07:00
Johannes
9530dca29d finalize notebookDocumentEvents-API, https://github.com/microsoft/vscode/issues/144662 2022-04-20 13:58:37 +02:00
Johannes
b1faab40de adopt tests to new notebook change event 2022-03-29 11:58:54 +02:00
Joyce Er
31c338e5fa Fix https://github.com/microsoft/vscode/issues/146022 2022-03-24 22:31:50 -07:00
aamunger
3b9868b099 include 'create notebook' in the command pallette 2022-03-09 13:39:16 -08:00
rebornix
998ee04a72 update nbformat typings 2022-03-01 12:59:58 -08:00
rebornix
3567a2f2bc Show codelens to ipynb json to open in notebook editor 2022-02-18 14:54:40 -08:00
rebornix
4b17d05668 re #142872. Contribute ipynb notebook to File -> New when no Jupyter extension enabled. 2022-02-16 11:42:45 -08:00