Skip to content

The open source coding agent.

TypeScript

fix(tui): markdown wrapping off sometimes

adamdottv32d5db4f0a0b
diff --git a/packages/tui/internal/util/file.go b/packages/tui/internal/util/file.go
index 2c0987dcfb9..b079f24cdc4 100644
--- a/packages/tui/internal/util/file.go
+++ b/packages/tui/internal/util/file.go
@@ -83,7 +83,7 @@ func Extension(path string) string {
}
func ToMarkdown(content string, width int, backgroundColor compat.AdaptiveColor) string {
- r := styles.GetMarkdownRenderer(width-7, backgroundColor)
+ r := styles.GetMarkdownRenderer(width-6, backgroundColor)
content = strings.ReplaceAll(content, RootPath+"/", "")
rendered, _ := r.Render(content)
lines := strings.Split(rendered, "\n")