repl: Refactor outputs for externalization (#16971)

Working on addressing large outputs, refactored as part of it.



https://github.com/user-attachments/assets/48ea576c-e13a-4d09-b45a-4baa41bf6f72



Release Notes:

- N/A
This commit is contained in:
Kyle Kelley
2024-08-29 12:41:03 -07:00
committed by GitHub
parent 89487772b0
commit 82ceb4c091
7 changed files with 359 additions and 202 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
use gpui::{AnyElement, FontWeight, WindowContext};
use gpui::{AnyElement, FontWeight, View, WindowContext};
use ui::{h_flex, prelude::*, v_flex, Label};
use crate::outputs::plain::TerminalOutput;
@@ -7,7 +7,7 @@ use crate::outputs::plain::TerminalOutput;
pub struct ErrorView {
pub ename: String,
pub evalue: String,
pub traceback: TerminalOutput,
pub traceback: View<TerminalOutput>,
}
impl ErrorView {
@@ -41,7 +41,7 @@ impl ErrorView {
.py(padding)
.border_l_1()
.border_color(theme.status().error_border)
.child(self.traceback.render(cx)),
.child(self.traceback.clone()),
)
.into_any_element(),
)