-
Notifications
You must be signed in to change notification settings - Fork 49
Closed
Labels
Description
Objective
Replace direct Lipgloss style usage in mcp_inspect_mcp.go with appropriate console package helpers for consistency.
Context
From discussion #11611: The mcp_inspect_mcp.go file directly uses styles.ServerName, styles.ServerType, and styles.ErrorBox.Render() instead of going through the console package abstraction layer.
Current Issues: Lines 54-57, 73 use direct Lipgloss styles.
Approach
-
Review current usage in
pkg/cli/mcp_inspect_mcp.go:- Identify all direct
styles.*usage (lines ~54-57, ~73) - Determine appropriate console package alternatives
- Identify all direct
-
Replace with console helpers:
- Use existing console formatters where applicable
- Consider creating new helpers if needed (e.g.,
FormatListItem()) - Maintain the same visual appearance
-
Test the output:
- Verify output looks the same in terminal
- Test non-TTY mode works correctly
- Ensure error boxes render properly
Files to Modify
- Update:
pkg/cli/mcp_inspect_mcp.go(lines ~54-57, ~73) - Consider:
pkg/console/*.go(if new helpers are needed)
Implementation Guidance
// Before (mcp_inspect_mcp.go:54-57):
serverNameStyled := styles.ServerName.Render(serverName)
serverTypeStyled := styles.ServerType.Render(fmt.Sprintf("(%s)", mcpConfig.Mode))
// After (option 1 - use existing formatter):
serverInfo := console.FormatInfoMessage(fmt.Sprintf("%s (%s)", serverName, mcpConfig.Mode))
// After (option 2 - create new helper if needed):
serverInfo := console.FormatListItem(fmt.Sprintf("%s (%s)", serverName, mcpConfig.Mode))// Before (mcp_inspect_mcp.go:73):
fmt.Fprintln(os.Stderr, styles.ErrorBox.Render(errorMsg))
// After:
fmt.Fprintln(os.Stderr, console.RenderErrorBox(errorMsg))Acceptance Criteria
- All direct
styles.*usage replaced with console helpers - Output appearance remains consistent
- TTY detection works properly
- No direct Lipgloss imports remain in CLI commands
- Code passes
make fmtandmake lint -
make agent-finishcompletes successfully
Priority
Phase 1: Critical Fix (1-2 hours estimated)
AI generated by Plan Command for discussion #11611
Reactions are currently unavailable