MCPcopy Create free account
hub / github.com/codeaashu/claude-code / calculateOptimalLeftWidth

Function calculateOptimalLeftWidth

src/utils/logoV2Utils.ts:80–92  ·  view source on GitHub ↗
(
  welcomeMessage: string,
  truncatedCwd: string,
  modelLine: string,
)

Source from the content-addressed store, hash-verified

78 * Calculates optimal left panel width based on content
79 */
80export function calculateOptimalLeftWidth(
81 welcomeMessage: string,
82 truncatedCwd: string,
83 modelLine: string,
84): number {
85 const contentWidth = Math.max(
86 stringWidth(welcomeMessage),
87 stringWidth(truncatedCwd),
88 stringWidth(modelLine),
89 20, // Minimum for clawd art
90 )
91 return Math.min(contentWidth + 4, MAX_LEFT_WIDTH) // +4 for padding
92}
93
94/**
95 * Formats the welcome message based on username

Callers 1

LogoV2Function · 0.85

Calls 1

maxMethod · 0.80

Tested by

no test coverage detected