Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f03db93

Browse files
authored
fix(markdown): add dim attribute to code block style for better visibility (tailcallhq#752)
1 parent 1068fa4 commit f03db93

4 files changed

Lines changed: 3 additions & 5 deletions

File tree

crates/forge_display/src/markdown.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ impl MarkdownFormat {
1919
let compound_style = CompoundStyle::new(Some(Color::Cyan), None, Attribute::Bold.into());
2020
skin.inline_code = compound_style.clone();
2121

22-
let codeblock_style = CompoundStyle::new(Some(Color::Cyan), None, Default::default());
22+
let mut codeblock_style = CompoundStyle::new(None, None, Default::default());
23+
codeblock_style.add_attr(Attribute::Dim);
24+
2325
skin.code_block = LineStyle::new(codeblock_style, Default::default());
2426

2527
Self { skin, max_consecutive_newlines: 2 }

crates/forge_domain/src/snapshots/forge_domain__tool_call_record__tests__display_successful_call.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@ snapshot_kind: text
55
---
66
---
77
tool_name: fs_read
8-
status: Success
98
---
109
Contents of the file

crates/forge_domain/src/snapshots/forge_domain__tool_call_record__tests__display_with_special_chars.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@ snapshot_kind: text
55
---
66
---
77
tool_name: test_tool
8-
status: Success
98
---
109
Result with <tags> & special "characters"

crates/forge_domain/src/tool_call_record.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ impl Display for ToolCallRecord {
2323
writeln!(f, "tool_name: {tool_name}")?;
2424
if self.tool_result.is_error {
2525
writeln!(f, "status: Failure")?;
26-
} else {
27-
writeln!(f, "status: Success")?;
2826
}
2927
writeln!(f, "---")?;
3028

0 commit comments

Comments
 (0)