diff --git a/internal/ui/chat/tools.go b/internal/ui/chat/tools.go index 619aad5a04e59aa66fb9d190fa25686db07484f9..c0059010cc4efaeb0c883fbf2f050c785f19da2b 100644 --- a/internal/ui/chat/tools.go +++ b/internal/ui/chat/tools.go @@ -623,12 +623,13 @@ func toolOutputImageContent(sty *styles.Styles, data, mediaType string) string { dataSize := len(data) * 3 / 4 sizeStr := formatSize(dataSize) - loaded := sty.Base.Foreground(sty.Green).Render("Loaded") - arrow := sty.Base.Foreground(sty.GreenDark).Render("→") - typeStyled := sty.Base.Render(mediaType) - sizeStyled := sty.Subtle.Render(sizeStr) - - return sty.Tool.Body.Render(fmt.Sprintf("%s %s %s %s", loaded, arrow, typeStyled, sizeStyled)) + return sty.Tool.Body.Render(fmt.Sprintf( + "%s %s %s %s", + sty.Tool.ResourceLoadedText.String(), + sty.Tool.ResourceLoadedIndicator.String(), + sty.Base.Render(mediaType), + sty.Subtle.Render(sizeStr), + )) } // getDigits returns the number of digits in a number. diff --git a/internal/ui/styles/styles.go b/internal/ui/styles/styles.go index c0a15bc69ebd103adaa3d193645915184b64361a..c2c54156c6facc9fb5ccb32281a1631994e62bad 100644 --- a/internal/ui/styles/styles.go +++ b/internal/ui/styles/styles.go @@ -321,6 +321,12 @@ type Styles struct { MCPName lipgloss.Style // The mcp name MCPToolName lipgloss.Style // The mcp tool name MCPArrow lipgloss.Style // The mcp arrow icon + + // Images and external resources + ResourceLoadedText lipgloss.Style + ResourceLoadedIndicator lipgloss.Style + ResourceSize lipgloss.Style + MediaType lipgloss.Style } // Dialog styles @@ -1168,6 +1174,12 @@ func DefaultStyles() Styles { s.Tool.MCPToolName = base.Foreground(blueDark) s.Tool.MCPArrow = base.Foreground(blue).SetString(ArrowRightIcon) + // Loading indicators for images, skills + s.Tool.ResourceLoadedText = base.Foreground(green).SetString("Loaded") + s.Tool.ResourceLoadedIndicator = base.Foreground(greenDark).SetString(ArrowRightIcon) + s.Tool.MediaType = base + s.Tool.ResourceSize = base.Foreground(fgMuted) + // Buttons s.ButtonFocus = lipgloss.NewStyle().Foreground(white).Background(secondary) s.ButtonBlur = s.Base.Background(bgSubtle)