Detailed changes
@@ -99,7 +99,7 @@ func formatTokensAndCost(t *styles.Styles, tokens, contextWindow int64, cost flo
formattedPercentage := t.Muted.Render(fmt.Sprintf("%d%%", int(percentage)))
formattedTokens = fmt.Sprintf("%s %s", formattedPercentage, formattedTokens)
if percentage > 80 {
- formattedTokens = fmt.Sprintf("%s %s", styles.WarningIcon, formattedTokens)
+ formattedTokens = fmt.Sprintf("%s %s", styles.LSPWarningIcon, formattedTokens)
}
return fmt.Sprintf("%s %s", formattedTokens, formattedCost)
@@ -256,7 +256,7 @@ func (m *APIKeyInput) inputView() string {
ts := t.TextInput
ts.Focused.Prompt = ts.Focused.Prompt.Foreground(charmtone.Cherry)
- m.input.Prompt = styles.ErrorIcon + " "
+ m.input.Prompt = styles.LSPErrorIcon + " "
m.input.SetStyles(ts)
m.input.Focus()
}
@@ -114,7 +114,7 @@ func renderHeaderDetails(
}
if errorCount > 0 {
- parts = append(parts, t.LSP.ErrorDiagnostic.Render(fmt.Sprintf("%s%d", styles.ErrorIcon, errorCount)))
+ parts = append(parts, t.LSP.ErrorDiagnostic.Render(fmt.Sprintf("%s%d", styles.LSPErrorIcon, errorCount)))
}
agentCfg := config.Get().Agents[config.AgentCoder]
@@ -62,16 +62,16 @@ func (m *UI) lspInfo(width, maxItems int, isSection bool) string {
func lspDiagnostics(t *styles.Styles, diagnostics map[protocol.DiagnosticSeverity]int) string {
errs := []string{}
if diagnostics[protocol.SeverityError] > 0 {
- errs = append(errs, t.LSP.ErrorDiagnostic.Render(fmt.Sprintf("%s %d", styles.ErrorIcon, diagnostics[protocol.SeverityError])))
+ errs = append(errs, t.LSP.ErrorDiagnostic.Render(fmt.Sprintf("%s%d", styles.LSPErrorIcon, diagnostics[protocol.SeverityError])))
}
if diagnostics[protocol.SeverityWarning] > 0 {
- errs = append(errs, t.LSP.WarningDiagnostic.Render(fmt.Sprintf("%s %d", styles.WarningIcon, diagnostics[protocol.SeverityWarning])))
+ errs = append(errs, t.LSP.WarningDiagnostic.Render(fmt.Sprintf("%s%d", styles.LSPWarningIcon, diagnostics[protocol.SeverityWarning])))
}
if diagnostics[protocol.SeverityHint] > 0 {
- errs = append(errs, t.LSP.HintDiagnostic.Render(fmt.Sprintf("%s %d", styles.HintIcon, diagnostics[protocol.SeverityHint])))
+ errs = append(errs, t.LSP.HintDiagnostic.Render(fmt.Sprintf("%s%d", styles.LSPHintIcon, diagnostics[protocol.SeverityHint])))
}
if diagnostics[protocol.SeverityInformation] > 0 {
- errs = append(errs, t.LSP.InfoDiagnostic.Render(fmt.Sprintf("%s %d", styles.InfoIcon, diagnostics[protocol.SeverityInformation])))
+ errs = append(errs, t.LSP.InfoDiagnostic.Render(fmt.Sprintf("%s%d", styles.LSPInfoIcon, diagnostics[protocol.SeverityInformation])))
}
return strings.Join(errs, " ")
}
@@ -18,10 +18,6 @@ import (
const (
CheckIcon string = "✓"
- ErrorIcon string = "×"
- WarningIcon string = "⚠"
- InfoIcon string = "ⓘ"
- HintIcon string = "∵"
SpinnerIcon string = "⋯"
LoadingIcon string = "⟳"
ModelIcon string = "◇"
@@ -49,6 +45,11 @@ const (
ScrollbarThumb string = "┃"
ScrollbarTrack string = "│"
+
+ LSPErrorIcon string = "E"
+ LSPWarningIcon string = "W"
+ LSPInfoIcon string = "I"
+ LSPHintIcon string = "H"
)
const (