Makes repl actions that are specific to running kernels only come up
after a session has been started at least once for the editor.
Release Notes:
- Only show session oriented `repl::` actions for editors after a
session has been created
Closes#18341
* [x] Remove "Change Kernel" Doc link from REPL menu
* [x] Remove chevron
* [x] Set a higher min width
* [x] Include the language along with the kernel name
Future PRs will address
* Add support for Python envs (#18291, #16757, #15563)
* Add support for Remote kernels
* Project settings support (#16898)
Release Notes:
- Added kernel picker for repl
---------
Co-authored-by: Nate Butler <iamnbutler@gmail.com>
* Implement `clone_on_split` to allow splitting a notebook into another
pane
* Switched to `tab_content` in `impl Item for NotebookEditor` to show
both the notebook name and an icon
* Added placeholder methods and TODOs for future work, such as saving,
reloading, and search functionality within the notebook editor.
* Started moving more core `Model` bits into `NotebookItem`, including
pulling the language of the notebook (which affects every code cell)
* Loaded notebook asynchronously using `fs`
Release Notes:
- N/A
---------
Co-authored-by: Mikayla <mikayla@zed.dev>
This is a behavior-preserving change, but lays the groundwork for
expanding selections when the cursor lands inside of a "replace" block.
Release Notes:
- N/A
This is the start of a notebook UI for Zed.
`🔔 Note: This won't be useable yet when it is merged! Read below. 🔔`
This is going to be behind a feature flag so that we can merge this
initial PR and then make follow up PRs. Release notes will be produced
in a future PR.
Minimum checklist for merging this:
* [x] All functionality behind the `notebooks` feature flag (with env
var opt out)
* [x] Open notebook files in the workspace
* [x] Remove the "Open Notebook" button from title bar
* [x] Incorporate text style refinements for cell editors
* [x] Rely on `nbformat` crate for parsing the notebook into our
in-memory format
* [x] Move notebook to a `gpui::List`
* [x] Hook up output rendering
Release Notes:
- N/A
---------
Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
This PR adds the ability for editor blocks to replace lines of text, but
does not yet use that feature anywhere. We'll update assistant patches
to use replace blocks on another branch:
https://github.com/zed-industries/zed/tree/assistant-patch-replace-blocks
Release Notes:
- N/A
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Richard Feldman <richard@zed.dev>
Co-authored-by: Marshall Bowers <marshall@zed.dev>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
This simplifies rendering of excerpt headers and footers, and removes
the need to store a `BlockDisposition` on these boundary blocks. It's a
step toward implementing "replace blocks", which we want to use in the
assistant panel.
We've also cleaned up the way heights are specified for headers and
footers and fixed some visual asymmetries between the "expand upward"
and "expand downward" buttons.
Release Notes:
- N/A
---------
Co-authored-by: Richard <richard@zed.dev>
Fixes https://github.com/zed-industries/zed/issues/5291
Release Notes:
- Fixed a bug where the 'toggle comments' command didn't use the right
comment syntax in JSX and TSX elements.
---------
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
- Implement restart kernel functionality
- Clean up shutdown process to properly drop messaging and exit status
tasks
- Refactor kernel state handling for better consistency
Closes#16037
Release Notes:
- repl: Added restart kernel action
- repl: Fixed issue with shutting down kernels that are in a failure
state
This PR is a small refactor to remove the leading `_` for some free
variables, as this unintentionally marks them as unused to the compiler.
While the fields on the struct _are_ unused, the free variables should
participate in usage tracking, as we want to make sure they get stored
on the struct.
Release Notes:
- N/A
For future reference: WIP branch of copy/pasting a mixture of images and
text: https://github.com/zed-industries/zed/tree/copy-paste-images -
we'll come back to that one after landing this one.
Release Notes:
- You can now paste images into the Assistant Panel to include them as
context. Currently works only on Mac, and with Anthropic models. Future
support is planned for more models, operating systems, and image
clipboard operations.
---------
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Jason <jason@zed.dev>
Co-authored-by: Kyle <kylek@zed.dev>
Fixes#15923
Release Notes:
- Assistant workflow steps can now be applied and reverted directly from
within the assistant panel.
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Antonio <antonio@zed.dev>
<img width="862" alt="image"
src="https://github.com/user-attachments/assets/ae8c479d-d9f9-4c46-bb1a-be411ab07876">
Release Notes:
- Added additional context about available to kernel sessions
- Fixed bug in kernelspec launch choosing first available kernel
matching the language rather than selected name
---------
Co-authored-by: Jason <jason@zed.dev>
Release Notes:
- Added `ctrl-alt-enter` keybinding for `repl::RunInPlace`
(`ctrl-option-enter` on MacOS). Keeps your screen position and cursor in
place when running any block.
This PR adds support for animated images. The image requires a id for it
to actually animate across frames.
Currently it only has support for `GIF`, I tried adding decoding a
animated `WebP` into frames but it seems to error. This issue in the
image crate seems to document this
https://github.com/image-rs/image/issues/2263.
Not sure if this is the best way or the desired way for animated images
to work in GPUI but I would really like support for animated images.
Open to feedback.
Example Video:
https://github.com/zed-industries/zed/assets/76515905/011f790f-d070-499b-96c9-bbff141fb002
Closes https://github.com/zed-industries/zed/issues/9993
Release Notes:
- N/A
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Nathan <nathan@zed.dev>
This adds support for detecting line comments in the
[Jupytext](https://jupytext.readthedocs.io/) format. When line comments
such as `# %%` is present, invoking `repl: run` will evaluate the code
between these line comments as a unit.
/cc @rgbkrk
```py
# %%
# This is my first block
print(1)
print(2)
# %%
# This is my second block
print(3)
```
Release Notes:
- N/A
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Thorsten <thorsten@zed.dev>
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>