repl: Create better terminal output for REPL stdio (#15715)

Rely on our implementation of a GPUI powered alacritty terminal to
render stdout & stderr from the repl.

Release Notes:

- Fixed ANSI escape code and carriage return handling in repl outputs
(https://github.com/zed-industries/zed/issues/15640,
https://github.com/zed-industries/zed/issues/14855)


https://github.com/user-attachments/assets/bd3f1584-863a-4afa-b60b-9d222a830ff8

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
Kyle Kelley 2024-08-03 05:48:16 -07:00 committed by GitHub
parent b6a3556a32
commit 4528e9d582
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 168 additions and 398 deletions

29
Cargo.lock generated
View file

@ -80,30 +80,6 @@ dependencies = [
"memchr",
]
[[package]]
name = "alacritty_terminal"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6d1ea4484c8676f295307a4892d478c70ac8da1dbd8c7c10830a504b7f1022f"
dependencies = [
"base64 0.22.1",
"bitflags 2.6.0",
"home",
"libc",
"log",
"miow",
"parking_lot",
"piper",
"polling 3.3.2",
"regex-automata 0.4.5",
"rustix-openpty",
"serde",
"signal-hook",
"unicode-width",
"vte",
"windows-sys 0.48.0",
]
[[package]]
name = "alacritty_terminal"
version = "0.24.1-dev"
@ -8756,7 +8732,7 @@ dependencies = [
name = "repl"
version = "0.1.0"
dependencies = [
"alacritty_terminal 0.23.0",
"alacritty_terminal",
"anyhow",
"async-dispatcher",
"base64 0.22.1",
@ -8781,6 +8757,7 @@ dependencies = [
"serde_json",
"settings",
"smol",
"terminal",
"terminal_view",
"theme",
"tree-sitter-md",
@ -10875,7 +10852,7 @@ dependencies = [
name = "terminal"
version = "0.1.0"
dependencies = [
"alacritty_terminal 0.24.1-dev",
"alacritty_terminal",
"anyhow",
"collections",
"dirs 4.0.0",